FVWM: FvwmIconMan-0.9.7

From: <jmknoble_at_pobox.com>
Date: Sun, 9 Mar 1997 04:04:17 -0500 (EST)

FvwmIconMan-0.9.7 compiles under fvwm-2.0.45 on Linux (kernel 2.0.27,
gcc-2.7.2.1) with warnings that functions stripcpy() and GetNextToken()
in readconfig.c are declared static after being declared non-static.
this is because stripcpy() in FvwmIconMan is the same function (only
static) as in fvwm-2.0.45/libs/Strings.c, and GetNextToken() conflicts
with a function of the same name in fvwm-2.0.45/libs/Parse.c. the
patch below comments out the definition of stripcpy in
.../FvwmIconMan/readconfig.c and renames FvwmIconMan's version of
GetNextToken() to GetNextCommaToken(). compiles with no warnings.

--jim

############## jim knoble ###### jmknoble_at_pobox.com ################

--- fvwm-2.0.45/modules/FvwmIconMan/readconfig.c.orig Tue Feb 11 23:08:21 1997
+++ fvwm-2.0.45/modules/FvwmIconMan/readconfig.c Sun Mar 9 03:53:41 1997
_at_@ -204,6 +204,7 @@
     (*p)++;
 }
 
+#if 0
 static char *stripcpy(char *source)
 {
   char *tmp,*ptr;
_at_@ -226,6 +227,7 @@
   ptr[len]=0;
   return ptr;
 }
+#endif /* 0 */
 
 static void add_to_binding (Binding **list, Binding *binding)
 {
_at_@ -285,7 +287,7 @@
 
 /* I modified this from the fvwm version to stop at commas */
 
-static char *GetNextToken(char *indata,char **token)
+static char *GetNextCommaToken(char *indata,char **token)
 {
   char *t,*start, *end, *text;
 
_at_@ -438,7 +440,7 @@
   bv->offset = 0;
   bv->base = AbsoluteButton;
 
- rest = GetNextToken (string, &token);
+ rest = GetNextCommaToken (string, &token);
   if (token == NULL || !strcmp (token, ",")) {
     bv->base = NoButton;
     *flag = 0;
_at_@ -509,7 +511,7 @@
 
   ConsoleDebug (CONFIG, "in parse_function\n");
 
- ptr = GetNextToken (*line, &name);
+ ptr = GetNextCommaToken (*line, &name);
   if (name == NULL || name[0] == '\0') {
     *line = NULL;
     Free (name);
_at_@ -527,7 +529,7 @@
         ftype->args[j].type = builtin_functions[i].args[j];
         switch (builtin_functions[i].args[j]) {
         case IntArg:
- ptr = GetNextToken (ptr, &tok);
+ ptr = GetNextCommaToken (ptr, &tok);
           if (!tok) {
             ConsoleMessage ("%s: too few arguments\n",
                             builtin_functions[i].name);
_at_@ -545,7 +547,7 @@
           break;
 
         case StringArg:
- ptr = GetNextToken (ptr, &ftype->args[j].value.string_value);
+ ptr = GetNextCommaToken (ptr, &ftype->args[j].value.string_value);
           if (!ftype->args[j].value.string_value ||
               !strcmp (ftype->args[j].value.string_value, ",")) {
             ConsoleMessage ("%s: too few arguments\n",
_at_@ -607,7 +609,7 @@
     else
       ret = f;
     tail = f;
- p = GetNextToken (line, &token);
+ p = GetNextCommaToken (line, &token);
     if (token && token[0] && strcmp (token, ",") != 0) {
       ConsoleMessage ("Bad function list, comma expected\n");
       Free (token);
_at_@ -633,13 +635,13 @@
 
   /* tline points after the key word "key" */
   ptr = tline;
- ptr = GetNextToken(ptr,&token);
+ ptr = GetNextCommaToken(ptr,&token);
   if(token != NULL) {
     n1 = sscanf(token,"%d",&button);
     Free(token);
   }
 
- action = GetNextToken(ptr,&token);
+ action = GetNextCommaToken(ptr,&token);
   if(token != NULL) {
     n2 = sscanf(token,"%19s",modifiers);
     Free(token);
_at_@ -688,13 +690,13 @@
   /* tline points after the key word "key" */
   ptr = tline;
 
- ptr = GetNextToken(ptr,&token);
+ ptr = GetNextCommaToken(ptr,&token);
   if(token != NULL) {
     n1 = sscanf(token,"%19s",key);
     Free(token);
   }
   
- action = GetNextToken(ptr,&token);
+ action = GetNextCommaToken(ptr,&token);
   if(token != NULL) {
     n2 = sscanf(token,"%19s",modifiers);
     Free(token);
_at_@ -1308,7 +1310,7 @@
           ConsoleMessage ("Bad line: %s\n", current_line);
           continue;
         }
- GetNextToken (p, &token);
+ GetNextCommaToken (p, &token);
         
         SET_MANAGER (manager, formatstring,
                      copy_string (&globals.managers[id].formatstring, token));
_at_@ -1327,7 +1329,7 @@
           ConsoleMessage ("Bad line: %s\n", current_line);
           continue;
         }
- GetNextToken (p, &token);
+ GetNextCommaToken (p, &token);
         
         SET_MANAGER (manager, iconname,
                      copy_string (&globals.managers[id].iconname, token));
_at_@ -1441,7 +1443,7 @@
           ConsoleMessage ("Bad line: %s\n", current_line);
           continue;
         }
- GetNextToken (p, &token);
+ GetNextCommaToken (p, &token);
         ConsoleDebug (CONFIG, "flag 4\n");
         
         SET_MANAGER (manager, titlename,

--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_hpc.uh.edu.
To report problems, send mail to fvwm-owner_at_hpc.uh.edu.
Received on Sun Mar 09 1997 - 03:41:17 GMT

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:38:00 BST