~drgeo-developers/drgeo/trunk

« back to all changes in this revision

Viewing changes to VMs/iPad/source/iOS/plugins/FT2Plugin/macFileNameBits.c

  • Committer: Hilaire Fernandes
  • Date: 2012-01-27 21:15:40 UTC
  • Revision ID: hilaire.fernandes@gmail.com-20120127211540-912spf97bhpx6mve
Initial additions

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 *  macFileNameBits.c
 
3
 *  FT2Plugin support
 
4
 *
 
5
 *  Created by John M McIntosh on 21/11/05.
 
6
 * Feb 15th, 2006, use sqFilenameFromString
 
7
 *
 
8
 */
 
9
#include "sqVirtualMachine.h" 
 
10
 
 
11
extern struct VirtualMachine * interpreterProxy;
 
12
 
 
13
void            sqFilenameFromString(char *buffer,long fileIndex, long fileLength) {
 
14
        interpreterProxy->ioFilenamefromStringofLengthresolveAliases(buffer,fileIndex, fileLength, 1);
 
15
}
 
16
 
 
17
void fetchPreferences() {}
 
18
 
 
19
/* int IsImageName(char *name) {
 
20
        return 1;
 
21
};
 
22
 
 
23
int isSystem9_0_or_better(void)
 
24
{
 
25
        return 1;
 
26
}
 
27
 
 
28
CFStringEncoding gCurrentVMEncoding=kCFStringEncodingMacRoman;
 
29
 
 
30
void fetchPreferences() {
 
31
        CFBundleRef  myBundle;
 
32
        CFDictionaryRef myDictionary;
 
33
        CFStringRef    SqueakVMEncodingType;
 
34
        char        encoding[256];
 
35
 
 
36
        myBundle = CFBundleGetMainBundle();
 
37
        myDictionary = CFBundleGetInfoDictionary(myBundle);
 
38
        SqueakVMEncodingType = CFDictionaryGetValue(myDictionary, CFSTR("SqueakEncodingType"));
 
39
        if (SqueakVMEncodingType) 
 
40
                CFStringGetCString (SqueakVMEncodingType, encoding, 256, kCFStringEncodingMacRoman);
 
41
        else
 
42
                *encoding = 0x00;
 
43
 
 
44
        gCurrentVMEncoding = kCFStringEncodingMacRoman;
 
45
        if (strcmp("UTF-8",encoding) == 0)
 
46
          gCurrentVMEncoding = kCFStringEncodingUTF8;
 
47
        if (strcmp("ShiftJIS",encoding) == 0)
 
48
          gCurrentVMEncoding = kCFStringEncodingShiftJIS;
 
49
}
 
50
*/
 
 
b'\\ No newline at end of file'