WPrefs: Remove trimstr() and use wtrimspace() from WINGs
commit69d2e5187613a41b0f883885fb3575a43f7f2226
authorCarlos R. Mafra <crmafra@gmail.com>
Thu, 19 Jan 2012 01:12:58 +0000 (19 01:12 +0000)
committerCarlos R. Mafra <crmafra@gmail.com>
Fri, 20 Jan 2012 21:43:13 +0000 (20 21:43 +0000)
treee5f3acafc61c1825e0ac97421b4c18bd20cbfa11
parent171eca8b64a024e6f08c1026dd49599a6742ccac
WPrefs: Remove trimstr() and use wtrimspace() from WINGs

There's no need to have a private function while there's one in WINGs.

Besides that, it does not remove trailing whitespaces appropriately as I
just tested by adding trailing space in the shortcut captured by WPrefs.
It is not trimmed before saving it:

[mafra@Pilar:Defaults]$ grep CloseKey WindowMaker
  CloseKey = "Mod1+C    ";

Using wtrimspace() fixes that and even saves 208 bytes of code:

[mafra@Pilar:WPrefs.app]$ size KeyboardShortcuts.o.*
   text    data     bss     dec     hex filename
   7703       0       0    7703    1e17 KeyboardShortcuts.o.new
   7911       0       0    7911    1ee7 KeyboardShortcuts.o.old

Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
WPrefs.app/KeyboardShortcuts.c