[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-cvs: CVS update: g_smob.c
User: cnieves
Date: 06/12/26 10:45:29
Modified: . g_smob.c
Log:
* include/prototype.h, src/g_smob.c:
Added a new scheme function: get-page-filename, returning
the page filename of the given page.
Revision Changes Path
1.12 +27 -0 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.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- g_smob.c 13 Dec 2006 20:57:45 -0000 1.11
+++ g_smob.c 26 Dec 2006 15:45:28 -0000 1.12
@@ -577,6 +577,8 @@
scm_set_smob_free(page_smob_tag, g_free_page_smob);
scm_set_smob_print(page_smob_tag, g_print_page_smob);
+ scm_c_define_gsubr ("get-page-filename", 1, 0, 0, g_get_page_filename);
+
return;
}
@@ -631,3 +633,28 @@
return (TRUE);
}
+/*! \brief Get the page filename from a page smob.
+ * \par Function Description
+ * Get the page filename from a page smob.
+ *
+ * \param [in] page_smob The page smob to get the filename from.
+ * \return the page filename or SCM_EOL if there was some error.
+ */
+SCM g_get_page_filename(SCM page_smob)
+{
+ SCM returned = SCM_EOL;
+ PAGE *page;
+
+ SCM_ASSERT ( SCM_NIMP(page_smob) &&
+ ((long) SCM_CAR(page_smob) == page_smob_tag),
+ page_smob, SCM_ARG1, "get-page-filename");
+
+ page = (PAGE *)
+ (((struct st_page_smob *)SCM_CDR(page_smob))->page);
+
+ if (page->page_filename)
+ returned = scm_makfrom0str (page->page_filename);
+
+ return (returned);
+}
+
_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs