Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
mmix
util
Commits
21d6e186
Commit
21d6e186
authored
Nov 19, 2014
by
Martin Ruckert
Browse files
adapting for mmixvd
parent
43897533
Changes
4
Hide whitespace changes
Inline
Side-by-side
mmixlib/libio.ch
0 → 100644
View file @
21d6e186
@x
#include <stdio.h>
#include <stdlib.h>
@y
#include <stdio.h>
#include <stdlib.h>
#include "libconfig.h"
#include "libimport.h"
#pragma warning(disable : 4996 4267)
@z
@x
if (fwrite(buf,1,n,sfile[handle].fp)!=n) return ominus(zero_octa,size);
fflush(sfile[handle].fp);
@y
#ifdef MMIX_PRINT
if (sfile[handle].fp==stdout || sfile[handle].fp==stderr)
win32_log(buf);
else
#endif
{ if (fwrite(buf,1,n,sfile[handle].fp)!=n) return ominus(zero_octa,size);
fflush(sfile[handle].fp);
}
@z
@x
if (fwrite(buf,1,n,sfile[handle].fp)!=n) return neg_one;
@y
#ifdef MMIX_PRINT
if (sfile[handle].fp==stdout || sfile[handle].fp==stderr)
win32_log(buf);
else
#endif
if (fwrite(buf,1,n,sfile[handle].fp)!=n) return neg_one;
@z
@x
fflush(sfile[handle].fp);
@y
#ifdef MMIX_PRINT
if (sfile[handle].fp!=stdout && sfile[handle].fp!=stderr)
#endif
fflush(sfile[handle].fp);
@z
@x
if (fwrite(buf,1,n,sfile[handle].fp)!=n) return neg_one;
@y
#ifdef MMIX_PRINT
if (sfile[handle].fp==stdout || sfile[handle].fp==stderr)
win32_log(buf);
else
#endif
if (fwrite(buf,1,n,sfile[handle].fp)!=n) return neg_one;
@z
@x
fflush(sfile[handle].fp);
@y
#ifdef MMIX_PRINT
if (sfile[handle].fp!=stdout && sfile[handle].fp!=stderr)
#endif
fflush(sfile[handle].fp);
@z
mmixlib/mmixallib.ch
View file @
21d6e186
...
...
@@ -138,6 +138,7 @@ void report_error(message)
#include <stdlib.h>
#include <stdio.h>
#include <setjmp.h>
#include "libname.h"
#define _MMIXAL_
int err_count;
...
...
@@ -149,7 +150,7 @@ extern jmp_buf mmixal_exit;
void report_error(char *message,int file_no,int line_no)
{ char *filename;
filename=file2name(file_no);
filename=file2
file
name(file_no);
if (!filename) filename="(nofile)";
if (message[0]=='*')
fprintf(stderr,"\"%s\", line %d warning: %s\n",
...
...
mmixlib/mmixlib.h
View file @
21d6e186
...
...
@@ -118,7 +118,7 @@ extern void mmputchars(unsigned char *buf,int size,octa addr);
extern
int
mmgetchars
(
unsigned
char
*
buf
,
int
size
,
octa
addr
,
int
stop
);
extern
FILE
*
fake_stdin
;
extern
mem_tetra
*
mem_find
(
octa
addr
);
extern
mem_node
*
mem_root
;
...
...
@@ -233,7 +233,8 @@ extern void mmix_status(int status);
#endif
/* function from mmix-io */
void
mmix_fake_stdin
(
FILE
*
f
);
/* functions that mmixal provides */
extern
int
mmixal
(
char
*
mms_name
,
char
*
mmo_name
,
char
*
mml_name
,
int
x_option
,
int
b_option
);
...
...
mmixlib/mmixlib.vcproj
View file @
21d6e186
...
...
@@ -715,7 +715,7 @@
>
</File>
<File
RelativePath=
".\
io-win
.ch"
RelativePath=
".\
libio
.ch"
>
</File>
<File
...
...
@@ -752,7 +752,7 @@
<Tool
Name=
"VCCustomBuildTool"
Description=
"ctangle mmix-io with libio.ch"
CommandLine=
"ctangle mmixware\mmix-io.w libio.ch"
CommandLine=
"ctangle mmixware\mmix-io.w libio.ch


"
AdditionalDependencies=
"libio.ch"
Outputs=
"mmix-io.c"
/>
...
...
@@ -763,7 +763,7 @@
<Tool
Name=
"VCCustomBuildTool"
Description=
"ctangle mmix-io with libio.ch"
CommandLine=
"ctangle mmixware\mmix-io.w libio.ch"
CommandLine=
"ctangle mmixware\mmix-io.w libio.ch


"
AdditionalDependencies=
"libio.ch"
Outputs=
"mmix-io.c"
/>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment