indentp.c

src/indentp.c · 352 B

From the archive Lpmud-CD.03.31beta1.tar.gz

Download the archive   « Back to the archive contents

#include <stdio.h>

extern char *strrchr();
extern int system();	/* Could be char* for sprintf, but... */

int
indent_program(char *name)
{
    char buf[1000];
    char *p;

    p = strrchr(name, '/');
    if (!p)
	p = name;
    else
	p++;
    (void) sprintf(buf, "%s/indent '%s' -lpc && rm '%s'.BAK", BINDIR, name, p);
    return system(buf) == 0;
}

Site Stats

Snippets: 1791
Codebases: 571