X-Git-Url: https://git.armaanb.net/?p=stagit.git;a=blobdiff_plain;f=stagit.c;h=264604eb4fffd984ff7ef47993e7ff0d4b44de84;hp=daa81fc67d36c1f54909aefea1024c0aa710c3b8;hb=3c00e328b546283294871232e65e39b9d2b80041;hpb=bda0c0dc3edd12eac75e700e98d2b7e2c4b771f2 diff --git a/stagit.c b/stagit.c index daa81fc..264604e 100644 --- a/stagit.c +++ b/stagit.c @@ -418,7 +418,7 @@ writefooter(FILE *fp) } int -syntax_highlight(const char *filename, FILE *fp, const char *s, size_t len) +call_py(const char *filename, FILE *fp, const char *s, size_t len) { // Flush HTML-file fflush(fp); @@ -428,7 +428,7 @@ syntax_highlight(const char *filename, FILE *fp, const char *s, size_t len) dup2(fileno(fp), 1); // Python Pygments script for syntax highlighting. - FILE *child = popen("/usr/local/share/doc/stagit/highlight.py", "w"); + FILE *child = popen("/usr/local/share/stagit/highlight.py", "w"); if (child == NULL) { printf("child is null: %s", strerror(errno)); exit(1); @@ -458,7 +458,7 @@ writeblobhtml(const char *filename, FILE *fp, const git_blob *blob) git_off_t len = git_blob_rawsize(blob); if (len > 0) { - lc = syntax_highlight(filename, fp, s, len); + lc = call_py(filename, fp, s, len); } return lc; @@ -1171,9 +1171,9 @@ main(int argc, char *argv[]) /* copy css */ char cwd[PATH_MAX]; strcpy(cwd, getcwd(cwd, sizeof(cwd))); - cp("/usr/local/share/doc/stagit/syntax.css", strcat(cwd, "/syntax.css")); + cp("/usr/local/share/stagit/syntax.css", strcat(cwd, "/syntax.css")); strcpy(cwd, getcwd(cwd, sizeof(cwd))); - cp("/usr/local/share/doc/stagit/style.min.css", strcat(cwd, "/style.min.css")); + cp("/usr/local/share/stagit/style.min.css", strcat(cwd, "/style.min.css")); /* strip .git suffix */ if (!(strippedname = strdup(name)))