20 |
*/ |
*/ |
21 |
|
|
22 |
#define IN_GUIS |
#define IN_GUIS |
|
#include "gclincl.h" |
|
|
#include "config.h" |
|
23 |
|
|
24 |
#include <stdio.h> |
#include <stdio.h> |
25 |
#include <stdlib.h> |
#include <stdlib.h> |
74 |
#endif |
#endif |
75 |
|
|
76 |
|
|
77 |
|
#include "guis.h" |
78 |
|
|
79 |
#ifndef TRUE |
#ifndef TRUE |
80 |
#define TRUE (1) |
#define TRUE (1) |
81 |
#define FALSE (0) |
#define FALSE (0) |
82 |
#endif |
#endif |
83 |
|
|
|
#include "guis.h" |
|
|
|
|
84 |
FILE *pstreamDebug; |
FILE *pstreamDebug; |
85 |
int fDebugSockets; |
int fDebugSockets; |
86 |
|
|
207 |
|
|
208 |
|
|
209 |
int delay; |
int delay; |
210 |
int main(argc, argv) |
int main(argc, argv,envp) |
211 |
int argc; |
int argc; |
212 |
char *argv[]; |
char *argv[]; |
213 |
|
char *envp[]; |
214 |
{ |
{ |
215 |
int rv = 0; |
int rv = 0; |
216 |
{ |
{ |
308 |
to set waiting to 0 */ |
to set waiting to 0 */ |
309 |
while (-- delay >=0) sleep(1); |
while (-- delay >=0) sleep(1); |
310 |
{ |
{ |
|
char *buf = "\0\0"; |
|
311 |
TkX_Wish(argc, argv); |
TkX_Wish(argc, argv); |
312 |
} |
} |
313 |
|
|
404 |
{ |
{ |
405 |
char buf[0x1000]; |
char buf[0x1000]; |
406 |
char *p = buf; |
char *p = buf; |
|
int cb; |
|
407 |
int m; |
int m; |
408 |
int n_written; |
int n_written; |
409 |
struct message_header *msg; |
struct message_header *msg; |
458 |
{ int m; |
{ int m; |
459 |
int body_length; |
int body_length; |
460 |
int tot; |
int tot; |
|
char *p = buf; |
|
461 |
struct message_header *msg; |
struct message_header *msg; |
462 |
msg = (struct message_header *) buf; |
msg = (struct message_header *) buf; |
463 |
m= read1(sfd,msg,MESSAGE_HEADER_SIZE,DEFAULT_TIMEOUT_FOR_TK_READ); |
m= read1(sfd,msg,MESSAGE_HEADER_SIZE,DEFAULT_TIMEOUT_FOR_TK_READ); |
478 |
if (m == body_length) |
if (m == body_length) |
479 |
{ return msg;}} |
{ return msg;}} |
480 |
if (m < 0) exit(1); |
if (m < 0) exit(1); |
481 |
fail: |
{ static int bad_read_allowed=4; |
|
{ static bad_read_allowed=4; |
|
482 |
if (bad_read_allowed-- < 0) exit(1); |
if (bad_read_allowed-- < 0) exit(1); |
483 |
} |
} |
484 |
|
|
486 |
return 0; |
return 0; |
487 |
} |
} |
488 |
|
|
489 |
|
void |
490 |
error(s) |
error(s) |
491 |
char *s; |
char *s; |
492 |
{ fprintf(stderr,"%s",s); abort(); |
{ fprintf(stderr,"%s",s); abort(); |
493 |
} |
} |
494 |
|
|
495 |
|
void |
496 |
write_timeout_error(s) |
write_timeout_error(s) |
497 |
char *s; |
char *s; |
498 |
{ fprintf(stderr,"write timeout: %s",s); abort(); |
{ fprintf(stderr,"write timeout: %s",s); abort(); |
499 |
} |
} |
500 |
|
void |
501 |
connection_failure(s) |
connection_failure(s) |
502 |
char *s; |
char *s; |
503 |
{ fprintf(stderr,"connection_failure:%s",s); abort(); |
{ fprintf(stderr,"connection_failure:%s",s); abort(); |
504 |
} |
} |
505 |
|
|
506 |
|
object |
507 |
|
make_fixnum(long i) { |
508 |
|
|
509 |
|
static union lispunion lu; |
510 |
|
|
511 |
|
lu.FIX.FIXVAL=i; |
512 |
|
return &lu; |
513 |
|
|
514 |
|
} |