Date:2014-02-15 22:08:26 (5 years 6 months ago)
Author:Werner Almesberger
Commit:1d7eccb06b61f239b9671617488f33910286f0f1
Message:dump.c: add dumping of %iprint

Files: dump.c (2 diffs)
test/iprint (1 diff)

Change Details

dump.c
11/*
22 * dump.c - Dump objects in the native FPD format
33 *
4 * Written 2009-2012 by Werner Almesberger
5 * Copyright 2009-2012 by Werner Almesberger
4 * Written 2009-2012, 2014 by Werner Almesberger
5 * Copyright 2009-2012, 2014 by Werner Almesberger
66 *
77 * This program is free software; you can redistribute it and/or modify
88 * it under the terms of the GNU General Public License as published by
...... 
383383        }
384384        free(s2);
385385        break;
386    case ot_iprint:
387        s2 = unparse(obj->u.iprint.expr);
388        s = stralloc_printf("%%iprint %s", s2);
389        free(s2);
390        break;
386391    default:
387392        abort();
388393    }
test/iprint
9898undefined variable "foo"
9999EOF
100100
101#------------------------------------------------------------------------------
102
103fped_dump "iprint: dump" <<EOF
104%iprint 42
105EOF
106expect <<EOF
10742
108/* MACHINE-GENERATED ! */
109
110package "_"
111unit mm
112
113%iprint 42
114EOF
115
101116###############################################################################

Archive Download the corresponding diff file

Branches:
master



interactive