mac docu fixes, mac launcher backport from sauer, etc

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@3372 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
core-code
2008-11-01 17:11:55 +00:00
parent baf375b83c
commit fe13d43a59
13 changed files with 655 additions and 356 deletions
+15 -3
View File
@@ -1,8 +1,8 @@
#import <Cocoa/Cocoa.h>
#define _MAXDEFSTR 260
#define MAXSTRLEN 260
inline char *s_strncpy(char *d, const char *s, size_t m) { strncpy(d,s,m); d[m-1] = 0; return d; };
inline char *s_strcat(char *d, const char *s) { size_t n = strlen(d); return s_strncpy(d+n,s,_MAXDEFSTR-n); };
inline char *s_strcat(char *d, const char *s) { size_t n = strlen(d); return s_strncpy(d+n,s,MAXSTRLEN-n); };
void mac_pasteconsole(char *commandbuf)
{
@@ -13,4 +13,16 @@ void mac_pasteconsole(char *commandbuf)
if (contents != nil)
s_strcat(commandbuf, [contents lossyCString]);
}
}
}
/*
* 0x1030 = 10.3
* 0x1040 = 10.4
* 0x1050 = 10.5
*/
int mac_osversion()
{
SInt32 MacVersion;
Gestalt(gestaltSystemVersion, &MacVersion);
return MacVersion;
}