More renaming.

This commit is contained in:
C. Guy Yarvin 2014-09-10 09:45:39 -07:00
parent 464f545e99
commit 57278a5a1d
14 changed files with 26 additions and 103 deletions

View File

@ -78,18 +78,18 @@ CWFLAGS=-Wall
.c.o: .c.o:
$(CC) -c $(CWFLAGS) $(CFLAGS) -o $@ $< $(CC) -c $(CWFLAGS) $(CFLAGS) -o $@ $<
C_OFILES=\ G_OFILES=\
c/a.o \ g/a.o \
c/h.o \ g/h.o \
c/i.o \ g/i.o \
c/j.o \ g/j.o \
c/m.o \ g/m.o \
c/n.o \ g/n.o \
c/r.o \ g/r.o \
c/t.o \ g/t.o \
c/x.o \ g/x.o \
c/v.o \ g/v.o \
c/z.o g/z.o
J_1_OFILES=\ J_1_OFILES=\
j/1/add.o \ j/1/add.o \
@ -245,7 +245,7 @@ J_OFILES=\
$(J_6_OFILES_UT) \ $(J_6_OFILES_UT) \
j/dash.o j/dash.o
BASE_OFILES=$(C_OFILES) $(J_OFILES) BASE_OFILES=$(G_OFILES) $(J_OFILES)
CRE2_OFILES=\ CRE2_OFILES=\
outside/cre2/src/src/cre2.o outside/cre2/src/src/cre2.o

View File

View File

View File

View File

View File

@ -42,15 +42,15 @@ u3_cm_file(c3_c* pas_c)
/* _boot_north(): install a north road. /* _boot_north(): install a north road.
*/ */
static u3_road* static u3_road*
_boot_north(c3_w* mem_w, c3_w len_w) _boot_north(c3_w* mem_w, c3_w siz_w, c3_w len_w)
{ {
c3_w* rut_w = mem_w; c3_w* rut_w = mem_w;
c3_w* hat_w = rut_w; c3_w* hat_w = rut_w;
c3_w* mat_w = ((mem_w + len_w) - c3_wiseof(u3_road)); c3_w* mat_w = ((mem_w + len_w) - siz_w);
c3_w* cap_w = mat_w; c3_w* cap_w = mat_w;
u3_road* rod_u = (void*) mat_w; u3_road* rod_u = (void*) mat_w;
memset(rod_u, 0, sizeof(u3_road)); memset(rod_u, 0, 4 * siz_w);
rod_u->rut_w = rut_w; rod_u->rut_w = rut_w;
rod_u->hat_w = hat_w; rod_u->hat_w = hat_w;
@ -64,15 +64,15 @@ _boot_north(c3_w* mem_w, c3_w len_w)
/* _boot_south(): install a south road. /* _boot_south(): install a south road.
*/ */
static u3_road* static u3_road*
_boot_south(c3_w* mem_w, c3_w len_w) _boot_south(c3_w* mem_w, c3_w siz_w, c3_w len_w)
{ {
c3_w* rut_w = mem_w; c3_w* rut_w = mem_w;
c3_w* hat_w = rut_w; c3_w* hat_w = rut_w;
c3_w* mat_w = ((mem_w + len_w) - c3_wiseof(u3_road)); c3_w* mat_w = ((mem_w + len_w) - siz_w);
c3_w* cap_w = mat_w; c3_w* cap_w = mat_w;
u3_road* rod_u = (void*) mat_w; u3_road* rod_u = (void*) mat_w;
memset(rod_u, 0, sizeof(u3_road)); memset(rod_u, 0, 4 * siz_w);
rod_u->rut_w = rut_w; rod_u->rut_w = rut_w;
rod_u->hat_w = hat_w; rod_u->hat_w = hat_w;
@ -112,7 +112,8 @@ u3_cm_boot(c3_p adr_p, c3_w len_w)
} }
printf("loom: mapped %dMB\n", (len_w >> 18)); printf("loom: mapped %dMB\n", (len_w >> 18));
u3L = map_v; u3L = map_v;
u3H = u3R = _boot_north(map_v, len_w); u3H = (u3_cs_home *)_boot_north(map_v, c3_wiseof(u3_cs_home), len_w);
u3R = &u3H->rod_u;
} }
/* u3_cm_clear(): clear all allocated data in road. /* u3_cm_clear(): clear all allocated data in road.

View File

View File

View File

View File

View File

View File

@ -1,75 +0,0 @@
/* j/3/mur.c
**
** This file is in the public domain.
*/
#include "all.h"
#include "../pit.h"
/* functions
*/
u2_weak // transfer
j2_mb(Pt3, mum)(u2_wire wir_r,
u2_noun cor) // retain
{
u2_noun sam;
if ( u2_none == (sam = u2_frag(u2_cv_sam, cor)) ) {
return u2_bl_bail(wir_r, c3__exit);
} else {
return u2_mum(sam);
}
}
/* structures
*/
u2_ho_jet
j2_mbj(Pt3, mum)[] = {
{ ".2", c3__lite, j2_mb(Pt3, mum),
u2_jet_test | u2_jet_live, u2_none, u2_none },
{ }
};
/* functions
*/
u2_weak // transfer
j2_mbc(Pt3, mur)(u2_wire wir_r,
u2_atom syd, // retain
u2_atom key) // retain
{
c3_w syd_w = u2_cr_word(0, syd);
c3_w len_w = u2_cr_met(5, key);
{
c3_w* key_w = alloca(4 * len_w);
c3_w goc_w;
u2_cr_words(0, len_w, key_w, key);
goc_w = u2_mur_words(syd_w, len_w, key_w);
return u2_ci_words(1, &goc_w);
}
}
u2_weak // transfer
j2_mb(Pt3, mur)(u2_wire wir_r,
u2_noun cor) // retain
{
u2_noun a, b;
if ( (u2_no == u2_mean(cor, u2_cv_sam_2, &a, u2_cv_sam_3, &b, 0)) ||
(u2_no == u2_stud(a)) ||
(u2_no == u2_stud(b)) )
{
return u2_bl_bail(wir_r, c3__exit);
} else {
return j2_mbc(Pt3, mur)(wir_r, a, b);
}
}
/* structures
*/
u2_ho_jet
j2_mbj(Pt3, mur)[] = {
{ ".2", c3__lite, j2_mb(Pt3, mur),
u2_jet_test | u2_jet_live, u2_none, u2_none },
{ }
};

