[Pinfo-devel] r94 - in pinfo/branches/cxx: . src
Nathanael Nerode
neroden-guest at costa.debian.org
Tue Aug 30 13:07:17 UTC 2005
Author: neroden-guest
Date: 2005-08-30 13:07:16 +0000 (Tue, 30 Aug 2005)
New Revision: 94
Modified:
pinfo/branches/cxx/config.h.in
pinfo/branches/cxx/configure.ac
pinfo/branches/cxx/src/menu_and_note_utils.cxx
Log:
Remove all vestiges of ___USE_STATIC___.
Modified: pinfo/branches/cxx/config.h.in
===================================================================
--- pinfo/branches/cxx/config.h.in 2005-08-30 12:57:20 UTC (rev 93)
+++ pinfo/branches/cxx/config.h.in 2005-08-30 13:07:16 UTC (rev 94)
@@ -327,9 +327,6 @@
/* Don't use regexp search engine */
#undef ___DONT_USE_REGEXP_SEARCH___
-/* don't use dynamic buffer */
-#undef ___USE_STATIC___
-
/* Define to empty if `const' does not conform to ANSI C. */
#undef const
Modified: pinfo/branches/cxx/configure.ac
===================================================================
--- pinfo/branches/cxx/configure.ac 2005-08-30 12:57:20 UTC (rev 93)
+++ pinfo/branches/cxx/configure.ac 2005-08-30 13:07:16 UTC (rev 94)
@@ -192,17 +192,6 @@
AC_DEFINE(HIDECURSOR,TRUE,[don't show cursor])
fi
-# If pinfo is too slow, the below definition will resign from dynamical
-# allocation in critical places, and replace it with static buffers which
-# should save few instructions to CPU ;)
-## TODO: do we still need this with current computing powers?
-AC_ARG_ENABLE(use_static,
- [ --disable-static enable using static buffers ], ,
- enable_use_static=yes)
-if test "x$enable_use_static" = "xyes" ; then
- AC_DEFINE(___USE_STATIC___, 1, [don't use dynamic buffer])
-fi
-
# do you want to use regexp searches?
## TODO: this should really be a command line/config file option
AC_ARG_WITH(regexp_search,
Modified: pinfo/branches/cxx/src/menu_and_note_utils.cxx
===================================================================
--- pinfo/branches/cxx/src/menu_and_note_utils.cxx 2005-08-30 12:57:20 UTC (rev 93)
+++ pinfo/branches/cxx/src/menu_and_note_utils.cxx 2005-08-30 13:07:16 UTC (rev 94)
@@ -51,11 +51,7 @@
getnextnode(char *type, char *node)
{
int j;
-#ifndef ___USE_STATIC___
char *tmp = xmalloc(strlen(type) + 1);
-#else
- static char tmp[1024 + 1];
-#endif
char *wsk;
strcpy(tmp, type);
wsk = strstr(tmp, "Next: ");
@@ -70,15 +66,11 @@
{
wsk[j] = 0;
strcpy(node, wsk + 6);
-#ifndef ___USE_STATIC___
xfree(tmp);
-#endif
return;
}
}
-#ifndef ___USE_STATIC___
xfree(tmp);
-#endif
}
/* read the `Prev:' header entry */
@@ -86,11 +78,7 @@
getprevnode(char *type, char *node)
{
int j;
-#ifndef ___USE_STATIC___
char *tmp = xmalloc(strlen(type) + 1);
-#else
- static char tmp[1024 + 1];
-#endif
char *wsk;
strcpy(tmp, type);
wsk = strstr(tmp, "Prev: ");
@@ -105,15 +93,11 @@
{
wsk[j] = 0;
strcpy(node, wsk + 6);
-#ifndef ___USE_STATIC___
xfree(tmp);
-#endif
return;
}
}
-#ifndef ___USE_STATIC___
xfree(tmp);
-#endif
}
/* read the `Up:' header entry */
@@ -121,11 +105,7 @@
getupnode(char *type, char *node)
{
int j;
-#ifndef ___USE_STATIC___
char *tmp = xmalloc(strlen(type) + 1);
-#else
- static char tmp[1024 + 1];
-#endif
char *wsk;
strcpy(tmp, type);
wsk = strstr(tmp, "Up: ");
@@ -140,15 +120,11 @@
{
wsk[j] = 0;
strcpy(node, wsk + 4);
-#ifndef ___USE_STATIC___
xfree(tmp);
-#endif
return;
}
}
-#ifndef ___USE_STATIC___
xfree(tmp);
-#endif
}
@@ -157,11 +133,7 @@
getnodename(char *type, char *node)
{
int j;
-#ifndef ___USE_STATIC___
char *tmp = xmalloc(strlen(type) + 1);
-#else
- static char tmp[1024 + 1];
-#endif
char *wsk;
strcpy(tmp, type);
wsk = strstr(tmp, "Node: ");
@@ -176,13 +148,9 @@
{
wsk[j] = 0;
strcpy(node, wsk + 6);
-#ifndef ___USE_STATIC___
xfree(tmp);
-#endif
return;
}
}
-#ifndef ___USE_STATIC___
xfree(tmp);
-#endif
}
More information about the Pinfo-devel
mailing list