/[m4]/m4/modules/format.c
ViewVC logotype

Diff of /m4/modules/format.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.10 by gary, Thu Sep 20 03:48:05 2001 UTC revision 1.11 by gary, Sun Sep 30 14:43:38 2001 UTC
# Line 24  Line 24 
24    
25  #define ARG_INT(argc, argv) \  #define ARG_INT(argc, argv) \
26          ((argc == 0) ? 0 : \          ((argc == 0) ? 0 : \
27           (--argc, argv++, atoi (M4_SYMBOL_TEXT (argv[-1]))))           (--argc, argv++, atoi (M4_TOKEN_DATA_TEXT (argv[-1]))))
28    
29  #define ARG_UINT(argc, argv) \  #define ARG_UINT(argc, argv) \
30          ((argc == 0) ? 0 : \          ((argc == 0) ? 0 : \
31           (--argc, argv++, (unsigned int) atoi (M4_SYMBOL_TEXT (argv[-1]))))           (--argc, argv++, (unsigned int) atoi (M4_TOKEN_DATA_TEXT (argv[-1]))))
32    
33  #define ARG_LONG(argc, argv) \  #define ARG_LONG(argc, argv) \
34          ((argc == 0) ? 0 : \          ((argc == 0) ? 0 : \
35           (--argc, argv++, atol (M4_SYMBOL_TEXT (argv[-1]))))           (--argc, argv++, atol (M4_TOKEN_DATA_TEXT (argv[-1]))))
36    
37  #define ARG_ULONG(argc, argv) \  #define ARG_ULONG(argc, argv) \
38          ((argc == 0) ? 0 : \          ((argc == 0) ? 0 : \
39           (--argc, argv++, (unsigned long) atol (M4_SYMBOL_TEXT (argv[-1]))))           (--argc, argv++, (unsigned long) atol (M4_TOKEN_DATA_TEXT (argv[-1]))))
40    
41  #define ARG_STR(argc, argv) \  #define ARG_STR(argc, argv) \
42          ((argc == 0) ? "" : \          ((argc == 0) ? "" : \
43           (--argc, argv++, M4_SYMBOL_TEXT (argv[-1])))           (--argc, argv++, M4_TOKEN_DATA_TEXT (argv[-1])))
44    
45  #define ARG_DOUBLE(argc, argv) \  #define ARG_DOUBLE(argc, argv) \
46          ((argc == 0) ? 0 : \          ((argc == 0) ? 0 : \
47           (--argc, argv++, atof (M4_SYMBOL_TEXT (argv[-1]))))           (--argc, argv++, atof (M4_TOKEN_DATA_TEXT (argv[-1]))))
48    
49    
50  /* The main formatting function.  Output is placed on the obstack OBS, the  /* The main formatting function.  Output is placed on the obstack OBS, the
51     first argument in ARGV is the formatting string, and the rest is     first argument in ARGV is the formatting string, and the rest is
52     arguments for the string.  */     arguments for the string.  */
53  void format (struct obstack *obs, int argc, m4_symbol **argv);  void format (struct obstack *obs, int argc, m4_token_data **argv);
54    
55  void  void
56  format (struct obstack *obs, int argc, m4_symbol **argv)  format (struct obstack *obs, int argc, m4_token_data **argv)
57  {  {
58    char *fmt;                    /* format control string */    char *fmt;                    /* format control string */
59    const char *fstart;           /* beginning of current format spec */    const char *fstart;           /* beginning of current format spec */

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26