Skip to content

Commit 3cb60cc

Browse files
committed
Update C bootstrap source.
1 parent 412a8c3 commit 3cb60cc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

185 files changed

+870
-3740
lines changed

bootstrap/unix-44/Compiler.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */
1+
/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */
22

33
#define SHORTINT INT8
44
#define INTEGER INT16
@@ -122,7 +122,7 @@ static void Compiler_FindLocalObjectFiles (CHAR *objectnames, ADDRESS objectname
122122
Strings_Append((CHAR*)" ", 2, (void*)objectnames, objectnames__len);
123123
Strings_Append(fn, 64, (void*)objectnames, objectnames__len);
124124
} else {
125-
OPM_LogVT100((CHAR*)"33m", 4);
125+
OPM_LogVT100((CHAR*)"91m", 4);
126126
OPM_LogWStr((CHAR*)"Link warning: a local symbol file is present for module ", 57);
127127
OPM_LogWStr(l->name, 256);
128128
OPM_LogWStr((CHAR*)", but local object file '", 26);

bootstrap/unix-44/Configuration.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
1+
/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
22

33
#define SHORTINT INT8
44
#define INTEGER INT16
@@ -19,6 +19,6 @@ export void *Configuration__init(void)
1919
__DEFMOD;
2020
__REGMOD("Configuration", 0);
2121
/* BEGIN */
22-
__MOVE("2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75);
22+
__MOVE("2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75);
2323
__ENDMOD;
2424
}

bootstrap/unix-44/Configuration.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
1+
/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
22

33
#ifndef Configuration__h
44
#define Configuration__h

bootstrap/unix-44/Files.c

Lines changed: 1 addition & 131 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */
1+
/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */
22

33
#define SHORTINT INT8
44
#define INTEGER INT16
@@ -69,9 +69,6 @@ static void Files_CloseOSFile (Files_File f);
6969
static void Files_Create (Files_File f);
7070
export void Files_Delete (CHAR *name, ADDRESS name__len, INT16 *res);
7171
static void Files_Deregister (CHAR *name, ADDRESS name__len);
72-
export void Files_DumpBuffer (Files_Buffer b, INT16 indent);
73-
export void Files_DumpFile (Files_File f, INT16 indent);
74-
export void Files_DumpRider (Files_Rider r, INT16 indent);
7572
static void Files_Err (CHAR *s, ADDRESS s__len, Files_File f, INT16 errcode);
7673
static void Files_Finalize (SYSTEM_PTR o);
7774
static void Files_FlipBytes (SYSTEM_BYTE *src, ADDRESS src__len, SYSTEM_BYTE *dest, ADDRESS dest__len);
@@ -102,7 +99,6 @@ export void Files_Rename (CHAR *old, ADDRESS old__len, CHAR *new, ADDRESS new__l
10299
static void Files_ScanPath (INT16 *pos, CHAR *dir, ADDRESS dir__len);
103100
export void Files_Set (Files_Rider *r, ADDRESS *r__typ, Files_File f, INT32 pos);
104101
export void Files_SetSearchPath (CHAR *path, ADDRESS path__len);
105-
static void Files_Spaces (INT16 i);
106102
export void Files_Write (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE x);
107103
export void Files_WriteBool (Files_Rider *R, ADDRESS *R__typ, BOOLEAN x);
108104
export void Files_WriteBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS x__len, INT32 n);
@@ -116,132 +112,6 @@ export void Files_WriteString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS
116112

117113
#define Files_IdxTrap() __HALT(-1)
118114

119-
static void Files_Spaces (INT16 i)
120-
{
121-
while (i > 0) {
122-
Out_String((CHAR*)" ", 3);
123-
i -= 1;
124-
}
125-
}
126-
127-
void Files_DumpFile (Files_File f, INT16 indent)
128-
{
129-
Files_Spaces(indent);
130-
Out_String((CHAR*)"workName: ", 15);
131-
Out_String(f->workName, 101);
132-
Out_Ln();
133-
Files_Spaces(indent);
134-
Out_String((CHAR*)"registerName: ", 15);
135-
Out_String(f->registerName, 101);
136-
Out_Ln();
137-
Files_Spaces(indent);
138-
Out_String((CHAR*)"tempFile: ", 15);
139-
if (f->tempFile) {
140-
Out_String((CHAR*)"TRUE", 5);
141-
} else {
142-
Out_String((CHAR*)"FALSE", 6);
143-
}
144-
Out_Ln();
145-
Files_Spaces(indent);
146-
Out_String((CHAR*)"identity: ", 15);
147-
Out_String((CHAR*)"...", 4);
148-
Out_Ln();
149-
Files_Spaces(indent);
150-
Out_String((CHAR*)"fd: ", 15);
151-
Out_Int(f->fd, 1);
152-
Out_Ln();
153-
Files_Spaces(indent);
154-
Out_String((CHAR*)"len, ", 15);
155-
Out_Int(f->len, 1);
156-
Out_Ln();
157-
Files_Spaces(indent);
158-
Out_String((CHAR*)"pos: ", 15);
159-
Out_Int(f->pos, 1);
160-
Out_Ln();
161-
Files_Spaces(indent);
162-
Out_String((CHAR*)"bufs: ", 15);
163-
Out_String((CHAR*)"...", 4);
164-
Out_Ln();
165-
Files_Spaces(indent);
166-
Out_String((CHAR*)"swapper: ", 15);
167-
Out_Int(f->swapper, 1);
168-
Out_Ln();
169-
Files_Spaces(indent);
170-
Out_String((CHAR*)"state: ", 15);
171-
Out_Int(f->state, 1);
172-
Out_Ln();
173-
Files_Spaces(indent);
174-
Out_String((CHAR*)"next: ", 15);
175-
Out_Hex((INT32)(ADDRESS)f->next, 1);
176-
Out_Ln();
177-
}
178-
179-
void Files_DumpBuffer (Files_Buffer b, INT16 indent)
180-
{
181-
Files_Spaces(indent);
182-
Out_String((CHAR*)"chg: ", 7);
183-
if (b->chg) {
184-
Out_String((CHAR*)"TRUE", 5);
185-
} else {
186-
Out_String((CHAR*)"FALSE", 6);
187-
}
188-
Out_Ln();
189-
Files_Spaces(indent);
190-
Out_String((CHAR*)"org: ", 7);
191-
Out_Int(b->org, 1);
192-
Out_Ln();
193-
Files_Spaces(indent);
194-
Out_String((CHAR*)"size: ", 7);
195-
Out_Int(b->size, 1);
196-
Out_Ln();
197-
Files_Spaces(indent);
198-
Out_String((CHAR*)"data: ", 7);
199-
Out_Ln();
200-
Out_HexDump((void*)b->data, 4096);
201-
Files_Spaces(indent);
202-
Out_String((CHAR*)"f: ", 7);
203-
if (b->f == NIL) {
204-
Out_String((CHAR*)"<NIL>", 6);
205-
Out_Ln();
206-
} else {
207-
Out_Ln();
208-
Files_DumpFile(b->f, indent + 1);
209-
}
210-
}
211-
212-
void Files_DumpRider (Files_Rider r, INT16 indent)
213-
{
214-
Files_Spaces(indent);
215-
Out_String((CHAR*)"res: ", 9);
216-
Out_Int(r.res, 1);
217-
Out_Ln();
218-
Files_Spaces(indent);
219-
Out_String((CHAR*)"eof: ", 9);
220-
if (r.eof) {
221-
Out_String((CHAR*)"TRUE", 5);
222-
} else {
223-
Out_String((CHAR*)"FALSE", 6);
224-
}
225-
Out_Ln();
226-
Files_Spaces(indent);
227-
Out_String((CHAR*)"org: ", 9);
228-
Out_Int(r.org, 1);
229-
Out_Ln();
230-
Files_Spaces(indent);
231-
Out_String((CHAR*)"offset: ", 9);
232-
Out_Int(r.offset, 1);
233-
Out_Ln();
234-
Files_Spaces(indent);
235-
Out_String((CHAR*)"buf: ", 9);
236-
if (r.buf == NIL) {
237-
Out_String((CHAR*)"<NIL>", 6);
238-
Out_Ln();
239-
} else {
240-
Out_Ln();
241-
Files_DumpBuffer(r.buf, indent + 1);
242-
}
243-
}
244-
245115
static void Files_Assert (BOOLEAN truth)
246116
{
247117
if (!truth) {

bootstrap/unix-44/Files.h

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,10 @@
1-
/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */
1+
/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */
22

33
#ifndef Files__h
44
#define Files__h
55

66
#include "SYSTEM.h"
77

8-
typedef
9-
struct Files_BufDesc {
10-
INT32 _prvt0;
11-
char _prvt1[4108];
12-
} Files_BufDesc;
13-
14-
typedef
15-
Files_BufDesc *Files_Buffer;
16-
178
typedef
189
struct Files_FileDesc *Files_File;
1910

@@ -33,16 +24,12 @@ typedef
3324

3425

3526
import ADDRESS *Files_FileDesc__typ;
36-
import ADDRESS *Files_BufDesc__typ;
3727
import ADDRESS *Files_Rider__typ;
3828

3929
import Files_File Files_Base (Files_Rider *r, ADDRESS *r__typ);
4030
import void Files_ChangeDirectory (CHAR *path, ADDRESS path__len, INT16 *res);
4131
import void Files_Close (Files_File f);
4232
import void Files_Delete (CHAR *name, ADDRESS name__len, INT16 *res);
43-
import void Files_DumpBuffer (Files_Buffer b, INT16 indent);
44-
import void Files_DumpFile (Files_File f, INT16 indent);
45-
import void Files_DumpRider (Files_Rider r, INT16 indent);
4633
import void Files_GetDate (Files_File f, INT32 *t, INT32 *d);
4734
import void Files_GetName (Files_File f, CHAR *name, ADDRESS name__len);
4835
import INT32 Files_Length (Files_File f);

bootstrap/unix-44/Heap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. tsSF */
1+
/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. tsSF */
22

33
#define SHORTINT INT8
44
#define INTEGER INT16

bootstrap/unix-44/Heap.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. tsSF */
1+
/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. tsSF */
22

33
#ifndef Heap__h
44
#define Heap__h

bootstrap/unix-44/Modules.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
1+
/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
22

33
#define SHORTINT INT8
44
#define INTEGER INT16

bootstrap/unix-44/Modules.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
1+
/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
22

33
#ifndef Modules__h
44
#define Modules__h

bootstrap/unix-44/OPB.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
1+
/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
22

33
#define SHORTINT INT8
44
#define INTEGER INT16

0 commit comments

Comments
 (0)