version 1.32, 1997/06/24 15:09:09
|
version 1.33, 1997/06/25 16:24:57
|
Line 212 XtInputId *id;
|
Line 212 XtInputId *id;
|
# ifndef _WINDOWS |
# ifndef _WINDOWS |
if (THD_TRACE) |
if (THD_TRACE) |
fprintf (stderr, "(BF) removing Xtinput %lu !RWE, sock %d (Request has ended)\n", *id, *s); |
fprintf (stderr, "(BF) removing Xtinput %lu !RWE, sock %d (Request has ended)\n", *id, *s); |
# endif |
# endif /* !_WINDOWS */ |
if ((me->mode & AMAYA_ASYNC) || (me->mode & AMAYA_IASYNC)) { |
if ((me->mode & AMAYA_ASYNC) || (me->mode & AMAYA_IASYNC)) { |
/* free the memory allocated for async requests */ |
/* free the memory allocated for async requests */ |
AHTPrintPendingRequestStatus (me->docid, YES); |
AHTPrintPendingRequestStatus (me->docid, YES); |
Line 258 HTAlertPar *reply;
|
Line 258 HTAlertPar *reply;
|
AHTReqContext *me = HTRequest_context (request); |
AHTReqContext *me = HTRequest_context (request); |
|
|
if (me->reqStatus == HT_NEW) { |
if (me->reqStatus == HT_NEW) { |
if (me->outputfile && (me->output = fopen (me->outputfile, "wb")) == NULL) { |
if ((me->output != stdout) && me->outputfile && (me->output = fopen (me->outputfile, "wb")) == NULL) { |
/* the request is associated with a file */ |
/* the request is associated with a file */ |
me->outputfile[0] = EOS; /* file could not be opened */ |
me->outputfile[0] = EOS; /* file could not be opened */ |
TtaSetStatus (me->docid, 1, TtaGetMessage (AMAYA, AM_CANNOT_CREATE_FILE), |
TtaSetStatus (me->docid, 1, TtaGetMessage (AMAYA, AM_CANNOT_CREATE_FILE), |
Line 322 HTAlertPar *reply;
|
Line 322 HTAlertPar *reply;
|
|
|
if (me->reqStatus == HT_NEW || me->reqStatus == HT_PENDING) { |
if (me->reqStatus == HT_NEW || me->reqStatus == HT_PENDING) { |
/* the request is active, open the output file */ |
/* the request is active, open the output file */ |
if (!(me->output = fopen (me->outputfile, "w"))) { |
if ((me->output != stdout) && !(me->output = fopen (me->outputfile, "w"))) { |
me->outputfile[0] = EOS; |
me->outputfile[0] = EOS; |
/* file could not be opened */ |
/* file could not be opened */ |
TtaSetStatus (me->docid, 1, TtaGetMessage (AMAYA, AM_CANNOT_CREATE_FILE), me->outputfile); |
TtaSetStatus (me->docid, 1, TtaGetMessage (AMAYA, AM_CANNOT_CREATE_FILE), me->outputfile); |
Line 357 HTAlertPar *reply;
|
Line 357 HTAlertPar *reply;
|
} |
} |
#endif /* _WINDOWS */ |
#endif /* _WINDOWS */ |
|
|
#ifndef _WINDOWS |
|
/*---------------------------------------------------------------------- |
/*---------------------------------------------------------------------- |
AHTEvent_register |
AHTEvent_register |
callback called by libwww whenever a socket is open and associated |
callback called by libwww whenever a socket is open and associated |
Line 380 HTPriority p;
|
Line 379 HTPriority p;
|
AHTReqContext *me; /* current request */ |
AHTReqContext *me; /* current request */ |
int status; /* libwww status associated with the socket number */ |
int status; /* libwww status associated with the socket number */ |
|
|
|
/* verify this under UNIX */ |
if (sock == INVSOC) |
if (sock == INVSOC) |
return (0); |
return (0); |
|
|
Line 397 HTPriority p;
|
Line 397 HTPriority p;
|
if (me->reqStatus == HT_NEW) |
if (me->reqStatus == HT_NEW) |
{ |
{ |
/* we are opening a pending request */ |
/* we are opening a pending request */ |
if ((me->output = fopen (me->outputfile, "w")) == NULL) |
if ((me->output != stdout) && (me->output = fopen (me->outputfile, "w")) == NULL) |
{ |
{ |
me->outputfile[0] = '\0'; /* file could not be opened */ |
me->outputfile[0] = '\0'; /* file could not be opened */ |
TtaSetStatus (me->docid, 1, TtaGetMessage (AMAYA, AM_CANNOT_CREATE_FILE), |
TtaSetStatus (me->docid, 1, TtaGetMessage (AMAYA, AM_CANNOT_CREATE_FILE), |
Line 420 HTPriority p;
|
Line 420 HTPriority p;
|
fprintf (stderr, "AHTEvent_register: url %s, sock %d, ops %lu \n", |
fprintf (stderr, "AHTEvent_register: url %s, sock %d, ops %lu \n", |
me->urlName, sock, ops); |
me->urlName, sock, ops); |
|
|
/* add the input */ |
#ifndef _WINDOWS |
if (me->reqStatus == HT_NEW) |
|
me->reqStatus = HT_WAITING; |
|
|
|
if (ops & ReadBits) |
if (ops & ReadBits) |
{ |
{ |
me->read_ops = ops; |
me->read_ops = ops; |
Line 441 HTPriority p;
|
Line 438 HTPriority p;
|
me->except_ops = ops; |
me->except_ops = ops; |
RequestRegisterExceptXtevent (me, sock); |
RequestRegisterExceptXtevent (me, sock); |
} |
} |
} |
#endif /* !_WINDOWS */ |
|
} |
return (status); |
return (status); |
} |
} |
|
|
|
#ifndef _WINDOWS |
|
|
/*---------------------------------------------------------------------- |
/*---------------------------------------------------------------------- |
AHTEvent_unregister |
AHTEvent_unregister |
callback called by libwww each time a request is unregistered. This |
callback called by libwww each time a request is unregistered. This |