WS updates. No code changes
authorAdam Dickmeiss <adam@indexdata.dk>
Fri, 24 Jun 2005 19:56:52 +0000 (19:56 +0000)
committerAdam Dickmeiss <adam@indexdata.dk>
Fri, 24 Jun 2005 19:56:52 +0000 (19:56 +0000)
client/admin.c
client/client.c
client/tabcomplete.c
src/cclptree.c
src/z3950oid.c

index 5d28af8..84674be 100644 (file)
@@ -2,7 +2,7 @@
  * Copyright (C) 1995-2005, Index Data ApS
  * See the file LICENSE for details.
  *
- * $Id: admin.c,v 1.19 2005-01-16 21:51:49 adam Exp $
+ * $Id: admin.c,v 1.20 2005-06-24 19:56:52 adam Exp $
  */
 
 #include <stdio.h>
@@ -303,12 +303,3 @@ int cmd_adm_startup(const char *arg)
     sendAdminES(Z_ESAdminOriginPartToKeep_start, NULL);
     return 2;
 }
-
-/*
- * Local variables:
- * tab-width: 8
- * c-basic-offset: 4
- * End:
- * vim600: sw=4 ts=8 fdm=marker
- * vim<600: sw=4 ts=8
- */
index ce1bc11..14aa737 100644 (file)
@@ -2,7 +2,7 @@
  * Copyright (C) 1995-2005, Index Data ApS
  * See the file LICENSE for details.
  *
- * $Id: client.c,v 1.290 2005-06-24 12:50:46 adam Exp $
+ * $Id: client.c,v 1.291 2005-06-24 19:56:52 adam Exp $
  */
 
 #include <stdio.h>
@@ -4757,12 +4757,3 @@ int main(int argc, char **argv)
     client ();
     exit (0);
 }
-
-/*
- * Local variables:
- * tab-width: 8
- * c-basic-offset: 4
- * End:
- * vim600: sw=4 ts=8 fdm=marker
- * vim<600: sw=4 ts=8
- */
index 61bec92..01bb0e0 100644 (file)
@@ -2,7 +2,7 @@
  * Copyright (C) 1995-2005, Index Data ApS
  * See the file LICENSE for details.
  *
- * $Id: tabcomplete.c,v 1.10 2005-01-15 19:47:08 adam Exp $
+ * $Id: tabcomplete.c,v 1.11 2005-06-24 19:56:52 adam Exp $
  */
 
 #include <string.h>
@@ -22,25 +22,25 @@ extern char** curret_global_list;
 
 char* complete_from_list(char* completions[], const char *text, int state)
 {      
-       static int idx;
-
-       if(!completions) return NULL;
-       if(state==0) {
-               idx = 0;
-       }
-       for(; completions[idx]; ++ idx) {
-               if(!
+    static int idx;
+    
+    if(!completions) return NULL;
+    if(state==0) {
+        idx = 0;
+    }
+    for(; completions[idx]; ++ idx) {
+        if(!
 #ifdef WIN32
-                   _strnicmp
+           _strnicmp
 #else
-                   strncasecmp
+           strncasecmp
 #endif             
-                   (completions[idx],text,strlen(text))) {
-                       ++idx; /* skip this entry on the next run */ 
-                       return (char*)strdup(completions[idx-1]);
-               };
-       };
-       return NULL;
+           (completions[idx],text,strlen(text))) {
+            ++idx; /* skip this entry on the next run */ 
+            return (char*)strdup(completions[idx-1]);
+        };
+    };
+    return NULL;
 }
 
 
