Archived
1
0
Fork 0

Added dirname() function

This commit is contained in:
Fredric N 2010-04-22 21:37:52 +02:00 committed by Henrik Hautakoski
parent 1e68c71d72
commit efd9d3d312
3 changed files with 44 additions and 0 deletions

18
test/t_path2.c Normal file
View file

@ -0,0 +1,18 @@
#include <malloc.h>
#include <stdio.h>
#include "../src/common/path.h"
int main(int argc, char *argv[]) {
char fp[] = "/this/is/my/path/to/file.pdf/";
char *d;
printf("%s\n=>\n", fp);
d = dirname(fp);
printf("%s\n", d);
return 0;
}