param.c

Go to the documentation of this file.
00001 /*
00002 *    Copyright (c) 2007. The BATI team. All right reserved.
00003 *
00004 *    This file is part of BATI library.
00005 *
00006 *    BATI library is free software: you can redistribute it and/or modify
00007 *    it under the terms of the GNU General Public License as published by
00008 *    the Free Software Foundation, either version 3 of the License, or
00009 *    (at your option) any later version.
00010 *
00011 *    BATI library  is distributed in the hope that it will be useful,
00012 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014 *    GNU General Public License for more details.
00015 *
00016 *    You should have received a copy of the GNU General Public License
00017 *    along with BATI library.  If not, see <http://www.gnu.org/licenses/>.
00018 */
00019 #include <stdio.h>
00020 #include "volume.h"
00021 #include <stdlib.h>
00022 
00035 int main(argc,argv)
00036     int argc;
00037     char *argv[];
00038 {
00039 
00040   int VAL;
00041   FILE *fin;
00042 
00043 if (argc<2 || strcmp (argv[1],"-h") == 0 )
00044     {
00045         printf("\nparam <fichier image ELF>\n  -h help\n\n");
00046         exit(1);
00047     }
00048 
00049 if ( (fin=fopen(argv[1],"r"))==NULL )
00050     {
00051         printf("Erreur a l'ouverture du fichier.\n");
00052         exit(1);
00053     }
00054 
00055   lire_longueur_trace(fin,&VAL);
00056   printf("dimx=%d  ",VAL);
00057   lire_nb_trace(fin,&VAL); 
00058   printf("dimy=%d  ",VAL);
00059   lire_nb_plan(fin,&VAL);
00060   printf("dimz=%d  ",VAL);
00061   lire_nb_octet(fin,&VAL); 
00062   printf("Nb_bit=%d  ",VAL);
00063   lire_longueur_entete(fin,&VAL); 
00064   printf("dim_entete=%d\n",VAL);
00065 }

Generated on Tue Apr 22 13:31:06 2008 for volume by  doxygen 1.5.3