[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-cvs: CVS update: g_funcs.c
User: peterb
Date: 07/06/04 12:15:39
Modified: . g_funcs.c g_hook.c g_keys.c g_rc.c x_menus.c
Log:
Replace deprecated Guile functions & macros.
Replace deprecated SCM_STRINGP, SCM_INUM, SXM_INUMP & SCM_MAKINUM with
recommended equivalents for Guile 1.8.
Revision Changes Path
1.24 eda/geda/gaf/gschem/src/g_funcs.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: g_funcs.c
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/g_funcs.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -b -r1.23 -r1.24
--- g_funcs.c 21 Apr 2007 09:24:02 -0000 1.23
+++ g_funcs.c 4 Jun 2007 16:15:38 -0000 1.24
@@ -48,7 +48,7 @@
*/
SCM g_funcs_print(SCM filename)
{
- SCM_ASSERT (SCM_NIMP (filename) && SCM_STRINGP (filename), filename,
+ SCM_ASSERT (scm_is_string (filename), filename,
SCM_ARG1, "gschem-print");
if (output_filename) {
@@ -69,7 +69,7 @@
*/
SCM g_funcs_postscript(SCM filename)
{
- SCM_ASSERT (SCM_NIMP (filename) && SCM_STRINGP (filename), filename,
+ SCM_ASSERT (scm_is_string (filename), filename,
SCM_ARG1, "gschem-postscript");
if (output_filename) {
@@ -90,7 +90,7 @@
*/
SCM g_funcs_image(SCM filename)
{
- SCM_ASSERT (SCM_NIMP (filename) && SCM_STRINGP (filename), filename,
+ SCM_ASSERT (scm_is_string (filename), filename,
SCM_ARG1, "gschem-image");
if (output_filename) {
@@ -126,7 +126,7 @@
SCM g_funcs_log(SCM msg)
{
- SCM_ASSERT (SCM_NIMP (msg) && SCM_STRINGP (msg), msg,
+ SCM_ASSERT (scm_is_string (msg), msg,
SCM_ARG1, "gschem-log");
s_log_message (SCM_STRING_CHARS (msg));
@@ -142,7 +142,7 @@
SCM g_funcs_msg(SCM msg)
{
- SCM_ASSERT (SCM_NIMP (msg) && SCM_STRINGP (msg), msg,
+ SCM_ASSERT (scm_is_string (msg), msg,
SCM_ARG1, "gschem-msg");
generic_msg_dialog (SCM_STRING_CHARS (msg));
@@ -159,7 +159,7 @@
{
int r;
- SCM_ASSERT (SCM_NIMP (msg) && SCM_STRINGP (msg), msg,
+ SCM_ASSERT (scm_is_string (msg), msg,
SCM_ARG1, "gschem-msg");
r = generic_confirm_dialog (SCM_STRING_CHARS (msg));
@@ -181,10 +181,10 @@
char * r;
SCM v;
- SCM_ASSERT (SCM_NIMP (msg) && SCM_STRINGP (msg), msg,
+ SCM_ASSERT (scm_is_string (msg), msg,
SCM_ARG1, "gschem-filesel");
- SCM_ASSERT (SCM_NIMP (templ) && SCM_STRINGP (templ), templ,
+ SCM_ASSERT (scm_is_string (templ), templ,
SCM_ARG1, "gschem-filesel");
/*! \bug FIXME -- figure out the magic SCM_ASSERT for the flags */
@@ -325,7 +325,7 @@
/* Extract wiki name string from Scheme value structure.
* If not a string, use the empty string */
- if (SCM_STRINGP (wikiname)) {
+ if (scm_is_string (wikiname)) {
wikistr = SCM_STRING_CHARS(wikiname);
} else {
wikistr = "";
1.22 eda/geda/gaf/gschem/src/g_hook.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: g_hook.c
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/g_hook.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -b -r1.21 -r1.22
--- g_hook.c 28 May 2007 07:42:19 -0000 1.21
+++ g_hook.c 4 Jun 2007 16:15:38 -0000 1.22
@@ -145,9 +145,9 @@
int i;
gchar *newtext=NULL;
- SCM_ASSERT (SCM_STRINGP(scm_attrib_name), scm_attrib_name,
+ SCM_ASSERT (scm_is_string(scm_attrib_name), scm_attrib_name,
SCM_ARG2, "add-attribute-to-object");
- SCM_ASSERT (SCM_STRINGP(scm_attrib_value), scm_attrib_value,
+ SCM_ASSERT (scm_is_string(scm_attrib_value), scm_attrib_value,
SCM_ARG3, "add-attribute-to-object");
SCM_ASSERT (scm_boolean_p(scm_vis), scm_vis,
SCM_ARG4, "add-attribute-to-object");
@@ -163,16 +163,16 @@
attrib_value = SCM_STRING_CHARS(scm_attrib_value);
vis = SCM_NFALSEP(scm_vis);
- for (i=0; i<=SCM_INUM(scm_length(scm_show))-1; i++) {
+ for (i=0; i<=scm_to_int(scm_length(scm_show))-1; i++) {
/* Check every element in the list. It should be a string! */
- SCM_ASSERT(scm_list_ref(scm_show, SCM_MAKINUM(i)),
+ SCM_ASSERT(scm_list_ref(scm_show, scm_from_int(i)),
scm_show,
SCM_ARG5, "add-attribute-to-object");
- SCM_ASSERT(SCM_STRINGP(scm_list_ref(scm_show, SCM_MAKINUM(i))),
+ SCM_ASSERT(scm_is_string(scm_list_ref(scm_show, scm_from_int(i))),
scm_show,
SCM_ARG5, "add-attribute-to-object");
- value = SCM_STRING_CHARS(scm_list_ref(scm_show, SCM_MAKINUM(i)));
+ value = SCM_STRING_CHARS(scm_list_ref(scm_show, scm_from_int(i)));
SCM_ASSERT(value, scm_show,
SCM_ARG5, "add-attribute-to-object");
@@ -235,10 +235,10 @@
SCM_ASSERT (o_current->line != NULL,
object, SCM_ARG1, "get-pin-ends");
- coord1 = scm_cons(SCM_MAKINUM(o_current->line->x[0]),
- SCM_MAKINUM(o_current->line->y[0]));
- coord2 = scm_cons(SCM_MAKINUM(o_current->line->x[1]),
- SCM_MAKINUM(o_current->line->y[1]));
+ coord1 = scm_cons(scm_from_int(o_current->line->x[0]),
+ scm_from_int(o_current->line->y[0]));
+ coord2 = scm_cons(scm_from_int(o_current->line->x[1]),
+ scm_from_int(o_current->line->y[1]));
if (o_current->whichend == 0) {
coords = scm_cons(coord1, scm_list(coord2));
} else {
@@ -288,17 +288,17 @@
int rotation = 0;
int x = -1, y = -1;
- SCM_ASSERT (SCM_STRINGP(scm_colorname), scm_colorname,
+ SCM_ASSERT (scm_is_string(scm_colorname), scm_colorname,
SCM_ARG2, "set-attribute-text-properties!");
- SCM_ASSERT ( SCM_INUMP(scm_size),
+ SCM_ASSERT ( scm_is_integer(scm_size),
scm_size, SCM_ARG3, "set-attribute-text-properties!");
- SCM_ASSERT (SCM_STRINGP(scm_alignment), scm_alignment,
+ SCM_ASSERT (scm_is_string(scm_alignment), scm_alignment,
SCM_ARG4, "set-attribute-text-properties!");
- SCM_ASSERT ( SCM_INUMP(scm_rotation),
+ SCM_ASSERT ( scm_is_integer(scm_rotation),
scm_rotation, SCM_ARG5, "set-attribute-text-properties!");
- SCM_ASSERT ( SCM_INUMP(scm_x),
+ SCM_ASSERT ( scm_is_integer(scm_x),
scm_x, SCM_ARG6, "set-attribute-text-properties!");
- SCM_ASSERT ( SCM_INUMP(scm_y),
+ SCM_ASSERT ( scm_is_integer(scm_y),
scm_y, SCM_ARG7, "set-attribute-text-properties!");
colorname = SCM_STRING_CHARS(scm_colorname);
@@ -311,10 +311,10 @@
color = -1;
}
- size = SCM_INUM(scm_size);
- rotation = SCM_INUM(scm_rotation);
- x = SCM_INUM(scm_x);
- y = SCM_INUM(scm_y);
+ size = scm_to_int(scm_size);
+ rotation = scm_to_int(scm_rotation);
+ x = scm_to_int(scm_x);
+ y = scm_to_int(scm_y);
alignment_string = SCM_STRING_CHARS(scm_alignment);
@@ -350,7 +350,7 @@
}
if (alignment == -2) {
/* Bad specified */
- SCM_ASSERT (SCM_STRINGP(scm_alignment), scm_alignment,
+ SCM_ASSERT (scm_is_string(scm_alignment), scm_alignment,
SCM_ARG4, "set-attribute-text-properties!");
}
@@ -566,23 +566,23 @@
SCM_ARG3, "get-object-bounds");
/* Build the exclude attrib list */
- for (i=0; i <= SCM_INUM(scm_length(scm_exclude_attribs))-1; i++) {
- SCM_ASSERT (SCM_STRINGP(scm_list_ref(scm_exclude_attribs, SCM_MAKINUM(i))),
+ for (i=0; i <= scm_to_int(scm_length(scm_exclude_attribs))-1; i++) {
+ SCM_ASSERT (scm_is_string(scm_list_ref(scm_exclude_attribs, scm_from_int(i))),
scm_exclude_attribs,
SCM_ARG2, "get-object-bounds");
exclude_attrib_list = g_list_append(exclude_attrib_list,
SCM_STRING_CHARS(scm_list_ref(scm_exclude_attribs,
- SCM_MAKINUM(i))));
+ scm_from_int(i))));
}
/* Build the exclude object type list */
- for (i=0; i <= SCM_INUM(scm_length(scm_exclude_object_type))-1; i++) {
- SCM_ASSERT (SCM_STRINGP(scm_list_ref(scm_exclude_object_type, SCM_MAKINUM(i))),
+ for (i=0; i <= scm_to_int(scm_length(scm_exclude_object_type))-1; i++) {
+ SCM_ASSERT (scm_is_string(scm_list_ref(scm_exclude_object_type, scm_from_int(i))),
scm_exclude_object_type,
SCM_ARG3, "get-object-bounds");
exclude_obj_type_list = g_list_append(exclude_obj_type_list,
SCM_STRING_CHARS(scm_list_ref(scm_exclude_object_type,
- SCM_MAKINUM(i))));
+ scm_from_int(i))));
}
/* Get w_current and o_current. */
@@ -606,8 +606,8 @@
/* Free the exclude attrib_list. Don't free the nodes!! */
g_list_free(exclude_obj_type_list);
- horizontal = scm_cons (SCM_MAKINUM(left), SCM_MAKINUM(right));
- vertical = scm_cons (SCM_MAKINUM(top), SCM_MAKINUM(bottom));
+ horizontal = scm_cons (scm_from_int(left), scm_from_int(right));
+ vertical = scm_cons (scm_from_int(top), scm_from_int(bottom));
returned = scm_cons (horizontal, vertical);
return (returned);
}
@@ -683,13 +683,13 @@
SCM_ASSERT (g_get_data_from_page_smob (page_smob, &w_current, &page),
page_smob, SCM_ARG1, "add-component-at-xy");
/* Check the arguments */
- SCM_ASSERT (SCM_STRINGP(scm_comp_name), scm_comp_name,
+ SCM_ASSERT (scm_is_string(scm_comp_name), scm_comp_name,
SCM_ARG2, "add-component-at-xy");
- SCM_ASSERT ( SCM_INUMP(scm_x), scm_x,
+ SCM_ASSERT ( scm_is_integer(scm_x), scm_x,
SCM_ARG3, "add-component-at-xy");
- SCM_ASSERT ( SCM_INUMP(scm_y), scm_y,
+ SCM_ASSERT ( scm_is_integer(scm_y), scm_y,
SCM_ARG4, "add-component-at-xy");
- SCM_ASSERT ( SCM_INUMP(scm_angle), scm_angle,
+ SCM_ASSERT ( scm_is_integer(scm_angle), scm_angle,
SCM_ARG5, "add-component-at-xy");
SCM_ASSERT ( scm_boolean_p(scm_selectable), scm_selectable,
SCM_ARG6, "add-component-at-xy");
@@ -698,9 +698,9 @@
/* Get the parameters */
comp_name = SCM_STRING_CHARS(scm_comp_name);
- x = SCM_INUM(scm_y);
- y = SCM_INUM(scm_y);
- angle = SCM_INUM(scm_angle);
+ x = scm_to_int(scm_y);
+ y = scm_to_int(scm_y);
+ angle = scm_to_int(scm_angle);
selectable = SCM_NFALSEP(scm_selectable);
mirror = SCM_NFALSEP(scm_mirror);
1.9 eda/geda/gaf/gschem/src/g_keys.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: g_keys.c
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/g_keys.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- g_keys.c 22 Apr 2007 17:59:50 -0000 1.8
+++ g_keys.c 4 Jun 2007 16:15:38 -0000 1.9
@@ -133,7 +133,7 @@
g_return_val_if_fail (SCM_CONSP (scm_keymap_entry) &&
SCM_SYMBOLP (SCM_CAR (scm_keymap_entry)) &&
- SCM_STRINGP (SCM_CDR (scm_keymap_entry)), ret);
+ scm_is_string (SCM_CDR (scm_keymap_entry)), ret);
keymap_entry.action = g_strdup (SCM_SYMBOL_CHARS (SCM_CAR (scm_keymap_entry)));
keymap_entry.keyseq = g_strdup (SCM_STRING_CHARS (SCM_CDR (scm_keymap_entry)));
ret = g_array_append_val (ret, keymap_entry);
1.45 eda/geda/gaf/gschem/src/g_rc.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: g_rc.c
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/g_rc.c,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -b -r1.44 -r1.45
--- g_rc.c 17 Apr 2007 20:19:16 -0000 1.44
+++ g_rc.c 4 Jun 2007 16:15:38 -0000 1.45
@@ -98,7 +98,7 @@
{
SCM ret;
- SCM_ASSERT (SCM_NIMP (version) && SCM_STRINGP (version), version,
+ SCM_ASSERT (scm_is_string (version), version,
SCM_ARG1, "gschem-version");
if (g_strcasecmp (SCM_STRING_CHARS (version), VERSION) != 0) {
@@ -135,23 +135,23 @@
int image_blue;
SCM ret;
- SCM_ASSERT (SCM_INUMP (index), index, SCM_ARG1, rc_name);
- SCM_ASSERT (SCM_STRINGP (color), color, SCM_ARG2, rc_name);
- SCM_ASSERT (SCM_NIMP (outline_color) && SCM_STRINGP (outline_color),
+ SCM_ASSERT (scm_is_integer (index), index, SCM_ARG1, rc_name);
+ SCM_ASSERT (scm_is_string (color), color, SCM_ARG2, rc_name);
+ SCM_ASSERT (scm_is_string (outline_color),
outline_color, SCM_ARG3, rc_name);
- SCM_ASSERT (SCM_NIMP (ps_color) && SCM_STRINGP (ps_color), ps_color,
+ SCM_ASSERT (scm_is_string (ps_color), ps_color,
SCM_ARG4, rc_name);
- SCM_ASSERT (SCM_INUMP (ir), ir, SCM_ARG5, rc_name);
- SCM_ASSERT (SCM_INUMP (ig), ig, SCM_ARG6, rc_name);
- SCM_ASSERT (SCM_INUMP (ib), ib, SCM_ARG7, rc_name);
+ SCM_ASSERT (scm_is_integer (ir), ir, SCM_ARG5, rc_name);
+ SCM_ASSERT (scm_is_integer (ig), ig, SCM_ARG6, rc_name);
+ SCM_ASSERT (scm_is_integer (ib), ib, SCM_ARG7, rc_name);
- color_index = SCM_INUM (index);
+ color_index = scm_to_int (index);
color_name = SCM_STRING_CHARS (color);
outline_color_name = SCM_STRING_CHARS (outline_color);
ps_color_string = SCM_STRING_CHARS (ps_color);
- image_red = SCM_INUM (ir);
- image_green = SCM_INUM (ig);
- image_blue = SCM_INUM (ib);
+ image_red = scm_to_int (ir);
+ image_green = scm_to_int (ig);
+ image_blue = scm_to_int (ib);
status = s_color_request (color_index, color_name, outline_color_name,
ps_color_string,
@@ -346,7 +346,7 @@
int index;
char *mode;
- SCM_ASSERT (SCM_NIMP (scmmode) && SCM_STRINGP (scmmode), scmmode,
+ SCM_ASSERT (scm_is_string (scmmode), scmmode,
SCM_ARG1, rc_name);
mode = SCM_STRING_CHARS (scmmode);
@@ -527,10 +527,10 @@
{
int val;
- SCM_ASSERT (SCM_INUMP (zoomfactor), zoomfactor,
+ SCM_ASSERT (scm_is_integer (zoomfactor), zoomfactor,
SCM_ARG1, "test-display-zoom-factor");
- val = SCM_INUM (zoomfactor);
+ val = scm_to_int (zoomfactor);
if (val == 0) {
fprintf(stderr,
_("Invalid zoomfactor [%d] passed to %s\n"),
@@ -557,7 +557,7 @@
#endif
SCM ret = SCM_BOOL_T;
- SCM_ASSERT (SCM_NIMP (scmmode) && SCM_STRINGP (scmmode), scmmode,
+ SCM_ASSERT (scm_is_string (scmmode), scmmode,
SCM_ARG1, "scrollbar-update");
#if 0
@@ -647,9 +647,9 @@
{
int val;
- SCM_ASSERT (SCM_INUMP (size), size, SCM_ARG1, "text-size");
+ SCM_ASSERT (scm_is_integer (size), size, SCM_ARG1, "text-size");
- val = SCM_INUM (size);
+ val = scm_to_int (size);
if (val == 0) {
fprintf(stderr,
_("Invalid size [%d] passed to text-size\n"),
@@ -718,9 +718,9 @@
{
int val;
- SCM_ASSERT (SCM_INUMP (size), size, SCM_ARG1, "snap-size");
+ SCM_ASSERT (scm_is_integer (size), size, SCM_ARG1, "snap-size");
- val = SCM_INUM (size);
+ val = scm_to_int (size);
if (val == 0) {
fprintf(stderr, _("Invalid size [%d] passed to snap-size\n"),
val);
@@ -760,7 +760,7 @@
char *path;
SCM ret;
- SCM_ASSERT (SCM_NIMP (scm_path) && SCM_STRINGP (scm_path), scm_path,
+ SCM_ASSERT (scm_is_string (scm_path), scm_path,
SCM_ARG1, "attribute-name");
path = SCM_STRING_CHARS (scm_path);
@@ -789,7 +789,7 @@
#ifdef HAS_LIBSTROKE
char *stroke;
- SCM_ASSERT (SCM_NIMP (scm_stroke) && SCM_STRINGP (scm_stroke), scm_stroke,
+ SCM_ASSERT (scm_is_string (scm_stroke), scm_stroke,
SCM_ARG1, "stroke");
stroke = SCM_STRING_CHARS (scm_stroke);
@@ -871,7 +871,7 @@
char *papername;
SCM ret;
- SCM_ASSERT (SCM_STRINGP (scm_papername), scm_papername,
+ SCM_ASSERT (scm_is_string (scm_papername), scm_papername,
SCM_ARG1, FUNC_NAME);
SCM_ASSERT (SCM_NIMP (scm_width) && SCM_REALP (scm_width), scm_width,
SCM_ARG2, FUNC_NAME);
@@ -971,12 +971,12 @@
*/
SCM g_rc_image_size(SCM width, SCM height)
{
- SCM_ASSERT (SCM_INUMP (width), width, SCM_ARG1, "image-size");
- SCM_ASSERT (SCM_INUMP (height), height, SCM_ARG2, "image-size");
+ SCM_ASSERT (scm_is_integer (width), width, SCM_ARG1, "image-size");
+ SCM_ASSERT (scm_is_integer (height), height, SCM_ARG2, "image-size");
/* yes this is legit, we are casting the resulting double to an int */
- default_image_width = SCM_INUM (width);
- default_image_height = SCM_INUM (height);
+ default_image_width = scm_to_int (width);
+ default_image_height = scm_to_int (height);
return SCM_BOOL_T;
}
@@ -1267,9 +1267,9 @@
{
int val;
- SCM_ASSERT (SCM_INUMP (levels), levels, SCM_ARG1, "undo-levels");
+ SCM_ASSERT (scm_is_integer (levels), levels, SCM_ARG1, "undo-levels");
- val = SCM_INUM (levels);
+ val = scm_to_int (levels);
if (val == 0) {
fprintf(stderr, _("Invalid num levels [%d] passed to undo-levels\n"),
@@ -1372,7 +1372,7 @@
*/
SCM g_rc_add_menu(SCM menu_name, SCM menu_items)
{
- SCM_ASSERT (SCM_NIMP (menu_name) && SCM_STRINGP (menu_name), menu_name,
+ SCM_ASSERT (scm_is_string (menu_name), menu_name,
SCM_ARG1, "add-menu");
SCM_ASSERT (SCM_NIMP (menu_items) && SCM_CONSP (menu_items), menu_items,
SCM_ARG2, "add-menu");
@@ -1389,11 +1389,11 @@
*/
SCM g_rc_window_size(SCM width, SCM height)
{
- SCM_ASSERT (SCM_INUMP (width), width, SCM_ARG1, "window-size");
- SCM_ASSERT (SCM_INUMP (height), height, SCM_ARG2, "window-size");
+ SCM_ASSERT (scm_is_integer (width), width, SCM_ARG1, "window-size");
+ SCM_ASSERT (scm_is_integer (height), height, SCM_ARG2, "window-size");
- default_width = SCM_INUM (width);
- default_height = SCM_INUM (height);
+ default_width = scm_to_int (width);
+ default_height = scm_to_int (height);
return SCM_BOOL_T;
}
@@ -1492,9 +1492,9 @@
{
int val;
- SCM_ASSERT (SCM_INUMP (size), size, SCM_ARG1, "bus-ripper-size");
+ SCM_ASSERT (scm_is_integer (size), size, SCM_ARG1, "bus-ripper-size");
- val = SCM_INUM (size);
+ val = scm_to_int (size);
if (val == 0) {
fprintf(stderr, _("Invalid size [%d] passed to bus-ripper-size\n"),
@@ -1567,9 +1567,9 @@
{
int val;
- SCM_ASSERT (SCM_INUMP (dotsize), dotsize, SCM_ARG1, "grid-dot-size");
+ SCM_ASSERT (scm_is_integer (dotsize), dotsize, SCM_ARG1, "grid-dot-size");
- val = SCM_INUM (dotsize);
+ val = scm_to_int (dotsize);
if (val <= 0) {
fprintf(stderr, _("Invalid dot size [%d] passed to grid-dot-size\n"),
@@ -1608,9 +1608,9 @@
{
int val;
- SCM_ASSERT (SCM_INUMP (spacing), spacing, SCM_ARG1, "grid-fixed-threshold");
+ SCM_ASSERT (scm_is_integer (spacing), spacing, SCM_ARG1, "grid-fixed-threshold");
- val = SCM_INUM (spacing);
+ val = scm_to_int (spacing);
if (val <= 0) {
fprintf(stderr, _("Invalid pixel spacing [%d] passed to grid-fixed-threshold\n"),
@@ -1632,10 +1632,10 @@
{
int val;
- SCM_ASSERT (SCM_INUMP (numlines), numlines,
+ SCM_ASSERT (scm_is_integer (numlines), numlines,
SCM_ARG1, "output-vector-threshold");
- val = SCM_INUM (numlines);
+ val = scm_to_int (numlines);
default_print_vector_threshold = val;
@@ -1651,10 +1651,10 @@
{
int val;
- SCM_ASSERT (SCM_INUMP (offset), offset,
+ SCM_ASSERT (scm_is_integer (offset), offset,
SCM_ARG1, "add-attribute-offset");
- val = SCM_INUM (offset);
+ val = scm_to_int (offset);
if (val < 0) {
fprintf(stderr, _("Invalid offset [%d] passed to add-attribute-offset\n"),
@@ -1676,9 +1676,9 @@
{
int val;
- SCM_ASSERT (SCM_INUMP (seconds), seconds, SCM_ARG1, "auto-save-interval");
+ SCM_ASSERT (scm_is_integer (seconds), seconds, SCM_ARG1, "auto-save-interval");
- val = SCM_INUM (seconds);
+ val = scm_to_int (seconds);
if (val < 0) {
fprintf(stderr, _("Invalid number of seconds [%d] passed to auto-save-interval\n"),
@@ -1717,9 +1717,9 @@
{
int val;
- SCM_ASSERT (SCM_INUMP (gain), gain, SCM_ARG1, "mousepan-gain");
+ SCM_ASSERT (scm_is_integer (gain), gain, SCM_ARG1, "mousepan-gain");
- val = SCM_INUM (gain);
+ val = scm_to_int (gain);
if (val <= 0) {
fprintf(stderr, _("Invalid gain [%d] passed to mousepan-gain\n"),
@@ -1740,9 +1740,9 @@
{
int val;
- SCM_ASSERT (SCM_INUMP (gain), gain, SCM_ARG1, "keyboardpan-gain");
+ SCM_ASSERT (scm_is_integer (gain), gain, SCM_ARG1, "keyboardpan-gain");
- val = SCM_INUM (gain);
+ val = scm_to_int (gain);
if (val <= 0) {
fprintf(stderr, _("Invalid gain [%d] passed to keyboardpan-gain\n"),
@@ -1765,7 +1765,7 @@
{
char *command;
- SCM_ASSERT (SCM_STRINGP (scm_command), scm_command,
+ SCM_ASSERT (scm_is_string (scm_command), scm_command,
SCM_ARG1, FUNC_NAME);
command = SCM_STRING_CHARS (scm_command);
@@ -1786,9 +1786,9 @@
{
int val;
- SCM_ASSERT (SCM_INUMP (pixels), pixels, SCM_ARG1, "select-slack-pixels");
+ SCM_ASSERT (scm_is_integer (pixels), pixels, SCM_ARG1, "select-slack-pixels");
- val = SCM_INUM (pixels);
+ val = scm_to_int (pixels);
if (val <= 0) {
fprintf(stderr, _("Invalid number of pixels [%d] passed to select-slack-pixels\n"),
1.45 eda/geda/gaf/gschem/src/x_menus.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: x_menus.c
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/x_menus.c,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -b -r1.44 -r1.45
--- x_menus.c 10 May 2007 12:45:12 -0000 1.44
+++ x_menus.c 4 Jun 2007 16:15:38 -0000 1.45
@@ -140,12 +140,12 @@
scm_items_len = (int) scm_ilength (scm_items);
for (j = 0 ; j < scm_items_len; j++) {
- scm_index = SCM_MAKINUM (j);
+ scm_index = scm_from_int (j);
scm_item = scm_list_ref (scm_items, scm_index);
scm_item_name = SCM_CAR (scm_item);
scm_item_func = SCM_CADR (scm_item);
scm_item_hotkey_func = SCM_CADDR (scm_item);
- SCM_ASSERT(SCM_STRINGP(scm_item_name), scm_item_name, SCM_ARGn, "get_main_menu item_name");
+ SCM_ASSERT(scm_is_string(scm_item_name), scm_item_name, SCM_ARGn, "get_main_menu item_name");
SCM_ASSERT(SCM_SYMBOLP(scm_item_func), scm_item_func, SCM_ARGn, "get_main_menu item_func");
SCM_ASSERT(SCM_SYMBOLP(scm_item_hotkey_func), scm_item_hotkey_func, SCM_ARGn, "get_main_menu hotkey_func");
_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs