]>
git.proxmox.com Git - mirror_edk2.git/blob - Tools/Source/TianoTools/SplitFile/SplitFile.c
3 Copyright (c) 1999 - 2002 Intel Corporation. All rights reserved
4 This software and associated documentation (if any) is furnished
5 under a license and may only be used or copied in accordance
6 with the terms of the license. Except as permitted by such
7 license, no part of this software or documentation may be
8 reproduced, stored in a retrieval system, or transmitted in any
9 form or by any means without the express written consent of
14 // GC_TODO: fix comment to start with /*++
27 GC_TODO: Add function description
34 GC_TODO: add return values
39 "SplitFile Filename Offset\n"" Filename = Input file to split\n"" Offset = offset at which to split file\n"
40 "\n\n""SplitFile will break a file in two pieces at the requested offset\n"
41 " outputting Filename1 and Filename2\n"
54 GC_TODO: Add function description
58 argc - GC_TODO: add argument description
59 ] - GC_TODO: add argument description
63 GC_TODO: add return values
75 unsigned long splitpoint
;
83 In
= fopen (argv
[1], "rb");
85 printf ("Unable to open file \"%s\"\n", argv
[1]);
89 strncpy (OutName1
, argv
[1], 510);
90 strncpy (OutName2
, argv
[1], 510);
91 strcat (OutName1
, "1");
92 strcat (OutName2
, "2");
94 Out1
= fopen (OutName1
, "wb");
96 printf ("Unable to open file \"%s\"\n", OutName1
);
100 Out2
= fopen (OutName2
, "wb");
102 printf ("Unable to open file \"%s\"\n", OutName2
);
106 splitpoint
= atoi (argv
[2]);
108 for (Index
= 0; Index
< splitpoint
; Index
++) {
109 CharC
= (char) fgetc (In
);
118 CharC
= (char) fgetc (In
);