C:/Users/Dennis/src/lang/russell.orig/src/gc/if_mach.c

Go to the documentation of this file.
00001 /* Conditionally execute a command based on machine and OS from config.h */
00002 # include "config.h"
00003 # include <stdio.h>
00004 
00005 int main(argc, argv, envp)
00006 int argc;
00007 char ** argv;
00008 char ** envp;
00009 {
00010     if (argc < 4) goto Usage;
00011     if (strcmp(MACH_TYPE, argv[1]) != 0) return(0);
00012     if (strcmp(OS_TYPE, "") != 0 && strcmp(argv[2], "") != 0
00013         && strcmp(OS_TYPE, argv[2]) != 0) return(0);
00014     execvp(argv[3], argv+3);
00015     
00016 Usage:
00017     fprintf(stderr, "Usage: %s mach_type os_type command\n", argv[0]);
00018     fprintf(stderr, "Currently mach_type = %s, os_type = %s\n",
00019             MACH_TYPE, OS_TYPE);
00020     return(1);
00021 }
00022 

Generated on Fri Jan 25 10:39:45 2008 for russell by  doxygen 1.5.4