Move strlwr() into shared.c and don't link main.c into the refresher

This commit is contained in:
Yamagi Burmeister 2012-04-19 13:22:50 +00:00
parent a7aa1e93c0
commit 179ec5538e
4 changed files with 18 additions and 16 deletions

View file

@ -385,7 +385,6 @@ OPENGL_OBJS_ = \
src/common/shared/shared.o \
src/unix/glob.o \
src/unix/hunk.o \
src/unix/main.o \
src/unix/qgl.o
# ----------

View file

@ -196,6 +196,8 @@ void Com_sprintf(char *dest, int size, char *fmt, ...);
void Com_PageInMemory(byte *buffer, int size);
char *strlwr ( char *s );
/* ============================================= */
/* portable case insensitive compare */

View file

@ -24,6 +24,8 @@
* =======================================================================
*/
#include <ctype.h>
#include "../header/shared.h"
#define DEG2RAD(a) (a * M_PI) / 180.0F
@ -1113,6 +1115,20 @@ Com_sprintf(char *dest, int size, char *fmt, ...)
strcpy(dest, bigbuffer);
}
char *
strlwr ( char *s )
{
char *p = s;
while ( *s )
{
*s = tolower( *s );
s++;
}
return ( p );
}
/*
* =====================================================================
*

View file

@ -25,7 +25,6 @@
* =======================================================================
*/
#include <ctype.h>
#include <fcntl.h>
#include <locale.h>
#include <sys/types.h>
@ -38,20 +37,6 @@
cvar_t *nostdout;
uid_t saved_euid;
char *
strlwr ( char *s )
{
char *p = s;
while ( *s )
{
*s = tolower( *s );
s++;
}
return ( p );
}
int
main ( int argc, char **argv )
{