From 2ce485c65dd9d2bbd8e64dba275f449ff2303e72 Mon Sep 17 00:00:00 2001 From: Tollef Fog Heen Date: Thu, 27 May 2010 21:48:52 +0200 Subject: Allow : and = unescaped in output too --- check/check-whitespace | 4 ++-- check/whitespace.pc | 4 ++-- parse.c | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/check/check-whitespace b/check/check-whitespace index 38de0e8..31a413c 100755 --- a/check/check-whitespace +++ b/check/check-whitespace @@ -11,10 +11,10 @@ set -e # expect cflags from whitespace ARGS="--cflags whitespace" -RESULT="-I/usr/white\\ space/include -Iinclude\\ dir -Iother\\ include\\ dir" +RESULT="-Dlala=misc -I/usr/white\\ space/include -Iinclude\\ dir -Iother\\ include\\ dir" run_test # expect libs from whitespace ARGS="--libs whitespace" -RESULT="-L/usr/white\\ space/lib -lfoo\\ bar -lbar\\ baz" +RESULT="-r:foo -L/usr/white\\ space/lib -lfoo\\ bar -lbar\\ baz" run_test diff --git a/check/whitespace.pc b/check/whitespace.pc index e9d8488..50a8742 100644 --- a/check/whitespace.pc +++ b/check/whitespace.pc @@ -7,5 +7,5 @@ Name: Whitespace test Description: Dummy pkgconfig test package for testing pkgconfig Version: 1.0.0 Requires: -Libs: -L${libdir} -lfoo\ bar "-lbar baz" -Cflags: -I${includedir} -Iinclude\ dir "-Iother include dir" +Libs: -L${libdir} -lfoo\ bar "-lbar baz" -r:foo +Cflags: -I${includedir} -Iinclude\ dir "-Iother include dir" -Dlala=misc diff --git a/parse.c b/parse.c index c383c57..918b4f1 100644 --- a/parse.c +++ b/parse.c @@ -639,7 +639,8 @@ static char *strdup_escape_shell(const char *s) char *r = g_malloc(r_s); while (s[0]) { if ((s[0] < '+') || - (s[0] > '9' && s[0] < '@') || + (s[0] > ':' && s[0] < '=') || + (s[0] > '=' && s[0] < '@') || (s[0] > 'Z' && s[0] < '^') || (s[0] == '`') || (s[0] > 'z')) { -- cgit v1.2.1