1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-08-01 10:06:59 +03:00

Spring cleanup ...: - configure.in Makefile.am config.h.in

Spring cleanup ...:
- configure.in Makefile.am config.h.in xmlversion.h.in: detect if
  we need string functions
- trio.[ch] strio.[ch]: embedded the Trio-0.23 string functions
  to be able to use them where needed. Applied some changes
  to reduce name linking pollution and compile in only what's
  needed.
- HTMLtree.c debugXML.c entities.c error.c nanoftp.c valid.c
  xlink.c xmlversion.h.in xpath.c: got rid of the #ifdef
  for the string manipulation functions
- xmlmemory.[ch]: removed DEBUG_MEMORY_FREED and added it automatically
  to the free() function of xmlmemory.c
- entities.c HTMLtree.c parserInternals.c tree.c uri.c valid.c
  xinclude.c xmlIO.c xpath.c xpointer.c: removed the MEM_CLEANUP
  usage.
Daniel
This commit is contained in:
Daniel Veillard
2001-03-27 12:47:33 +00:00
parent 2be30641d1
commit 92ad210417
27 changed files with 4709 additions and 206 deletions

View File

@ -1512,18 +1512,10 @@ xmlShellPwd(xmlShellCtxtPtr ctxt ATTRIBUTE_UNUSED, char *buffer, xmlNodePtr node
next = cur->parent;
}
if (occur == 0)
#ifdef HAVE_SNPRINTF
snprintf(buf, sizeof(buf), "%c%s%s", sep, name, buffer);
#else
sprintf(buf, "%c%s%s", sep, name, buffer);
#endif
else
#ifdef HAVE_SNPRINTF
snprintf(buf, sizeof(buf), "%c%s[%d]%s",
sep, name, occur, buffer);
#else
sprintf(buf, "%c%s[%d]%s", sep, name, occur, buffer);
#endif
buf[sizeof(buf) - 1] = 0;
/*
* This test prevents buffer overflow, because this routine
@ -1593,11 +1585,7 @@ xmlShell(xmlDocPtr doc, char *filename, xmlShellReadlineFunc input,
if (ctxt->node == (xmlNodePtr) ctxt->doc)
sprintf(prompt, "%s > ", "/");
else if (ctxt->node->name)
#ifdef HAVE_SNPRINTF
snprintf(prompt, sizeof(prompt), "%s > ", ctxt->node->name);
#else
sprintf(prompt, "%s > ", ctxt->node->name);
#endif
else
sprintf(prompt, "? > ");
prompt[sizeof(prompt) - 1] = 0;