Mercurial > audlegacy
annotate src/libguess/greek_impl.c @ 4120:51641a875a01
revise setting mask on windows
author | Tomasz Mon <desowin@gmail.com> |
---|---|
date | Tue, 25 Dec 2007 19:03:38 +0100 |
parents | ce2d24746c09 |
children |
rev | line source |
---|---|
3215
ce2d24746c09
Add support for greek and hebrew character set detection.
William Pitcock <nenolod@atheme-project.org>
parents:
diff
changeset
|
1 static const char *_guess_gr(const unsigned char *ptr, int size) |
ce2d24746c09
Add support for greek and hebrew character set detection.
William Pitcock <nenolod@atheme-project.org>
parents:
diff
changeset
|
2 { |
ce2d24746c09
Add support for greek and hebrew character set detection.
William Pitcock <nenolod@atheme-project.org>
parents:
diff
changeset
|
3 int i; |
ce2d24746c09
Add support for greek and hebrew character set detection.
William Pitcock <nenolod@atheme-project.org>
parents:
diff
changeset
|
4 |
ce2d24746c09
Add support for greek and hebrew character set detection.
William Pitcock <nenolod@atheme-project.org>
parents:
diff
changeset
|
5 for (i = 0; i < size; i++) |
ce2d24746c09
Add support for greek and hebrew character set detection.
William Pitcock <nenolod@atheme-project.org>
parents:
diff
changeset
|
6 { |
ce2d24746c09
Add support for greek and hebrew character set detection.
William Pitcock <nenolod@atheme-project.org>
parents:
diff
changeset
|
7 if (ptr[i] == 0x80 || |
ce2d24746c09
Add support for greek and hebrew character set detection.
William Pitcock <nenolod@atheme-project.org>
parents:
diff
changeset
|
8 (ptr[i] >= 0x82 && ptr[i] <= 0x87) || |
ce2d24746c09
Add support for greek and hebrew character set detection.
William Pitcock <nenolod@atheme-project.org>
parents:
diff
changeset
|
9 ptr[i] == 0x89 || ptr[i] == 0x8B || |
ce2d24746c09
Add support for greek and hebrew character set detection.
William Pitcock <nenolod@atheme-project.org>
parents:
diff
changeset
|
10 (ptr[i] >= 0x91 && ptr[i] <= 0x97) || |
ce2d24746c09
Add support for greek and hebrew character set detection.
William Pitcock <nenolod@atheme-project.org>
parents:
diff
changeset
|
11 ptr[i] == 0x99 || ptr[i] == 0x9B || ptr[i] == 0xA4 || |
ce2d24746c09
Add support for greek and hebrew character set detection.
William Pitcock <nenolod@atheme-project.org>
parents:
diff
changeset
|
12 ptr[i] == 0xA5 || ptr[i] == 0xAE) |
ce2d24746c09
Add support for greek and hebrew character set detection.
William Pitcock <nenolod@atheme-project.org>
parents:
diff
changeset
|
13 return "CP1253"; |
ce2d24746c09
Add support for greek and hebrew character set detection.
William Pitcock <nenolod@atheme-project.org>
parents:
diff
changeset
|
14 } |
ce2d24746c09
Add support for greek and hebrew character set detection.
William Pitcock <nenolod@atheme-project.org>
parents:
diff
changeset
|
15 |
ce2d24746c09
Add support for greek and hebrew character set detection.
William Pitcock <nenolod@atheme-project.org>
parents:
diff
changeset
|
16 return "ISO-8859-7"; |
ce2d24746c09
Add support for greek and hebrew character set detection.
William Pitcock <nenolod@atheme-project.org>
parents:
diff
changeset
|
17 } |
ce2d24746c09
Add support for greek and hebrew character set detection.
William Pitcock <nenolod@atheme-project.org>
parents:
diff
changeset
|
18 |
ce2d24746c09
Add support for greek and hebrew character set detection.
William Pitcock <nenolod@atheme-project.org>
parents:
diff
changeset
|
19 const char *guess_gr(const char *ptr, int size) |
ce2d24746c09
Add support for greek and hebrew character set detection.
William Pitcock <nenolod@atheme-project.org>
parents:
diff
changeset
|
20 { |
ce2d24746c09
Add support for greek and hebrew character set detection.
William Pitcock <nenolod@atheme-project.org>
parents:
diff
changeset
|
21 return _guess_gr((const unsigned char *) ptr, size); |
ce2d24746c09
Add support for greek and hebrew character set detection.
William Pitcock <nenolod@atheme-project.org>
parents:
diff
changeset
|
22 } |