User guide

E-71
PLI Access Routines
Caution
You must call vcsSpInitialize() and vcsSpSetFilePtr()
before calling this routine.
vcsSpEncoding
Syntax
int vcsSpEncoding(vcsSpStateID esp)
Synopsis
Calling vcsSpEncodeOn() and vcsSpEncodeOff() turns
encoding on and off. Use this function to get the current state of
encoding.
Returns
1 for on, 0 for off.
Example D-31 Example of vcsSpEncoding
vcsSpStateID esp = vcsSpInitialize();
FILE *fp = fopen("protected.file", "w");
if (fp == NULL) { printf("ERROR: file ..."); exit(1); }
vcsSpSetFilePtr(esp, fp);
...
if (! vcsSpEncoding(esp))
vcsSpEncodeOn(esp)
...
if (vcsSpEncoding(esp))
vcsSpEncodeOff(esp);
fclose(fp);
vcsSpClose(esp);