Rename %time to %behn, tym to now; closes #334

This commit is contained in:
Anton Dyudin 2015-06-24 12:50:30 -07:00
parent 9edda1bb73
commit cfe0339761
5 changed files with 42 additions and 43 deletions

View File

@ -295,13 +295,13 @@ OUT_OFILES=\
V_OFILES=\
vere/ames.o \
vere/behn.o \
vere/cttp.o \
vere/http.o \
vere/loop.o \
vere/raft.o \
vere/reck.o \
vere/sist.o \
vere/temp.o \
vere/term.o \
vere/time.o \
vere/unix.o \
@ -411,7 +411,7 @@ $(LIBSCRYPT):
$(CRE2_OFILES): outside/cre2/src/src/cre2.cpp outside/cre2/src/src/cre2.h $(LIBRE2)
$(CXX) $(CXXFLAGS) -c $< -o $@
$(V_OFILES): i/v/vere.h
$(V_OFILES): include/vere/vere.h
ifdef NO_SILENT_RULES
$(BIN)/urbit: $(LIBCRE) $(LIBCOMMONMARK) $(VERE_OFILES) $(LIBUV) $(LIBRE2) $(LIBED25519) $(LIBANACHRONISM) $(LIBSCRYPT)

View File

@ -1019,7 +1019,6 @@
# define c3__teal c3_s4('t','e','a','l')
# define c3__teck c3_s4('t','e','c','k')
# define c3__tell c3_s4('t','e','l','l')
# define c3__temp c3_s4('t','e','m','p')
# define c3__terg c3_s4('t','e','r','g')
# define c3__term c3_s4('t','e','r','m')
# define c3__test c3_s4('t','e','s','t')

View File

