Programa para el testeo de algunas funciones de la biblioteca <pds/pdsfilesfunc.h> .
- Autor
- Fernando Pujaico Rivera
- Copyright
- GNU Public License.
Este programa solo hace una prueba simple de las funciones que hice mas al tun tun.
# Compilation command
gcc -o testpdsfilesfunc testpdsfilesfunc.c -lpdsdatafunc
# Test command
./testpdsfilesfunc /text/file.c
#include <stdio.h>
#include <stdlib.h>
#include <pds/pdsdatafunc.h>
#if defined(_WINDOWS_) || defined(_WIN32) || defined(WIN32)
#define DEFAULT_NOEXISTENT_FILEPATH "C:\\path\\to\\file\\filename.h"
#elif defined(__linux__)
#define DEFAULT_NOEXISTENT_FILEPATH "/path/to/file/filename.h"
#else
#define DEFAULT_NOEXISTENT_FILEPATH "/path/to/file/filename.h"
#endif
int main(int argc, char* argv[])
{
const char *filepath1=NULL;
char *DATA=NULL;
if(argc==1)
filepath1=DEFAULT_NOEXISTENT_FILEPATH;
else
filepath1=argv[1];
printf("\n<<<< Data from %s >>>>\n",filepath1);
printf("basename :\t%s\n",DATA);
free(DATA);
printf("extension:\t%s\n",DATA);
free(DATA);
printf("filename :\t%s\n",DATA);
free(DATA);
printf("dirname :\t%s\n",DATA);
free(DATA);
printf("other_ext:\t%s\n",DATA);
free(DATA);
printf("temporal :\t%s\n",DATA);
free(DATA);
printf("temporal :\t%s\n",DATA);
free(DATA);
return EXIT_SUCCESS;
}