regex handling
Change the regex_error_desc() interface. Have the caller pass in
a pointer to a buffer of at least BUFSZ characters and have
regex_error_desc() populate that. No need for static buffers or
extra dynamic alloction.
Also, change it to never return Null. None of its callers were
checking for that and could have passed Null to config_error_add()
or raw_print(). printf("%s", NULL) produces "null" on OSX but other
systems would probably crash if a Null result ever actually occurred.
The error explanation returned by cppregex included a trailing period.
config_error_add() adds one, so the message ended up with two. Have
regex_error_desc() check for final period and strip it off if found.
(My test case used a menucolor pattern of "[" which triggers an error
about mismatched brackets.)
Reformat cppregex.cpp; treat 'extern "C" {' as if it isn't introducing
a nested block. Fix the '#include <hack.h>' that 'make depend' was
ignoring.
This commit is contained in:
@@ -905,7 +905,7 @@ $(TARGETPFX)winval.o: ../win/X11/winval.c $(HACK_H) ../include/winX.h
|
||||
$(TARGETPFX)tile.o: tile.c $(HACK_H)
|
||||
$(TARGETPFX)winshim.o: ../win/shim/winshim.c $(HACK_H)
|
||||
$(TARGET_CC) $(TARGET_CFLAGS) -c -o $@ ../win/shim/winshim.c
|
||||
$(TARGETPFX)cppregex.o: ../sys/share/cppregex.cpp
|
||||
$(TARGETPFX)cppregex.o: ../sys/share/cppregex.cpp $(CONFIG_H)
|
||||
$(TARGET_CXX) $(TARGET_CXXFLAGS) -c -o $@ ../sys/share/cppregex.cpp
|
||||
$(TARGETPFX)qt_bind.o: ../win/Qt/qt_bind.cpp $(HACK_H) ../win/Qt/qt_pre.h \
|
||||
../win/Qt/qt_post.h ../win/Qt/qt_bind.h ../win/Qt/qt_main.h \
|
||||
|
||||
Reference in New Issue
Block a user