~ubuntu-branches/ubuntu/maverick/luatex/maverick

« back to all changes in this revision

Viewing changes to source/texk/web2c/web2c/web2c-parser.y

  • Committer: Bazaar Package Importer
  • Author(s): Norbert Preining
  • Date: 2009-10-22 02:16:43 UTC
  • mfrom: (1.1.8 upstream) (4.2.2 sid)
  • Revision ID: james.westby@ubuntu.com-20091022021643-hvoq5boj9y5q92ao
Tags: 0.40.6-1
* new upstream release (add Announce file)
* fix FTBFS due to new poppler version (Closes: #529331)

Show diffs side-by-side

added added

removed removed

Lines of Context:
48
48
extern string program_name;
49
49
extern boolean debug;
50
50
 
51
 
static long my_labs P1H(long);
52
 
static void compute_array_bounds P1H(void);
53
 
static void fixup_var_list P1H(void);
54
 
static void do_proc_args P1H(void);
55
 
static void gen_function_head P1H(void);
56
 
static boolean doreturn P1H(string);
 
51
static long my_labs (long);
 
52
static void compute_array_bounds (void);
 
53
static void fixup_var_list (void);
 
54
static void do_proc_args (void);
 
55
static void gen_function_head (void);
 
56
static boolean doreturn (string);
57
57
%}
58
58
 
59
59
%start PROGRAM
1205
1205
%%
1206
1206
 
1207
1207
static void
1208
 
compute_array_bounds P1H(void)
 
1208
compute_array_bounds (void)
1209
1209
{
1210
1210
  long lb;
1211
1211
  char tmp[200];
1291
1291
   Otherwise, return 0.  */
1292
1292
   
1293
1293
static boolean
1294
 
doreturn P1C(string, label)
 
1294
doreturn (string label)
1295
1295
{
1296
1296
    return
1297
1297
      tex
1305
1305
 
1306
1306
/* Return the absolute value of a long.  */
1307
1307
static long 
1308
 
my_labs P1C(long, x)
 
1308
my_labs (long x)
1309
1309
{
1310
1310
    if (x < 0L) return(-x);
1311
1311
    return(x);
1315
1315
/* Output current function declaration to coerce file.  */
1316
1316
 
1317
1317
static void
1318
 
do_proc_args P1H(void)
 
1318
do_proc_args (void)
1319
1319
{
1320
1320
  /* If we want ANSI code and one of the parameters is a var
1321
1321
     parameter, then use the #define to add the &.  We do this by
1333
1333
 
1334
1334
  /* We can't use our P?H macros here, since there might be an arbitrary
1335
1335
     number of function arguments.  */
1336
 
  fprintf (coerce, "%s %s AA((", fn_return_type, z_id);
 
1336
  fprintf (coerce, "%s %s (", fn_return_type, z_id);
1337
1337
  if (ids_paramed == 0) fprintf (coerce, "void");
1338
1338
  for (i = 0; i < ids_paramed; i++) {
1339
1339
    if (i > 0)
1340
1340
      putc (',', coerce);
1341
1341
    fprintf (coerce, "%s %s", arg_type[i], symbol (param_id_list[i]));
1342
1342
  }
1343
 
  fprintf (coerce, "));\n");
 
1343
  fprintf (coerce, ");\n");
1344
1344
}
1345
1345
 
1346
1346
static void
1347
 
gen_function_head P1H(void)
 
1347
gen_function_head (void)
1348
1348
{
1349
1349
    int i;
1350
1350
 
1374
1374
       generated code, or we'd generate different code with and without
1375
1375
       prototypes, which might cause splitup to create different numbers
1376
1376
       of files in each case. */
1377
 
    fputs ("#ifdef HAVE_PROTOTYPES\n", out);
 
1377
    /* We now always use ANSI C prototypes, but keep the '#if 1' in the
 
1378
       generated code, to avoid different numbers of files.
 
1379
       Once we stop splitting the TeX and Metafont output files all this
 
1380
       can go away.  */
 
1381
    fputs ("#if 1\n", out);
1378
1382
    my_output (z_id);
1379
1383
    my_output ("(");
1380
1384
    if (ids_paramed == 0) my_output ("void");