[dhcp-agent-commits] dhcp-agent/src dhcp-client-guile.c,1.11,1.12 dhcp-client-guile.h,1.2,1.3 dhcp-c
Status: Alpha
Brought to you by:
actmodern
From: <act...@us...> - 2003-08-05 04:51:38
|
Update of /cvsroot/dhcp-agent/dhcp-agent/src In directory sc8-pr-cvs1:/tmp/cvs-serv25348/src Modified Files: dhcp-client-guile.c dhcp-client-guile.h dhcp-client.c Log Message: client now linking to guile utility code Index: dhcp-client-guile.c =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/src/dhcp-client-guile.c,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** dhcp-client-guile.c 28 Jun 2003 17:40:10 -0000 1.11 --- dhcp-client-guile.c 5 Aug 2003 04:51:35 -0000 1.12 *************** *** 36,39 **** --- 36,40 ---- #include "dhcp-client-cache.h" #include "dhcp-client.h" + #include "dhcp-guile-util.h" #include "dhcp-client-guile.h" #include "dhcp-interface.h" *************** *** 42,76 **** static scm_t_bits client_control_tag; - /* * * * * * * * * * * * * * * * * * * * * * * * - * utility routines guile doesn't provide but * - * really should :| * - * * * * * * * * * * * * * * * * * * * * * * * */ - - static char *x_scm_symbol2newstr(SCM symbol) - { - size_t len; - char *newstr; - - len = SCM_SYMBOL_LENGTH(symbol); - newstr = xmalloc((len + 1) * sizeof(char)); - memcpy(newstr, SCM_SYMBOL_CHARS(symbol), len); - newstr[len] = 0; - - return newstr; - } - - static char *x_scm_string2newstr(SCM string) - { - size_t len; - char *newstr; - - len = SCM_STRING_LENGTH(string); - newstr = xmalloc((len + 1) * sizeof(char)); - memcpy(newstr, SCM_STRING_CHARS(string), len); - newstr[len] = 0; - - return newstr; - } - /* * * * * * * * * * * * * * * * * * * * * * * * list conversions. we need to do a few * --- 43,46 ---- *************** *** 534,538 **** client_control_smob_t *client_control_smob; ! client_control_smob = xmalloc(sizeof(client_control_smob_t)); client_control_smob->dc = dc; --- 504,508 ---- client_control_smob_t *client_control_smob; ! client_control_smob = scm_must_malloc(sizeof(client_control_smob_t), "dhcp_scm_make_client_control"); client_control_smob->dc = dc; Index: dhcp-client-guile.h =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/src/dhcp-client-guile.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** dhcp-client-guile.h 20 May 2003 01:43:40 -0000 1.2 --- dhcp-client-guile.h 5 Aug 2003 04:51:35 -0000 1.3 *************** *** 26,31 **** #define DHCP_CLIENT_GUILE_H - #include <libguile.h> - typedef struct client_control_smob { dhcp_client_control_t *dc; --- 26,29 ---- Index: dhcp-client.c =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/src/dhcp-client.c,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** dhcp-client.c 8 Jul 2003 07:01:41 -0000 1.36 --- dhcp-client.c 5 Aug 2003 04:51:35 -0000 1.37 *************** *** 34,37 **** --- 34,38 ---- #include "dhcp-client-cache.h" #include "dhcp-client.h" + #include "dhcp-guile-util.h" #include "dhcp-client-guile.h" |