dxx-rebirth/include/strutil.h
2008-07-01 11:15:52 +00:00

47 lines
1.6 KiB
C

/*
THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO
END-USERS, AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN, GRANTS A
ROYALTY-FREE, PERPETUAL LICENSE TO SUCH END-USERS FOR USE BY SUCH END-USERS
IN USING, DISPLAYING, AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS
SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE
FREE PURPOSES. IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE
CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES. THE END-USER UNDERSTANDS
AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE.
COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
*/
#ifndef _STRUTILS_H
#define _STRUTILS_H
#if defined(macintosh)
extern void snprintf(char *out_string, int size, char * format, ... );
extern int stricmp(const char *str1, const char *str2);
extern int strnicmp(const char *str1, const char *str2, int n);
#elif !defined(_WIN32)
# include <string.h>
# define stricmp(a,b) strcasecmp(a,b)
# define strnicmp(a,b,c) strncasecmp(a,b,c)
#endif
#ifndef _WIN32
#ifndef __DJGPP__
void strupr( char *s1 );
void strlwr( char *s1 );
#endif
void strrev( char *s1 );
#endif
// remove extension from filename, doesn't work with paths.
void removeext(const char *filename, char *out);
//give a filename a new extension, doesn't work with paths.
extern void change_filename_extension( char *dest, char *src, char *new_ext );
#if !(defined(_WIN32))
void _splitpath(char *name, char *drive, char *path, char *base, char *ext);
#endif
#endif /* _STRUTILS_H */