Commit bbc00243 authored by Martin Ruckert's avatar Martin Ruckert
Browse files

shortening too long lines, adapting to linux

parent d39f0e75
# the directory with the MMIXware sources # the directory with the MMIXware sources
MMIXWARE=./mmixware MMIXWARE=./mmixware
INCLDIR=-I ../../vmb/src/util -I ../../vmb/src/vmbmmixlib #INCLDIR=-I ../../vmb/src/util -I ../../vmb/src/vmbmmixlib
LIBDIR=-L. -L../../vmb/src/util -L../../vmb/src/vmbmmixlib #LIBDIR=-L. -L../../vmb/src/util -L../../vmb/src/vmbmmixlib
#INCLDIR=-I
#LIBDIR=-L.
LIBSIM= libboot.c libfinal.c libload.c libprint.c libstats.c \ LIBSIM= libboot.c libfinal.c libload.c libprint.c libstats.c \
libcommand.c libinit.c libmem.c libprofile.c libtrace.c \ libcommand.c libinit.c libmem.c libprofile.c libtrace.c \
...@@ -36,20 +40,20 @@ abstime.h: $(MMIXWARE)/abstime.h ...@@ -36,20 +40,20 @@ abstime.h: $(MMIXWARE)/abstime.h
cp $< $@ cp $< $@
$(MMIXWARE)/abstime.h: $(MMIXWARE)/abstime $(MMIXWARE)/abstime.h: $(MMIXWARE)/abstime
$(MAKE) -C mmix abstime $(MAKE) -C mmixware abstime
$(MMIXWARE)/abstime > $(MMIXWARE)/abstime.h $(MMIXWARE)/abstime > $(MMIXWARE)/abstime.h
mmix-arith.c: boilerplate.w $(MMIXWARE)/mmix-arith.w mmix-arith.c: boilerplate.w $(MMIXWARE)/mmix-arith.w
ctangle $(MMIXWARE)/mmix-arith.w ctangle $(MMIXWARE)/mmix-arith.w
mmix-io.c: boilerplate.w $(MMIXWARE)/mmix-io.w mmix-io.c: boilerplate.w $(MMIXWARE)/mmix-io.w libio.ch
ctangle $(MMIXWARE)/mmix-io.w ctangle $(MMIXWARE)/mmix-io.w libio.ch
$(LIBAL): boilerplate.w $(MMIXWARE)/mmixal.w mmixallib.ch $(LIBAL): boilerplate.w $(MMIXWARE)/mmixal.w mmixallib.ch
ctangle $(MMIXWARE)/mmixal.w mmixallib.ch ctangle $(MMIXWARE)/mmixal.w mmixallib.ch
$(LIBSIM) $(LIBH) mmix-sim.c: boilerplate.w $(MMIXWARE)/mmix-sim.w mmixlib.ch libconfig.h $(LIBSIM) $(LIBH) mmix-sim.c: boilerplate.w $(MMIXWARE)/mmix-sim.w mmixlib.ch libconfig.h libimport.h
ctangle $(MMIXWARE)/mmix-sim.w mmixlib.ch ctangle $(MMIXWARE)/mmix-sim.w mmixlib.ch
......
@x @x
@<Preprocessor macros@>@; @<Preprocessor macros@>@;
@<Type definitions@>@; @<Type definitions@>@;
@<External subroutines@>@; @<External subroutines@>@;
@<Global variables@>@; @<Global variables@>@;
@<Subroutines@>@; @<Subroutines@>@;
@y @y
@<Preprocessor macros@>@; @<Preprocessor macros@>@;
#ifdef WIN32
#pragma warning(disable : 4996 4267) #pragma warning(disable : 4996 4267)
#endif
#include "libconfig.h" #include "libconfig.h"
@<Type definitions@>@; @<Type definitions@>@;
@<External subroutines@>@; @<External subroutines@>@;
@<Global variables@>@; @<Global variables@>@;
#include "libimport.h" #include "libimport.h"
@<Subroutines@>@; @<Subroutines@>@;
@z @z
@x @x
if (fwrite(buf,1,n,sfile[handle].fp)!=n) return ominus(zero_octa,size); if (fwrite(buf,1,n,sfile[handle].fp)!=n) return ominus(zero_octa,size);
fflush(sfile[handle].fp); fflush(sfile[handle].fp);
@y @y
#ifdef MMIX_PRINT #ifdef MMIX_PRINT
if (sfile[handle].fp==stdout || sfile[handle].fp==stderr) if (sfile[handle].fp==stdout || sfile[handle].fp==stderr)
win32_log(buf); win32_log(buf);
else else
#endif #endif
{ if (fwrite(buf,1,n,sfile[handle].fp)!=n) return ominus(zero_octa,size); { if (fwrite(buf,1,n,sfile[handle].fp)!=n) return ominus(zero_octa,size);
fflush(sfile[handle].fp); fflush(sfile[handle].fp);
} }
@z @z
@x @x
if (fwrite(buf,1,n,sfile[handle].fp)!=n) return neg_one; if (fwrite(buf,1,n,sfile[handle].fp)!=n) return neg_one;
@y @y
#ifdef MMIX_PRINT #ifdef MMIX_PRINT
if (sfile[handle].fp==stdout || sfile[handle].fp==stderr) if (sfile[handle].fp==stdout || sfile[handle].fp==stderr)
win32_log(buf); win32_log(buf);
else else
#endif #endif
if (fwrite(buf,1,n,sfile[handle].fp)!=n) return neg_one; if (fwrite(buf,1,n,sfile[handle].fp)!=n) return neg_one;
...@@ -54,9 +55,9 @@ ...@@ -54,9 +55,9 @@
@x @x
if (fwrite(buf,1,n,sfile[handle].fp)!=n) return neg_one; if (fwrite(buf,1,n,sfile[handle].fp)!=n) return neg_one;
@y @y
#ifdef MMIX_PRINT #ifdef MMIX_PRINT
if (sfile[handle].fp==stdout || sfile[handle].fp==stderr) if (sfile[handle].fp==stdout || sfile[handle].fp==stderr)
win32_log(buf); win32_log(buf);
else else
#endif #endif
if (fwrite(buf,1,n,sfile[handle].fp)!=n) return neg_one; if (fwrite(buf,1,n,sfile[handle].fp)!=n) return neg_one;
......
...@@ -878,7 +878,8 @@ Make sure we do not branch from a positive to a negative address. ...@@ -878,7 +878,8 @@ Make sure we do not branch from a positive to a negative address.
@x @x
if (g[rI].l<=2 && g[rI].l && g[rI].h==0) tracing=breakpoint=true; if (g[rI].l<=2 && g[rI].l && g[rI].h==0) tracing=breakpoint=true;
@y @y
if (g[rI].l<=2 && g[rI].l && g[rI].h==0) g[rQ].l |= IN_BIT, new_Q.l |= IN_BIT, tracing=true, breakpoint|=trace_bit; if (g[rI].l<=2 && g[rI].l && g[rI].h==0)
g[rQ].l |= IN_BIT, new_Q.l |= IN_BIT, tracing=true, breakpoint|=trace_bit;
@z @z
...@@ -1893,7 +1894,8 @@ else ...@@ -1893,7 +1894,8 @@ else
@x @x
if (g[rI].l<=info[op].oops && g[rI].l && g[rI].h==0) tracing=breakpoint=true; if (g[rI].l<=info[op].oops && g[rI].l && g[rI].h==0) tracing=breakpoint=true;
@y @y
if (g[rI].l<=info[op].oops && g[rI].l && g[rI].h==0) g[rQ].l |= IN_BIT, new_Q.l |= IN_BIT, tracing=true, breakpoint|=trace_bit; if (g[rI].l<=info[op].oops && g[rI].l && g[rI].h==0)
g[rQ].l |= IN_BIT, new_Q.l |= IN_BIT, tracing=true, breakpoint|=trace_bit;
@z @z
...@@ -1988,9 +1990,9 @@ void show_stats(verbose) ...@@ -1988,9 +1990,9 @@ void show_stats(verbose)
#include "libarith.h" #include "libarith.h"
#include "libimport.h" #include "libimport.h"
void show_stats @,@,@[ARGS((int))@];@+@t}\6{@> void show_stats @,@,@[ARGS((bool))@];@+@t}\6{@>
void show_stats(verbose) void show_stats(verbose)
int verbose; bool verbose;
@z @z
...@@ -2522,7 +2524,7 @@ BOOL CtrlHandler( DWORD fdwCtrlType ) ...@@ -2522,7 +2524,7 @@ BOOL CtrlHandler( DWORD fdwCtrlType )
void catchint @,@,@[ARGS((int))@];@+@t}\6{@> void catchint @,@,@[ARGS((int))@];@+@t}\6{@>
void catchint(n) void catchint(n)
int n; int n;
{ MMIX_CTRL_HANDLER { MMIX_CTRL_HANDLER;
interrupt=true; interrupt=true;
signal(SIGINT,catchint); /* now |catchint| will catch the next interrupt */ signal(SIGINT,catchint); /* now |catchint| will catch the next interrupt */
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment