From 179ec5538e82c89f05bca3cda082a0d9e6d5edf0 Mon Sep 17 00:00:00 2001 From: Yamagi Burmeister Date: Thu, 19 Apr 2012 13:22:50 +0000 Subject: [PATCH] Move strlwr() into shared.c and don't link main.c into the refresher --- Makefile | 1 - src/common/header/shared.h | 2 ++ src/common/shared/shared.c | 16 ++++++++++++++++ src/unix/main.c | 15 --------------- 4 files changed, 18 insertions(+), 16 deletions(-) diff --git a/Makefile b/Makefile index de4baa96..8065d596 100644 --- a/Makefile +++ b/Makefile @@ -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 # ---------- diff --git a/src/common/header/shared.h b/src/common/header/shared.h index 7de3eaed..d3b2f59c 100644 --- a/src/common/header/shared.h +++ b/src/common/header/shared.h @@ -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 */ diff --git a/src/common/shared/shared.c b/src/common/shared/shared.c index 9d1a2974..d3c3ead4 100644 --- a/src/common/shared/shared.c +++ b/src/common/shared/shared.c @@ -24,6 +24,8 @@ * ======================================================================= */ +#include + #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 ); +} + /* * ===================================================================== * diff --git a/src/unix/main.c b/src/unix/main.c index 52171d0c..0d846d79 100644 --- a/src/unix/main.c +++ b/src/unix/main.c @@ -25,7 +25,6 @@ * ======================================================================= */ -#include #include #include #include @@ -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 ) {