Ticket #167: adlang_sizet

File adlang_sizet, 3.4 KB (added by epruesse, 16 years ago)
Line 
1Index: arb/ARBDB/adlang1.c
2===================================================================
3--- arb.orig/ARBDB/adlang1.c
4+++ arb/ARBDB/adlang1.c
5@@ -72,11 +72,6 @@ static char gbl_param_char(const char *p
6     return def;
7 }
8 
9-static size_t gbl_param_size_t(const char *param_name, size_t def, const char *help_text, struct gbl_param **pp, size_t *vaddr) {
10-    gbl_new_param(pp, GB_INT, vaddr, param_name, help_text);
11-    return def;
12-}
13-
14 static const char *gbl_param_String(const char *param_name, const char *def, const char *help_text, struct gbl_param **pp, String *vaddr) {
15     gbl_new_param(pp, GB_STRING, vaddr, param_name, help_text);
16     return def;
17@@ -92,13 +87,11 @@ static int gbl_param_bit(const char *par
18 
19 #define GBL_PARAM_INT(   var, param_name, def, help_text) GBL_PARAM_TYPE(int,    var, param_name, def, help_text)
20 #define GBL_PARAM_CHAR(  var, param_name, def, help_text) GBL_PARAM_TYPE(char,   var, param_name, def, help_text)
21-#define GBL_PARAM_SIZET( var, param_name, def, help_text) GBL_PARAM_TYPE(size_t, var, param_name, def, help_text)
22 #define GBL_PARAM_STRING(var, param_name, def, help_text) GBL_PARAM_TYPE(String, var, param_name, def, help_text)
23 #define GBL_PARAM_BIT(   var, param_name, def, help_text) GBL_PARAM_TYPE(bit,    var, param_name, def, help_text)
24 
25 #define GBL_STRUCT_PARAM_INT(   strct, member, param_name, def, help_text) GBL_STRUCT_PARAM_TYPE(int,    strct, member, param_name, def, help_text)
26 #define GBL_STRUCT_PARAM_CHAR(  strct, member, param_name, def, help_text) GBL_STRUCT_PARAM_TYPE(char,   strct, member, param_name, def, help_text)
27-#define GBL_STRUCT_PARAM_SIZET( strct, member, param_name, def, help_text) GBL_STRUCT_PARAM_TYPE(size_t, strct, member, param_name, def, help_text)
28 #define GBL_STRUCT_PARAM_STRING(strct, member, param_name, def, help_text) GBL_STRUCT_PARAM_TYPE(String, strct, member, param_name, def, help_text)
29 #define GBL_STRUCT_PARAM_BIT(   strct, member, param_name, def, help_text) GBL_STRUCT_PARAM_TYPE(bit,    strct, member, param_name, def, help_text)
30 
31@@ -144,7 +137,6 @@ static GB_ERROR trace_params(int argc, c
32                         break;
33                         
34                     case GB_INT:
35-                        gb_assert(sizeof(int) == sizeof(size_t)); // assumed by GBL_PARAM_SIZET
36                         *(int *)para->varaddr = atoi(value);
37                         break;
38 
39@@ -2011,11 +2003,11 @@ static GB_ERROR gbl_format_sequence(GBL_
40     int      ic;
41 
42     GBL_BEGIN_PARAMS;
43-    GBL_PARAM_SIZET (firsttab, "firsttab=", 10,   "Indent first line");
44-    GBL_PARAM_SIZET (tab,      "tab=",      10,   "Indent not first line");
45+    GBL_PARAM_INT   (firsttab, "firsttab=", 10,   "Indent first line");
46+    GBL_PARAM_INT   (tab,      "tab=",      10,   "Indent not first line");
47     GBL_PARAM_BIT   (numleft,  "numleft",   0,    "Numbers left of sequence");
48-    GBL_PARAM_SIZET (gap,      "gap=",      10,   "Insert ' ' every n sequence characters");
49-    GBL_PARAM_SIZET (width,    "width=",    50,   "Sequence width (bases only)");
50+    GBL_PARAM_INT   (gap,      "gap=",      10,   "Insert ' ' every n sequence characters");
51+    GBL_PARAM_INT   (width,    "width=",    50,   "Sequence width (bases only)");
52     GBL_PARAM_STRING(nl,       "nl=",       " ",  "Break line at characters 'str' if wrapping needed");
53     GBL_PARAM_STRING(forcenl,  "forcenl=",  "\n", "Always break line at characters 'str'");
54     GBL_TRACE_PARAMS(args->cparam,args->vparam);