Changeset 80 in PSPA for parmelaPSPA/trunk/main.c


Ignore:
Timestamp:
Nov 15, 2012, 12:36:13 PM (12 years ago)
Author:
lemeur
Message:

prise en compte d'un path pour les fichiers

File:
1 edited

Legend:

Unmodified
Added
Removed
  • parmelaPSPA/trunk/main.c

    r73 r80  
     1#include <string.h>
     2#include <stdio.h>
     3#include <stdlib.h>
    14
    2 #include <stdio.h>
     5static int maxLongPath=132;
    36
    4 void parmela_();
     7void parmela_(char*, int*);
    58
    69int main(int argc,char* argv[])
    710{
    8   parmela_();
     11
     12  if ( argc != 2 )
     13    {
     14    printf(" usage : parmela complete_path_of_files  \n");
     15    return 0;
     16    }
     17 
     18  char workingPath[maxLongPath];
     19
     20
     21  int taille = strlen(argv[1]);
     22  if ( taille < maxLongPath - 1)
     23    {
     24      strcpy(workingPath, argv[1]);
     25    }
     26  else
     27    {
     28      printf(" parmela ERROR : path name of working area too long (should be < %d \n",maxLongPath);
     29      return 0;
     30    }
     31
     32  parmela_(workingPath, &taille);
    933  return 0;
    1034}
Note: See TracChangeset for help on using the changeset viewer.