svn: r1223
This commit is contained in:
Matthew Flatt 2005-11-03 20:17:44 +00:00
parent 2c7a5c276a
commit 6f91c62cf9
7 changed files with 442 additions and 1240 deletions

View File

@ -143,6 +143,8 @@ Scheme_Config *scheme_init_error_escape_proc(Scheme_Config *config)
%E = error number for platform-specific error string
%Z = potential platform-specific error number; additional char*
is either NULL or a specific error message
%N = boolean then error number like %E (if boolean is 0)
or error number for scheme_hostname_error()
*/
static long sch_vsprintf(char *s, long maxlen, const char *msg, va_list args)
@ -187,6 +189,10 @@ static long sch_vsprintf(char *s, long maxlen, const char *msg, va_list args)
case 'E':
ints[ip++] = mzVA_ARG(args, int);
break;
case 'N':
ints[ip++] = mzVA_ARG(args, int);
ints[ip++] = mzVA_ARG(args, int);
break;
case 'Z':
ints[ip++] = mzVA_ARG(args, int);
ptrs[pp++] = mzVA_ARG(args, char*);
@ -295,9 +301,17 @@ static long sch_vsprintf(char *s, long maxlen, const char *msg, va_list args)
case 'e':
case 'E':
case 'Z':
case 'N':
{
int en;
int en, he;
char *es;
if (type == 'N') {
he = ints[ip++];
type = 'E';
} else
he = 0;
en = ints[ip++];
if (type == 'Z')
@ -305,6 +319,9 @@ static long sch_vsprintf(char *s, long maxlen, const char *msg, va_list args)
else
es = NULL;
if (he)
es = (char *)scheme_hostname_error(en);
if (en || es) {
#ifdef NO_STRERROR_AVAILABLE
if (!es)

View File

@ -3145,6 +3145,7 @@ int mark_udp_evt_MARK(void *p) {
gcMARK(uw->udp);
gcMARK(uw->str);
gcMARK(uw->dest_addr);
return
gcBYTES_TO_WORDS(sizeof(Scheme_UDP_Evt));
@ -3155,6 +3156,7 @@ int mark_udp_evt_FIXUP(void *p) {
gcFIXUP(uw->udp);
gcFIXUP(uw->str);
gcFIXUP(uw->dest_addr);
return
gcBYTES_TO_WORDS(sizeof(Scheme_UDP_Evt));

View File

@ -1262,6 +1262,7 @@ mark_udp_evt {
gcMARK(uw->udp);
gcMARK(uw->str);
gcMARK(uw->dest_addr);
size:
gcBYTES_TO_WORDS(sizeof(Scheme_UDP_Evt));

File diff suppressed because it is too large Load Diff

View File

@ -773,7 +773,8 @@ MZ_EXTERN void scheme_add_fd_eventmask(void *fds, int mask);
MZ_EXTERN void scheme_security_check_file(const char *who, const char *filename, int guards);
MZ_EXTERN void scheme_security_check_network(const char *who, const char *host, int port, int client);
MZ_EXTERN int scheme_get_host_address(const char *address, int id, void *result);
MZ_EXTERN struct addrinfo *scheme_get_host_address(const char *address, int id, int *err,
int family, int passive, int tcp);
MZ_EXTERN int scheme_get_port_file_descriptor(Scheme_Object *p, long *_fd);
MZ_EXTERN int scheme_get_port_socket(Scheme_Object *p, long *_s);

View File

@ -644,7 +644,8 @@ void (*scheme_add_fd_handle)(void *h, void *fds, int repost);
void (*scheme_add_fd_eventmask)(void *fds, int mask);
void (*scheme_security_check_file)(const char *who, const char *filename, int guards);
void (*scheme_security_check_network)(const char *who, const char *host, int port, int client);
int (*scheme_get_host_address)(const char *address, int id, void *result);
struct addrinfo *(*scheme_get_host_address)(const char *address, int id, int *err,
int family, int passive, int tcp);
int (*scheme_get_port_file_descriptor)(Scheme_Object *p, long *_fd);
int (*scheme_get_port_socket)(Scheme_Object *p, long *_s);
void (*scheme_set_type_printer)(Scheme_Type stype, Scheme_Type_Printer printer);

View File

@ -2024,6 +2024,8 @@ const char *scheme_number_suffix(int);
void scheme_reset_prepared_error_buffer(void);
const char *scheme_hostname_error(int err);
char *scheme_make_args_string(char *s, int which, int argc, Scheme_Object **argv, long *olen);
#define IMPROPER_LIST_FORM "illegal use of `.'"