comparison src/print.c @ 495:c7a2471e5c4e

Introduce macros to display debug messages. if (debug) printf(...) is now replaced by variadic macros: DEBUG_1() And for higher debugging levels: DEBUG_2() DEBUG_3() DEBUG_4()
author zas_
date Wed, 23 Apr 2008 20:47:19 +0000
parents 48c8e49b571c
children fc9c8a3e1a8b
comparison
equal deleted inserted replaced
494:3bb9a8df6ee9 495:c7a2471e5c4e
930 ptr += 8; 930 ptr += 8;
931 end = ptr; 931 end = ptr;
932 while (*end != '\0' && *end != '\n' && *end != ' ' && *end != '\t') end++; 932 while (*end != '\0' && *end != '\n' && *end != ' ' && *end != '\t') end++;
933 *end = '\0'; 933 *end = '\0';
934 list = g_list_append(list, g_strdup(ptr)); 934 list = g_list_append(list, g_strdup(ptr));
935 if (debug) printf("adding printer: %s\n", ptr); 935 DEBUG_1("adding printer: %s\n", ptr);
936 } 936 }
937 937
938 pclose(p); 938 pclose(p);
939 939
940 return list; 940 return list;