2 THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
3 SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO
4 END-USERS, AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN, GRANTS A
5 ROYALTY-FREE, PERPETUAL LICENSE TO SUCH END-USERS FOR USE BY SUCH END-USERS
6 IN USING, DISPLAYING, AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS
7 SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE
8 FREE PURPOSES. IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE
9 CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES. THE END-USER UNDERSTANDS
10 AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE.
11 COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
23 char *d_strdup(char *str)
27 a = d_malloc(strlen(str) + 1);
34 #if !defined __ENV_LINUX__ && !defined __ENV_DJGPP__
35 // string compare without regard to case
37 int stricmp( char *s1, char *s2 )
40 if ( tolower(*s1) != tolower(*s2) ) return 1;
44 if ( *s1 || *s2 ) return 1;
48 int strnicmp( char *s1, char *s2, int n )
50 while( *s1 && *s2 && n) {
51 if ( tolower(*s1) != tolower(*s2) ) return 1;
64 void strlwr( char *s1 )
72 void strupr( char *s1 )
82 void strrev( char *s1 )
87 s2 = (char *)d_malloc(strlen(s1) + 1);
90 for (i = 0; i < l; i++)
95 void _splitpath(char *name, char *drive, char *path, char *base, char *ext)
113 s = strrchr(p, '\\');
149 char drive[10], path[50], name[16], ext[5];
151 drive[0] = path[0] = name[0] = ext[0] = '\0';
152 _splitpath("f:\\tmp\\x.out", drive, path, name, ext);
153 drive[0] = path[0] = name[0] = ext[0] = '\0';
154 _splitpath("tmp\\x.out", drive, path, name, ext);
155 drive[0] = path[0] = name[0] = ext[0] = '\0';
156 _splitpath("f:\\tmp\\a.out", NULL, NULL, name, NULL);
157 drive[0] = path[0] = name[0] = ext[0] = '\0';
158 _splitpath("tmp\\*.dem", drive, path, NULL, NULL);
159 drive[0] = path[0] = name[0] = ext[0] = '\0';
160 _splitpath(".\\tmp\\*.dem", drive, path, NULL, NULL);