@@ -52,10 +52,10 @@ char* complete_from_list(char* completions[], const char *text, int state)
    
 
 typedef struct {
-       oid_class oclass;
-       char** values;
-       size_t index;
-       size_t max;
+    oid_class oclass;
+    char** values;
+    size_t index;
+    size_t max;
 } oid_callback_t;
 
 /*!
@@ -65,30 +65,30 @@ typedef struct {
 
 void oid_loader(struct oident* oid, void* data_)
 {
-       oid_callback_t* data=(oid_callback_t*) data_;
-       
-       
-       if((oid->oclass == CLASS_GENERAL) || (oid->oclass == data->oclass)) {
-               if(data->index==data->max) {
+    oid_callback_t* data=(oid_callback_t*) data_;
+    
+    
+    if((oid->oclass == CLASS_GENERAL) || (oid->oclass == data->oclass)) {
+        if(data->index==data->max) {
                        data->values=(char**)realloc(data->values,((data->max+1)*2)*sizeof(char*));
                        data->max=(data->max+1)*2 - 1;
-               };
-               data->values[data->index]=oid->desc;
-               ++data->index;          
-       }
+        };
+        data->values[data->index]=oid->desc;
+        ++data->index;         
+    }
 }
 
 char** build_list_for_oclass(oid_class oclass) {       
-       oid_callback_t data;    
-       data.values = (char **) calloc(10,sizeof(char*));
-       data.index = 0;
-       data.max = 9;
-       data.oclass = oclass;
-               
-       oid_trav(oid_loader, &data);
-       
-       data.values[data.index]=0;
-       return data.values;        
+    oid_callback_t data;       
+    data.values = (char **) calloc(10,sizeof(char*));
+    data.index = 0;
+    data.max = 9;
+    data.oclass = oclass;
+    
+    oid_trav(oid_loader, &data);
+    
+    data.values[data.index]=0;
+    return data.values;           
 }
 
 /* ***************************************************************************
@@ -112,43 +112,35 @@ char* complete_auto_reconnect(const char *text, int state)
 
 char* complete_format(const char* text, int state)
 {
-       char** list=build_list_for_oclass(CLASS_RECSYN);
-       char* res=complete_from_list(list,text,state);  
-       
-       free(list);     
-       return res;
+    char** list=build_list_for_oclass(CLASS_RECSYN);
+    char* res=complete_from_list(list,text,state);  
+    
+    free(list);        
+    return res;
 }
 
 char* complete_schema(const char* text, int state)
 {
-       char** list=build_list_for_oclass(CLASS_SCHEMA);
-       char* res=complete_from_list(list,text,state);  
-       
-       free(list);     
-       return res;
+    char** list=build_list_for_oclass(CLASS_SCHEMA);
+    char* res=complete_from_list(list,text,state);  
+    
+    free(list);        
+    return res;
 }
 
 
 char* complete_attributeset(const char* text, int state)
 {
-       char** list=build_list_for_oclass(CLASS_ATTSET);
-       char* res=complete_from_list(list,text,state);  
-       
-       free(list);     
-       return res;
+    char** list=build_list_for_oclass(CLASS_ATTSET);
+    char* res=complete_from_list(list,text,state);  
+    
+    free(list);        
+    return res;
 }
 
 
 char* default_completer(const char* text, int state)
 {
-       return complete_from_list(curret_global_list,text,state);
+    return complete_from_list(curret_global_list,text,state);
 }
 
-
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- */
index 49f088a..06fe093 100644 (file)
@@ -53,7 +53,7 @@
 /* CCL print rpn tree - infix notation
  * Europagate, 1995
  *
- * $Id: cclptree.c,v 1.4 2004-12-30 00:22:25 adam Exp $
+ * $Id: cclptree.c,v 1.5 2005-06-24 19:56:52 adam Exp $
  *
  * Old Europagate Log:
  *
 
 void fprintSpaces(int indent,FILE * fd_out) 
 {
-       char buf[100];
-       sprintf(buf,"%%%d.s",indent);
-       fprintf(fd_out,buf," ");
+    char buf[100];
+    sprintf(buf,"%%%d.s",indent);
+    fprintf(fd_out,buf," ");
 }
 
 void ccl_pr_tree_as_qrpn(struct ccl_rpn_node *rpn, FILE *fd_out, int indent)
 {
-       if(indent>0) fprintSpaces(indent,fd_out);
+    if(indent>0)
+        fprintSpaces(indent,fd_out);
     switch (rpn->kind)
     {
     case CCL_RPN_TERM:
@@ -100,24 +101,24 @@ void ccl_pr_tree_as_qrpn(struct ccl_rpn_node *rpn, FILE *fd_out, int indent)
         {
             struct ccl_rpn_attr *attr;
             for (attr = rpn->u.t.attr_list; attr; attr = attr->next)
-                       {
-                               if (attr->set)
-                                       fprintf(fd_out, "@attr %s ", attr->set);
-                               else
-                                       fprintf(fd_out, "@attr ");
-                               switch(attr->kind)
-                               {
-                               case CCL_RPN_ATTR_NUMERIC:
+            {
+                if (attr->set)
+                    fprintf(fd_out, "@attr %s ", attr->set);
+                else
+                    fprintf(fd_out, "@attr ");
+                switch(attr->kind)
+                {
+                case CCL_RPN_ATTR_NUMERIC:
                     fprintf (fd_out, "%d=%d ", attr->type,
                              attr->value.numeric);
-                                       break;
-                               case CCL_RPN_ATTR_STRING:
+                    break;
+                case CCL_RPN_ATTR_STRING:
                     fprintf (fd_out, "%d=%s ", attr->type,
-                                                        attr->value.str);
-                               }
-                       }
+                             attr->value.str);
+                }
+            }
         }
-               fprintf (fd_out, "\"%s\"\n", rpn->u.t.term);
+        fprintf (fd_out, "\"%s\"\n", rpn->u.t.term);
         break;
     case CCL_RPN_AND:
         fprintf (fd_out, "@and \n");
@@ -163,14 +164,14 @@ void ccl_pr_tree_as_qrpn(struct ccl_rpn_node *rpn, FILE *fd_out, int indent)
         ccl_pr_tree_as_qrpn (rpn->u.p[1], fd_out,indent+2);
         break;
     default:
-               fprintf(stderr,"Internal Error Unknown ccl_rpn node type %d\n",rpn->kind);
+        fprintf(stderr,"Internal Error Unknown ccl_rpn node type %d\n",rpn->kind);
     }
 }
 
 
 void ccl_pr_tree (struct ccl_rpn_node *rpn, FILE *fd_out)
 {
-       ccl_pr_tree_as_qrpn(rpn,fd_out,0);
+    ccl_pr_tree_as_qrpn(rpn,fd_out,0);
 }
 
 
@@ -180,13 +181,13 @@ static void ccl_pquery_complex (WRBUF w, struct ccl_rpn_node *p)
     {
     case CCL_RPN_AND:
        wrbuf_puts(w, "@and ");
-               break;
+        break;
     case CCL_RPN_OR:
        wrbuf_puts(w, "@or ");
-               break;
+        break;
     case CCL_RPN_NOT:
        wrbuf_puts(w, "@not ");
-               break;
+        break;
     case CCL_RPN_PROX:
         if (p->u.p[2] && p->u.p[2]->kind == CCL_RPN_TERM)
         {
@@ -211,9 +212,9 @@ static void ccl_pquery_complex (WRBUF w, struct ccl_rpn_node *p)
         }
         else
             wrbuf_puts(w, "@prox 0 2 0 1 k 2 ");
-               break;
+        break;
     default:
-               wrbuf_puts(w, "@ bad op (unknown) ");
+        wrbuf_puts(w, "@ bad op (unknown) ");
     }
     ccl_pquery(w, p->u.p[0]);
     ccl_pquery(w, p->u.p[1]);
@@ -231,50 +232,43 @@ void ccl_pquery (WRBUF w, struct ccl_rpn_node *p)
     case CCL_RPN_NOT:
     case CCL_RPN_PROX:
        ccl_pquery_complex (w, p);
-               break;
+        break;
     case CCL_RPN_SET:
-               wrbuf_puts (w, "@set ");
-               wrbuf_puts (w, p->u.setname);
-               wrbuf_puts (w, " ");
-               break;
+        wrbuf_puts (w, "@set ");
+        wrbuf_puts (w, p->u.setname);
+        wrbuf_puts (w, " ");
+        break;
     case CCL_RPN_TERM:
        for (att = p->u.t.attr_list; att; att = att->next)
-               {
-                       char tmpattr[128];
-                       wrbuf_puts (w, "@attr ");
-                       if (att->set)
-                       {
-                               wrbuf_puts (w, att->set);
-                               wrbuf_puts (w, " ");
-                       }
-                       switch(att->kind)
-                       {
-                       case CCL_RPN_ATTR_NUMERIC:
-                               sprintf(tmpattr, "%d=%d ", att->type, att->value.numeric);
-                               wrbuf_puts (w, tmpattr);
-                               break;
-                       case CCL_RPN_ATTR_STRING:
-                               sprintf(tmpattr, "%d=", att->type);
-                               wrbuf_puts (w, tmpattr);
-                               wrbuf_puts(w, att->value.str);
-                               wrbuf_puts (w, " ");
-                               break;
-                       }
-               }
-               for (cp = p->u.t.term; *cp; cp++)
-               {
-                       if (*cp == ' ' || *cp == '\\')
-                               wrbuf_putc (w, '\\');
-                       wrbuf_putc (w, *cp);
-               }
-               wrbuf_puts (w, " ");
-               break;
+        {
+            char tmpattr[128];
+            wrbuf_puts (w, "@attr ");
+            if (att->set)
+            {
+                wrbuf_puts (w, att->set);
+                wrbuf_puts (w, " ");
+            }
+            switch(att->kind)
+            {
+            case CCL_RPN_ATTR_NUMERIC:
+                sprintf(tmpattr, "%d=%d ", att->type, att->value.numeric);
+                wrbuf_puts (w, tmpattr);
+                break;
+            case CCL_RPN_ATTR_STRING:
+                sprintf(tmpattr, "%d=", att->type);
+                wrbuf_puts (w, tmpattr);
+                wrbuf_puts(w, att->value.str);
+                wrbuf_puts (w, " ");
+                break;
+            }
+        }
+        for (cp = p->u.t.term; *cp; cp++)
+        {
+            if (*cp == ' ' || *cp == '\\')
+                wrbuf_putc (w, '\\');
+            wrbuf_putc (w, *cp);
+        }
+        wrbuf_puts (w, " ");
+        break;
     }
 }
-
-/*
- * Local variables:
- * tab-width: 8
- * c-basic-offset: 4
- * End:
- */
index 86e370e..db55135 100644 (file)
@@ -2,7 +2,7 @@
  * Copyright (C) 1995-2005, Index Data ApS
  * See the file LICENSE for details.
  *
- * $Id: z3950oid.c,v 1.2 2005-01-15 19:47:14 adam Exp $
+ * $Id: z3950oid.c,v 1.3 2005-06-24 19:56:52 adam Exp $
  */
 
 #if HAVE_CONFIG_H
@@ -70,13 +70,3 @@ const char* yaz_z3950_oid_value_to_str(oid_value ov, oid_class oc)
         return "";
     }
 }
-
-
-/*
- * Local variables:
- * tab-width: 8
- * c-basic-offset: 4
- * End:
- * vim600: sw=4 ts=8 fdm=marker
- * vim<600: sw=4 ts=8
- */