~ubuntu-branches/ubuntu/oneiric/texinfo/oneiric

« back to all changes in this revision

Viewing changes to info/nodes.c

  • Committer: Bazaar Package Importer
  • Author(s): Norbert Preining
  • Date: 2009-03-09 15:50:03 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20090309155003-3k9a07mt2jqnuudg
Tags: 4.13a.dfsg.1-1
* new upstream releases (Closes: #500301)
  - fix (wrongly) added leading spaces in direntries (Closes: #457741)
  -  work with ~ in th epath (Closes: #495577)
  - disable the patch fix-direntry and fix-texi2dvi-bashism, 
    included upstream
* update the list of files to be installed (new translations, pdftexi2dvi)
* mange version in the watch file to remove the .dfsg.N part
* use quilt.make (first step in direction of source format 3.0, but that
  is broken)
* add README.Debian to info package (Closes: #513187)
* add README.source, bump standards version to 3.8.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* nodes.c -- how to get an Info file and node.
2
 
   $Id: nodes.c,v 1.9 2007/07/01 21:20:30 karl Exp $
 
2
   $Id: nodes.c,v 1.11 2008/06/11 09:55:42 gray Exp $
3
3
 
4
 
   Copyright (C) 1993, 1998, 1999, 2000, 2002, 2003, 2004, 2006, 2007
5
 
   Free Software Foundation, Inc.
 
4
   Copyright (C) 1993, 1998, 1999, 2000, 2002, 2003, 2004, 2006, 2007,
 
5
   2008 Free Software Foundation, Inc.
6
6
 
7
7
   This program is free software: you can redistribute it and/or modify
8
8
   it under the terms of the GNU General Public License as published by
118
118
  /* If the node not found was "Top", try again with different case,
119
119
     unless this was a man page.  */
120
120
  if (!node
121
 
      && strcasecmp (filename, MANPAGE_FILE_BUFFER_NAME) != 0
122
 
      && (nodename == NULL || strcasecmp (nodename, "Top") == 0))
 
121
      && mbscasecmp (filename, MANPAGE_FILE_BUFFER_NAME) != 0
 
122
      && (nodename == NULL || mbscasecmp (nodename, "Top") == 0))
123
123
    {
124
124
      node = info_get_node_of_file_buffer ("Top", file_buffer);
125
125
      if (!node)
162
162
     a node. */
163
163
  if (strcmp (nodename, "*") == 0)
164
164
    {
165
 
      node = (NODE *)xmalloc (sizeof (NODE));
 
165
      node = xmalloc (sizeof (NODE));
166
166
      node->filename = file_buffer->fullpath;
167
167
      node->parent   = NULL;
168
168
      node->nodename = xstrdup ("*");
294
294
#if defined (HANDLE_MAN_PAGES)
295
295
  /* If the name of the file that we want is our special file buffer for
296
296
     Unix manual pages, then create the file buffer, and return it now. */
297
 
  if (strcasecmp (filename, MANPAGE_FILE_BUFFER_NAME) == 0)
 
297
  if (mbscasecmp (filename, MANPAGE_FILE_BUFFER_NAME) == 0)
298
298
    file_buffer = create_manpage_file_buffer ();
299
299
  else
300
300
#endif /* HANDLE_MAN_PAGES */
331
331
     doesn't exist, then try again with the last part of the filename
332
332
     appearing in lowercase. */
333
333
  /* This is probably not needed at all on those systems which define
334
 
     FILENAME_CMP to be strcasecmp.  But let's do it anyway, lest some
 
334
     FILENAME_CMP to be mbscasecmp.  But let's do it anyway, lest some
335
335
     network redirector supports case sensitivity.  */
336
336
  if (retcode < 0)
337
337
    {
728
728
        if (colon == -1)
729
729
          break;
730
730
 
731
 
        subfile = (SUBFILE *)xmalloc (sizeof (SUBFILE));
732
 
        subfile->filename = (char *)xmalloc (colon);
 
731
        subfile = xmalloc (sizeof (SUBFILE));
 
732
        subfile->filename = xmalloc (colon);
733
733
        strncpy (subfile->filename, line, colon - 1);
734
734
        subfile->filename[colon - 1] = 0;
735
735
        subfile->first_byte = (long) atol (line + colon);
790
790
 
791
791
        for (i = 0; subfiles[i]; i++);
792
792
 
793
 
        file_buffer->subfiles = (char **) xmalloc ((1 + i) * sizeof (char *));
 
793
        file_buffer->subfiles = xmalloc ((1 + i) * sizeof (char *));
794
794
 
795
795
        for (i = 0; subfiles[i]; i++)
796
796
          {
797
797
            char *fullpath;
798
798
 
799
 
            fullpath = (char *) xmalloc
 
799
            fullpath = xmalloc
800
800
              (2 + strlen (subfiles[i]->filename) + len_containing_dir);
801
801
 
802
802
            sprintf (fullpath, "%s/%s",