diff options
author | Christopher James Lahey <clahey@helixcode.com> | 2000-09-11 17:59:30 +0800 |
---|---|---|
committer | Chris Lahey <clahey@src.gnome.org> | 2000-09-11 17:59:30 +0800 |
commit | d65fb37051402d1df0d125540546f63cc6b46ea6 (patch) | |
tree | 287b9cc05ed644eab851b234dc837c16d457d611 /e-util/ename | |
parent | e30911d7d0806677fbd6ee239d0c47284c05a228 (diff) | |
download | gsoc2013-evolution-d65fb37051402d1df0d125540546f63cc6b46ea6.tar gsoc2013-evolution-d65fb37051402d1df0d125540546f63cc6b46ea6.tar.gz gsoc2013-evolution-d65fb37051402d1df0d125540546f63cc6b46ea6.tar.bz2 gsoc2013-evolution-d65fb37051402d1df0d125540546f63cc6b46ea6.tar.lz gsoc2013-evolution-d65fb37051402d1df0d125540546f63cc6b46ea6.tar.xz gsoc2013-evolution-d65fb37051402d1df0d125540546f63cc6b46ea6.tar.zst gsoc2013-evolution-d65fb37051402d1df0d125540546f63cc6b46ea6.zip |
Removed a bunch of redundant code. Made it so that when you set an address
2000-09-11 Christopher James Lahey <clahey@helixcode.com>
* backend/ebook/e-card-simple.c, backend/ebook/e-card-simple.h:
Removed a bunch of redundant code. Made it so that when you set
an address label, it sets the delivery address as well. Added
functions to set and get the delivery address.
* backend/ebook/e-card.c, backend/ebook/e-card.h: Added code to
convert and address label to a delivery address.
* contact-editor/Makefile.am: Added e-contact-editor-address.[ch],
fulladdr.glade, fulladdr.glade.h.
* contact-editor/contact-editor.glade,
contact-editor/e-contact-editor-strings.h: Switched from a label
to a button to show the parsed address.
* contact-editor/e-contact-editor-address.c,
contact-editor/e-contact-editor-address.h: New class to implement
the parsed address dialog.
* contact-editor/e-contact-editor-fullname.c,
contact-editor/e-contact-editor-fullname.h: Added const to the
_new function.
* contact-editor/e-contact-editor.c: Implemented clicking on the
address button.
* contact-editor/fulladdr.glade, contact-editor/fulladdr.glade.h:
New glade files for the parsed address dialog.
* contact-editor/fullname-strings.h, fullname.glade: Changed these
accellabels to labels.
* ename/Makefile.am: Added e-address-western.c.
* ename/e-address-western.c: Fixed some warnings.
svn path=/trunk/; revision=5317
Diffstat (limited to 'e-util/ename')
-rw-r--r-- | e-util/ename/Makefile.am | 2 | ||||
-rw-r--r-- | e-util/ename/e-address-western.c | 18 |
2 files changed, 12 insertions, 8 deletions
diff --git a/e-util/ename/Makefile.am b/e-util/ename/Makefile.am index 6e4d3818f2..068de01d90 100644 --- a/e-util/ename/Makefile.am +++ b/e-util/ename/Makefile.am @@ -21,11 +21,13 @@ ename_libs = \ lib_LTLIBRARIES = libename.la libename_la_SOURCES = \ + e-address-western.c \ e-name-western.c libenameincludedir = $(includedir)/ename libenameinclude_HEADERS = \ + e-address-western.h \ e-name-western-tables.h \ e-name-western.h diff --git a/e-util/ename/e-address-western.c b/e-util/ename/e-address-western.c index b6ced3bebf..3e5d491b90 100644 --- a/e-util/ename/e-address-western.c +++ b/e-util/ename/e-address-western.c @@ -45,7 +45,7 @@ e_address_western_is_line_blank (gchar *line) /* In the array of lines, `lines', we will erase the line at line_num, and shift the remaining lines, up to line number num_lines, up one position. */ -void +static void e_address_western_shift_line (gchar *lines[], gint line_num, gint num_lines) { gint cntr; @@ -83,10 +83,10 @@ e_address_western_remove_blank_lines (gchar *lines[], gint *linecntr) } -gboolean +static gboolean e_address_western_is_po_box (gchar *line) { - gboolean retval; + gboolean retval = FALSE; /* In which phase of processing are we? */ enum State { FIRSTCHAR, SECONDCHAR, WHITESPACE } state; @@ -138,7 +138,7 @@ e_address_western_is_po_box (gchar *line) /* A line that contains a comma followed eventually by a number is deemed to be the line in the form of <town, region postal-code>. */ -gboolean +static gboolean e_address_western_is_postal (gchar *line) { gboolean retval; @@ -182,13 +182,13 @@ e_address_western_is_postal (gchar *line) return retval; } -gchar * +static gchar * e_address_western_extract_po_box (gchar *line) { return g_strdup (line); } -gchar * +static gchar * e_address_western_extract_locality (gchar *line) { gint index; @@ -206,7 +206,7 @@ e_address_western_extract_locality (gchar *line) /* Whatever resides between the comma and the start of the postal code is deemed to be the region. */ -gchar * +static gchar * e_address_western_extract_region (gchar *line) { gint start, end; @@ -231,7 +231,7 @@ e_address_western_extract_region (gchar *line) return g_strndup ( (line+start), end-start); } -gchar * +static gchar * e_address_western_extract_postal_code (gchar *line) { int start, end; @@ -261,7 +261,9 @@ e_address_western_parse (const gchar *in_address) gboolean found_po_box, found_postal; EAddressWestern *eaw; +#ifndef NO_WARNINGS gint start, end; /* To be used to classify address lines. */ +#endif if (in_address == NULL) return NULL; |