~ubuntu-branches/ubuntu/dapper/pantomime/dapper

« back to all changes in this revision

Viewing changes to Source/WINDOWS_1252.m

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2004-11-20 00:25:28 UTC
  • mfrom: (2.1.1 warty)
  • Revision ID: james.westby@ubuntu.com-20041120002528-igjuwyao6gubpig1
Tags: 1.1.2-3
Build depend / depend on libgnustep-base-1.10-dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
 
2
 
#import <Pantomime/WINDOWS_1252.h>
3
 
 
4
 
static struct
5
 
{
6
 
        int code;
7
 
        unichar value;
8
 
} codes[]={
 
1
#include <Pantomime/WINDOWS_1252.h>
 
2
 
 
3
static struct charset_code code_table[]={
9
4
{0x20,0x0020}, {0x21,0x0021}, {0x22,0x0022}, {0x23,0x0023}, {0x24,0x0024}, 
10
5
{0x25,0x0025}, {0x26,0x0026}, {0x27,0x0027}, {0x28,0x0028}, {0x29,0x0029}, 
11
6
{0x2a,0x002a}, {0x2b,0x002b}, {0x2c,0x002c}, {0x2d,0x002d}, {0x2e,0x002e}, 
55
50
 
56
51
- (id) init
57
52
{
58
 
        int i;
59
 
        unichar value[2];
60
 
 
61
 
        self = [super init];
62
 
        value[1] = 0;
63
 
 
64
 
        for (i=0;i<sizeof(codes)/sizeof(codes[0]);i++)
65
 
        {
66
 
                value[0]=codes[i].value;
67
 
                [dict setObject: [NSString stringWithCharacters: value length: 1]
68
 
                         forKey: [NSString stringWithFormat: @"=%02X", codes[i].code]];
69
 
        }
70
 
 
71
 
 
72
 
        return self;
 
53
        return [super initWithCodeCharTable: code_table  length: sizeof(code_table)/sizeof(code_table[0])];
73
54
}
74
55
 
75
56
- (NSString *) name
76
57
{
77
 
  return @"windows-1252";
 
58
        return @"windows-1252";
78
59
}
79
60
 
80
61
@end