static char Copyright[] = "Copyright Yngvi Sigurjonsson (yngvi@hafro.is), 1993"; #include #include #include #include #include #include #include #include "prototypes.h" #include "regfunc.h" #include "windows.h" /* Funny to divide them between user and kernel. */ /* KERNEL.89 */ LPSTR lstrcat(LPSTR target,LPCSTR source) { #ifdef DEBUG_STRING fprintf(stderr,"lstrcat(%s,%s)\n",target,source); #endif return strcat(target,source); } /* USER.430 */ INT lstrcmp(LPCSTR str1,LPCSTR str2) { return strcmp(str1,str2); } /* USER.471 */ INT lstrcmpi(LPCSTR str1,LPCSTR str2) { int i; i=0; while((toupper(str1[i])==toupper(str2[i]))&&(str1[i]!=0)) i++; return toupper(str1[i])-toupper(str2[i]); } /* KERNEL.88 */ LPSTR lstrcpy(LPSTR target,LPCSTR source) { return strcpy(target,source); } /* KERNEL.353 */ LPSTR lstrcpyn(LPSTR target,LPCSTR source,int n) { return strncpy(target,source,n); } /* KERNEL.90 */ INT lstrlen(LPCSTR str) { return strlen(str); } /* AnsiUpper USER.431 */ char FAR* AnsiUpper(char FAR* strOrChar) { /* I am not sure if the locale stuff works with toupper, but then again I am not sure if the Linux libc locale stuffs works at all */ /* if((int)strOrChar<256) return (char FAR*) toupper((int)strOrChar); else { int i; for(i=0;(i<65536) && strOrChar[i];i++) strOrChar[i]=toupper(strOrChar[i]); return strOrChar; } */ int i; for (i = 0; (i < 65536 && strOrChar[i]);i++) strOrChar[i] = (strOrChar[i] >= 'a' && strOrChar[i] <= 'z') ? strOrChar[i] - ('a' - 'A') : strOrChar[i]; return strOrChar; } /* AnsiLower USER.432 */ char FAR* AnsiLower(char FAR* strOrChar) { /* I am not sure if the locale stuff works with tolower, but then again I am not sure if the Linux libc locale stuffs works at all */ /* if((int)strOrChar<256) return (char FAR*)tolower((int)strOrChar); else { int i; for(i=0;(i<65536)&&strOrChar[i];i++) strOrChar[i]=tolower(strOrChar[i]); return strOrChar; }*/ int i; for (i = 0; (i < 65536 && strOrChar[i]);i++) strOrChar[i] = (strOrChar[i] >= 'A' && strOrChar[i] <= 'Z') ? strOrChar[i] + ('a' - 'A') : strOrChar[i]; } /* AnsiUpperBuff USER.437 */ UINT AnsiUpperBuff(LPSTR str,UINT len) { int i; len=(len==0)?65536:len; for(i=0;i