introduce new "DEBUGPC" macro for continuing on the same line without prefix of file/line/time

diff --git a/include/openbsc/debug.h b/include/openbsc/debug.h
index 5671980..3945ee6 100644
--- a/include/openbsc/debug.h
+++ b/include/openbsc/debug.h
@@ -15,15 +15,17 @@
 #define DMIB		0x2000
 
 #ifdef DEBUG
-#define DEBUGP(ss, fmt, args...) debugp(ss, __FILE__, __LINE__, fmt, ## args)
+#define DEBUGP(ss, fmt, args...) debugp(ss, __FILE__, __LINE__, 0, fmt, ## args)
+#define DEBUGPC(ss, fmt, args...) debugp(ss, __FILE__, __LINE__, 1, fmt, ## args)
 #else
 #define DEBUGP(xss, fmt, args...) 
+#define DEBUGPC(ss, fmt, args...)
 #endif
 
 #define static_assert(exp, name) typedef int dummy##name [(exp) ? 1 : -1];
 
 void hexdump(unsigned char *buf, int len);
-void debugp(unsigned int subsys, char *file, int line, const char *format, ...);
+void debugp(unsigned int subsys, char *file, int line, int cont, const char *format, ...);
 void debug_parse_category_mask(const char* mask);
 void debug_use_color(int use_color);
 unsigned int debug_mask;
diff --git a/src/debug.c b/src/debug.c
index 5504e11..a3084e2 100644
--- a/src/debug.c
+++ b/src/debug.c
@@ -98,11 +98,9 @@
 	return "";
 }
 
-void debugp(unsigned int subsys, char *file, int line, const char *format, ...)
+void debugp(unsigned int subsys, char *file, int line, int cont, const char *format, ...)
 {
-	char *timestr;
 	va_list ap;
-	time_t tm;
 	FILE *outfd = stderr;
 
 	if (!(debug_mask & subsys))
@@ -110,10 +108,16 @@
 
 	va_start(ap, format);
 
-	tm = time(NULL);
-	timestr = ctime(&tm);
-	timestr[strlen(timestr)-1] = '\0';
-	fprintf(outfd, "%s%s <%4.4x> %s:%d ", color(subsys), timestr, subsys, file, line);
+	fprintf(outfd, "%s", color(subsys));
+
+	if (!cont) {
+		char *timestr;
+		time_t tm;
+		tm = time(NULL);
+		timestr = ctime(&tm);
+		timestr[strlen(timestr)-1] = '\0';
+		fprintf(outfd, "%s <%4.4x> %s:%d ", timestr, subsys, file, line);
+	}
 	vfprintf(outfd, format, ap);
 	fprintf(outfd, "\033[0;m");