bug-texinfo
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gcc 3.0.x compilation issue (directives inside printf)


From: Leo-Panda
Subject: gcc 3.0.x compilation issue (directives inside printf)
Date: Wed, 21 Nov 2001 03:29:49 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.4) Gecko/20010917

Hello,
when I try to compile texinfo-4.0 package with gcc 3.0.2 make stops on line 567 of info.c:

info.c:567:1: directives may not be used inside a macro argument
.
The problem resides into the #ifdef directive inside the printf call... and since in gcc 3.0.x printf is defined as a macro (is that so? I'm 90% sure...) ...

I tried this small fix. It appears to work fine... at least my compiled 'info' program does not show strange behavouir in the help (target: linux mandrake 8.0, intel i686, gcc 3.0.2, glibc 2.2.2). Maybe it needs some testing under MS-DOS, but I think it should work fine.

HTH,
  Danilo

<CODE>

/* Produce a scaled down description of the available options to Info. */
static void
info_short_help ()
{

#ifdef __MSDOS__
char *speech_help = "\
 --speech-friendly        be friendly to speech synthesizers.\n";
#else
char *speech_help = "";
#endif

  printf (_("\
Usage: %s [OPTION]... [MENU-ITEM...]\n\
\n\
Read documentation in Info format.\n\
\n\
Options:\n\
--apropos=SUBJECT look up SUBJECT in all indices of all manuals.\n\
 --directory=DIR          add DIR to INFOPATH.\n\
 --dribble=FILENAME       remember user keystrokes in FILENAME.\n\
 --file=FILENAME          specify Info file to visit.\n\
 --help                   display this help and exit.\n\
 --index-search=STRING    go to node pointed by index entry STRING.\n\
 --node=NODENAME          specify nodes in first visited Info file.\n\
 --output=FILENAME        output selected nodes to FILENAME.\n\
 --restore=FILENAME       read initial keystrokes from FILENAME.\n\
 --show-options, --usage  go to command-line options node.\n\
 --subnodes               recursively output menu items.\n%s\
 --vi-keys                use vi-like and less-like key bindings.\n\
 --version                display version information and exit.\n\
\n\
The first non-option argument, if present, is the menu entry to start from;\n\
it is searched for in all `dir' files along INFOPATH.\n\
If it is not present, info merges all `dir' files and shows the result.\n\
Any remaining arguments are treated as the names of menu\n\
items relative to the initial node visited.\n\
\n\
Examples:\n\
  info                       show top-level dir menu\n\
  info emacs                 start at emacs node from top-level dir\n\
  info emacs buffers         start at buffers node within emacs manual\n\
info --show-options emacs start at node with emacs' command line options\n\
  info -f ./foo.info         show file ./foo.info, not searching dir\n\
\n\
Email bug reports to address@hidden,\n\
general questions and discussion to address@hidden
"),
  program_name,
  speech_help
        );

  xexit (0);
}

</CODE>

--
Danilo Piazzalunga

Linux Registered User #245762 at http://counter.li.org
mailto:address@hidden





reply via email to

[Prev in Thread] Current Thread [Next in Thread]