]> git.armaanb.net Git - stagit.git/blobdiff - stagit.c
Use /usr/local/share
[stagit.git] / stagit.c
index daa81fc67d36c1f54909aefea1024c0aa710c3b8..264604eb4fffd984ff7ef47993e7ff0d4b44de84 100644 (file)
--- 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)))