Skip to content

Commit

Permalink
Allow filenames up to 8 characters.
Browse files Browse the repository at this point in the history
  • Loading branch information
pulkomandy committed Dec 14, 2020
1 parent 1c4b0c4 commit 6e97449
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions header.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,14 @@ void getNomFichAms(char *nomFichAms,char *pathFichAms)
/* copie et vérification du nom du ficher amdos */
if (strlen(pathFichAms)>12)
{printf(ERR10);exit(1);}

while(*pathFichAms && *pathFichAms!='.' && a<8)
*(nomFichAms+a++)=*pathFichAms++;

if(a>=8 && *pathFichAms=='.') {printf(ERR11);exit(1);}

while(*pathFichAms && *pathFichAms!='.' && a < 8)
*(nomFichAms + a++) = *pathFichAms++;

if(a > 8 && *pathFichAms=='.') {
printf(ERR11);
exit(1);
}

/* copie de l'extension si elle existe*/
if (*pathFichAms=='.')
Expand Down

0 comments on commit 6e97449

Please sign in to comment.