dpsXclient.c revision 824
* dpsXclient.c -- Implementation of the Display PostScript Client Library.
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#ifdef VMS
#include <decw$include/X.h>
#include "publictypes.h"
#include "DPS/dpsclient.h"
#include "dpsprivate.h"
#include "dpsXpriv.h"
#include "DPS/dpsXclient.h"
#include "dpsdict.h"
#include "DPS/dpsexcept.h"
#include "dpsXint.h"
long int cid)
return (cc);
return (NIL);
int cid)
int contextID,
if (!c) return NIL;
*c = *oldc;
c->eofReceived = false;
c->creator = true;
c->zombie = false;
return (DPSContext)c;
(unsigned long) ctxt, 0);
static void procFlushContext(
char *arg)
if (!c->creator)
c->resultTableLength = 0;
c->resultTableLength = 0;
if (c->zombie)
c->resultTableLength = 0;
void DPSinnerProcWriteData(
char *buf,
unsigned int count)
int currStatus;
int retries = 0;
currStatus = 0;
retries = 0;
++retries;
c->eofReceived = false;
if (c->creator)
void DPSDefaultPrivateHandler(
long unsigned int arg1,
long unsigned int arg2,
char *prefix,
char *suffix)
switch (errorCode) {
case dps_err_invalidAccess:
case dps_err_encodingCheck:
case dps_err_closedDisplay:
case dps_err_deadContext:
case dps_err_warning:
case dps_err_fatal:
abort();
case dps_err_recursiveWait:
(void) sprintf (m,
s->creator = true;
c->creator = true;
c->zombie = false;
if (!s->creator) {
c->creator = true;
c->zombie = false;
s->firstContext = c;
long int DPSLastUserObjectIndex = 0;
long int DPSNewUserObjectIndex (void)
return (DPSLastUserObjectIndex++);
void XDPSSetProcs (void)
if (!textCtxProcs)
if (!ctxProcs)
if (!XDPSconvProcs)
if (!XDPSrawProcs)
0, DefaultStdCMap,
DefaultStdCMap, 0, false);
return (NIL);
return (newCtxt);
unsigned int eventmask,
int actual,
return (NIL);
return (newCtxt);
unsigned int eventmask,
int actual,
return (NIL);
return (newCtxt);
DPSPrivSpace s;
if (DPSInitialize () != 0)
return (NIL);
if (c != NIL)
return ((DPSContext) c);
return (NIL);
return (NIL);
s = spaces;
while (s != NIL)
s = s->next;
s->creator = false;
spaces = s;
s->firstContext = c;
c->creator = false;
c->zombie = false;
return ((DPSContext) c);
(unsigned long) newNameEncoding,
(unsigned long) newProgEncoding);
DPSPrivSpace s;
if (DPSInitialize () != 0)
return (NIL);
s = spaces;
while (s != NIL)
s = s->next;
return (NIL);
s->creator = false;
spaces = s;
return ((DPSSpace) s);
return ((DPSContext) c);
return (NIL);
return (NIL);
return old;
return old;
i[0] = i0;
void XDPSStatusEventHandler (e)
XDPSLStatusEvent *e;
if (c == NIL)
c->zombie = true;
XDPSQuitBlocking = true;
void XDPSReadyEventHandler (e)
XDPSLReadyEvent *e;
if (c == NIL)
void DPSWarnProc(
char *msg)
if (DPSInitialize() != 0) return;
void DPSFatalProc(
char *msg)
if (DPSInitialize() != 0) return;
void DPSCantHappen(void)
static int locked = 0;
++locked;
--locked;
switch (newMode) {
case dps_event_pass_through:
else return dps_event_internal_dispatch;
int *status)
return True;
return False;
return True;
|| t == csdps_output_with_len)
return True;
return False;
return True;
return False;
return False;
} else return False;
return True;
int *val)
return True;
return False;
return True;