Mercurial > hg-old > index.cgi
comparison src/list.c @ 45:be459d69f481
Fixed stupid error in opening list file
author | lost |
---|---|
date | Sun, 04 Jan 2009 06:54:58 +0000 |
parents | 2330b88f9600 |
children | 804d7465e0f9 |
comparison
equal
deleted
inserted
replaced
44:2330b88f9600 | 45:be459d69f481 |
---|---|
54 | 54 |
55 if (as -> listfile[0] == '-' && as -> listfile[1] == '\0') | 55 if (as -> listfile[0] == '-' && as -> listfile[1] == '\0') |
56 lf = stdout; | 56 lf = stdout; |
57 else | 57 else |
58 { | 58 { |
59 lf = fopen(as -> listfile, "o"); | 59 lf = fopen(as -> listfile, "w"); |
60 if (!lf) | 60 if (!lf) |
61 { | 61 { |
62 fprintf(stderr, "Unable to open list file. No listing will be generated!\n"); | 62 fprintf(stderr, "Unable to open list file '%s'. No listing will be generated: ", as -> listfile); |
63 perror(""); | |
63 goto showerr; | 64 goto showerr; |
64 } | 65 } |
65 } | 66 } |
66 | 67 |
67 for (l = as -> lineshead; l; l = l -> next) | 68 for (l = as -> lineshead; l; l = l -> next) |