*** empty log message ***
authorroot <root>
Sun, 15 Aug 2004 04:54:21 +0000 (04:54 +0000)
committerroot <root>
Sun, 15 Aug 2004 04:54:21 +0000 (04:54 +0000)
src/menubar.C
src/misc.C
src/netdisp.C
src/rxvttoolkit.C
src/strings.C

index a18f682471f1fc14b39660ff573f140042c1a979..a3a2261a4a6f2560ad0edb1d69e040a3cc13dbae 100644 (file)
@@ -38,7 +38,7 @@
 static const struct
   {
     const char      name;      /* (l)eft, (u)p, (d)own, (r)ight */
-    const unsigned char str[5];        /* str[0] = STRLEN (str+1) */
+    const unsigned char str[5];        /* str[0] = strlen (str+1) */
   }
 Arrows[NARROWS] = {
                     { 'l', "\003\033[D" },
@@ -91,11 +91,11 @@ rxvt_menuitem_find (const menu_t *menu, const char *name)
     {
       if (item->entry.type == MenuSubMenu)
         {
-          if (!STRCMP (name, (item->entry.submenu.menu)->name))
+          if (!strcmp (name, (item->entry.submenu.menu)->name))
             break;
         }
       else if ((isSeparator (name) && isSeparator (item->name))
-               || !STRCMP (name, item->name))
+               || !strcmp (name, item->name))
         break;
     }
   return item;
@@ -154,7 +154,7 @@ rxvt_action_type (action_t *action, unsigned char *str)
   unsigned int    len;
 
 #if defined (DEBUG_MENU) || defined (DEBUG_MENUARROWS)
-  len = STRLEN (str);
+  len = strlen (str);
   fprintf (stderr, " (len %d) = %s\n", len, str);
 #else
   len = rxvt_Str_escaped ((char *)str);
@@ -265,7 +265,7 @@ rxvt_term::menuarrow_add (char *string)
               *cur,
               parse[NARROWS];
 
-  MEMSET (parse, 0, sizeof (parse));
+  memset (parse, 0, sizeof (parse));
 
   /* fprintf (stderr, "add arrows = `%s'\n", string); */
   for (p = string; p != NULL && *p; string = p)
