Back to index

lightning-sunbird  0.9+nobinonly
Functions
if_not_there.c File Reference
#include "gcconfig.h"
#include <stdio.h>

Go to the source code of this file.

Functions

int main (int argc, char **argv, char **envp)

Function Documentation

int main ( int  argc,
char **  argv,
char **  envp 
)

Definition at line 6 of file if_not_there.c.

{
    FILE * f;
    if (argc < 3) goto Usage;
    if ((f = fopen(argv[1], "rb")) != 0
        || (f = fopen(argv[1], "r")) != 0) {
        fclose(f);
        return(0);
    }
    printf("^^^^Starting command^^^^\n");
    execvp(argv[2], argv+2);
    exit(1);
    
Usage:
    fprintf(stderr, "Usage: %s file_name command\n", argv[0]);
    return(1);
}

Here is the call graph for this function: