aboutsummaryrefslogtreecommitdiffstats
path: root/e-util/e-util.c
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@helixcode.com>2000-05-14 22:17:51 +0800
committerChris Lahey <clahey@src.gnome.org>2000-05-14 22:17:51 +0800
commit623ba9a279db035339ac8ae5030683c1e79b8618 (patch)
tree82b610030315c26a99a65a006fb2bceba0cdb280 /e-util/e-util.c
parent310189326247ec07951b30c52abc69050be5d2b9 (diff)
downloadgsoc2013-evolution-623ba9a279db035339ac8ae5030683c1e79b8618.tar.gz
gsoc2013-evolution-623ba9a279db035339ac8ae5030683c1e79b8618.tar.zst
gsoc2013-evolution-623ba9a279db035339ac8ae5030683c1e79b8618.zip
Added e_strdup_strip which returns a copy of the string with the leading
2000-05-14 Christopher James Lahey <clahey@helixcode.com> * e-util.c, e-util.h: Added e_strdup_strip which returns a copy of the string with the leading and trailing spaces removed. svn path=/trunk/; revision=3026
Diffstat (limited to 'e-util/e-util.c')
-rw-r--r--e-util/e-util.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/e-util/e-util.c b/e-util/e-util.c
index d5603d3dfa..33c10aba5c 100644
--- a/e-util/e-util.c
+++ b/e-util/e-util.c
@@ -25,6 +25,7 @@
#include <errno.h>
#include <fcntl.h>
#include <unistd.h>
+#include <ctype.h>
#include "e-util.h"
@@ -45,6 +46,23 @@ g_int_compare(const void *x, const void *y)
return -1;
}
+char *
+e_strdup_strip(char *string)
+{
+ int i;
+ int length = 0;
+ int initial = 0;
+ for ( i = 0; string[i]; i++ ) {
+ if (initial == i && isspace(string[i])) {
+ initial ++;
+ }
+ if (!isspace(string[i])) {
+ length = i - initial + 1;
+ }
+ }
+ return g_strndup(string + initial, length);
+}
+
void
e_free_object_list (GList *list)
{
> * - Update to 0.9.1miwi2006-11-0110-110/+7 * - Update to 1.10.7miwi2006-11-012-8/+22 * Work around the improperly defined libc stub for pthread_cond_wait(3)marcus2006-11-011-1/+11 * - Update to 2.0.0RC1pav2006-11-013-6/+19 * Update to 1.4.2.lawrance2006-11-016-46/+51 * Update to 2.18.thierry2006-11-014-13/+201 * - Update to 1.2.3.shaun2006-11-012-5/+5 * The tifiles library is a library to handle the various TI calculatoralepulver2006-11-015-0/+76 * quilt is a collection of bash scripts to manage a series of patches byalepulver2006-11-016-0/+180 * Update to 2.16.demon2006-11-012-4/+3 * Qt3 bindings for the D-BUS interprocess messaging system.alepulver2006-11-015-0/+46 * Update to 1.07lth2006-10-312-4/+4 * - Update to 1.46clsung2006-10-312-4/+4 * Update to 2.09lth2006-10-312-7/+4 * - Update to 1.26clsung2006-10-312-4/+4 * Remove expired leaf ports:vd2006-10-314-53/+0 * - Update to 0.98clsung2006-10-314-4/+10 * - again, I forgot to unbreak :(clsung2006-10-311-2/+0 * - Update to 1.7.4miwi2006-10-312-4/+4 * - Update to 1.0.7miwi2006-10-312-4/+4 * - Update to 3.2.7miwi2006-10-314-8/+8 * - Update to 1.4.0miwi2006-10-312-8/+19 * - Update to 1.6.0clsung2006-10-314-2539/+2573 * The reference port does not need hal.jylefort2006-10-311-2/+1 * Fix the rc script (must now source RC_SUBR before GNOME_SUBR)jylefort2006-10-311-2/+1 * - Update to 3.23clsung2006-10-313-8/+7 * Start dbus if gnome_enable is set to yes in /etc/rc.confjylefort2006-10-312-2/+5 * Update to 0.24erwin2006-10-312-4/+4 * Update to 2.0604erwin2006-10-312-4/+4 * - Update WWWmiwi2006-10-311-1/+1 * - Update to ver 0.10clsung2006-10-312-4/+7 * - Update to 0.42clsung2006-10-312-6/+6 * - Update to 0.07clsung2006-10-312-4/+4 * * Upgrade devel/google-sparsehash from 0.4 to 0.5vd2006-10-312-4/+6 * This library is a collection of classes intended to be used to helpdinoex2006-10-315-0/+59 * ProjectManager aims to provide a simple, but very usable developmentdinoex2006-10-315-0/+477 * Framework needed by Project Manager.dinoex2006-10-319-0/+115 * Framework needed by Project Manager.dinoex2006-10-311-0/+1 * - clean package namedinoex2006-10-311-2/+2 * - connect cairo backenddinoex2006-10-312-1/+1 * - add Local/Library/Documentation, Local/Toolsdinoex2006-10-312-1/+7 * - Update to 0.20rafan2006-10-312-4/+4 * - Update to 0.531rafan2006-10-312-4/+4 * - Update to 0.82rafan2006-10-312-4/+4 * - Update to 2.1rafan2006-10-318-42/+86 * - Update to 0.21clsung2006-10-312-4/+4 * Tie::CPHash is a Perl module implementing a case preserving but casealepulver2006-10-315-0/+35 * Update to 0.72.marcus2006-10-313-5/+31 * Update to 0.94.marcus2006-10-316-53/+31 * - Don't depend on glib since only the examples use glibahze2006-10-311-4/+5 * - Update to 0.20clsung2006-10-313-28/+21 * - Update to 0.95.7 (distversion 0.957)rafan2006-10-312-4/+4 * - Update to 0.68rafan2006-10-312-4/+4 * - Fix PATH'sahze2006-10-314-1/+101 * - Move messages to pre-build stage. If we reach post-build, then werafan2006-10-292-2/+4 * - Fix pkg-plistrafan2006-10-274-10/+34 * Add a missing #include to correct a problem where dbus would refuse tomarcus2006-10-272-4/+12 * Chase the tcllib version.mi2006-10-271-1/+1 * Fix a regression which causes a connection drop to stay undetected.jylefort2006-10-262-1/+16 * - don't back down so far that slib-guile doesn't work anymore.ahze2006-10-231-2/+2 * - Back out of all gtk20 stuff to fix gnucash and plist and other stuffahze2006-10-231-9/+9 * - Add backup MASTER_SITESmiwi2006-10-221-2/+4 * Disable self-tests which fail on pointyhat due to differences inlawrance2006-10-221-10/+38 * Fix DISTNAME after renaming from avr-gcc into avr-gcc-3.joerg2006-10-221-0/+1 * Unbreak, chase updated binarieslth2006-10-2124-114/+102 * BROKEN: Size mismatchkris2006-10-218-0/+16 * BROKEN: Unfetchablekris2006-10-211-0/+2 * BROKEN: incomplete pkg-plistkris2006-10-212-0/+4 * Fix a bug in rp2gen utility which segfaults on 64 bit architecturesvd2006-10-202-0/+16 * - Update files/patch-freebsdlocal to include the fix of FreeBSD-SA-05:20.cvsbug.sumikawa2006-10-204-238/+5026 * Restore the collation patch.jylefort2006-10-203-0/+135 * Apply patch obtained from http://www.cs.aau.dk/~arj/neon-0.24-fix.patchyoichi2006-10-194-2/+160 * Unbreak port by fixing do-install.shaun2006-10-191-13/+8 * - Back out of 1.9.6 and back down to 1.3.4 since ffi doesn't build on !i386ahze2006-10-188-98/+92 * Restore a patch to fix the build on ia64 that was removed during themarcus2006-10-171-0/+37 * Fix CONFLICTS after renaming avr-gcc*.joerg2006-10-161-1/+1 * Remove the avr/lib/avr6 directory upon deinstallation.joerg2006-10-152-0/+2 * -Update to stable release at 1.0 to fix the fetch.mezz2006-10-153-5/+6 * Remove devel/avr-gcc-devel from the directory traversal.joerg2006-10-151-1/+0 * - Add py-libgsfahze2006-10-143-0/+41 * - Add glade3ahze2006-10-145-0/+369 * Chase the GNOME X11BASE to LOCALBASE move, and fix the build with themarcus2006-10-1444-119/+374 * Add new entries for:marcus2006-10-141-0/+2 * Presenting GNOME 2.16.1 for FreeBSD. This release represents a massivemarcus2006-10-1487-1275/+1040 * Fix build on amd64. The workaround for Elf64_Xword has been "borrowed"joerg2006-10-141-1/+14 * - Add a forgotten man page and fix deinstallclsung2006-10-131-1/+2 * BROKEN: Changes permissions on installed filekris2006-10-121-0/+2 * BROKEN: Incorrect pkg-plistkris2006-10-121-0/+2 * - unbreak it by removing RUBY_VER= 16 and adding a patchclsung2006-10-112-6/+18 * Several tests fail, when run as root. Arrange to run them as `nobody', whenmi2006-10-112-12/+21 * Upgrade to 20060421.joerg2006-10-108-52/+12 * Upgrade to binutils 2.17.joerg2006-10-103-12/+11 * Upgrade to binutils 2.17.joerg2006-10-102-9/+4 * OK, I bite. Implement the patch from PR ports/96407, to avoid thejoerg2006-10-102-0/+14 * This port installs FreeBSD 6.x binaries.dds2006-10-101-1/+7 * Remove RESTRICTED, since we now have to ability to redistributeale2006-10-101-5/+6 * Add avr-gcc to the systemedwin2006-10-101-0/+1 * [MAINTAINER] devel/p5-Object-InsideOut update to 2.05edwin2006-10-103-5/+6 * In case of a self-test failure, include the output of "uname -a" in themi2006-10-101-0/+1 * Add the three missing executables installed by tcllib into bin/. Theymi2006-10-101-0/+3 * Upgrade to version 1.4.5.joerg2006-10-105-35/+26 * - Remove dependensmiwi2006-10-101-1/+0 * Upgrade to version 5.2.joerg2006-10-102-4/+4 * - Update to 5.8clsung2006-10-102-4/+4 * - Update to 0.07miwi2006-10-102-4/+4 * - Fix incorrect dependency pathclsung2006-10-101-2/+2 * - I forgot to add two new patch into repo.clsung2006-10-104-0/+238 * - Update to 0.10.0clsung2006-10-106-32/+68 * - Update to 0.18clsung2006-10-102-4/+4 * - Update to 0.95clsung2006-10-094-5/+7 * Fix build with WITH_PYTHON=yes on amd64perky2006-10-092-1/+2 * Fix build on environments with ncurses port.perky2006-10-091-2/+2 * Update to 1.4.3perky2006-10-093-4/+11 * Update to 1.5.3perky2006-10-092-4/+4 * Remove expired leaf port:vd2006-10-095-223/+0 * Mark as BROKEN on 4.x:vd2006-10-091-1/+7 * Add vendor's patch, which fixes 3 false test failures.mi2006-10-091-0/+46 * Fix the path to testlog.failures, which is shown if there were any, uhm,mi2006-10-091-1/+1 * - update to 1.15leeym2006-10-092-4/+5 * - Update to 1.140clsung2006-10-092-4/+4 * - update to 2.64leeym2006-10-093-4/+9 * Change private hack into @dirrmtry.joerg2006-10-091-2/+2 * Try to remove the "rw" locale directories when uninstalling.joerg2006-10-092-1/+3 * Upgrade to version 2.5.joerg2006-10-092-5/+4 * - Update to 0.17clsung2006-10-092-4/+4 * - Update to 0.9clsung2006-10-094-34/+77 * - Turn doxygen documentation off by default, make it into OPTIONSpav2006-10-091-10/+12 * Update from 1.7 to 1.9. Vendor has fixed the self-tests on multiple arches.mi2006-10-093-58/+242 * Update to 0.9.7.1perky2006-10-083-4/+11 * Update to 0.9.1perky2006-10-082-5/+6 * Update rapidsvn to 0.9.3 :clsung2006-10-083-33/+19 * - Connect evfs to the build.stas2006-10-081-0/+1 * - Move to LOCALBASEstas2006-10-0812-31/+205 * - Update to 3.3rafan2006-10-082-4/+4 * - A patch to prevent a buffer overrunsem2006-10-083-6/+24 * Update to 0.85r4tmclaugh2006-10-083-10/+16 * Versuch is a H323 voice & video proxy appropriated for border and zonealepulver2006-10-085-0/+51 * Update to 21784.bsam2006-10-082-4/+4 * - udpate to 3.0.2dinoex2006-10-082-4/+4 * - Fix EXPIRATION_DATE format.alepulver2006-10-085-5/+5 * - Update to 4.6clsung2006-10-084-23/+22 * - Mark broken on amd64clsung2006-10-071-0/+5 * - Fix xspin runtime: sed the correct wish executable into the scriptpav2006-10-071-4/+3 * - Update to 1.03clsung2006-10-072-4/+4 * - Reformat pkg-descrmiwi2006-10-072-13/+14 * - Refomat pkg-descmiwi2006-10-072-5/+4 * - Refomat pkg-descrmiwi2006-10-072-16/+17 * - Added socket patch to fix (non-)blocking behaviourmiwi2006-10-076-18/+74 * - Fixed bug in RTPIPv6Destinationmiwi2006-10-072-1/+16 * - Update to 1.4.4clsung2006-10-072-5/+5 * Update to 2.105erwin2006-10-072-4/+4 * Update to 2.0603erwin2006-10-072-4/+4 * Remove. This has been moved to avr-gcc to become the standard versionjoerg2006-10-0710-1154/+0 * Copy over the avr-gcc-devel port to avr-gcc, so this will become thejoerg2006-10-0710-0/+1153 * - Fix build on 4.xacm2006-10-072-1/+14 * - Depend on and link against wxgtk26-unicode instead of the ANSI version. [1]stefan2006-10-072-37/+38 * - Update devel/ode to 0.7acm2006-10-062-5/+4 * - Update to 2.2.12miwi2006-10-062-5/+5 * - Update to 0.16clsung2006-10-062-4/+4 * - Update to version 1.5.9clsung2006-10-064-5/+14 * Trail devel/avr-gcc rename to devel/avr-gcc-3edwin2006-10-061-2/+2 * - substitute INSTALLS_SHLIB with USE_LDCONFIGclsung2006-10-061-1/+1 * - Add gcc42 linkahze2006-10-061-1/+1 * - Remove gcc35 linkahze2006-10-061-3/+3 * - Remove gcc35 linkahze2006-10-061-2/+2 * - Fix Makefiles.units. The devel/fpc-fcl was building without -CX optionacm2006-10-0611-11/+11 * Shell::EnvImporter allows various kinds of shell scripts (csh, tcsh, bash, zshalepulver2006-10-065-0/+51 * Upgrade to version 15.6.obrien2006-10-067-358/+32 * devel/avr-gcc has been repocopied to devel/avr-gcc-3, so to make roomjoerg2006-10-0615-1016/+2 * Upgrade to 5.14.shaun2006-10-062-7/+7 * Mark mingw* ports as DEPRECATED with EXPIRATION_DATE set to 2006-11-04.alepulver2006-10-065-0/+15 * Upgrade:vd2006-10-069-40/+48