projects
/
yaz-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
New private OID: IDXPATH
[yaz-moved-to-github.git]
/
zoom
/
zoom-opt.c
diff --git
a/zoom/zoom-opt.c
b/zoom/zoom-opt.c
index
f99092e
..
b74698c
100644
(file)
--- a/
zoom/zoom-opt.c
+++ b/
zoom/zoom-opt.c
@@
-1,5
+1,5
@@
/*
/*
- * $Id: zoom-opt.c,v 1.2 2001-11-18 21:14:23 adam Exp $
+ * $Id: zoom-opt.c,v 1.4 2002-01-28 09:27:48 adam Exp $
*
* ZOOM layer for C, options handling
*/
*
* ZOOM layer for C, options handling
*/
@@
-16,7
+16,7
@@
ZOOM_options ZOOM_options_create (void)
ZOOM_options ZOOM_options_create_with_parent (ZOOM_options parent)
{
ZOOM_options ZOOM_options_create_with_parent (ZOOM_options parent)
{
- ZOOM_options opt = xmalloc (sizeof(*opt));
+ ZOOM_options opt = (ZOOM_options) xmalloc (sizeof(*opt));
opt->refcount = 1;
opt->callback_func = 0;
opt->refcount = 1;
opt->callback_func = 0;
@@
-85,7
+85,7
@@
void ZOOM_options_set (ZOOM_options opt, const char *name, const char *value)
}
e = &(*e)->next;
}
}
e = &(*e)->next;
}
- *e = xmalloc (sizeof(**e));
+ *e = (struct ZOOM_options_entry *) xmalloc (sizeof(**e));
(*e)->name = xstrdup (name);
(*e)->value = xstrdup (value);
(*e)->next = 0;
(*e)->name = xstrdup (name);
(*e)->value = xstrdup (value);
(*e)->next = 0;
@@
-132,3
+132,11
@@
int ZOOM_options_get_int (ZOOM_options opt, const char *name, int defa)
return defa;
return atoi(v);
}
return defa;
return atoi(v);
}
+
+void ZOOM_options_set_int(ZOOM_options opt, const char *name, int value)
+{
+ char s[40];
+
+ sprintf (s, "%d", value);
+ ZOOM_options_set (opt, name, s);
+}