Enlightenment CVS committal

Author  : kwo
Project : e16
Module  : e

Dir     : e16/e/dox


Modified Files:
        dox.c dox.h file.c text.c ttfont.c 


Log Message:
Enable compiling with -Wwrite-strings (trivial fixups).
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/dox/dox.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -3 -r1.26 -r1.27
--- dox.c       20 Mar 2004 15:36:32 -0000      1.26
+++ dox.c       21 Mar 2004 01:37:30 -0000      1.27
@@ -95,7 +95,7 @@
 Imlib_Image        *im_prev1, *im_prev2;
 Imlib_Image        *im_next1, *im_next2;
 Imlib_Image        *im_exit1, *im_exit2;
-char               *docdir;
+char               *docdir = NULL;
 
 Window              CreateWindow(Window parent, int x, int y, int ww, int hh);
 int                 ReadHeader(FILE * f);
@@ -222,7 +222,8 @@
    int                 i, w, h, t, x, y;
    int                 wx, wy;
    FILE               *f;
-   char               *s, *docfile = NULL;
+   char               *s;
+   const char         *docfile;
    Pixmap              draw = 0;
    Link               *l = NULL, *ll = NULL;
    Imlib_Border        ibd;
@@ -293,7 +294,6 @@
        exit(1);
      }
 
-   docdir = ".";
    docfile = "MAIN";
    for (i = 1; i < argc; i++)
      {
@@ -309,6 +309,8 @@
        else
           docdir = strdup(argv[i]);
      }
+   if (docdir == NULL)
+      docdir = strdup(".");
    s = malloc(strlen(docdir) + strlen(docfile) + 2 + 20);
    sprintf(s, "%s/%s", docdir, docfile);
    findLocalizedFile(s);
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/dox/dox.h,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -3 -r1.28 -r1.29
--- dox.h       20 Mar 2004 15:36:32 -0000      1.28
+++ dox.h       21 Mar 2004 01:37:30 -0000      1.29
@@ -279,7 +279,7 @@
 }
 Link;
 
-void                Efont_extents(Efont * f, char *text,
+void                Efont_extents(Efont * f, const char *text,
                                  int *font_ascent_return,
                                  int *font_descent_return, int *width_return,
                                  int *max_ascent_return,
@@ -291,9 +291,9 @@
                                      int x, int y, char *text,
                                      Efont * font, Visual * vis, Colormap cm);
 
-char              **TextGetLines(char *text, int *count);
+char              **TextGetLines(const char *text, int *count);
 void                TextStateLoadFont(TextState * ts);
-void                TextSize(TextState * ts, char *text,
+void                TextSize(TextState * ts, const char *text,
                             int *width, int *height, int fsize);
 void                TextDraw(TextState * ts, Window win, char *text,
                             int x, int y, int w, int h, int fsize,
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/dox/file.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -3 -r1.14 -r1.15
--- file.c      20 Mar 2004 15:36:32 -0000      1.14
+++ file.c      21 Mar 2004 01:37:30 -0000      1.15
@@ -123,7 +123,7 @@
    int                 wcflg, mbflg;
    struct char_class
    {
-      char               *name;
+      const char         *name;
       wctype_t            wt;
    }                  *cc, char_class_tbl[] =
    {
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/dox/text.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -3 -r1.14 -r1.15
--- text.c      20 Mar 2004 15:36:32 -0000      1.14
+++ text.c      21 Mar 2004 01:37:30 -0000      1.15
@@ -24,7 +24,7 @@
 #include "dox.h"
 
 char              **
-TextGetLines(char *text, int *count)
+TextGetLines(const char *text, int *count)
 {
    int                 i, j, k;
    char              **list = NULL;
@@ -146,7 +146,7 @@
 }
 
 void
-TextSize(TextState * ts, char *text, int *width, int *height, int fsize)
+TextSize(TextState * ts, const char *text, int *width, int *height, int fsize)
 {
    char              **lines;
    int                 i, num_lines;
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/dox/ttfont.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -3 -r1.13 -r1.14
--- ttfont.c    20 Mar 2004 15:36:32 -0000      1.13
+++ ttfont.c    21 Mar 2004 01:37:30 -0000      1.14
@@ -95,7 +95,7 @@
 }
 
 void
-Efont_extents(Efont * f, char *text, int *font_ascent_return,
+Efont_extents(Efont * f, const char *text, int *font_ascent_return,
              int *font_descent_return, int *width_return,
              int *max_ascent_return, int *max_descent_return,
              int *lbearing_return __UNUSED__, int *rbearing_return __UNUSED__)




-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to