1

Unexpected result on string parsing with C language

view story
linux-howto

http://stackoverflow.com – I have following (reduced) simple application which was built with line: gcc -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -D_GNU_SOURCE -D_XOPEN_SOURCE -std=c99 -ggdb -O0 main-test.c -L/usr/lib -lm -lglib-2.0 -o main-test The application itself: #include <stdio.h> #include <ctype.h> #include <alloca.h> #include <glib.h> #include <glib/gprintf.h> #include "main.h" const char *filter(char *original, pt_search_key key) { const char *mname = "ModelName"; const char *pname = "Product"; const char *delim = " \t"; const c (HowTos)