View File

@ -40,7 +40,7 @@
/* u3_cm_file(): load file, as atom, or bail. /* u3_cm_file(): load file, as atom, or bail.
*/ */
static u3_noun u3_noun
u3_cm_file(c3_c* pas_c); u3_cm_file(c3_c* pas_c);
/* u3_cm_clear(): clear all allocated data in road. /* u3_cm_clear(): clear all allocated data in road.
@ -94,12 +94,12 @@
void void
u3_cm_flog(c3_w gof_w); u3_cm_flog(c3_w gof_w);
/* u2_cm_soft(): system soft wrapper. unifies unix and nock errors. /* u3_cm_soft(): system soft wrapper. unifies unix and nock errors.
** **
** Produces [%$ result] or [%error (list tank)]. ** Produces [%$ result] or [%error (list tank)].
*/ */
u2_noun u3_noun
u2_cm_soft(c3_w sec_w, u2_funk fun_f, u2_noun arg); u3_cm_soft(c3_w sec_w, u3_funk fun_f, u3_noun arg);
/* u3_cm_water(): produce high and low watermarks. Asserts u3R == u3H. /* u3_cm_water(): produce high and low watermarks. Asserts u3R == u3H.
*/ */

View File

@ -29,13 +29,10 @@
typedef u3_noun u3_quin; // must be quintuple typedef u3_noun u3_quin; // must be quintuple
typedef u3_noun u3_bean; // loobean: 0 == u3_yes, 1 == u3_no typedef u3_noun u3_bean; // loobean: 0 == u3_yes, 1 == u3_no
typedef u3_noun u3_weak; // may be u3_none typedef u3_noun u3_weak; // may be u3_none
typedef u3_noun (*u3_funk)(u2_noun); typedef u3_noun (*u3_funk)(u3_noun);
/** Typedefs. /** Typedefs.
**/ **/
/* u3_funk: C function producing noun.
typedef
/* u3_atom, u3_cell: logical atom and cell structures. /* u3_atom, u3_cell: logical atom and cell structures.
*/ */
typedef struct { typedef struct {