Back to index

texmacs  1.0.7.15
realpath.c
Go to the documentation of this file.
00001 
00002 /******************************************************************************
00003 * MODULE     : realpath.c
00004 * DESCRIPTION: finding the real path of a file
00005 * COPYRIGHT  : (C) 2005  Andrey Grozin
00006 *******************************************************************************
00007 * This software falls under the GNU general public license version 3 or later.
00008 * It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE
00009 * in the root directory or <http://www.gnu.org/licenses/gpl-3.0.html>.
00010 ******************************************************************************/
00011 
00012 #include <stdlib.h>
00013 #include <stdio.h>
00014 #define SIZE 4096
00015 
00016 int main(int argc, char **argv)
00017 { char path[SIZE];
00018   if (argc<2) exit(1);
00019   if (realpath(argv[1],path)) printf("%s\n",path);
00020   else exit(1);
00021   return 0;
00022 }