/[hyperestraier]/upstream/0.5.3/estcall.c
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /upstream/0.5.3/estcall.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

upstream/0.5.2/estcall.c revision 9 by dpavlin, Wed Aug 3 15:21:15 2005 UTC upstream/0.5.3/estcall.c revision 10 by dpavlin, Wed Aug 3 15:25:48 2005 UTC
# Line 37  int g_timeout = -1; Line 37  int g_timeout = -1;
37  const char *g_authname = NULL;           /* name of authority */  const char *g_authname = NULL;           /* name of authority */
38  const char *g_authpass = NULL;           /* password of authority */  const char *g_authpass = NULL;           /* password of authority */
39  int g_viewmode = VM_PROT;                /* viewing mode */  int g_viewmode = VM_PROT;                /* viewing mode */
 int g_condopts = 0;                      /* options of the search condtion */  
40  int g_nonparse = FALSE;                  /* whether to output response headers */  int g_nonparse = FALSE;                  /* whether to output response headers */
41  CBLIST *g_exheaders = NULL;              /* extension headers */  CBLIST *g_exheaders = NULL;              /* extension headers */
42    
# Line 62  static int procget(const char *nurl, int Line 61  static int procget(const char *nurl, int
61  static int procuriid(const char *nurl, const char *uri);  static int procuriid(const char *nurl, const char *uri);
62  static int procinform(const char *nurl);  static int procinform(const char *nurl);
63  static int procsearch(const char *nurl, const char *phrase,  static int procsearch(const char *nurl, const char *phrase,
64                        const CBLIST *attrs, const char *ord, int max, int depth);                        const CBLIST *attrs, const char *ord, int max, int opts, int depth);
65  static int procsetuser(const char *nurl, const char *name, int mode);  static int procsetuser(const char *nurl, const char *name, int mode);
66  static int procsetlink(const char *nurl, const char *url, const char *label, int credit);  static int procsetlink(const char *nurl, const char *url, const char *label, int credit);
67  static int procraw(const char *url, const char *file);  static int procraw(const char *url, const char *file);
# Line 344  static int runsearch(int argc, char **ar Line 343  static int runsearch(int argc, char **ar
343    CBDATUM *pbuf;    CBDATUM *pbuf;
344    CBLIST *attrs;    CBLIST *attrs;
345    char *nurl, *ord;    char *nurl, *ord;
346    int i, max, depth, rv;    int i, max, opts, depth, rv;
347    nurl = NULL;    nurl = NULL;
348    ord = NULL;    ord = NULL;
349    max = SEARCHMAX;    max = SEARCHMAX;
350      opts = 0;
351    depth = 0;    depth = 0;
352    pbuf = cbdatumopen("", 0);    pbuf = cbdatumopen("", 0);
353    cbglobalgc(pbuf, (void (*)(void *))cbdatumclose);    cbglobalgc(pbuf, (void (*)(void *))cbdatumclose);
# Line 371  static int runsearch(int argc, char **ar Line 371  static int runsearch(int argc, char **ar
371        } else if(!strcmp(argv[i], "-vx")){        } else if(!strcmp(argv[i], "-vx")){
372          g_viewmode = VM_XML;          g_viewmode = VM_XML;
373        } else if(!strcmp(argv[i], "-sf")){        } else if(!strcmp(argv[i], "-sf")){
374          g_condopts |= ESTCONDSIMPLE;          opts |= ESTCONDSIMPLE;
375        } else if(!strcmp(argv[i], "-attr")){        } else if(!strcmp(argv[i], "-attr")){
376          if(++i >= argc) usage();          if(++i >= argc) usage();
377          cblistpush(attrs, argv[i], -1);          cblistpush(attrs, argv[i], -1);
# Line 395  static int runsearch(int argc, char **ar Line 395  static int runsearch(int argc, char **ar
395      }      }
396    }    }
397    if(!nurl || depth < 0) usage();    if(!nurl || depth < 0) usage();
398    rv = procsearch(nurl, cbdatumptr(pbuf), attrs, ord, max, depth);    rv = procsearch(nurl, cbdatumptr(pbuf), attrs, ord, max, opts, depth);
399    return rv;    return rv;
400  }  }
401    
# Line 741  static int procinform(const char *nurl){ Line 741  static int procinform(const char *nurl){
741    
742  /* perform the inform command */  /* perform the inform command */
743  static int procsearch(const char *nurl, const char *phrase,  static int procsearch(const char *nurl, const char *phrase,
744                        const CBLIST *attrs, const char *ord, int max, int depth){                        const CBLIST *attrs, const char *ord, int max, int opts, int depth){
745    ESTNODE *node;    ESTNODE *node;
746    ESTNODERES *nres;    ESTNODERES *nres;
747    ESTRESDOC *rdoc;    ESTRESDOC *rdoc;
# Line 767  static int procsearch(const char *nurl, Line 767  static int procsearch(const char *nurl,
767    }    }
768    if(ord) est_cond_set_order(cond, ord);    if(ord) est_cond_set_order(cond, ord);
769    if(max >= 0) est_cond_set_max(cond, max);    if(max >= 0) est_cond_set_max(cond, max);
770    est_cond_set_options(cond, g_condopts);    est_cond_set_options(cond, opts);
771    if((nres = est_node_search(node, cond, depth)) != NULL){    if((nres = est_node_search(node, cond, depth)) != NULL){
772      hints = est_noderes_hints(nres);      hints = est_noderes_hints(nres);
773      switch(g_viewmode){      switch(g_viewmode){

Legend:
Removed from v.9  
changed lines
  Added in v.10

  ViewVC Help
Powered by ViewVC 1.1.26