[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

gEDA-cvs: CVS update: g_rc.c



  User: peterb  
  Date: 07/06/04 12:15:44

  Modified:    .        g_rc.c g_smob.c s_clib.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.7                  eda/geda/gaf/libgeda/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/libgeda/src/g_rc.c,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -b -r1.6 -r1.7
  --- g_rc.c	28 May 2007 08:13:50 -0000	1.6
  +++ g_rc.c	4 Jun 2007 16:15:43 -0000	1.7
  @@ -350,11 +350,11 @@
     char *string;
     char *namestr = NULL;
   
  -  SCM_ASSERT (SCM_NIMP (path) && SCM_STRINGP (path), path,
  +  SCM_ASSERT (scm_is_string (path), path,
                 SCM_ARG1, "component-library");
     
     if (name != SCM_UNDEFINED) {
  -    SCM_ASSERT (SCM_NIMP (name) && SCM_STRINGP (name), name,
  +    SCM_ASSERT (scm_is_string (name), name,
   		SCM_ARG2, "component-library");
       namestr = SCM_STRING_CHARS (name);
     }
  @@ -407,12 +407,12 @@
   {
     gchar *namestr = NULL;
     gchar *cmdstr = NULL;
  -  SCM_ASSERT (SCM_STRINGP (command), command, SCM_ARG1, 
  +  SCM_ASSERT (scm_is_string (command), command, SCM_ARG1, 
   	      "component-library-command");
     cmdstr = g_strdup(SCM_STRING_CHARS (command));
   
     if (name != SCM_UNDEFINED) {
  -    SCM_ASSERT (SCM_STRINGP (name), name, SCM_ARG2, 
  +    SCM_ASSERT (scm_is_string (name), name, SCM_ARG2, 
   	      "component-library-command");
       namestr = SCM_STRING_CHARS (name);
     }
  @@ -448,7 +448,7 @@
   	      "component-library-funcs");
     SCM_ASSERT (scm_is_true (scm_procedure_p (getfunc)), getfunc, SCM_ARG2,
   	      "component-library-funcs");
  -  SCM_ASSERT (SCM_STRINGP (name), name, SCM_ARG1, 
  +  SCM_ASSERT (scm_is_string (name), name, SCM_ARG1, 
   	      "component-library-funcs");
   
     if (s_clib_add_scm (listfunc, getfunc, SCM_STRING_CHARS (name)) != NULL) {
  @@ -471,7 +471,7 @@
     GDir *dir;
     const gchar *entry;
     
  -  SCM_ASSERT (SCM_NIMP (path) && SCM_STRINGP (path), path,
  +  SCM_ASSERT (scm_is_string (path), path,
                 SCM_ARG1, "component-library-search");
   
     string = g_strdup (SCM_STRING_CHARS (path));
  @@ -547,7 +547,7 @@
   {
     char *string;
     
  -  SCM_ASSERT (SCM_NIMP (path) && SCM_STRINGP (path), path,
  +  SCM_ASSERT (scm_is_string (path), path,
                 SCM_ARG1, "source-library");
   
     string = g_strdup (SCM_STRING_CHARS (path));
  @@ -600,7 +600,7 @@
     GDir *dir;
     const gchar *entry;
     
  -  SCM_ASSERT (SCM_NIMP (path) && SCM_STRINGP (path), path,
  +  SCM_ASSERT (scm_is_string (path), path,
                 SCM_ARG1, "source-library-search");
   
     string = g_strdup (SCM_STRING_CHARS (path));
  @@ -720,7 +720,7 @@
    */
   SCM g_rc_default_series_name(SCM name)
   {
  -  SCM_ASSERT (SCM_NIMP (name) && SCM_STRINGP (name), name,
  +  SCM_ASSERT (scm_is_string (name), name,
                 SCM_ARG1, "default-series-name");
   
     if (default_series_name) {
  @@ -741,7 +741,7 @@
    */
   SCM g_rc_untitled_name(SCM name)
   {
  -  SCM_ASSERT (SCM_NIMP (name) && SCM_STRINGP (name), name,
  +  SCM_ASSERT (scm_is_string (name), name,
                 SCM_ARG1, "untitled-name");
   
     if (default_untitled_name) {
  @@ -764,7 +764,7 @@
   {
     char *string;
   
  -  SCM_ASSERT (SCM_NIMP (path) && SCM_STRINGP (path), path,
  +  SCM_ASSERT (scm_is_string (path), path,
                 SCM_ARG1, "font-directory");
   
     string = g_strdup (SCM_STRING_CHARS (path));
  @@ -801,7 +801,7 @@
   {
     char *string;
   
  -  SCM_ASSERT (SCM_NIMP (path) && SCM_STRINGP (path), path,
  +  SCM_ASSERT (scm_is_string (path), path,
                 SCM_ARG1, "scheme-directory");
   
     string = g_strdup (SCM_STRING_CHARS (path));
  @@ -838,7 +838,7 @@
   {
     char *string;
   
  -  SCM_ASSERT (SCM_NIMP (path) && SCM_STRINGP (path), path,
  +  SCM_ASSERT (scm_is_string (path), path,
                 SCM_ARG1, "bitmap-directory");
     
     string = g_strdup (SCM_STRING_CHARS (path));
  @@ -873,7 +873,7 @@
    */
   SCM g_rc_bus_ripper_symname(SCM scmsymname)
   {
  -  SCM_ASSERT (SCM_NIMP (scmsymname) && SCM_STRINGP (scmsymname), scmsymname,
  +  SCM_ASSERT (scm_is_string (scmsymname), scmsymname,
                 SCM_ARG1, "bus-ripper-symname");
   
     if (default_bus_ripper_symname) {
  @@ -895,7 +895,7 @@
   {
     char *string;
     
  -  SCM_ASSERT (SCM_NIMP (scmsymname) && SCM_STRINGP (scmsymname), scmsymname,
  +  SCM_ASSERT (scm_is_string (scmsymname), scmsymname,
                 SCM_ARG1, "postsript-prolog");
   
     if (default_postscript_prolog) {
  @@ -951,9 +951,9 @@
     gchar *charstr, *filename;
     gunichar character;
   
  -  SCM_ASSERT (SCM_STRINGP (scmcharstr), scmcharstr,
  +  SCM_ASSERT (scm_is_string (scmcharstr), scmcharstr,
                 SCM_ARG1, "map-font-character-to-file");
  -  SCM_ASSERT (SCM_STRINGP (scmfilename), scmfilename,
  +  SCM_ASSERT (scm_is_string (scmfilename), scmfilename,
                 SCM_ARG2, "map-font-character-to-file");
   
     charstr  = SCM_STRING_CHARS (scmcharstr);
  @@ -989,7 +989,7 @@
    */
   SCM g_rc_always_promote_attributes(SCM scmsymname)
   {
  -  SCM_ASSERT (SCM_NIMP (scmsymname) && SCM_STRINGP (scmsymname), scmsymname,
  +  SCM_ASSERT (scm_is_string (scmsymname), scmsymname,
                 SCM_ARG1, "always-promote-attributes");
   
     if (default_always_promote_attributes) {
  
  
  
  1.16                 eda/geda/gaf/libgeda/src/g_smob.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: g_smob.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/libgeda/src/g_smob.c,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -b -r1.15 -r1.16
  --- g_smob.c	17 Apr 2007 20:19:20 -0000	1.15
  +++ g_smob.c	4 Jun 2007 16:15:43 -0000	1.16
  @@ -175,8 +175,8 @@
     SCM_ASSERT ( SCM_NIMP(attrib_smob) && 
                  ((long) SCM_CAR(attrib_smob) == attrib_smob_tag),
                  attrib_smob, SCM_ARG1, "set-attribute-value!");
  -  SCM_ASSERT ( SCM_NIMP(scm_value) && SCM_STRINGP(scm_value),
  -               scm_value, SCM_ARG2, "set-attribute-value!");
  +  SCM_ASSERT (scm_is_string(scm_value), scm_value, SCM_ARG2, 
  +	      "set-attribute-value!");
   
     attribute = (struct st_attrib_smob *)SCM_CDR(attrib_smob);
     value = SCM_STRING_CHARS (scm_value);
  @@ -247,18 +247,18 @@
     SCM horizontal = SCM_EOL;
     SCM returned = SCM_EOL;
   
  -  SCM_ASSERT (SCM_STRINGP(scm_alignment), scm_alignment,
  +  SCM_ASSERT (scm_is_string(scm_alignment), scm_alignment,
   	      SCM_ARG2, "calcule-new-attrib-bounds");
  -  SCM_ASSERT ( SCM_INUMP(scm_angle),
  +  SCM_ASSERT ( scm_is_integer(scm_angle),
                  scm_angle, SCM_ARG3, "calcule-new-attrib-bounds");
  -  SCM_ASSERT ( SCM_INUMP(scm_x),
  +  SCM_ASSERT ( scm_is_integer(scm_x),
                  scm_x, SCM_ARG4, "calcule-new-attrib-bounds");
  -  SCM_ASSERT ( SCM_INUMP(scm_y),
  +  SCM_ASSERT ( scm_is_integer(scm_y),
                  scm_y, SCM_ARG5, "calcule-new-attrib-bounds");
   
  -  angle = SCM_INUM(scm_angle);
  -  x = SCM_INUM(scm_x);
  -  y = SCM_INUM(scm_y);
  +  angle = scm_to_int(scm_angle);
  +  x = scm_to_int(scm_x);
  +  y = scm_to_int(scm_y);
     
     alignment_string = SCM_STRING_CHARS(scm_alignment);
   
  @@ -294,7 +294,7 @@
     }
     if (alignment == -2) {
       /* Bad specified */
  -    SCM_ASSERT (SCM_STRINGP(scm_alignment), scm_alignment,
  +    SCM_ASSERT (scm_is_string(scm_alignment), scm_alignment,
   		SCM_ARG2, "calcule-new-attrib-bounds");
     }
   
  @@ -341,8 +341,8 @@
     o_text_recreate(w_current, object);
   
     /* Construct the return value */
  -  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;
  @@ -409,8 +409,8 @@
       world_get_text_bounds (w_current, attribute->attribute->object,
                              &left, &top, &right, &bottom);
   
  -    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);
     }
   
  @@ -441,7 +441,7 @@
   	       attribute->attribute->object->text,
                  attrib_smob, SCM_ARG1, "get-attribute-angle");
   
  -  return SCM_MAKINUM(attribute->attribute->object->text->angle);
  +  return scm_from_int(attribute->attribute->object->text->angle);
   }
   
   /*! \brief Free object smob memory.
  @@ -572,7 +572,7 @@
                  ((long) SCM_CAR(object_smob) == object_smob_tag),
                  object_smob, SCM_ARG1, "get-attrib-value-by-attrib-name");
   
  -  SCM_ASSERT (SCM_STRINGP(scm_attrib_name), scm_attrib_name,
  +  SCM_ASSERT (scm_is_string(scm_attrib_name), scm_attrib_name,
   	      SCM_ARG2, "get-attrib-value-by-attrib-name");
   
     /* Get parameters */
  
  
  
  1.27                 eda/geda/gaf/libgeda/src/s_clib.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: s_clib.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/libgeda/src/s_clib.c,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -b -r1.26 -r1.27
  --- s_clib.c	28 May 2007 08:13:50 -0000	1.26
  +++ s_clib.c	4 Jun 2007 16:15:43 -0000	1.27
  @@ -636,7 +636,7 @@
   
     while (symlist != SCM_EOL) {
       symname = SCM_CAR (symlist);
  -    if (!SCM_STRINGP (symname)) {
  +    if (!scm_is_string (symname)) {
         s_log_message ("Non-string symbol name while scanning library [%s]\n",
   		     source->name);
       } else {
  @@ -1036,7 +1036,7 @@
     symdata = scm_call_1 (symbol->source->get_fn, 
   			scm_from_locale_string (symbol->name));
   
  -  if (!SCM_STRINGP (symdata)) {
  +  if (!scm_is_string (symdata)) {
       s_log_message ("Failed to load symbol data [%s] from source [%s]\n",
   		   symbol->name, symbol->source->name);
       return NULL;
  
  
  


_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs