}
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);
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);
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;
/* 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)))