jlnh | Bonjour,
J'ai un problème pour transférer des datas.
Au dessus d'un certain nombre ça foire!
Code :
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #define UI32 unsigned __int32
- #define FN_MAX_SIZE 64 // max file path/name
- void
- main(int argc, char *argv[])
- {
- UI32 i;
- char inpname[FN_MAX_SIZE], outname[FN_MAX_SIZE];
- FILE *finp, *fout;
- if (argc != 3)
- {
- printf("%s\n", "Usage: " );
- exit (1);
- }
- /* Store arguments */
- strncpy(inpname, argv[1], FN_MAX_SIZE);
- strncpy(outname, argv[2], FN_MAX_SIZE);
- /* Open input file */
- finp = fopen(inpname,"r" );
- if (finp == NULL) exit(2);
- /* Open output file */
- fout = fopen(outname,"w" );
- if (fout == NULL) exit(3);
- i = 2934129;
- while(i)
- {
- fputc(getc(finp),fout);
- i--;
- }
- fclose(finp);
- fclose(fout);
- }
|
Enregistre 2939145 bytes avec Watcom.
Le bon nombre avec gcc mais toutes les datas au dessus de 8548 sont à 0xff.
Donc il y a un problème, mais lequel?
Merci pour votre temps.
Bye,
Jean-Louis Message édité par jlnh le 08-01-2012 à 16:33:15
|