diff options
author | wollman <wollman@FreeBSD.org> | 2002-06-04 06:03:22 +0800 |
---|---|---|
committer | wollman <wollman@FreeBSD.org> | 2002-06-04 06:03:22 +0800 |
commit | 7f1718e7f477add553c00eb39015a24f8991cd95 (patch) | |
tree | cf44549c92823fea0b20fe9583f843b5c17c2cbd | |
parent | c02404838ee76837a5dd595cc8a1065a9e430e5d (diff) | |
download | freebsd-ports-gnome-7f1718e7f477add553c00eb39015a24f8991cd95.tar.gz freebsd-ports-gnome-7f1718e7f477add553c00eb39015a24f8991cd95.tar.zst freebsd-ports-gnome-7f1718e7f477add553c00eb39015a24f8991cd95.zip |
Don't assume stdin, stdout are compile-time constants.
-rw-r--r-- | lang/mixal/files/patch-io.c | 32 | ||||
-rw-r--r-- | lang/mixal/files/patch-main.c | 10 | ||||
-rw-r--r-- | lang/mixal/files/patch-mix.h | 10 |
3 files changed, 52 insertions, 0 deletions
diff --git a/lang/mixal/files/patch-io.c b/lang/mixal/files/patch-io.c new file mode 100644 index 000000000000..7e229050aa9b --- /dev/null +++ b/lang/mixal/files/patch-io.c @@ -0,0 +1,32 @@ +--- io.c.orig Mon Jun 3 17:56:10 2002 ++++ io.c Mon Jun 3 18:00:59 2002 +@@ -19,9 +19,12 @@ + } device_table[] = { + {tape}, {tape}, {tape}, {tape}, {tape}, {tape}, {tape}, {tape}, + {disk}, {disk}, {disk}, {disk}, {disk}, {disk}, {disk}, {disk}, +- {card_in, stdin}, +- {card_out, stdout}, +- {printer, stdout}, ++ {card_in, 0}, /* was stdin */ ++#define PATCH_CARD_IN 16 ++ {card_out, 0}, /* was stdout */ ++#define PATCH_CARD_OUT 17 ++ {printer, 0}, /* was stdout */ ++#define PATCH_PRINTER 18 + {console} + }; + +@@ -54,6 +57,13 @@ + /* console */ { 14, console_in, console_out, console_ioc } + + }; ++ ++void initialize_io(void) ++{ ++ device_table[PATCH_CARD_IN].file = stdin; ++ device_table[PATCH_CARD_OUT].file = stdout; ++ device_table[PATCH_PRINTER].file = stdout; ++} + + static unsigned block_size(unsigned device) + { diff --git a/lang/mixal/files/patch-main.c b/lang/mixal/files/patch-main.c new file mode 100644 index 000000000000..82c1d366ae0a --- /dev/null +++ b/lang/mixal/files/patch-main.c @@ -0,0 +1,10 @@ +--- main.c.orig Mon Jun 3 17:53:11 2002 ++++ main.c Mon Jun 3 17:53:23 2002 +@@ -104,6 +104,7 @@ + + int main(int argc, char **argv) + { ++ initialize_io(); + precompute_field_data(); + + /* Assemble the input: */ diff --git a/lang/mixal/files/patch-mix.h b/lang/mixal/files/patch-mix.h new file mode 100644 index 000000000000..4b4d4120c783 --- /dev/null +++ b/lang/mixal/files/patch-mix.h @@ -0,0 +1,10 @@ +--- mix.h.orig Mon Jun 3 17:55:50 2002 ++++ mix.h Mon Jun 3 17:56:02 2002 +@@ -16,6 +16,7 @@ + void warn(const char *message, ...); + void error(const char *message, ...); + void fatal_error(const char *message, ...); ++void initialize_io(void); + + #define memory_size 4000 + |