daplex.c#111daplex(YYSTYPElvalpDAPparsestatestate)
#113    DAPlexstatelexstate = state->lexstate;
#176     daperror(state,"Illegal \\xDD in TOKEN_STRING");
#180         daperror(state,"Illegal \\xDD in TOKEN_STRING");
dapparse.c#15static OCnodenewocnode(char* nameOCtype octypeDAPparsestatestate);
#27dap_tagparse(DAPparsestatestate, int kind)
#34 dapsetwordchars(state->lexstate,1);
#43dap_datasetbody(DAPparsestatestateObject nameObject decls)
#45    OCnoderoot = newocnode((char*)name,OC_Dataset,state);
#54        dap_parse_error(state,"Duplicate dataset field names: %s",name,dupname);
#55 state->error = OC_ENAMEINUSE;
#59    OCASSERT((state->root == NULL));
#60    state->root = root;
#61    state->root->root = state->root; /* make sure to cross link */
#63    setroot(root,state->ocnodes);
#68dap_attributebody(DAPparsestatestateObject attrlist)
#75 dap_parse_error(state,"Duplicate attribute names in same scope");
#76 state->error = OC_ENAMEINUSE; /* semantic error */
#79    node = newocnode(NULL,OC_Attributeset,state);
#80    OCASSERT((state->root == NULL));
#81    state->root = node;
#83    state->root->root = state->root;
#90dap_errorbody(DAPparsestatestate,
#93    state->error = OC_EDAPSVC;
#94    state->code     = nulldup((char*)code);
#95    state->message  = nulldup((char*)msg);
#100dap_unrecognizedresponse(DAPparsestatestate)
#106    sscanf(state->lexstate->input,"%u ",&httperr);
#108    state->lexstate->next = state->lexstate->input;
#110    for(i=0;i<4096;i++) {if(state->lexstate->input[i] == '\0') break;}
#111    state->lexstate->input[i] = '\0';
#112    dap_errorbody(state,iv,state->lexstate->input,NULL,NULL);
#116dap_declarations(DAPparsestatestateObject declsObject decl)
#127dap_arraydecls(DAPparsestatestateObject arraydeclsObject arraydecl)
#138dap_arraydecl(DAPparsestatestateObject nameObject size)
#143 dap_parse_error(state,"Dimension not an integer");
#144 state->error = OC_EDIMSIZE; /* signal semantic error */
#147 dim = newocnode((char*)name,OC_Dimension,state);
#149 dim = newocnode(NULL,OC_Dimension,state);
#155dap_attrlist(DAPparsestatestateObject attrlistObject attrtuple)
#169dap_attrvalue(DAPparsestatestateObject valuelistObject valueObject etype)
#180dap_attribute(DAPparsestatestateObject nameObject valuesObject etype)
#183    att = newocnode((char*)name,OC_Attribute,state);
#190dap_attrset(DAPparsestatestateObject nameObject attributes)
#193    attset = newocnode((char*)name,OC_Attributeset,state);
#264dap_makebase(DAPparsestatestateObject nameObject etypeObject dimensions)
#267    node = newocnode((char*)name,OC_Atomic,state);
#274dap_makestructure(DAPparsestatestateObject nameObject dimensionsObject fields)
#280        dap_parse_error(state,"Duplicate structure field names in same structure: %s",(char*)name);
#281 state->error = OC_ENAMEINUSE; /* semantic error */
#284    node = newocnode(name,OC_Structure,state);
#292dap_makesequence(DAPparsestatestateObject nameObject members)
#298        dap_parse_error(state,"Duplicate sequence member names in same sequence: %s",(char*)name);
#301    node = newocnode(name,OC_Sequence,state);
#308dap_makegrid(DAPparsestatestateObject nameObject arraydeclObject mapdecls)
#315        dap_parse_error(state,"Duplicate grid map names in same grid: %s",(char*)name);
#316 state->error = OC_ENAMEINUSE; /* semantic error */
#319    node = newocnode(name,OC_Grid,state);
#348daperror(DAPparsestatestate, const char* msg)
#350    return dapsemanticerror(state,OC_EINVAL,msg);
#354dapsemanticerror(DAPparsestatestateOCerror err, const char* msg)
#356    dap_parse_error(state,msg);
#357    state->error = err; /* semantic error */
#383newocnode(char* nameOCtype octypeDAPparsestatestate)
#385    OCnodenode = ocnode_new(name,octype,state->root);
#386    oclistpush(state->ocnodes,(void*)node);
#444dap_parse_error(DAPparsestatestate, const char *fmt, ...)
#452    len = strlen(state->lexstate->input);
#453    suffixlen = strlen(state->lexstate->next);
#456    flatten(state->lexstate->input,tmp,prefixlen);
#458    flatten(state->lexstate->next,tmp,suffixlen);
#466dap_parse_cleanup(DAPparsestatestate)
#468    daplexcleanup(&state->lexstate);
#469    if(state->ocnodes != NULLocnodes_free(state->ocnodes);
#470    state->ocnodes = NULL;
#471    free(state);
#477    DAPparsestatestate = (DAPparsestate*)ocmalloc(sizeof(DAPparsestate)); /*ocmalloc zeros*/
#478    MEMCHECK(state,NULL);
#480        dap_parse_error(state,"dap_parse_init: no input buffer");
#481 state->error = OC_EINVAL; /* semantic error */
#482 dap_parse_cleanup(state);
#485    daplexinit(buf,&state->lexstate);
#486    return state;
#493    DAPparsestatestate = dap_parse_init(parsestring);
#496    state->ocnodes = oclistnew();
#497    state->conn = conn;
#500    parseresult = dapparse(state);
#502 if(state->error == OC_EDAPSVC) {
#504            conn->error.code = nulldup(state->code);
#505            conn->error.message = nulldup(state->message);
#508     if(state->code != NULL
#509                && (strcmp(state->code,"404") == 0 /* tds returns 404 */
#510     || strcmp(state->code,"5") == 0)) /* hyrax returns 5 */
#514 } else if(state->error != OC_NOERR) {
#516     ocerr = state->error;
#518            tree->root = state->root;
#519     state->root = NULL; /* avoid reclaim */
#520            tree->nodes = state->ocnodes;
#521     state->ocnodes = NULL; /* avoid reclaim */
#533    dap_parse_cleanup(state);
dapparselex.h#53extern int dapsemanticerror(DAPparsestatestateOCerror, const char* msg);
dcelex.c#39dcelex(YYSTYPElvalpDCEparsestatestate)
#41    DCElexstatelexstate = state->lexstate;
#72     dceerror(state,"Illegal \\xDD in SCAN_STRING");
#76         dceerror(state,"Illegal \\xDD in SCAN_STRING");
dceparse.c#26projections(DCEparsestatestateObject list0)
#30        nclistfree(state->constraint->projections);
#31        state->constraint->projections = list;
#35 dcetostring((DCEnode*)state->constraint->projections));
#40selections(DCEparsestatestateObject list0)
#44        nclistfree(state->constraint->selections);
#45        state->constraint->selections = list;
#49 dcetostring((DCEnode*)state->constraint->selections));
#55projectionlist(DCEparsestatestateObject list0Object decl)
#61projection(DCEparsestatestateObject varorfcn)
#78segmentlist(DCEparsestatestateObject var0Object decl)
#92segment(DCEparsestatestateObject nameObject slices0)
#118rangelist(DCEparsestatestateObject list0Object decl)
#124range(DCEparsestatestateObject sfirstObject sstrideObject slast)
#142     dceerror(state,"Illegal index for range stride");
#144 dceerror(state,"Illegal index for range last index");
#158range1(DCEparsestatestateObject rangenumber)
#163     dceerror(state,"Illegal range index");
#169clauselist(DCEparsestatestateObject list0Object decl)
#175sel_clause(DCEparsestatestate, int selcase,
#190indexpath(DCEparsestatestateObject list0Object index)
#196array_indices(DCEparsestatestateObject list0Object indexno)
#204     dceerror(state,"Illegal array index");
#218indexer(DCEparsestatestateObject nameObject indices)
#234function(DCEparsestatestateObject fcnnameObject args)
#243arg_list(DCEparsestatestateObject list0Object decl)
#250value_list(DCEparsestatestateObject list0Object decl)
#256value(DCEparsestatestateObject val)
#271var(DCEparsestatestateObject indexpath)
#279constant(DCEparsestatestateObject val, int tag)
#321dceerror(DCEparsestatestate, char* msg)
#323  strncpy(state->errorbuf,msg,1023);
#324  state->errorcode=NC_EDAPCONSTRAINT;
#329dce_parse_cleanup(DCEparsestatestate)
#331    dcelexcleanup(&state->lexstate); /* will free */
#337  DCEparsestatestate = (DCEparsestate*)calloc(1,sizeof(DCEparsestate));;
#338  if(state==NULL) return (DCEparsestate*)NULL;
#341    dceerror(state,"ce_parse_init: no input buffer");
#343    state->errorbuf[0] = '\0';
#344    state->errorcode = 0;
#345    dcelexinit(input,&state->lexstate);
#346 state->constraint = constraint;
#348  return state;
#359    DCEparsestatestate;
#370        state = ce_parse_init(input,constraint);
#371        if(dceparse(state) == 0) {
#383     if(errmsgp) *errmsgp = nulldup(state->errorbuf);
#385 errcode = state->errorcode;
#386        dce_parse_cleanup(state);
dceparselex.h#62extern int dceerror(DCEparsestatestate, char* msg);
#63extern void projections(DCEparsestatestateObject list0);
#64extern void selections(DCEparsestatestateObject list0);
#65extern Object projectionlist(DCEparsestatestateObject list0Object decl);
#66extern Object projection(DCEparsestatestateObject segmentlist);
#67extern Object segmentlist(DCEparsestatestateObject list0Object decl);
#68extern Object segment(DCEparsestatestateObject nameObject slices0);
#69extern Object array_indices(DCEparsestatestateObject list0Object decl);
#70extern Object range(DCEparsestatestateObjectObjectObject);
#71extern Object selectionlist(DCEparsestatestateObject list0Object decl);
#72extern Object sel_clause(DCEparsestatestate, int selcaseObject path0Object relop0Object values);
#73extern Object selectionpath(DCEparsestatestateObject list0Object text);
#74extern Object arrayelement(DCEparsestatestateObject nameObject index);
#75extern Object function(DCEparsestatestateObject fcnnameObject args);
#76extern Object arg_list(DCEparsestatestateObject list0Object decl);
#77extern Object value_list(DCEparsestatestateObject list0Object decl);
#78extern Object value(DCEparsestatestateObject value);
#80extern Object indexer(DCEparsestatestateObject nameObject indices);
#81extern Object indexpath(DCEparsestatestateObject list0Object index);
#82extern Object var(DCEparsestatestateObject indexpath);
#83extern Object constant(DCEparsestatestateObject val, int tag);
#84extern Object clauselist(DCEparsestatestateObject list0Object decl);
#85extern Object range1(DCEparsestatestateObject rangenumber);
#86extern Object rangelist(DCEparsestatestateObject list0Object decl);
generate.c#36int generator_reset(Generatorgenerator, void* state)
#38    generator->globalstate = state;
getvara.c#119    int state;
#272    state = 0;
#274 state = CACHED;
#283 state = FETCHWHOLE;
#286     state = FETCHVAR;
#288     state = FETCHPART;
#290    ASSERT(state != 0);
#292    switch (state) {
#387    default: PANIC1("unknown fetch state: %d\n",state);
lookup3.c#982  uint32_t h,i,state[HASHSTATE];
#986  for (i=0; i<HASHSTATE; ++istate[i] = 1;
ncgenl.c#154#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
ncgenyy.c#153#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
oc.c#56    OCstatestate = NULL;
#58    ocerr = ocopen(&state,url);
#60      *linkp = (OCobject)(state);
#62      if(state) free(state);
#81    OCstatestate;
#83    OCDEREF(OCstate*,state,link);
#84    occlose(state);
#119    OCstatestate;
#123    OCDEREF(OCstate*,state,link);
#125    ocerr = ocfetch(state,constraint,dxdkind,flags,&root);
#263    OCstatestate;
#266    OCDEREF(OCstate*,state,link);
#270    if(state == NULL || node == NULL) return OCTHROW(OCTHROW(OC_EINVAL));
#853    OCstatestate;
#857    OCDEREF(OCstate*,state,link);
#863    return OCTHROW(ocddsdasmerge(state,das,dds));
#890    OCstatestate;
#894    OCDEREF(OCstate*,state,link);
#900    ocerr = ocdata_getroot(state,root,&droot);
#925    OCstatestate;
#929    OCDEREF(OCstate*,state,link);
#934    ocerr = ocdata_ithfield(state,data,index,&field);
#1053    OCstatestate;
#1057    OCDEREF(OCstate*,state,link);
#1062    ocerr = ocdata_container(state,data,&container);
#1086    OCstatestate;
#1090    OCDEREF(OCstate*,state,link);
#1095    ocerr = ocdata_root(state,data,&root);
#1122    OCstatestate;
#1126    OCDEREF(OCstate*,state,link);
#1131    ocerr = ocdata_ithelement(state,data,indices,&element);
#1156    OCstatestate;
#1160    OCDEREF(OCstate*,state,link);
#1165    ocerr = ocdata_ithrecord(state,data,index,&record);
#1192    OCstatestate;
#1195    OCDEREF(OCstate*,state,link);
#1199    return OCTHROW(ocdata_position(state,data,indices));
#1223    OCstatestate;
#1226    OCDEREF(OCstate*,state,link);
#1230    return OCTHROW(ocdata_recordcount(state,data,countp));
#1458    OCstatestate;
#1464    OCDEREF(OCstate*,state,link);
#1485        ocerr = ocdata_read(state,data,startpoint,N,memory,memsize);
#1487 ocdataddsmsg(state,pattern->tree);
#1730    OCstatestate;
#1732    OCDEREF(OCstate*,state,link);
#1734    return ocparamlookup(state,param);
#1746    OCstatestate;
#1748    OCDEREF(OCstate*,state,link);
#1750    return OCTHROW(ocparamdelete(state->clientparams,param));
#1761    OCstatestate;
#1763    OCDEREF(OCstate*,state,link);
#1765    state->clientparams = dapparaminsert(state->clientparams,param,value);
#1777    OCstatestate;
#1779    OCDEREF(OCstate*,state,link);
#1781    return dapparamreplace(state->clientparams,param,value);
#1816    OCstatestate;
#1818    OCDEREF(OCstate*,state,link);
#1819    return OCTHROW(ocsvcerrordata(state,codep,msgp,httpp));
#1834    OCstatestate;
#1836    OCDEREF(OCstate*,state,link);
#1837    return state->error.httpcode;
#1875    OCstatestate;
#1877    OCDEREF(OCstate*,state,link);
#1878    return OCTHROW(ocupdatelastmodifieddata(state));
#1884    OCstatestate;
#1886    OCDEREF(OCstate*,state,link);
#1887    return state->datalastmodified;
#1897    if(linkp) *linkp = node->root->tree->state;
#1942    OCstatestate;
#1945    OCDEREF(OCstate*,state,link);
#1949    ocdd(state,root,1,level);
#1967    OCstatestate;
#1972    OCDEREF(OCstate*,state,link);
#1977    ocdumpdatapath(state,data,buffer);
#1986    OCstatestate;
#1990    OCDEREF(OCstate*,state,link);
#1995    ocdumpdatatree(state,data,buffer,0);
#2053    OCstatestate;
#2057    OCDEREF(OCstate*,state,link);
#2061    return OCTHROW(ocset_curlopt(state,f->flag,value));
#2078    OCstatestate;
#2081    OCDEREF(OCstate*,state,link);
#2094    return OCTHROW(ocset_netrc(state,file));
#2111    OCstatestate;
#2113    OCDEREF(OCstate*,state,link);
#2117    return OCTHROW(ocset_useragent(state,agent));
#2169    OCstatestate;
#2171    OCDEREF(OCstate*,state,link);
#2172    oc_curl_debug(state);
occlientparams.c#29ocparamdecode(OCstatestate)
#32    i = ocuridecodeparams(state->uri);
#38ocparamlookup(OCstatestate, const char* key)
#41    if(state == NULL || key == NULL || state->uri == NULL) return NULL;
#42    if(!ocurilookup(state->uri,key,&value))
#48ocparamset(OCstatestate, const char* params)
#51    i = ocurisetparams(state->uri,params);
occompile.c#40occompile(OCstatestateOCnodexroot)
#47    OCASSERT(state != NULL);
#58    ocstat = occompile1(state,xroot,xxdrs,&data);
#65    ocdumpdatatree(state,data,buffer,0);
#74occompile1(OCstatestateOCnodexnodeXXDRxxdrsOCdata** datap)
#93 ocstat = occompilefields(state,data,xxdrs,istoplevel(xnode));
#99     ocstat = occompilefields(state,data,xxdrs,istoplevel(xnode));
#131 ocstat = occompilefields(state,instance,xxdrs,!TOPLEVEL);
#152 ocstat = occompilerecord(state,xnode,xxdrs,&record);
#178 ocstat = occompileatomic(state,data,xxdrs);
#194 ocdata_free(state,data);
#204     ocdata_free(state,(OCdata*)oclistget(records,i));
#209 ocdata_free(state,data);
#215occompilerecord(OCstatestateOCnodexnodeXXDRxxdrsOCdata** recordp)
#225    ocstat = OCTHROW(occompilefields(state,record,xxdrs,!TOPLEVEL));
#232     ocdata_free(state,record);
#238occompilefields(OCstatestateOCdatadataXXDRxxdrs, int istoplevel)
#255        ocstat = occompile1(state,fieldnode,xxdrs,&fieldinstance);
#281     ocdata_free(state,data->instances[i]);
#288occompileatomic(OCstatestateOCdatadataXXDRxxdrs)
#377ocdata_free(OCstatestateOCdatadata)
#385     ocdata_free(state,data->instances[i]);
occompile.h#7extern OCerror occompile(OCstatestateOCnodexroot);
occurlfunctions.c#22#define CHECK(state,flag,value) {if(check(state,flag,(void*)value) != OC_NOERR) {goto done;}}
#25static OCerror oc_set_curl_options(OCstatestate);
#29check(OCstatestate, int flag, void* value)
#31    OCerror stat = ocset_curlopt(state,flag,value);
#77ocset_curlopt(OCstatestate, int flag, void* value)
#81    cstat = OCCURLERR(state,curl_easy_setopt(state->curl,flag,value));
#91ocset_curlflag(OCstatestate, int flag)
#98        if(state->creds.userpwd != NULL) {
#99     CHECK(stateCURLOPT_USERPWDstate->creds.userpwd);
#100            CHECK(stateCURLOPT_HTTPAUTH, (OPTARG)CURLAUTH_ANY);
#105        if(state->curlflags.cookiejar) {
#107     CHECK(stateCURLOPT_COOKIEJARstate->curlflags.cookiejar);
#108     CHECK(stateCURLOPT_COOKIEFILEstate->curlflags.cookiejar);
#113 if(state->curlflags.netrc) {
#114     CHECK(stateCURLOPT_NETRC, (OPTARG)CURL_NETRC_REQUIRED);
#115     CHECK(stateCURLOPT_NETRC_FILEstate->curlflags.netrc);
#120 if(state->curlflags.verbose)
#121     CHECK(stateCURLOPT_VERBOSE, (OPTARG)1L);
#125 if(state->curlflags.timeout)
#126     CHECK(stateCURLOPT_TIMEOUT, (OPTARG)((long)state->curlflags.timeout));
#130        if(state->curlflags.useragent)
#131     CHECK(stateCURLOPT_USERAGENTstate->curlflags.useragent);
#135        CHECK(stateCURLOPT_FOLLOWLOCATION, (OPTARG)1L);
#139 CHECK(stateCURLOPT_MAXREDIRS, (OPTARG)OC_MAX_REDIRECTS);
#143 CHECK(stateCURLOPT_ERRORBUFFERstate->error.curlerrorbuf);
#148 if(state->curlflags.compress) {
#149     CHECK(stateCURLOPT_ENCODING,"deflate, gzip");
#155 if(state->proxy.host != NULL) {
#156     CHECK(stateCURLOPT_PROXYstate->proxy.host);
#157     CHECK(stateCURLOPT_PROXYPORT, (OPTARG)(long)state->proxy.port);
#158     if(state->proxy.userpwd) {
#159                CHECK(stateCURLOPT_PROXYUSERPWDstate->proxy.userpwd);
#161         CHECK(stateCURLOPT_PROXYAUTH, (long)CURLAUTH_ANY);
#171        struct OCSSLssl = &state->ssl;
#172        CHECK(stateCURLOPT_SSL_VERIFYPEER, (OPTARG)(ssl->verifypeer?1L:0L));
#173        CHECK(stateCURLOPT_SSL_VERIFYHOST, (OPTARG)(ssl->verifyhost?1L:0L));
#175            CHECK(stateCURLOPT_SSLCERTssl->certificate);
#177            CHECK(stateCURLOPT_SSLKEYssl->key);
#180            CHECK(stateCURLOPT_KEYPASSWDssl->keypasswd);
#182            CHECK(stateCURLOPT_CAINFOssl->cainfo);
#184            CHECK(stateCURLOPT_CAPATHssl->capath);
#202ocset_flags_perfetch(OCstatestate)
#212ocset_flags_perlink(OCstatestate)
#217    if(stat == OC_NOERRstat = ocset_curlflag(state,CURLOPT_ENCODING);
#218    if(stat == OC_NOERRstat = ocset_curlflag(state,CURLOPT_NETRC);
#219    if(stat == OC_NOERRstat = ocset_curlflag(state,CURLOPT_VERBOSE);
#220    if(stat == OC_NOERRstat = ocset_curlflag(state,CURLOPT_TIMEOUT);
#221    if(stat == OC_NOERRstat = ocset_curlflag(state,CURLOPT_USERAGENT);
#222    if(stat == OC_NOERRstat = ocset_curlflag(state,CURLOPT_COOKIEJAR);
#223    if(stat == OC_NOERRstat = ocset_curlflag(state,CURLOPT_USERPWD);
#224    if(stat == OC_NOERRstat = ocset_curlflag(state,CURLOPT_PROXY);
#225    if(stat == OC_NOERRstat = ocset_curlflag(state,CURLOPT_USE_SSL);
#226    if(stat == OC_NOERRstat = ocset_curlflag(stateCURLOPT_FOLLOWLOCATION);
#227    if(stat == OC_NOERRstat = ocset_curlflag(stateCURLOPT_MAXREDIRS);
#228    if(stat == OC_NOERRstat = ocset_curlflag(stateCURLOPT_ERRORBUFFER);
#231    if(stat == OC_NOERRstat = oc_set_curl_options(state);
#240oc_set_curl_options(OCstatestate)
#249    hostport = occombinehostport(state->uri);
#272        stat = ocset_curlopt(state,ocflag->flag,cvt(triple->value,ocflag->type));
#301oc_curl_debug(OCstatestate)
#303    state->curlflags.verbose = 1;
#304    ocset_curlflag(state,CURLOPT_VERBOSE);
#305    ocset_curlflag(state,CURLOPT_ERRORBUFFER);
#311ocrc_netrc_required(OCstatestate)
#313    char* netrcfile = ocrc_lookup(NETRCFILETAG,state->uri->uri);
#314    return (netrcfile != NULL || state->curlflags.netrc != NULL ? 0 : 1);
#318oc_curl_printerror(OCstatestate)
#320    fprintf(stderr,"curl error details: %s\n",state->curlerror);
#327oc_curl_protocols(struct OCGLOBALSTATEstate)
#333        if(strcmp("file",*proto)==0) {state->curl.proto_file=1;}
#334        if(strcmp("http",*proto)==0) {state->curl.proto_https=1;}
#337        oclog(OCLOGNOTE,"Curl file:// support = %d",state->curl.proto_file);
#338        oclog(OCLOGNOTE,"Curl https:// support = %d",state->curl.proto_https);
#349ocset_curlstate(OCstatestate, int flag, void* value)
#356        if(state->creds.userpwd != NULL) free(state->creds.userpwd);
#357 state->creds.userpwd = strdup((char*)value);
#361        if(state->curlflags.cookiejar != NULL) free(state->curlflags.cookiejar);
#362 state->curlflags.cookiejar = strdup((char*)value);
#366        if(state->curlflags.netrc != NULL) free(state->curlflags.netrc);
#367 state->curlflags.netrc = strdup((char*)value);
#371 state->curlflags.verbose = (long)value;
#375 state->curlflags.timeout = (long)value;
#379        if(state->curlflags.useragent != NULL) free(state->curlflags.useragent);
#380        state->curlflags.useragent = strdup((char*)value);
#401 if(state->proxy.host != NULL) free(state->proxy.host);
#402 if(state->proxy.userpwd != NULL) free(state->proxy.userpwd);
#403 state->proxy.host = NULL;
#404 state->proxy.userpwd = NULL;
#405 if(!ocparseproxy(state,(char*)value))
#410 if(state->ssl.certificate != NULL) free(state->ssl.certificate);
#411 state->ssl.certificate = strdup((char*)value);
#414 if(state->ssl.key != NULL) free(state->ssl.key);
#415 state->ssl.key = strdup((char*)value);
#418 if(state->ssl.keypasswd!= NULL) free(state->ssl.keypasswd);
#419 state->ssl.keypasswd = strdup((char*)value);
#422      state->ssl.verifypeer = (long)value;
#425      state->ssl.verifyhost = (long)value;
#428      if(state->ssl.cainfo != NULL) free(state->ssl.cainfo);
#429      state->ssl.cainfo = strdup((char*)value);
#432 if(state->ssl.capath != NULL) free(state->ssl.capath);
#433 state->ssl.capath = strdup((char*)value);
occurlfunctions.h#12extern OCerror ocset_curlopt(OCstatestate, int flag, void* value);
#21extern OCerror ocset_curlstate(OCstatestate, int flag, void* value);
#23extern void oc_curl_debug(OCstatestate);
#25extern void oc_curl_printerror(OCstatestate);
#26extern int ocrc_netrc_required(OCstatestate);
ocdata.c#15octrace(char* procOCstatestateOCdatadata)
#18    ocdumpdatapath(state,data,buffer);
#24#define octrace(proc,state,data)
#29ocdata_getroot(OCstatestateOCnoderootOCdata** datap)
#41    octrace("attach",state,data);
#47ocdata_container(OCstatestateOCdatadataOCdata** containerp)
#52    OCASSERT(state != NULL);
#65    octrace("container", statecontainer);
#71ocdata_root(OCstatestateOCdatadataOCdata** rootp)
#76    OCASSERT(state != NULL);
#82    octrace("root", stateroot);
#88ocdata_ithfield(OCstatestateOCdatacontainer, size_t indexOCdata** fieldp)
#93    OCASSERT(state != NULL);
#108    octrace("ithfield", statefield);
#114ocdata_ithelement(OCstatestateOCdatadata, size_t* indicesOCdata** elementp)
#121    OCASSERT(state != NULL);
#145    octrace("ithelement", stateelement);
#152ocdata_ithrecord(OCstatestateOCdatadata,
#161    OCASSERT(state != NULL);
#179    octrace("ithrecord", staterecord);
#185ocdata_position(OCstatestateOCdatadata, size_t* indices)
#189    OCASSERT(state != NULL);
#208ocdata_recordcount(OCstatestateOCdatadata, size_t* countp)
#210    OCASSERT(state != NULL);
#235ocdata_read(OCstatestateOCdatadata, size_t start, size_t count,
#246    octrace("read", statedata);
#248    assert(state != NULL);
ocdebug.c#72ocreportcurlerror(OCstatestateCURLcode cstat)
#76 if(state != NULL)
#77            fprintf(stderr," ; %s",state->error.curlerrorbuf);
ocdebug.h#88extern CURLcode ocreportcurlerror(struct OCstatestateCURLcode cstat);
ocdump.c#479ocdd(OCstatestateOCnoderoot, int xdrencoded, int level)
#505ocdumpdata(OCstatestateOCdatadataOCbytesbuffer, int frominstance)
#546ocdumpdatatree(OCstatestateOCdatadataOCbytesbuffer, int depth)
#627     ocdumpdatatree(state,data->instances[i],buffer,depth+1);
#632ocdumpdatapath(OCstatestateOCdatadataOCbytesbuffer)
ocinternal.c#166    OCstate * state = NULL;
#175    state = (OCstate*)ocmalloc(sizeof(OCstate)); /* ocmalloc zeros memory*/
#176    if(state == NULL) {OCTHROWCHK(stat=OC_ENOMEM); goto fail;}
#179    state->header.magic = OCMAGIC;
#180    state->header.occlass = OC_State;
#181    state->curl = curl;
#182    state->trees = oclistnew();
#183    state->uri = tmpurl;
#184    if(!ocuridecodeparams(state->uri)) {
#187    state->packet = ocbytesnew();
#188    ocbytessetalloc(state->packet,DFALTPACKETSIZE); /*initial reasonable size*/
#191    stat = ocset_curlproperties(state);
#195    if((stat=ocset_flags_perlink(state))!= OC_NOERR) goto fail;
#197    if((stat=ocset_flags_perfetch(state))!= OC_NOERR) goto fail;
#200    if(statep) *statep = state;
#202      if(state != NULLocfree(state);
#208    if(state != NULLocfree(state);
#214ocfetch(OCstatestate, const char* constraintOCdxd kindOCflags flags,
#225    tree->state = state;
#232    if((stat=ocset_flags_perfetch(state))!= OC_NOERR) goto fail;
#235    ocbytesclear(state->packet);
#239        stat = readDAS(state,tree);
#241            tree->text = ocbytesdup(state->packet);
#246        stat = readDDS(state,tree);
#248            tree->text = ocbytesdup(state->packet);
#257            stat = createtempfile(state,tree);
#259            stat = readDATADDS(state,tree,flags);
#263                stat = ocextractddsinfile(state,tree,flags);
#266            stat = readDATADDS(state,tree,flags);
#270            stat = ocextractddsinmemory(state,tree,flags);
#278    state->error.httpcode = ocfetchhttpcode(state->curl);
#280 if(state->error.httpcode >= 400) {
#281     oclog(OCLOGWARN,"oc_open: Could not read url; http error = %l",state->error.httpcode);
#289    stat = DAPparse(state,tree,tree->text);
#291    if(stat == OC_EDAPSVC  && state->error.code != NULL) {
#293   state->error.code,
#294   (state->error.message?state->error.message:""));
#323        ocmarkcacheable(state,root);
#347 if(dataError(tree->data.xdrs,state)) {
#350   state->error.code,
#351   (state->error.message?state->error.message:""));
#356 stat = occompile(state,tree->root);
#362    oclistpush(state->trees,(void*)root);
#376createtempfile(OCstatestateOCtreetree)
#415occlose(OCstatestate)
#418    if(state == NULL) return;
#422    for(i=0;i<oclistlength(state->trees);i++) {
#423 OCnoderoot = (OCnode*)oclistpop(state->trees);
#426    oclistfree(state->trees);
#427    ocurifree(state->uri);
#428    ocbytesfree(state->packet);
#429    ocfree(state->error.code);
#430    ocfree(state->error.message);
#431    ocfree(state->curlflags.useragent);
#432    if(state->curlflags.cookiejar) {
#434        if(state->curlflags.createdflags & COOKIECREATED)
#435     unlink(state->curlflags.cookiejar);
#437 ocfree(state->curlflags.cookiejar);
#439    if(state->curlflags.netrc != NULL) {
#441        if(state->curlflags.createdflags & NETRCCREATED)
#442     unlink(state->curlflags.netrc);
#444 ocfree(state->curlflags.netrc);
#446    ocfree(state->ssl.certificate);
#447    ocfree(state->ssl.key);
#448    ocfree(state->ssl.keypasswd);
#449    ocfree(state->ssl.cainfo);
#450    ocfree(state->ssl.capath);
#451    ocfree(state->proxy.host);
#452    ocfree(state->proxy.userpwd);
#453    ocfree(state->creds.userpwd);
#454    if(state->curl != NULLoccurlclose(state->curl);
#455    ocfree(state);
#459ocextractddsinmemory(OCstatestateOCtreetreeOCflags flags)
#464    bodfound = ocfindbod(state->packet,&bod,&ddslen);
#474        memcpy((void*)tree->text,(void*)ocbytescontents(state->packet),ddslen);
#479    tree->data.memory = ocbytesextract(state->packet);
#495ocextractddsinfile(OCstatestateOCtreetreeOCflags flags)
#501    ocbytesclear(state->packet);
#510        ocbytesappendn(state->packet,chunk,count);
#511 bodfound = ocfindbod(state->packet,&bod,&ddslen);
#526        memcpy((void*)tree->text,(void*)ocbytescontents(state->packet),ddslen);
#572ocupdatelastmodifieddata(OCstatestate)
#577    base = ocuribuild(state->uri,NULL,NULL,OCURIENCODE);
#578    status = ocfetchlastmodified(state->curlbase, &lastmodified);
#581 state->datalastmodified = lastmodified;
#590ocset_curlproperties(OCstatestate)
#595    ocrc_process(state);
#597    if(state->curlflags.useragent == NULL) {
#601     state->curlflags.useragent = agent;
#609    if(state->curlflags.cookiejar != NULL
#610       && strlen(state->curlflags.cookiejar) == 0) {
#611 free(state->curlflags.cookiejar);
#612 state->curlflags.cookiejar = NULL;
#615    if(state->curlflags.cookiejar == NULL) {
#632 stat = ocmktmp(tmp,&state->curlflags.cookiejar);
#633 state->curlflags.createdflags |= COOKIECREATED;
#640    OCASSERT(state->curlflags.cookiejar != NULL);
#645 char* fname = state->curlflags.cookiejar;
#669    if(ocrc_netrc_required(state)) {
#672 if(state->creds.userpwd != NULL) {
#675 stat = oc_build_netrc(state);
#688dataError(XXDRxdrsOCstatestate)
#720    state->error.message = errmsg;
#721    state->error.code = strdup("?");
#722    state->error.httpcode = 404;
#739ocset_useragent(OCstatestate, const char* agent)
#742    if(state->curlflags.useragent != NULL)
#743 free(state->curlflags.useragent);
#744    state->curlflags.useragent = strdup(agent);
#745    if(state->curlflags.useragent == NULL)
#747    stat = ocset_curlflag(state,CURLOPT_USERAGENT);
#752ocset_netrc(OCstatestate, const char* path)
#755    if(state->curlflags.netrc != NULL)
#756 free(state->curlflags.netrc);
#757    state->curlflags.netrc = strdup(path);
#758    if(state->curlflags.netrc == NULL)
#760    stat = ocset_curlflag(state,CURLOPT_NETRC);
ocinternal.h#236    struct OCstatestate; /* cross link */
#263extern void occlose(OCstatestate);
#269extern OCerror ocupdatelastmodifieddata(OCstatestate);
#271extern OCerror ocset_useragent(OCstatestate, const char* agent);
#272extern OCerror ocset_netrc(OCstatestate, const char* path);
#276extern OCerror ocrc_process(OCstatestate); /* extract relevant triples */
#279extern int ocparseproxy(OCstatestate, char* v);
ocnode.c#152    OCstatestate;
#158    state = tree->state;
#162 ocdata_free(state,tree->data.data);
#164    for(i=0;i<oclistlength(state->trees);i++) {
#165 OCnodenode = (OCnode*)oclistget(state->trees,(size_t)i);
#167     oclistremove(state->trees,(size_t)i);
#245ocddsdasmerge(OCstatestateOCnodedasrootOCnodeddsroot)
#522ocmarkcacheable(OCstatestateOCnodeddsroot)
#563ocddsdasmerge(OCstatestateOCnodeddsrootOCnodedasroot)
ocnode.h#78extern void ocmarkcacheable(OCstatestateOCnodeddsroot);
ocrc.c#150ocparseproxy(OCstatestate, char* v)
#159        ocextract_credentials(v, &state->proxy.userpwd, &result_url);
#175        state->proxy.host = malloc(sizeof(char) * host_len + 1);
#176        if (state->proxy.host == NULL)
#178        strncpy(state->proxy.hosthost_poshost_len);
#179        state->proxy.host[host_len] = '\0';
#180        state->proxy.port = atoi(port_pos);
#183        state->proxy.host = malloc(sizeof(char) * host_len + 1);
#184        if (state->proxy.host == NULL)
#186        strncpy(state->proxy.hosthost_poshost_len);
#187        state->proxy.host[host_len] = '\0';
#188        state->proxy.port = 80;
#191    state->proxy.host[v_len] = '\0';
#192    state->proxy.port = atoi(v);
#194    state->proxy.user = malloc(sizeof(char) * s_len + 1);
#195    if (state->proxy.user == NULL)
#197     strncpy(state->proxy.uservs_len);
#198     state->proxy.user[s_len] = '\0';
#200     state->proxy.password = malloc(sizeof(char) * p_len + 1);
#201     if (state->proxy.password == NULL)
#203     strncpy(state->proxy.passwordvp_len);
#204     state->proxy.password[p_len] = '\0';
#207         oclog(OCLOGNOTE,"host name: %s", state->proxy.host);
#209         oclog(OCLOGNOTE,"user+pwd: %s", state->proxy.userpwd);
#211         oclog(OCLOGNOTE,"port number: %d", state->proxy.port);
#412ocrc_process(OCstatestate)
#416    OCURIuri = state->uri;
#436        if(atoi(value)) state->curlflags.compress = 1;
#438            oclog(OCLOGNOTE,"HTTP.DEFLATE: %ld", state->curlflags.compress);
#441        if(atoi(value)) state->curlflags.verbose = 1;
#443            oclog(OCLOGNOTE,"HTTP.VERBOSE: %ld", state->curlflags.verbose);
#446        if(atoi(value)) state->curlflags.timeout = atoi(value);
#448            oclog(OCLOGNOTE,"HTTP.TIMEOUT: %ld", state->curlflags.timeout);
#451        if(atoi(value)) state->curlflags.useragent = strdup(value);
#452        if(state->curlflags.useragent == NULL) {stat = OC_ENOMEM; goto done;}
#454            oclog(OCLOGNOTE,"HTTP.USERAGENT: %s", state->curlflags.useragent);
#463        state->curlflags.cookiejar = strdup(value);
#464        if(state->curlflags.cookiejar == NULL) {stat = OC_ENOMEM; goto done;}
#466            oclog(OCLOGNOTE,"HTTP.COOKIEJAR: %s", state->curlflags.cookiejar);
#470        stat = ocparseproxy(state,value);
#478     state->ssl.verifypeer = 1;
#479     state->ssl.verifyhost = 1;
#486        state->ssl.certificate = strdup(value);
#487        if(state->ssl.certificate == NULL) {stat = OC_ENOMEM; goto done;}
#489            oclog(OCLOGNOTE,"HTTP.SSL.CERTIFICATE: %s", state->ssl.certificate);
#493        state->ssl.key = strdup(value);
#494        if(state->ssl.key == NULL) {stat = OC_ENOMEM; goto done;}
#496            oclog(OCLOGNOTE,"HTTP.SSL.KEY: %s", state->ssl.key);
#500        state->ssl.keypasswd = strdup(value);
#501        if(state->ssl.keypasswd == NULL) {stat = OC_ENOMEM; goto done;}
#503            oclog(OCLOGNOTE,"HTTP.SSL.KEYPASSWORD: %s", state->ssl.keypasswd);
#507        state->ssl.cainfo = strdup(value);
#508        if(state->ssl.cainfo == NULL) {stat = OC_ENOMEM; goto done;}
#510            oclog(OCLOGNOTE,"HTTP.SSL.CAINFO: %s", state->ssl.cainfo);
#514        state->ssl.capath = strdup(value);
#515        if(state->ssl.capath == NULL) {stat = OC_ENOMEM; goto done;}
#517            oclog(OCLOGNOTE,"HTTP.SSL.CAPATH: %s", state->ssl.capath);
#529        state->ssl.verifypeer = tf;
#531            oclog(OCLOGNOTE,"HTTP.SSL.VERIFYPEER: %d", state->ssl.verifypeer);
#536        if(state->curlflags.netrc != NULL)
#537     free(state->curlflags.netrc);
#538        state->curlflags.netrc = strdup(value);
#539        if(state->curlflags.netrc == NULL) {stat = OC_ENOMEM; goto done;}
#541            oclog(OCLOGNOTE,"HTTP.NETRC: %s", state->curlflags.netrc);
#558     state->creds.userpwd = userpwd;
#560     state->creds.userpwd = strdup(userpwd);
ocread.c#30static int readpacket(OCstatestateOCURI*, OCbytes*, OCdxd, long*);
#35readDDS(OCstatestateOCtreetree)
#40    ocurisetconstraints(state->uri,tree->constraint);
#45    stat = readpacket(state,state->uri,state->packet,OCDDS,
#47    if(stat == OC_NOERRstate->ddslastmodified = lastmodified;
#53readDAS(OCstatestateOCtreetree)
#57    ocurisetconstraints(state->uri,tree->constraint);
#61    stat = readpacket(state,state->uri,state->packet,OCDAS,NULL);
#68readversion(OCstatestateOCURIurlOCbytespacket)
#70   return readpacket(state,url,packet,OCVER,NULL);
#87readpacket(OCstatestateOCURIurl,OCbytespacket,OCdxd dxd,long* lastmodified)
#93   CURLcurl = state->curl;
#97   if(fileprotocol && !state->curlflags.proto_file) {
#112        stat = ocfetchurl(curl,fetchurl,packet,lastmodified,&state->creds);
#114     oc_curl_printerror(state);
#129readDATADDS(OCstatestateOCtreetreeOCflags flags)
#138        ocurisetconstraints(state->uri,tree->constraint);
#139        stat = readpacket(state,state->uri,state->packet,OCDATADDS,&lastmod);
#141            state->datalastmodified = lastmod;
#142        tree->data.datasize = ocbyteslength(state->packet);
#144        OCURIurl = state->uri;
#150        if(fileprotocol && !state->curlflags.proto_file) {
#163            stat = ocfetchurl_file(state->curlreadurltree->data.file,
#166                state->datalastmodified = lastmod;
ocutil.c#412ocsvcerrordata(OCstatestate, char** codep, char** msgp, long* httpp)
#414    if(codep) *codep = state->error.code;
#415    if(msgp) *msgp = state->error.message;
#416    if(httpp) *httpp = state->error.httpcode;
#425ocdataddsmsg(OCstatestateOCtreetree)


HyperKWIC - Version 7.20DA executed at 11:37 on 27 Oct 2017 | Polyhedron Solutions - INTERNAL USE | COMMERCIAL (Any O/S) SN 4AKIed