gEDA-dev: [PATCH] GAF: Doxygenate o_text_add(), kill whitespace, fix spelling
Bernd Jendrissek
bernd.jendrissek at gmail.com
Tue Jul 24 12:22:25 EDT 2007
Here some purely textual changes:
2007-07-24 Bernd Jendrissek <bernd.jendrissek at gmail.com>
* libgeda/include/struct.h: Kill spurious whitespace.
* libgeda/src/a_basic.c, libgeda/src/o_complex_basic.c,
libgeda/src/f_basic.c, libgeda/src/o_arc_basic.c,
libgeda/src/o_attrib.c: Fix transpositions, typos, and random
spelling errors.
* libgeda/src/o_text_basic.c: Doxygenate o_text_add().
-------------- next part --------------
Index: gaf.git/libgeda/include/struct.h
diff -u -p -- gaf.git/libgeda/include/struct.h.borig gaf.git/libgeda/include/struct.h
--- gaf.git/libgeda/include/struct.h
+++ gaf.git/libgeda/include/struct.h 2007-07-23 20:26:39.000000000 +0200
@@ -209,7 +217,7 @@ struct st_object {
int fill_angle1, fill_pitch1;
int fill_angle2, fill_pitch2;
/* PB : change end */
-
+
int visited; /* used in gnetlist for travesal purposes */
gboolean complex_embedded; /* is embedded component? */
@@ -239,7 +247,7 @@ struct st_object {
/* 1 for right, -1 for left (horizontal bus) */
/* 1 for up, -1 for down (vertial bus) */
int bus_ripper_direction; /* only valid on buses */
-
+
int font_text_size; /* used only with fonts defs */
OBJECT *font_prim_objs; /* used only with fonts defs */
@@ -260,7 +268,7 @@ struct st_object {
struct st_attrib {
OBJECT *object; /* object attribute is connected to */
-
+
OBJECT *copied_to; /* used when copying attributes */
ATTRIB *prev;
@@ -392,7 +400,7 @@ struct st_toplevel {
int wid; /* Window id, always unique */
int num_untitled; /* keep track of untitled wins */
-
+
int start_x;
int start_y;
int save_x;
@@ -403,7 +411,7 @@ struct st_toplevel {
int second_y;
int loc_x, loc_y;
int distance;
-
+
/* used by attribute dialog */
/* also used by text add dialog */
char *current_attribute;
@@ -433,7 +441,7 @@ struct st_toplevel {
char *font_directory; /* path of the vector fonts */
char *scheme_directory; /* path of the scheme scripts */
char *bitmap_directory; /* path of the bitmaps */
-
+
int event_state; /* Current event state */
int inside_action; /* Are we doing an action? */
@@ -484,7 +492,7 @@ struct st_toplevel {
int CONTROLKEY; /* control key pressed? */
int SHIFTKEY; /* shift key pressed? */
int ALTKEY; /* alt key pressed? */
-
+
int doing_pan; /* mouse pan status flag */
/* page system */
@@ -812,7 +820,7 @@ struct st_toplevel {
/* controls the threshold (in lines of text) when the multi-line text */
/* output font is forced to vector */
int print_vector_threshold;
-
+
/* controls the offset (in world coordinates) that are added to netname */
/* attributes when they are attached to vertical or horizontal nets */
int add_attribute_offset;
@@ -861,9 +869,9 @@ struct st_netlist {
int nlid;
char *component_uref;
-
+
OBJECT *object_ptr;
-
+
CPINLIST *cpins;
char *hierarchy_tag;
@@ -912,7 +920,7 @@ struct st_schcheck {
int no_warnings; /* No of Warinings */
CHKERRS * sheet_errs;
-
+
CHKERRS *float_nets; /* Header of the list of floating nets */
int net_errs; /* No of floating nets */
-------------- next part --------------
Index: gaf.git/libgeda/src/a_basic.c
diff -u -p -- gaf.git/libgeda/src/a_basic.c.borig gaf.git/libgeda/src/a_basic.c
--- gaf.git/libgeda/src/a_basic.c
+++ gaf.git/libgeda/src/a_basic.c 2007-07-24 01:29:02.000000000 +0200
@@ -558,7 +569,7 @@ OBJECT *o_read_buffer(TOPLEVEL *w_curren
/*! \brief Read a file
* \par Function Description
- * This function reads a file in libgead format.
+ * This function reads a file in libgeda format.
*
* \param [in,out] w_current The current TOPLEVEL structure.
* \param [in] object_list The object_list to read data to.
Index: gaf.git/libgeda/src/o_complex_basic.c
diff -u -p -- gaf.git/libgeda/src/o_complex_basic.c.borig gaf.git/libgeda/src/o_complex_basic.c
--- gaf.git/libgeda/src/o_complex_basic.c
+++ gaf.git/libgeda/src/o_complex_basic.c 2007-07-07 14:50:28.000000000 +0200
@@ -44,7 +44,7 @@
#endif
/*! \brief Return the bounds of the given object.
- * \par Given an object, calcule the bounds coordinates.
+ * \par Given an object, calculate the bounds coordinates.
* \param [in] w_current The toplevel structure.
* \param [in] o_current The object to look the bounds for.
* \param [out] rleft pointer to the left coordinate of the object.
Index: gaf.git/libgeda/src/f_basic.c
diff -u -p -- gaf.git/libgeda/src/f_basic.c.borig gaf.git/libgeda/src/f_basic.c
--- gaf.git/libgeda/src/f_basic.c
+++ gaf.git/libgeda/src/f_basic.c 2007-07-08 02:16:52.000000000 +0200
@@ -148,7 +148,7 @@ int f_open(TOPLEVEL *w_current, char *fi
else {
g_string_append(message, "The backup copy is newer than the schematic, so it seems you should load it instead of the original file.\n");
}
- g_string_append (message, "Gschem usually makes backup copies automatically, and this situation happens when it crashed or it was forced to exit abruptely.\n");
+ g_string_append (message, "Gschem usually makes backup copies automatically, and this situation happens when it crashed or it was forced to exit abruptly.\n");
if (w_current->page_current->load_newer_backup_func == NULL) {
s_log_message(message->str);
s_log_message("\nRun gschem and correct the situation.\n\n");
Index: gaf.git/libgeda/src/o_arc_basic.c
diff -u -p -- gaf.git/libgeda/src/o_arc_basic.c.borig gaf.git/libgeda/src/o_arc_basic.c
--- gaf.git/libgeda/src/o_arc_basic.c
+++ gaf.git/libgeda/src/o_arc_basic.c 2007-07-08 03:10:11.000000000 +0200
@@ -88,7 +88,7 @@ OBJECT *o_arc_add(TOPLEVEL *w_current, O
/*! \note
* The ARC structure is initialized with the parameters.
* A default initialization is performed for the line and
- * fill type to avoid misunderstood.
+ * fill type to avoid misunderstanding.
*
* The functions relative to the use of the object are sets.
*/
Index: gaf.git/libgeda/src/o_attrib.c
diff -u -p -- gaf.git/libgeda/src/o_attrib.c.borig gaf.git/libgeda/src/o_attrib.c
--- gaf.git/libgeda/src/o_attrib.c
+++ gaf.git/libgeda/src/o_attrib.c 2007-07-21 23:33:05.000000000 +0200
@@ -204,7 +204,7 @@ ATTRIB *add_attrib_head(OBJECT *parent)
/*! \brief Add an attribute to an existing attribute list.
* \par Function Description
- * Add an attribute to an exsiting attribute list.
+ * Add an attribute to an existing attribute list.
*
* \param [in] w_current The TOPLEVEL object.
* \param [in,out] list_head The list where you want to add item to.
-------------- next part --------------
Index: gaf.git/libgeda/src/o_text_basic.c
diff -u -p -- gaf.git/libgeda/src/o_text_basic.c.borig gaf.git/libgeda/src/o_text_basic.c
--- gaf.git/libgeda/src/o_text_basic.c
+++ gaf.git/libgeda/src/o_text_basic.c 2007-07-22 19:29:48.000000000 +0200
@@ -864,9 +864,28 @@ OBJECT *o_text_create_string(TOPLEVEL *w
}
/*! \todo Finish function documentation!!!
- * \brief
+ * \brief Creates a text OBJECT and the graphical objects representing it
* \par Function Description
+ * Create an OBJECT of type OBJ_TEXT and link it to the end of object_list.
+ * Also add the OBJECTs forming the graphical representation of the visible
+ * string, to the text OBJECT's prim_objs list.
+ *
+ * \param [in] w_current The TOPLEVEL object.
+ * \param [in] object_list OBJECT list onto which to add text.
+ * \param [in] type OBJ_TEXT (TODO: why bother)
+ * \param [in] color The color of the text.
+ * \param [in] x World x coord of text.
+ * \param [in] y World y coord of text.
+ * \param [in] alignment How text bounding box aligns on (x, y).
+ * \param [in] angle Angle at which text will appear.
+ * \param [in] string The text (TODO: can be char const *)!
+ * \param [in] size Text size.
+ * \param [in] visibility VISIBLE or INVISIBLE.
+ * \param [in] show_name_value SHOW_NAME_VALUE or friends.
+ * \return Pointer to text OBJECT.
*
+ * \note
+ * Caller is responsible for string; this function allocates its own copy.
*/
OBJECT *o_text_add(TOPLEVEL *w_current, OBJECT *object_list,
char type, int color, int x, int y, int alignment,
More information about the geda-dev
mailing list