@@ -296,7 +296,7 @@ rxvt_term::menuarrow_add (char *string)
 
       if (cur == &end)
         {
-          p = STRCHR (string, '\0');
+          p = strchr (string, '\0');
         }
       else
         {
@@ -304,7 +304,7 @@ rxvt_term::menuarrow_add (char *string)
 
           while (1)
             {
-              p = STRCHR (next, '<');
+              p = strchr (next, '<');
               if (p != NULL)
                 {
                   if (p[1] && p[2] == '>')
@@ -314,7 +314,7 @@ rxvt_term::menuarrow_add (char *string)
               else
                 {
                   if (beg.str == NULL) /* no end needed */
-                    p = STRCHR (next, '\0');
+                    p = strchr (next, '\0');
                   break;
                 }
               next = (p + 1);
@@ -362,15 +362,15 @@ rxvt_term::menuarrow_add (char *string)
       len = 0;
       if (beg.len)
         {
-          STRNCPY (str + len, beg.str, beg.len);
+          strncpy (str + len, beg.str, beg.len);
           len += beg.len;
         }
-      STRNCPY (str + len, parse[i].str, parse[i].len);
+      strncpy (str + len, parse[i].str, parse[i].len);
       len += parse[i].len;
 
       if (end.len)
         {
-          STRNCPY (str + len, end.str, end.len);
+          strncpy (str + len, end.str, end.len);
           len += end.len;
         }
       str[len] = '\0';
@@ -434,9 +434,9 @@ rxvt_menuitem_add (menu_t *menu, const char *name, const char *name2, const char
   item->len2 = 0;
   item->name2 = NULL;
 
-  len = STRLEN (name);
+  len = strlen (name);
   item->name = (char *)rxvt_malloc (len + 1);
-  STRCPY (item->name, name);
+  strcpy (item->name, name);
   if (name[0] == '.' && name[1] != '.')
     len = 0;           /* hidden menu name */
   item->len = len;
@@ -458,18 +458,18 @@ rxvt_menuitem_add (menu_t *menu, const char *name, const char *name2, const char
 Item_Found:
   if (name2 != NULL && item->name2 == NULL)
     {
-      len = STRLEN (name2);
+      len = strlen (name2);
       if (len == 0)
         item->name2 = NULL;
       else
         {
           item->name2 = (char *)rxvt_malloc (len + 1);
-          STRCPY (item->name2, name2);
+          strcpy (item->name2, name2);
         }
       item->len2 = len;
     }
   item->entry.type = MenuLabel;
-  len = STRLEN (action);
+  len = strlen (action);
 
   if (len == 0 && item->name2 != NULL)
     {
@@ -480,7 +480,7 @@ Item_Found:
     {
       unsigned char *str = (unsigned char *)rxvt_malloc (len + 1);
 
-      STRCPY (str, action);
+      strcpy (str, action);
 
       if (rxvt_action_type (& (item->entry.action), str) < 0)
         free (str);
@@ -510,11 +510,11 @@ rxvt_term::menu_find_base (menu_t **menu, char *path)
   if (path[0] == '\0')
     return path;
 
-  if (STRCHR (path, '/') != NULL)
+  if (strchr (path, '/') != NULL)
     {
       char           *p = path;
 
-      while ((p = STRCHR (p, '/')) != NULL)
+      while ((p = strchr (p, '/')) != NULL)
         {
           p++;
           if (*p == '/')
@@ -527,17 +527,17 @@ rxvt_term::menu_find_base (menu_t **menu, char *path)
           *menu = NULL;
         }
 
-      while ((p = STRCHR (path, '/')) != NULL)
+      while ((p = strchr (path, '/')) != NULL)
         {
           p[0] = '\0';
           if (path[0] == '\0')
             return NULL;
 
-          if (!STRCMP (path, DOT))
+          if (!strcmp (path, DOT))
             {
               /* nothing to do */
             }
-          else if (!STRCMP (path, DOTS))
+          else if (!strcmp (path, DOTS))
             {
               if (*menu != NULL)
                 *menu = (*menu)->parent;
@@ -556,9 +556,9 @@ rxvt_term::menu_find_base (menu_t **menu, char *path)
         }
     }
 
-  if (!STRCMP (path, DOTS))
+  if (!strcmp (path, DOTS))
     {
-      path += STRLEN (DOTS);
+      path += strlen (DOTS);
       if (*menu != NULL)
         *menu = (*menu)->parent;
       return path;
@@ -568,7 +568,7 @@ rxvt_term::menu_find_base (menu_t **menu, char *path)
   if (*menu == NULL)
     {
       for (m = CurrentBar->tail; m != NULL; m = m->prev)
-        if (!STRCMP (path, m->name))
+        if (!strcmp (path, m->name))
           break;
     }
   else
@@ -577,7 +577,7 @@ rxvt_term::menu_find_base (menu_t **menu, char *path)
       for (item = (*menu)->tail; item != NULL; item = item->prev)
         {
           if (item->entry.type == MenuSubMenu
-              && !STRCMP (path, (item->entry.submenu.menu)->name))
+              && !strcmp (path, (item->entry.submenu.menu)->name))
             {
               m = (item->entry.submenu.menu);
               break;
@@ -588,7 +588,7 @@ rxvt_term::menu_find_base (menu_t **menu, char *path)
   if (m != NULL)
     {
       *menu = m;
-      path += STRLEN (path);
+      path += strlen (path);
     }
 
   return path;
@@ -672,7 +672,7 @@ rxvt_term::menu_add (menu_t *parent, char *path)
   assert (CurrentBar != NULL);
 #endif
 
-  if (STRCHR (path, '/') != NULL)
+  if (strchr (path, '/') != NULL)
     {
       char *p;
 
@@ -682,7 +682,7 @@ rxvt_term::menu_add (menu_t *parent, char *path)
           path++;
           parent = NULL;
         }
-      while ((p = STRCHR (path, '/')) != NULL)
+      while ((p = strchr (path, '/')) != NULL)
         {
           p[0] = '\0';
           if (path[0] == '\0')
@@ -692,10 +692,10 @@ rxvt_term::menu_add (menu_t *parent, char *path)
           path = (p + 1);
         }
     }
-  if (!STRCMP (path, DOTS))
+  if (!strcmp (path, DOTS))
     return (parent != NULL ? parent->parent : parent);
 
-  if (!STRCMP (path, DOT) || path[0] == '\0')
+  if (!strcmp (path, DOT) || path[0] == '\0')
     return parent;
 
   /* allocate a new menu */
@@ -703,9 +703,9 @@ rxvt_term::menu_add (menu_t *parent, char *path)
 
   menu->width = 0;
   menu->parent = parent;
-  menu->len = STRLEN (path);
+  menu->len = strlen (path);
   menu->name = (char *)rxvt_malloc ((menu->len + 1));
-  STRCPY (menu->name, path);
+  strcpy (menu->name, path);
 
   /* initialize head/tail */
   menu->head = menu->tail = NULL;
@@ -1033,7 +1033,7 @@ rxvt_term::menu_show ()
               menu->x = (x1 < 0 ? 0 : x1);
               menu->y = (y1 < 0 ? 0 : y1);
             }
-          else if (item->name2 && !STRCMP (name, item->name2))
+          else if (item->name2 && !strcmp (name, item->name2))
             name = NULL;
 
           if (len && name)
@@ -1144,11 +1144,11 @@ rxvt_term::menubar_find (const char *name)
   if (bar == NULL || name == NULL)
     return NULL;
 
-  if (STRLEN (name) && STRCMP (name, "*"))
+  if (strlen (name) && strcmp (name, "*"))
     {
       do
         {
-          if (!STRCMP (bar->name, name))
+          if (!strcmp (bar->name, name))
             {
 #ifdef DEBUG_MENUBAR_STACKING
               fprintf (stderr, " found!\n");
@@ -1178,7 +1178,7 @@ rxvt_term::menubar_push (const char *name)
       /* allocate first one */
       bar = (bar_t *) rxvt_malloc (sizeof (bar_t));
 
-      MEMSET (bar, 0, sizeof (bar_t));
+      memset (bar, 0, sizeof (bar_t));
       /* circular linked-list */
       bar->next = bar->prev = bar;
       bar->head = bar->tail = NULL;
@@ -1235,7 +1235,7 @@ rxvt_term::menubar_push (const char *name)
     }
 
   /* give menubar this name */
-  STRNCPY (CurrentBar->name, name, MAXNAME);
+  strncpy (CurrentBar->name, name, MAXNAME);
   CurrentBar->name[MAXNAME - 1] = '\0';
 
   return ret;
@@ -1278,7 +1278,7 @@ rxvt_term::menubar_remove (const char *name)
           CurrentBar = prev;
         }
     }
-  while (CurrentBar && !STRCMP (name, "*"));
+  while (CurrentBar && !strcmp (name, "*"));
 }
 
 void
@@ -1381,13 +1381,13 @@ rxvt_menu_dump (FILE *fp, menu_t *menu)
             break;
 
           case MenuLabel:
-            fprintf (fp, "{%s}\n", (STRLEN (item->name) ? item->name : "-"));
+            fprintf (fp, "{%s}\n", (strlen (item->name) ? item->name : "-"));
             break;
 
           case MenuTerminalAction:
           case MenuAction:
             fprintf (fp, "{%s}", item->name);
-            if (item->name2 != NULL && STRLEN (item->name2))
+            if (item->name2 != NULL && strlen (item->name2))
               fprintf (fp, "{%s}", item->name2);
             fprintf (fp, "\t");
             rxvt_action_decode (fp, & (item->entry.action));
@@ -1481,7 +1481,7 @@ rxvt_term::menubar_read (const char *filename)
 
 #if (MENUBAR_MAX > 1)
   /* semi-colon delimited */
-  if ((tag = STRCHR (filename, ';')) != NULL)
+  if ((tag = strchr (filename, ';')) != NULL)
     {
       tag++;
       if (*tag == '\0')
@@ -1631,7 +1631,7 @@ rxvt_term::menubar_dispatch (char *str)
                 do
                   {
                     next++;
-                    if ((next = STRCHR (next, ':')) == NULL)
+                    if ((next = strchr (next, ':')) == NULL)
                       return;  /* parse error */
                   }
                 while (next[1] != ']');
@@ -1641,7 +1641,7 @@ rxvt_term::menubar_dispatch (char *str)
               }
             else
               {
-                if ((next = STRCHR (next, ']')) == NULL)
+                if ((next = strchr (next, ']')) == NULL)
                   return;      /* parse error */
                 /* remove and skip ']' */
                 *next = '\0';
@@ -1659,20 +1659,20 @@ rxvt_term::menubar_dispatch (char *str)
                 menu_readonly = saved;
               }
             /* these ones don't require menu stacking */
-            else if (!STRCMP (str, "clear"))
+            else if (!strcmp (str, "clear"))
               {
                 menubar_clear ();
               }
-            else if (!STRCMP (str, "done") || rxvt_Str_match (str, "done:"))
+            else if (!strcmp (str, "done") || rxvt_Str_match (str, "done:"))
               {
                 menu_readonly = 1;
               }
-            else if (!STRCMP (str, "show"))
+            else if (!strcmp (str, "show"))
               {
                 map_menuBar (1);
                 menu_readonly = 1;
               }
-            else if (!STRCMP (str, "hide"))
+            else if (!strcmp (str, "hide"))
               {
                 map_menuBar (0);
                 menu_readonly = 1;
@@ -1690,10 +1690,10 @@ rxvt_term::menubar_dispatch (char *str)
                   {
                     if (*str)
                       {
-                        name = (char *)rxvt_realloc (CurrentBar->title, STRLEN (str) + 1);
+                        name = (char *)rxvt_realloc (CurrentBar->title, strlen (str) + 1);
                         if (name != NULL)
                           {
-                            STRCPY (name, str);
+                            strcpy (name, str);
                             CurrentBar->title = name;
                           }
                         menubar_expose ();
@@ -1748,7 +1748,7 @@ rxvt_term::menubar_dispatch (char *str)
                 if (CurrentBar != NULL)
                   menu_readonly = 0;   /* allow menu build commands */
               }
-            else if (!STRCMP (str, "dump"))
+            else if (!strcmp (str, "dump"))
               {
                 /* dump current menubars to a file */
                 FILE           *fp;
@@ -1766,7 +1766,7 @@ rxvt_term::menubar_dispatch (char *str)
                     fclose (fp);
                   }
               }
-            else if (!STRCMP (str, "next"))
+            else if (!strcmp (str, "next"))
               {
                 if (CurrentBar)
                   {
@@ -1774,7 +1774,7 @@ rxvt_term::menubar_dispatch (char *str)
                     menu_readonly = 1;
                   }
               }
-            else if (!STRCMP (str, "prev"))
+            else if (!strcmp (str, "prev"))
               {
                 if (CurrentBar)
                   {
@@ -1782,7 +1782,7 @@ rxvt_term::menubar_dispatch (char *str)
                     menu_readonly = 1;
                   }
               }
-            else if (!STRCMP (str, "swap"))
+            else if (!strcmp (str, "swap"))
               {
                 /* swap the top 2 menus */
                 if (CurrentBar)
@@ -1841,8 +1841,8 @@ rxvt_term::menubar_dispatch (char *str)
         /* parse STR, allow spaces inside (name)  */
         if (path[0] != '\0')
           {
-            name = STRCHR (path, MENUITEM_BEG);
-            str = STRCHR (path, MENUITEM_END);
+            name = strchr (path, MENUITEM_BEG);
+            str = strchr (path, MENUITEM_END);
             if (name != NULL || str != NULL)
               {
                 if (name == NULL || str == NULL || str <= (name + 1)
@@ -1854,7 +1854,7 @@ rxvt_term::menubar_dispatch (char *str)
                 if (str[1] == MENUITEM_BEG)
                   {
                     name2 = (str + 2);
-                    str = STRCHR (name2, MENUITEM_END);
+                    str = strchr (name2, MENUITEM_END);
 
                     if (str == NULL)
                       {
@@ -1890,7 +1890,7 @@ rxvt_term::menubar_dispatch (char *str)
                   int             len;
 
                   path = menu_find_base (& (BuildMenu), path);
-                  len = STRLEN (path);
+                  len = strlen (path);
 
                   /* don't allow menus called `*' */
                   if (path[0] == '*')
@@ -1898,7 +1898,7 @@ rxvt_term::menubar_dispatch (char *str)
                       menu_clear (BuildMenu);
                       break;
                     }
-                  else if (len >= 2 && !STRCMP ((path + len - 2), "/*"))
+                  else if (len >= 2 && !strcmp ((path + len - 2), "/*"))
                     {
                       path[len - 2] = '\0';
                     }
@@ -1907,12 +1907,12 @@ rxvt_term::menubar_dispatch (char *str)
                 }
               if (name != NULL && name[0] != '\0')
                 rxvt_menuitem_add (BuildMenu,
-                                  (STRCMP (name, SEPARATOR_NAME) ? name : ""),
+                                  (strcmp (name, SEPARATOR_NAME) ? name : ""),
                                   name2, str);
               break;
 
             case '-':          /* delete menu entry */
-              if (!STRCMP (path, "/*") && (name == NULL || name[0] == '\0'))
+              if (!strcmp (path, "/*") && (name == NULL || name[0] == '\0'))
                 {
                   menubar_clear ();
                   BuildMenu = NULL;
@@ -1925,7 +1925,7 @@ rxvt_term::menubar_dispatch (char *str)
                   menu_t         *menu = BuildMenu;
 
                   path = menu_find_base (&menu, path);
-                  len = STRLEN (path);
+                  len = strlen (path);
 
                   /* submenu called `*' clears all menu items */
                   if (path[0] == '*')
@@ -1933,7 +1933,7 @@ rxvt_term::menubar_dispatch (char *str)
                       menu_clear (menu);
                       break;   /* done */
                     }
-                  else if (len >= 2 && !STRCMP (&path[len - 2], "/*"))
+                  else if (len >= 2 && !strcmp (&path[len - 2], "/*"))
                     {
                       /* done */
                       break;
@@ -1956,7 +1956,7 @@ rxvt_term::menubar_dispatch (char *str)
                       menuitem_t     *item;
                       menu_t         *BuildMenu = BuildMenu;
 
-                      n1 = STRCMP (name, SEPARATOR_NAME) ? name : "";
+                      n1 = strcmp (name, SEPARATOR_NAME) ? name : "";
                       item = rxvt_menuitem_find (BuildMenu, n1);
                       if (item != NULL && item->entry.type != MenuSubMenu)
                         {
index 714415605fbbf0f5186030d8e76207b21c071ce3..fd431e1c10faa2e4559b9cd344182850676d4bfb 100644 (file)
@@ -27,7 +27,7 @@
 #include "rxvt.h"              /* NECESSARY */
 #include "misc.intpro"         /* PROTOS for internal routines */
 
-/* EXTPROTO */
+/* INTPROTO */
 char *
 rxvt_wcstombs (const wchar_t *str, int len)
 {
@@ -49,18 +49,18 @@ rxvt_wcstombs (const wchar_t *str, int len)
   return r;
 }
 
-/* EXTPROTO */
+/* INTPROTO */
 char *
 rxvt_strdup (const char *str)
 {
   return str ? strdup (str) : 0;
 }
 
-/* EXTPROTO */
+/* INTPROTO */
 char *
 rxvt_r_basename (const char *str)
 {
-  char *base = STRRCHR (str, '/');
+  char *base = strrchr (str, '/');
 
   return (char *) (base ? base + 1 : str);
 }
@@ -68,7 +68,7 @@ rxvt_r_basename (const char *str)
 /*
  * Print an error message
  */
-/* EXTPROTO */
+/* INTPROTO */
 void
 rxvt_vlog (const char *fmt, va_list arg_ptr)
 {
@@ -82,7 +82,7 @@ rxvt_vlog (const char *fmt, va_list arg_ptr)
     write (STDOUT_FILENO, msg, strlen (msg));
 }
 
-/* EXTPROTO */
+/* INTPROTO */
 void
 rxvt_log (const char *fmt,...)
 {
@@ -96,7 +96,7 @@ rxvt_log (const char *fmt,...)
 /*
  * Print an error message
  */
-/* EXTPROTO */
+/* INTPROTO */
 void
 rxvt_warn (const char *fmt,...)
 {
@@ -109,7 +109,7 @@ rxvt_warn (const char *fmt,...)
   va_end (arg_ptr);
 }
 
-/* EXTPROTO */
+/* INTPROTO */
 void
 rxvt_fatal (const char *fmt,...)
 {
@@ -126,7 +126,7 @@ rxvt_fatal (const char *fmt,...)
 
 class rxvt_failure_exception rxvt_failure_exception;
 
-/* EXTPROTO */
+/* INTPROTO */
 void
 rxvt_exit_failure ()
 {
@@ -139,18 +139,18 @@ rxvt_exit_failure ()
  * No Match
  *      return: 0
  * Match
- *      return: STRLEN (S2)
+ *      return: strlen (S2)
  */
-/* EXTPROTO */
+/* INTPROTO */
 int
 rxvt_Str_match (const char *s1, const char *s2)
 {
-  int n = STRLEN (s2);
+  int n = strlen (s2);
 
-  return ((STRNCMP (s1, s2, n) == 0) ? n : 0);
+  return ((strncmp (s1, s2, n) == 0) ? n : 0);
 }
 
-/* EXTPROTO */
+/* INTPROTO */
 const char *
 rxvt_Str_skip_space (const char *str)
 {
@@ -165,7 +165,7 @@ rxvt_Str_skip_space (const char *str)
  * remove leading/trailing space and strip-off leading/trailing quotes.
  * in place.
  */
-/* EXTPROTO */
+/* INTPROTO */
 char           *
 rxvt_Str_trim (char *str)
 {
@@ -214,7 +214,7 @@ rxvt_Str_trim (char *str)
  *
  * returns the converted string length
  */
-/* EXTPROTO */
+/* INTPROTO */
 int
 rxvt_Str_escaped (char *str)
 {
@@ -292,7 +292,7 @@ rxvt_Str_escaped (char *str)
  * are properly returned
  * Caller should free each entry and array when done
  */
-/* EXTPROTO */
+/* INTPROTO */
 char          **
 rxvt_splitcommastring (const char *cs)
 {
@@ -344,13 +344,13 @@ rxvt_File_search_path (const char *pathlist, const char *file, const char *ext)
   char            name[256];
 
   if (!access (file, R_OK))    /* found (plain name) in current directory */
-    return STRDUP (file);
+    return strdup (file);
 
   /* semi-colon delimited */
-  if ((p = STRCHR (file, ';')))
+  if ((p = strchr (file, ';')))
     len = (p - file);
   else
-    len = STRLEN (file);
+    len = strlen (file);
 
 #ifdef DEBUG_SEARCH_PATH
   getcwd (name, sizeof (name));
@@ -359,29 +359,29 @@ rxvt_File_search_path (const char *pathlist, const char *file, const char *ext)
 #endif
 
   /* leave room for an extra '/' and trailing '\0' */
-  maxpath = sizeof (name) - (len + (ext ? STRLEN (ext) : 0) + 2);
+  maxpath = sizeof (name) - (len + (ext ? strlen (ext) : 0) + 2);
   if (maxpath <= 0)
     return NULL;
 
   /* check if we can find it now */
-  STRNCPY (name, file, len);
+  strncpy (name, file, len);
   name[len] = '\0';
 
   if (!access (name, R_OK))
-    return STRDUP (name);
+    return strdup (name);
   if (ext)
     {
-      STRCAT (name, ext);
+      strcat (name, ext);
       if (!access (name, R_OK))
-        return STRDUP (name);
+        return strdup (name);
     }
   for (path = pathlist; path != NULL && *path != '\0'; path = p)
     {
       int             n;
 
       /* colon delimited */
-      if ((p = STRCHR (path, ':')) == NULL)
-        p = STRCHR (path, '\0');
+      if ((p = strchr (path, ':')) == NULL)
+        p = strchr (path, '\0');
 
       n = (p - path);
       if (*p != '\0')
@@ -389,26 +389,26 @@ rxvt_File_search_path (const char *pathlist, const char *file, const char *ext)
 
       if (n > 0 && n <= maxpath)
         {
-          STRNCPY (name, path, n);
+          strncpy (name, path, n);
           if (name[n - 1] != '/')
             name[n++] = '/';
           name[n] = '\0';
-          STRNCAT (name, file, len);
+          strncat (name, file, len);
 
           if (!access (name, R_OK))
-            return STRDUP (name);
+            return strdup (name);
           if (ext)
             {
-              STRCAT (name, ext);
+              strcat (name, ext);
               if (!access (name, R_OK))
-                return STRDUP (name);
+                return strdup (name);
             }
         }
     }
   return NULL;
 }
 
-/* EXTPROTO */
+/* INTPROTO */
 char           *
 rxvt_File_find (const char *file, const char *ext, const char *path)
 {
@@ -441,7 +441,7 @@ rxvt_File_find (const char *file, const char *ext, const char *path)
  * Draw top/left and bottom/right border shadows around windows
  */
 #if defined(RXVT_SCROLLBAR) || defined(MENUBAR)
-/* EXTPROTO */
+/* INTPROTO */
 void
 rxvt_Draw_Shadow (Display *display, Window win, GC topShadow, GC botShadow, int x, int y, int w, int h)
 {
@@ -462,7 +462,7 @@ rxvt_Draw_Shadow (Display *display, Window win, GC topShadow, GC botShadow, int
 
 /* button shapes */
 #ifdef MENUBAR
-/* EXTPROTO */
+/* INTPROTO */
 void
 rxvt_Draw_Triangle (Display *display, Window win, GC topShadow, GC botShadow, int x, int y, int w, int type)
 {
index c36b9a4767c764b1ad6c90f9fd5cd8f624025a79..ddb009c0fcae6171c6e30469771d9671171baef3 100644 (file)
@@ -47,7 +47,7 @@ rxvt_network_display (const char *display)
   struct ifreq   *ifr;
   int             i, skfd;
 
-  if (display[0] != ':' && STRNCMP (display, "unix:", 5))
+  if (display[0] != ':' && strncmp (display, "unix:", 5))
     return (char *) display;           /* nothing to do */
 
   ifc.ifc_len = sizeof (buffer);       /* Get names of all ifaces */
@@ -70,7 +70,7 @@ rxvt_network_display (const char *display)
     {
       struct ifreq    ifr2;
 
-      STRCPY (ifr2.ifr_name, ifr->ifr_name);
+      strcpy (ifr2.ifr_name, ifr->ifr_name);
       if (ioctl (skfd, SIOCGIFADDR, &ifr2) >= 0)
         {
           unsigned long   addr;
@@ -84,12 +84,12 @@ rxvt_network_display (const char *display)
            */
           if (addr && addr != 0x7F000001)
             {
-              char           *colon = STRCHR (display, ':');
+              char           *colon = strchr (display, ':');
 
               if (colon == NULL)
                 colon = ":0.0";
 
-              rval = rxvt_malloc (STRLEN (colon) + 16);
+              rval = rxvt_malloc (strlen (colon) + 16);
               sprintf (rval, "%d.%d.%d.%d%s",
                       (int) ((addr >> 030) & 0xFF),
                       (int) ((addr >> 020) & 0xFF),
index 398b730559afec0ff9a48bf0f073dbd665c1cda4..10bb9f9dd555ddc4690e0b228e4bb976eda0f343 100644 (file)
@@ -34,7 +34,7 @@
 
 refcounted::refcounted (const char *id)
 {
-  this->id = STRDUP (id);
+  this->id = strdup (id);
 }
 
 refcounted::~refcounted ()
index 210218170b56cf5badc6c4a05f6e88dfeb68510d..8ab7a44b83f72e6a2bd95a817e8c9feea43f5652 100644 (file)
@@ -133,18 +133,18 @@ strlen (const char *s)
 char           *
 strdup (const char *s)
 {
-  size_t         len = STRLEN (s) + 1;
+  size_t         len = strlen (s) + 1;
   char          *c;
 
   if ((c = malloc (len)) != NULL)
-    MEMCPY (c, s, len);
+    memcpy (c, s, len);
   return c;
 }
 
 char           *
 index (const char *s, int c)
 {
-  return STRCHR (s, c);
+  return strchr (s, c);
 }
 
 char           *
@@ -169,7 +169,7 @@ strchr (const char *s, int c)
 char           *
 rindex (const char *s, int c)
 {
-  return STRRCHR (s, c);
+  return strrchr (s, c);
 }
 
 char           *
@@ -191,7 +191,7 @@ void           *
 memcpy (void *s1, const void *s2, size_t len)
 {
   /* has extra stack and time but less code space */
-  return MEMMOVE (s1, s2, len);
+  return memmove (s1, s2, len);
 }
 
 /*--------------------------------------------------------------------------*
@@ -256,7 +256,7 @@ memmove (void *d, const void *s, size_t len)
 void
 bzero (void *b, size_t len)
 {
-  MEMSET (b, 0, len);
+  memset (b, 0, len);
 }
 
 void           *