From 703263e6b65990169fe9bc43745653d0a81c5372 Mon Sep 17 00:00:00 2001 From: reinelt Date: Thu, 14 Sep 2006 03:49:14 +0000 Subject: [lcd4linux @ 2006-09-14 03:49:14 by reinelt] indent run git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@713 3ae390bd-cb1e-0410-b409-cd5a39f66f1f --- drv_Crystalfontz.c | 10 +++++++--- drv_generic_serial.c | 7 +++++-- lcd4linux.c | 11 +++++++---- thread.c | 13 ++++++++----- thread.h | 7 +++++-- 5 files changed, 32 insertions(+), 16 deletions(-) diff --git a/drv_Crystalfontz.c b/drv_Crystalfontz.c index eda3e2e..5312dd0 100644 --- a/drv_Crystalfontz.c +++ b/drv_Crystalfontz.c @@ -1,4 +1,4 @@ -/* $Id: drv_Crystalfontz.c,v 1.46 2006/09/07 09:06:25 reinelt Exp $ +/* $Id: drv_Crystalfontz.c,v 1.47 2006/09/14 03:49:14 reinelt Exp $ * * new style driver for Crystalfontz display modules * @@ -23,6 +23,9 @@ * * * $Log: drv_Crystalfontz.c,v $ + * Revision 1.47 2006/09/14 03:49:14 reinelt + * indent run + * * Revision 1.46 2006/09/07 09:06:25 reinelt * lots of wrong printf formats corrected (thanks to Ernst Bachmann) * @@ -370,7 +373,8 @@ static void drv_CF_process_packet(void) default: /* this should not happen */ - error("%s: unexpected response type=0x%02x code=0x%02x size=%d", Name, Packet.type, Packet.code, Packet.size); + error("%s: unexpected response type=0x%02x code=0x%02x size=%d", Name, Packet.type, Packet.code, + Packet.size); break; } @@ -1126,7 +1130,7 @@ int drv_CF_init(const char *section, const int quiet) WIDGET_CLASS wc; int ret; - info("%s: %s", Name, "$Revision: 1.46 $"); + info("%s: %s", Name, "$Revision: 1.47 $"); /* start display */ if ((ret = drv_CF_start(section)) != 0) { diff --git a/drv_generic_serial.c b/drv_generic_serial.c index b34d117..dab1c53 100644 --- a/drv_generic_serial.c +++ b/drv_generic_serial.c @@ -1,4 +1,4 @@ -/* $Id: drv_generic_serial.c,v 1.18 2006/09/08 19:00:46 reinelt Exp $ +/* $Id: drv_generic_serial.c,v 1.19 2006/09/14 03:49:14 reinelt Exp $ * * generic driver helper for serial and usbserial displays * @@ -23,6 +23,9 @@ * * * $Log: drv_generic_serial.c,v $ + * Revision 1.19 2006/09/14 03:49:14 reinelt + * indent run + * * Revision 1.18 2006/09/08 19:00:46 reinelt * give up after 10 write errors to serial device * @@ -424,7 +427,7 @@ void drv_generic_serial_write(const char *string, const int len) error("%s: write to closed port %s failed!", Driver, Port); return; } - + for (run = 0; run < 10; run++) { ret = write(Device, string, len); if (ret >= 0 || errno != EAGAIN) { diff --git a/lcd4linux.c b/lcd4linux.c index 824c59c..bd9d231 100644 --- a/lcd4linux.c +++ b/lcd4linux.c @@ -1,4 +1,4 @@ -/* $Id: lcd4linux.c,v 1.82 2006/09/13 20:04:57 entropy Exp $ +/* $Id: lcd4linux.c,v 1.83 2006/09/14 03:49:14 reinelt Exp $ * * LCD4Linux * @@ -23,6 +23,9 @@ * * * $Log: lcd4linux.c,v $ + * Revision 1.83 2006/09/14 03:49:14 reinelt + * indent run + * * Revision 1.82 2006/09/13 20:04:57 entropy * threads change argv[0] to their thread name, for a neat 'ps' output * @@ -545,10 +548,10 @@ int main(int argc, char *argv[]) my_argv[c] = strdup(argv[c]); } my_argv[c] = NULL; - + /* save original arguments pointer for threads */ - thread_argv=argv; - thread_argc=argc; + thread_argv = argv; + thread_argc = argc; running_foreground = 0; running_background = 0; diff --git a/thread.c b/thread.c index 2aac128..d7cfcc9 100644 --- a/thread.c +++ b/thread.c @@ -1,4 +1,4 @@ -/* $Id: thread.c,v 1.9 2006/09/13 20:04:57 entropy Exp $ +/* $Id: thread.c,v 1.10 2006/09/14 03:49:14 reinelt Exp $ * * thread handling (mutex, shmem, ...) * @@ -26,6 +26,9 @@ * * * $Log: thread.c,v $ + * Revision 1.10 2006/09/14 03:49:14 reinelt + * indent run + * * Revision 1.9 2006/09/13 20:04:57 entropy * threads change argv[0] to their thread name, for a neat 'ps' output * @@ -111,7 +114,7 @@ #endif -int thread_argc; +int thread_argc; char **thread_argv; @@ -202,7 +205,7 @@ int thread_create(const char *name, void (*thread) (void *data), void *data) pid_t pid, ppid; ppid = getpid(); - + switch (pid = fork()) { case -1: error("fatal error: fork(%s) failed: %s", name, strerror(errno)); @@ -210,8 +213,8 @@ int thread_create(const char *name, void (*thread) (void *data), void *data) case 0: info("thread %s starting...", name); if (thread_argc > 0) { - strncpy(thread_argv[0],name,strlen(thread_argv[0])); - } + strncpy(thread_argv[0], name, strlen(thread_argv[0])); + } thread(data); info("thread %s ended.", name); exit(0); diff --git a/thread.h b/thread.h index 39ef6a8..3c19b40 100644 --- a/thread.h +++ b/thread.h @@ -1,4 +1,4 @@ -/* $Id: thread.h,v 1.8 2006/09/13 20:04:57 entropy Exp $ +/* $Id: thread.h,v 1.9 2006/09/14 03:49:14 reinelt Exp $ * * thread handling (mutex, shmem, ...) * @@ -26,6 +26,9 @@ * * * $Log: thread.h,v $ + * Revision 1.9 2006/09/14 03:49:14 reinelt + * indent run + * * Revision 1.8 2006/09/13 20:04:57 entropy * threads change argv[0] to their thread name, for a neat 'ps' output * @@ -60,7 +63,7 @@ #define _THREAD_H_ -extern int thread_argc; +extern int thread_argc; extern char **thread_argv; int mutex_create(void); -- cgit v1.2.3