mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 07:28:39 +01:00
Import cmdpad from oldpackages, add copyright, pkg info
Signed-off-by: Ted Hess <thess@kitschensync.net>
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
--- cmdpad-0.0.3/src/Makefile.orig 2008-01-05 23:29:44.000000000 +0100
|
||||
+++ cmdpad-0.0.3/src/Makefile 2008-01-05 23:30:23.000000000 +0100
|
||||
@@ -5,25 +5,25 @@
|
||||
TOP=..
|
||||
include $(TOP)/Makefile.common
|
||||
|
||||
-INCLUDE= -I/usr/include
|
||||
-LIBS= -L/usr/lib -lc
|
||||
-CFLAGS= -g3
|
||||
-LDFLAGS= -Xlinker -Map -Xlinker $(PROG).map #,--stack,16Mb
|
||||
+#INCLUDE= -I/usr/include
|
||||
+#LIBS= -L/usr/lib -lc
|
||||
+#CFLAGS= -g3
|
||||
+#LDFLAGS= -Xlinker -Map -Xlinker $(PROG).map #,--stack,16Mb
|
||||
OBJ= main.o command.o parse.o
|
||||
SCRIPTS= *.sh
|
||||
|
||||
build: $(PROG)
|
||||
|
||||
$(PROG): $(OBJ)
|
||||
- gcc -o $(PROG) $(OBJ) $(LIBS) $(LDFLAGS)
|
||||
+ $(GCC) -o $(PROG) $(OBJ) $(LIBS) $(LDFLAGS)
|
||||
@echo "==============================================="
|
||||
@echo "edit $(PROG).conf file to set default preferences"
|
||||
|
||||
%.o : %.c
|
||||
- gcc $(CFLAGS) -D__COPYLEFT__='$(COPYLEFT)' -c $<
|
||||
+ $(GCC) $(CFLAGS) -D__COPYLEFT__='$(COPYLEFT)' -c $<
|
||||
|
||||
%.o : %.c %.h
|
||||
- gcc $(CFLAGS) -D__COPYLEFT__='$(COPYLEFT)' -c $<
|
||||
+ $(GCC) $(CFLAGS) -D__COPYLEFT__='$(COPYLEFT)' -c $<
|
||||
|
||||
distclean clean:
|
||||
rm $(PROG) *~ *.o -vf
|
||||
@@ -0,0 +1,15 @@
|
||||
--- cmdpad-0.0.3/src/parse.orig 2008-01-05 23:55:32.000000000 +0100
|
||||
+++ cmdpad-0.0.3/src/parse.c 2008-01-05 23:56:07.000000000 +0100
|
||||
@@ -289,6 +289,12 @@
|
||||
pchEventDevice = strdup( pchValue) ;
|
||||
return 1 ;
|
||||
}
|
||||
+ if( (pchValue != NULL) &&
|
||||
+ (strncmp( pchValue, "/dev/event", 6) == 0) )
|
||||
+ {
|
||||
+ pchEventDevice = strdup( pchValue) ;
|
||||
+ return 1 ;
|
||||
+ }
|
||||
printf( "Option 'device' expects a /dev/input/eventX argument\n");
|
||||
return -1 ;
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
--- cmdpad-0.0.3/src/command.c.orig 2003-03-29 17:54:12.000000000 +0100
|
||||
+++ cmdpad-0.0.3/src/command.c 2008-01-12 05:41:22.000000000 +0100
|
||||
@@ -68,6 +68,7 @@
|
||||
|
||||
void exec( char * command)
|
||||
{
|
||||
+ int status;
|
||||
if( fork() == 0) {
|
||||
char ** tmp ;
|
||||
int i ;
|
||||
@@ -88,6 +89,7 @@
|
||||
perror( "ERROR: execv") ;
|
||||
exit( 1) ;
|
||||
} // end if( fork())
|
||||
+ wait(&status);
|
||||
}
|
||||
|
||||
int getNumberofEntry()
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/src/parse.c
|
||||
+++ b/src/parse.c
|
||||
@@ -125,7 +125,7 @@ int readCommandLine( int argc, char *arg
|
||||
|
||||
d2printf( "command line command %s found\n", pchCommandTranslations[ iCmd+1]) ;
|
||||
|
||||
- vsnprintf( achCommand, sizeof( achCommand),
|
||||
+ snprintf( achCommand, sizeof( achCommand),
|
||||
pchCommandTranslations[ iCmd+1],
|
||||
&argv[ i+1]) ;
|
||||
|
||||
Reference in New Issue
Block a user