@ -369,13 +369,13 @@
#endif
} u3_unix;
/* u3_temp: just a timer for ever
/* u3_behn: just a timer for ever
*/
typedef struct _u3_temp {
uv_timer_t tim_u; // temp timer
typedef struct _u3_behn {
uv_timer_t tim_u; // behn timer
c3_w run_w; // run of consecutive alarms
c3_o alm; // alarm
} u3_temp;
} u3_behn;
/* u2_utfo: unix terminfo strings.
*/
@ -558,7 +558,7 @@
u3_save sav_u; // autosave
u3_opts ops_u; // commandline options
u3_unix unx_u; // sync and clay
u3_temp teh_u; // temp timer
u3_behn teh_u; // behn timer
c3_o liv; // if u3_no, shut down
c3_i xit_i; // exit code for shutdown
void* ssl_u; // struct SSL_CTX*
@ -976,22 +976,22 @@
u3_unix_io_poll(void);
/** Temp, just a timer.
/** behn, just a timer.
**/
/* u2_temp_io_init(): initialize temp timer.
/* u2_behn_io_init(): initialize behn timer.
*/
void
u2_temp_io_init(void);
u2_behn_io_init(void);
/* u2_temp_io_exit(): terminate timer.
/* u2_behn_io_exit(): terminate timer.
*/
void
u2_temp_io_exit(void);
u2_behn_io_exit(void);
/* u2_temp_io_poll(): update temp IO state.
/* u2_behn_io_poll(): update behn IO state.
*/
void
u2_temp_io_poll(void);
u2_behn_io_poll(void);
/** HTTP server.
@ -1125,20 +1125,20 @@
/** New timer system.
**/
/* u3_temp_io_init(): initialize time timer.
/* u3_behn_io_init(): initialize time timer.
*/
void
u3_temp_io_init(void);
u3_behn_io_init(void);
/* u3_temp_io_exit(): terminate timer.
/* u3_behn_io_exit(): terminate timer.
*/
void
u3_temp_io_exit(void);
u3_behn_io_exit(void);
/* u3_temp_io_poll(): update temp IO state.
/* u3_behn_io_poll(): update behn IO state.
*/
void
u3_temp_io_poll(void);
u3_behn_io_poll(void);
/** HTTP client.

View File

@ -1,4 +1,4 @@
/* v/temp.c
/* v/behn.c
**
** This file is in the public domain.
*/
@ -21,30 +21,30 @@
#include "all.h"
#include "vere/vere.h"
/* u3_temp(): initialize time timer.
/* u3_behn(): initialize time timer.
*/
void
u3_temp_io_init(void)
u3_behn_io_init(void)
{
u3_temp* teh_u = &u3_Host.teh_u;
u3_behn* teh_u = &u3_Host.teh_u;
uv_timer_init(u3L, &teh_u->tim_u);
teh_u->alm = c3n;
}
/* u3_temp_io_exit(): terminate timer.
/* u3_behn_io_exit(): terminate timer.
*/
void
u3_temp_io_exit(void)
u3_behn_io_exit(void)
{
}
/* _temp_time_cb(): timer callback.
/* _behn_time_cb(): timer callback.
*/
static void
_temp_time_cb(uv_timer_t* tim_u)
_behn_time_cb(uv_timer_t* tim_u)
{
u3_temp* teh_u = &u3_Host.teh_u;
u3_behn* teh_u = &u3_Host.teh_u;
if(teh_u->run_w < 1024) {
teh_u->run_w++;
}
@ -52,19 +52,19 @@ _temp_time_cb(uv_timer_t* tim_u)
u3_lo_open();
{
u3v_plan
(u3nt(u3_blip, c3__temp, u3_nul),
(u3nt(u3_blip, c3__behn, u3_nul),
u3nc(c3__wake, u3_nul));
}
u3_lo_shut(c3n);
}
/* u3_temp_io_poll(): update temp IO state.
/* u3_behn_io_poll(): update behn IO state.
*/
void
u3_temp_io_poll(void)
u3_behn_io_poll(void)
{
u3_temp* teh_u = &u3_Host.teh_u;
u3_noun wen = u3v_keep(u3nt(u3_blip, c3__temp, u3_nul));
u3_behn* teh_u = &u3_Host.teh_u;
u3_noun wen = u3v_keep(u3nt(u3_blip, c3__behn, u3_nul));
if ( (u3_nul != wen) &&
(c3y == u3du(wen)) &&
@ -83,7 +83,7 @@ u3_temp_io_poll(void)
}
else teh_u->alm = c3y;
uv_timer_start(&teh_u->tim_u, _temp_time_cb, gap_d, 0);
uv_timer_start(&teh_u->tim_u, _behn_time_cb, gap_d, 0);
}
else {
if ( c3y == teh_u->alm ) {

View File

@ -192,8 +192,8 @@ _lo_init()
u3_save_io_init();
u3a_lop(cod_l);
cod_l = u3a_lush(c3__temp);
u3_temp_io_init();
cod_l = u3a_lush(c3__behn);
u3_behn_io_init();
u3a_lop(cod_l);
}
@ -252,8 +252,8 @@ u3_lo_exit(void)
u3_save_io_exit();
u3a_lop(cod_l);
cod_l = u3a_lush(c3__temp);
u3_temp_io_exit();
cod_l = u3a_lush(c3__behn);
u3_behn_io_exit();
u3a_lop(cod_l);
}
@ -284,8 +284,8 @@ _lo_poll(void)
u3_unix_io_poll();
u3a_lop(cod_l);
cod_l = u3a_lush(c3__temp);
u3_temp_io_poll();
cod_l = u3a_lush(c3__behn);
u3_behn_io_poll();
u3a_lop(cod_l);
}
@ -299,7 +299,7 @@ _lo_how(u3_noun how)
default: c3_assert(0); break;
case c3__ames: return "ames";
case c3__temp: return "temp";
case c3__behn: return "behn";
case c3__term: return "cons";
case c3__htcn: return "http-conn";
case c3__htls: return "http-lisn";