freshmeat time
This commit is contained in:
parent
da6a83de21
commit
21ce0a3648
3 changed files with 23 additions and 3 deletions
|
@ -1,6 +1,6 @@
|
|||
include ../Makefile.inc
|
||||
|
||||
INCLUDES = -I.. -I../keeper/ -I../adns/ -DHAVE_CONFIG_H -DDST_DIR=@prefix@
|
||||
INCLUDES = -I.. -I../keeper/ -I../adns/ -DHAVE_CONFIG_H
|
||||
|
||||
KP_SOURCES= kp_exp.c kp_imp.c kptool.c
|
||||
KP_OBJECTS= kp_exp.o kp_imp.o kptool.o
|
||||
|
|
|
@ -22,10 +22,13 @@
|
|||
|
||||
#include "gkeeper.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
|
||||
#define MENUPATH "ug/SerSoft/gkeeper:/menus"
|
||||
|
||||
static void about(void);
|
||||
|
@ -152,6 +155,14 @@ static void setup_window(int argc, char *argv[])
|
|||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
/* Change to the working Directory */
|
||||
if (chdir(NEO_PREFIX) < 0) {
|
||||
printf("configtool Could not change to %s\n", NEO_PREFIX);
|
||||
printf("Did you 'make install' after compiling?\n");
|
||||
printf("Error Was: %s\n", strerror(errno));
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
setup_window(argc, argv);
|
||||
gtk_main();
|
||||
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#include <ctype.h>
|
||||
#include <assert.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
|
||||
static const char *usagestr =
|
||||
"Usage: %s [options] [key]\n"
|
||||
|
@ -298,12 +299,20 @@ int main(int argc, char *argv[])
|
|||
IMP
|
||||
} cmd;
|
||||
|
||||
/* change to the working directory */
|
||||
if (chdir(NEO_PREFIX) < 0) {
|
||||
printf("kptool Could not change to %s\n", NEO_PREFIX);
|
||||
printf("Did you 'make install' after compiling?\n");
|
||||
printf("Error Was: %s\n", strerror(errno));
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
if(argc < 2 || strcmp(argv[1], "-h") == 0 ||
|
||||
strcmp(argv[1], "--help") == 0) {
|
||||
fprintf(stderr, usagestr, argv[0]);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
||||
argctr = 1;
|
||||
arg = argv[argctr];
|
||||
if(arg[0] != '-') {
|
||||
|
|
Reference in a new issue