Changeset 7892
- Timestamp:
- Jul 13, 2006, 9:22:35 AM (20 years ago)
- Location:
- trunk/Ohana/src/opihi
- Files:
-
- 12 added
- 11 edited
-
Makefile (modified) (2 diffs)
-
cmd.basic/init.c (modified) (1 diff)
-
doc/pantasks.txt (added)
-
dvo/fitsed.c (modified) (1 diff)
-
include/basic.h (modified) (1 diff)
-
include/pantasks.h (modified) (3 diffs)
-
include/shell.h (modified) (2 diffs)
-
lib.shell/ConfigInit.c (modified) (1 diff)
-
lib.shell/command_client.c (added)
-
lib.shell/opihi.c (modified) (1 diff)
-
mana/mana.c (modified) (1 diff)
-
pantasks/CheckPassword.c (added)
-
pantasks/ListenClients.c (added)
-
pantasks/Makefile (modified) (3 diffs)
-
pantasks/SocketOps.c (added)
-
pantasks/client_shell.c (added)
-
pantasks/connect_to_server.c (added)
-
pantasks/init.c (modified) (1 diff)
-
pantasks/init_client.c (added)
-
pantasks/invalid.c (added)
-
pantasks/notes.txt (added)
-
pantasks/pantasks_client.c (added)
-
pantasks/pantasks_server.c (added)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/Makefile
r7721 r7892 12 12 pclient: lib.data lib.shell cmd.basic 13 13 pcontrol: lib.data lib.shell cmd.basic 14 15 pantasks_server: lib.data lib.shell cmd.basic cmd.data cmd.astro 16 pantasks_client: lib.data lib.shell cmd.basic cmd.data cmd.astro 14 17 15 18 LIBS = lib.data lib.shell cmd.basic cmd.data cmd.astro … … 47 50 ############################################################# 48 51 52 pantasks_client pantasks_server: 53 if [ -d pantasks ]; then (cd pantasks && make $@); fi 54 55 pantasks_client.install pantasks_server.install: 56 if [ -d pantasks ]; then (cd pantasks && make $@); fi 57 49 58 $(PROGRAM) $(LIBS) $(EXTRAS): 50 59 if [ -d "$@" ]; then (cd $@ && make); fi -
trunk/Ohana/src/opihi/cmd.basic/init.c
r4748 r7892 89 89 90 90 } 91 92 void InitBasic_PantasksClient () { 93 94 int i; 95 96 InitCommands (); 97 InitMacros (); 98 InitBuffers (); 99 InitVectors (); 100 InitVariables (); 101 InitLists (); 102 InitOutfile (); 103 104 for (i = 0; i < sizeof (cmds) / sizeof (Command); i++) { 105 if (!strcmp (cmds[i].name, "quit")) goto valid; 106 if (!strcmp (cmds[i].name, "exit")) goto valid; 107 if (!strcmp (cmds[i].name, "exec")) goto valid; 108 if (!strcmp (cmds[i].name, "!")) goto valid; 109 continue; 110 111 valid: 112 AddCommand (&cmds[i]); 113 } 114 } -
trunk/Ohana/src/opihi/dvo/fitsed.c
r7688 r7892 1 1 # include "dvoshell.h" 2 # define NMIN_PTS 1003 2 4 3 typedef struct { -
trunk/Ohana/src/opihi/include/basic.h
r4689 r7892 5 5 void cleanup (); 6 6 void InitBasic (); 7 void InitBasic_PantasksClient (); -
trunk/Ohana/src/opihi/include/pantasks.h
r6687 r7892 1 1 # include "data.h" 2 2 # include "basic.h" 3 4 # include <sys/time.h> 5 # include <time.h> 6 # include <zlib.h> 7 # include <netinet/ip.h> 8 # include <netdb.h> 9 # include <arpa/inet.h> 10 # include <pthread.h> 11 12 typedef struct sockaddr_in SockAddress; 3 13 4 14 typedef enum { … … 120 130 121 131 void InitPantasks (); 132 void InitPantasksClient (); 122 133 void InitTasks (); 123 134 Task *NextTask (); … … 183 194 void gotsignal (int signum); 184 195 196 void InitClients (); 197 void AddNewClient (int client); 198 void *ListenClients (void *data); 199 200 int InitServerSocket (SockAddress *Address); 201 int WaitServerSocket (int InitSocket, SockAddress *Address); 202 int GetClientSocket (char *hostname); 203 int InitServerSocket_Named (char *hostname, SockAddress *Address); -
trunk/Ohana/src/opihi/include/shell.h
r5919 r7892 49 49 int multicommand PROTO((char *line)); 50 50 int command PROTO((char *, char **)); 51 int command_client PROTO((char *, char **)); 51 52 char *expand_vars PROTO((char *line)); 52 53 char *expand_vectors PROTO((char *line)); … … 87 88 int ConfigInit PROTO((int *argc, char **argv)); 88 89 char *VarConfig PROTO((char *keyword, char *mode, void *ptr)); 90 char *VarConfigEntry PROTO((char *keyword, char *mode, int entry, void *ptr)); 89 91 FILE *GetOutfile PROTO((void)); 90 92 void InitOutfile PROTO((void)); -
trunk/Ohana/src/opihi/lib.shell/ConfigInit.c
r4833 r7892 42 42 return (ptr); 43 43 } 44 45 char *VarConfigEntry (char *keyword, char *mode, int entry, void *ptr) { 46 47 char *answer; 48 49 answer = get_variable (keyword); 50 if (answer == (char *) NULL) { 51 answer = ScanConfig (GlobalConfig, keyword, mode, entry, ptr); 52 return (answer); 53 } 54 55 if (!strcmp (mode, "%s")) strcpy ((char *) ptr, answer); 56 if (!strcmp (mode, "%d")) *(int *) ptr = atoi (answer); 57 if (!strcmp (mode, "%u")) *(unsigned *) ptr = atoi (answer); 58 if (!strcmp (mode, "%ld")) *(long *) ptr = atoi (answer); 59 if (!strcmp (mode, "%hd")) *(short *) ptr = atoi (answer); 60 if (!strcmp (mode, "%f")) *(float *) ptr = atof (answer); 61 if (!strcmp (mode, "%lf")) *(double *) ptr = atof (answer); 62 63 free (answer); 64 return (ptr); 65 } -
trunk/Ohana/src/opihi/lib.shell/opihi.c
r5919 r7892 2 2 3 3 /******************/ 4 int main(int argc, char **argv) {4 int opihi (int argc, char **argv) { 5 5 6 6 int Nbad, status; -
trunk/Ohana/src/opihi/mana/mana.c
r5935 r7892 44 44 return; 45 45 } 46 47 /* call to opihi shell */ 48 int main (int argc, char **argv) { 49 int status; 50 status = opihi (argc, argv); 51 exit (status); 52 } -
trunk/Ohana/src/opihi/pantasks/Makefile
r6687 r7892 25 25 # sched user commands and support functions ######################## 26 26 27 single = \ 28 $(SDIR)/pantasks.$(ARCH).o 29 27 30 funcs = \ 28 $(SDIR)/pantasks.$(ARCH).o \29 31 $(SDIR)/init.$(ARCH).o \ 30 32 $(SDIR)/CheckJobs.$(ARCH).o \ … … 63 65 $(SDIR)/version.$(ARCH).o 64 66 67 client = \ 68 $(SDIR)/pantasks_client.$(ARCH).o \ 69 $(SDIR)/client_shell.$(ARCH).o \ 70 $(SDIR)/invalid.$(ARCH).o \ 71 $(SDIR)/init_client.$(ARCH).o \ 72 $(SDIR)/SocketOps.$(ARCH).o 73 74 server = \ 75 $(SDIR)/pantasks_server.$(ARCH).o \ 76 $(SDIR)/ListenClients.$(ARCH).o \ 77 $(SDIR)/CheckPassword.$(ARCH).o \ 78 $(SDIR)/SocketOps.$(ARCH).o 79 65 80 libs = \ 66 81 $(DESTLIB)/libshell.a \ … … 71 86 72 87 pantasks: $(BIN)/pantasks.$(ARCH) 88 $(BIN)/pantasks.$(ARCH) : $(single) $(funcs) $(cmds) $(libs) 73 89 74 $(BIN)/pantasks.$(ARCH) : $(funcs) $(cmds) $(libs) 90 pantasks_client: $(BIN)/pantasks_client.$(ARCH) 91 $(BIN)/pantasks_client.$(ARCH) : $(client) $(libs) 75 92 76 install: $(DESTBIN)/pantasks help 93 pantasks_server: $(BIN)/pantasks_server.$(ARCH) 94 $(BIN)/pantasks_server.$(ARCH) : $(server) $(funcs) $(cmds) $(libs) 95 @if [ ! -d $(BIN) ]; then mkdir -p $(BIN); fi 96 $(CC) -o $@ $^ $(LFLAGS) -lpthread 97 98 pantasks_client.install: $(DESTBIN)/pantasks_client 99 pantasks_server.install: $(DESTBIN)/pantasks_server 100 101 install: $(DESTBIN)/pantasks $(DESTBIN)/pantasks_client $(DESTBIN)/pantasks_server help 77 102 78 103 help: cmd.basic.help cmd.data.help cmd.astro.help pantasks.help 79 104 80 .PHONY: pantasks 105 .PHONY: pantasks pantasks_client pantasks_server 81 106 82 107 include ../Makefile.Common -
trunk/Ohana/src/opihi/pantasks/init.c
r6687 r7892 34 34 {"kill", kill_job, "kill job"}, 35 35 {"delete", delete_job, "delete job"}, 36 {"version", version, "show version information"},36 {"version", version, "show version information"}, 37 37 {"verbose", verbose, "set/toggle verbose mode"}, 38 38 };
Note:
See TracChangeset
for help on using the changeset viewer.
