From 308f70df7e403e68e0ae936ad00500ad46a914b9 Mon Sep 17 00:00:00 2001 From: dos-reis Date: Sun, 19 Aug 2012 00:39:07 +0000 Subject: * include/util.H1 (getmemWithLine): Second argument is now const char*. (saymemWithLine): First argument is now char*. * lib/util.c: Propogate change. * include/XSpadFill.h (SpadFillGC): Change last parameter type to const char*. * lib/XSpadFill.c (SpadFillGC): Likewise. --- src/ChangeLog | 9 +++++++++ src/include/XSpadFill.h | 2 +- src/include/util.H1 | 4 ++-- src/lib/XSpadFill.c | 2 +- src/lib/util.c | 14 +++++--------- 5 files changed, 18 insertions(+), 13 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 0304bd1a..2893ba58 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,12 @@ +2012-08-18 Gabriel Dos Reis + + * include/util.H1 (getmemWithLine): Second argument is now const char*. + (saymemWithLine): First argument is now char*. + * lib/util.c: Propogate change. + * include/XSpadFill.h (SpadFillGC): Change last parameter type to + const char*. + * lib/XSpadFill.c (SpadFillGC): Likewise. + 2012-08-18 Gabriel Dos Reis * boot/translator.boot (shoeOutParse): Fix thinko. diff --git a/src/include/XSpadFill.h b/src/include/XSpadFill.h index 33bf2d4e..fdf6899d 100644 --- a/src/include/XSpadFill.h +++ b/src/include/XSpadFill.h @@ -38,7 +38,7 @@ extern int XInitSpadFill(Display * , int , Colormap * , int * , int * , int * , int * ); extern void XSpadFillSetArcMode(Display * , int ); -extern GC SpadFillGC(Display * , int , int , char * ); +extern GC SpadFillGC(Display * , int , int , const char* ); extern unsigned long XSolidColor(int , int ); extern void XSpadFillRectangle(Display * , Drawable , int , int , unsigned int , unsigned int , int , int ); extern void XSpadFillRectangles(Display * , Drawable , XRectangle * , int , int , int ); diff --git a/src/include/util.H1 b/src/include/util.H1 index bed0da32..924c0251 100644 --- a/src/include/util.H1 +++ b/src/include/util.H1 @@ -1,6 +1,6 @@ extern int checker(int , int , char * ); -extern char * getmemWithLine(int , char * , int ); -extern char * saymemWithLine(char * , int , int , int ); +extern const char* getmemWithLine(int , const char* , int ); +extern const char* saymemWithLine(const char* , int , int , int ); extern void myfree(void * , int ); extern XPoint getWindowPositionXY(Display * , Window ); extern XPoint getWindowSizeXY(Display * , Window ); diff --git a/src/lib/XSpadFill.c b/src/lib/XSpadFill.c index fe805ff2..f4408db9 100644 --- a/src/lib/XSpadFill.c +++ b/src/lib/XSpadFill.c @@ -172,7 +172,7 @@ XSpadFillSetArcMode(Display *dsply, int mode) } GC -SpadFillGC(Display *dsply,int hue, int theshade,char * fill_routine) +SpadFillGC(Display *dsply,int hue, int theshade, const char* fill_routine) { int dither; int color; diff --git a/src/lib/util.c b/src/lib/util.c index c82358c5..0441a4f4 100644 --- a/src/lib/util.c +++ b/src/lib/util.c @@ -66,8 +66,8 @@ checker(int code, int lineNumber, char *errorStr) -char * -getmemWithLine(int nbytes, char *str, int lineNum) +const char* +getmemWithLine(int nbytes, const char* str, int lineNum) { char *p; @@ -80,14 +80,10 @@ getmemWithLine(int nbytes, char *str, int lineNum) } -char * -saymemWithLine(char *str, int num, int size, int lineNum) +const char * +saymemWithLine(const char *str, int num, int size, int lineNum) { - char *p; - - p = getmemWithLine(num * size, str, lineNum); - return p; - + return getmemWithLine(num * size, str, lineNum); } -- cgit v1.2.3