aboutsummaryrefslogtreecommitdiffstats
path: root/e-util
diff options
context:
space:
mode:
authorChris Toshok <toshok@src.gnome.org>2000-05-08 09:00:14 +0800
committerChris Toshok <toshok@src.gnome.org>2000-05-08 09:00:14 +0800
commit5aa0abfff8867dabcb22db7119709066b7120725 (patch)
treede92d97bd29c895137c30f3d4dd90946dd962c52 /e-util
parent02165524394289e422f615bf1e1e5df093676e03 (diff)
downloadgsoc2013-evolution-5aa0abfff8867dabcb22db7119709066b7120725.tar.gz
gsoc2013-evolution-5aa0abfff8867dabcb22db7119709066b7120725.tar.zst
gsoc2013-evolution-5aa0abfff8867dabcb22db7119709066b7120725.zip
comment function, and fix an ABR.
* ename/e-name-western.c (e_name_western_cleanup_string): comment function, and fix an ABR. svn path=/trunk/; revision=2893
Diffstat (limited to 'e-util')
-rw-r--r--e-util/ename/e-name-western.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/e-util/ename/e-name-western.c b/e-util/ename/e-name-western.c
index 98e03a6682..755d7eabed 100644
--- a/e-util/ename/e-name-western.c
+++ b/e-util/ename/e-name-western.c
@@ -51,18 +51,25 @@ e_name_western_cleanup_string (char **str)
if (*str == NULL)
return;
+ /* skip any spaces and commas at the start of the string */
p = *str;
while (isspace (*p) || *p == ',')
p ++;
+ /* make the copy we're going to return */
newstr = g_strdup (p);
- p = newstr + strlen (newstr) - 1;
- while (isspace (*p) || *p == ',')
- p --;
- if ((! isspace (*p)) && *p != ',')
- p ++;
- *p = '\0';
+ if ( strlen(newstr) > 0) {
+ /* now search from the back, skipping over any spaces and commas */
+ p = newstr + strlen (newstr) - 1;
+ while (isspace (*p) || *p == ',')
+ p --;
+ /* advance p to after the character that caused us to exit the
+ previous loop, and end the string. */
+ if ((! isspace (*p)) && *p != ',')
+ p ++;
+ *p = '\0';
+ }
g_free (*str);
*str = newstr;
kioslave. proc filesystems should nolofi2005-07-123-1/+101 * Fix compilation with OpenLDAP 2.3.4lofi2005-07-062-0/+10 * Change dependency pattern for libusb to usb-0.1lofi2005-06-291-1/+1 * Update to KDE 3.4.1lofi2005-06-267-361/+7 * Fix build on 4.9markus2005-05-071-0/+26 * Add patch to fix the kinfocenter PCI module (KDE Bug 101686)markus2005-04-151-0/+60 * Add CONFLICTS with kdeartwork 3.2.x and kdeartwork 3.3.x (plastik widgetlofi2005-03-261-1/+1 * Disable building kompmgr, instead RUN_DEPEND on it if xorg is installed.lofi2005-03-212-0/+16 * Update to KDE 3.4lofi2005-03-2111-300/+754 * Bump PORTREVISION to chase the glib20 shared lib version change.marcus2005-03-121-1/+1 * More cups-fixes and a patch that prevents konqueror from resettinglofi2005-02-063-0/+32 * Update to KDE 3.3.2lofi2004-12-146-107/+80 * Add imake as build dependency. It will soon no longer be picked up bylesi2004-12-081-1/+2 * Fix some more environment nits in the kdm configuration templates, andlofi2004-11-122-8/+17 * Update to KDE 3.3.1lofi2004-11-086-59/+39 * Bump PORTREVISION for the last commit.arved2004-10-111-1/+1 * Fix Environment for kdm/csh users.arved2004-10-111-1/+1 * Fix a typoarved2004-10-102-2/+2 * Fix bug in the default genkdmconf template - kdm would try and parselofi2004-09-243-6/+26 * The rc-script was botched, correct that and bump PORTREVISION.lofi2004-09-012-2/+3 * Update to KDE 3.3lofi2004-08-3112-443/+471 * A couple of patches didn't make it from the kde-freebsd repo into ports.lofi2004-08-136-1/+250 * Tell genkdmconf to ignore existing bits of xdm/kdm configuration, if itlofi2004-08-121-2/+1 * Factor out all but one of the build switches of the KDE main module portslofi2004-08-119-632/+757 * - Add the X_WINDOW_SYSTEM={xorg,xfree86-4,xfree86-3} variable to bsd.port.mk,anholt2004-07-241-1/+1 * Update to version 3.2.3lofi2004-06-104-15/+58 * Bump PORTREVISION.lofi2004-05-181-0/+1 * Fix a fat fingered commit I made two weeks ago:lofi2004-05-181-1/+1 * Put the pkg-message template back into PKGDIR.lofi2004-05-032-1/+1 * Process the pkg-message template earlier than post-install solofi2004-05-022-3/+7 * Update to KDE 3.2.2lofi2004-04-206-27/+27 * Respect WITHOUT_FOO.lofi2004-03-281-18/+1 * Enhance pkg-descr a little.lofi2004-03-221-1/+4 * Add the default path of of the linux-flashplugin to the list of pathslofi2004-03-181-0/+10 * Update to KDE 3.2.1 / QT 3.3.1lofi2004-03-106-63/+84 * Bump PORTREVISION.lofi2004-02-111-0/+1 * USE_MOTIF by default now - netscape plugins compat is en vogue againlofi2004-02-101-13/+6 * Shorten COMMENT.lofi2004-02-101-1/+1 * Update to KDE 3.2.0lofi2004-02-0512-523/+1148 * Bump PORTREVISION on all ports that depend on gettext to aid with upgrading.marcus2004-02-041-0/+1 * Add a patch to correct CPU states readout inlofi2003-12-131-0/+21 * Add a patch that should fix the "A window and A desktop icon sometimes havearved2003-11-201-0/+12 * Fix the -pthread problem in case the option gets removed again. Thiswill2003-10-041-0/+2 * From KDE_3_1_BRANCH:arved2003-09-291-0/+18 * Upgrade to Qt 3.2.1 / KDE 3.1.4. See x11/kde3/Makefile rev 1.64 for details.will2003-09-188-419/+2 * Multiple bugfixes and enhancements for kdebase.lofi2003-08-2910-9/+458 * Fix non-default dependency on openldap2[012] which is broken by splitting.kuriyama2003-08-151-1/+1 * Update KDE to the latest official release, KDE 3.1.3lofi2003-07-296-41/+14 * - Conditional ldap supportarved2003-06-032-5/+11 * Update to KDE 3.1.2lioux2003-05-203-3/+5 * Fix fetching.will2003-04-121-1/+1 * Upgrade to 3.1.1a to handle PS/PDF security advisory. There are additionalwill2003-04-112-2/+2 * Rejoice, for the long awaited upgrade to kde 3.1.1 is here!alane2003-04-068-70/+22 * Clear moonlight beckons.ade2003-03-07