Subversion Repositories wimsdev

Rev

Rev 10 | Rev 3835 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 10 Rev 3718
Line 14... Line 14...
14
 *  along with this program; if not, write to the Free Software
14
 *  along with this program; if not, write to the Free Software
15
 *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
15
 *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
16
 */
16
 */
17
 
17
 
18
/* dvi 2 gif driver, tex standard */
18
/* dvi 2 gif driver, tex standard */
-
 
19
#include "../Lib/basicstr.c"
19
 
20
 
20
void error(char *s)
21
void error(char *s)
21
{
22
{
22
    fprintf(stderr,"%s: %s\n",progname, s);
23
    fprintf(stderr,"%s: %s\n",progname, s);
23
    exit(1);
24
    exit(1);
Line 167... Line 168...
167
    struct stat st;
168
    struct stat st;
168
    char *buf;
169
    char *buf;
169
    if(stat(s,&st)==-1) {
170
    if(stat(s,&st)==-1) {
170
        if(strrchr(s,'/')!=NULL) {
171
        if(strrchr(s,'/')!=NULL) {
171
            buf=xmalloc(strlen(s)+1);
172
            buf=xmalloc(strlen(s)+1);
172
            strcpy(buf,s); *strrchr(buf,'/')=0;
173
            ovlstrcpy(buf,s); *strrchr(buf,'/')=0;
173
            mkdirs(buf); free(buf);
174
            mkdirs(buf); free(buf);
174
        }
175
        }
175
        mkdir(s,-1);
176
        mkdir(s,-1);
176
    }
177
    }
177
}
178
}