1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-19 12:28:22 +01:00
Commit Graph

17 Commits

Author SHA1 Message Date
Brad Jorsch
8ca05fd4be Use -lbsd for strlcat/strlcpy, if needed and available
On BSD systems, strlcat and strlcpy are included in the C library and
nothing special is needed. On Linux systems they are not, but libbsd may
be available to provide them. Use it if so.

This also adds wstrlcat and wstrlcpy instead of trying to maybe-provide
strlcat and strlcpy themselves, as that way there is no risk of symbol
conflicts. Not bumping the library version at this time, that should be
done (if necessary) before release.

Signed-off-by: Brad Jorsch <anomie@users.sourceforge.net>
2010-10-07 12:04:29 +02:00
Tamas TEVESZ
d2853c8584 WINGs: Add detection and local copy for strlcat()/strlcpy()
Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2010-10-07 12:04:29 +02:00
Tamas TEVESZ
a71a604ab1 WINGs: Make wmalloc() intialize allocated memory to 0
- Accordingly remove individual memsets, for now from WINGs only.

Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2010-10-07 12:04:29 +02:00
Tamas TEVESZ
7374fe5984 Remove local strcasecmp implementation
Remove local strcasecmp implementation; whatever system doesn't have it
is off the table for now.

memcmp is used by WINGs; add autoconf check

Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2010-10-07 12:04:28 +02:00
Tamas TEVESZ
9911ecd985 make wtrimspace() use internal api
make wtrimspace() use wings' own function for a task

semantics change: it used to segfault given null, now it returns null.
this doesn't affect any current use (there's exactly one..), and i see
no harm in this behaviour, and perceive this to be more natural.
2010-03-17 16:39:53 +01:00
Carlos R. Mafra
034339320f Constify the argument of wstrdup() 2010-03-17 11:12:54 +01:00
Tobias Stoeckmann
e522ca734d WINGs: Fix memory leak in wtokenfree()
wtokenfree() does not free the first entry of an array.
If count is 1 then

   while (--count)

will be

   while (0)

and the inner body of that while-loop will not be entered.
Therefore a memory leak happens every time wtokenfree() is called.

Retrieved-from: http://paldium.homeunix.org/tobias/wmaker/patches/

[crmafra: This patch, altough correct, breaks WPrefs.app, which will be
fixed by the next patch. ]
2009-08-22 20:40:27 +02:00
Carlos R. Mafra
688a56e8ab Change to the linux kernel coding style
for arq in `git ls-files *.c`; do
    echo $arq;
    indent -linux -l115 $arq;
    done

The different line break at 115 columns is because
I use a widescreen monitor :-)
2009-08-20 00:59:40 +02:00
dan
6830b05716 changed indentation to use spaces only 2004-10-12 21:28:27 +00:00
dan
ca43aba088 - Added wstrndup() and WMGetFontName() 2002-12-02 00:01:05 +00:00
dan
af287fb8eb - added strcasecmp() to WINGs (only on systems that don't have it)
- removed some redundant includes of ../src/config.h where wconfig.h
  is also included
2001-11-17 04:26:08 +00:00
dan
3ab16b3e40 Moved some string related functions from memory.c to string.c 2001-05-27 15:58:28 +00:00
dan
497e34b6b8 - Replaced all free() with wfree() where appropriate
- Fixed some memory leaks
2000-10-31 14:57:22 +00:00
dan
99ce8b2d85 Fixed wtrimspace() whih had wrong behavior. 2000-10-25 22:41:03 +00:00
kojima
3de3009cee added wtokennext() 2000-09-26 22:44:38 +00:00
dan
7b3c10b07d Replaced malloc by wmalloc 2000-09-25 23:31:08 +00:00
kojima
9a89e6cc18 added string utils 2000-07-15 22:08:25 +00:00