Write a function in C to merge text files
- or -
Post a project like this1455
$
- Posted:
- Proposals: 9
- Remote
- #2778017
- OPPORTUNITY
- Awarded
WordPress Expert/Woocommerce Expert/Data Scientist/Python Expert/Auto-CAD/3D/2D Animation/ White Board Animation
Rawalpindi
2350420629462111547261915528374083151005360672138518523968306
Description
Experience Level: Entry
Estimated project duration: 1 day or less
I have written a program in C that process lines from a text file. I would like to expand the program with a function that includes the text from referenced files and text from files referenced by the referenced files and writes the output to a new file. Where a file is referenced the calling line should be written to the output file and preceded with a %. I would like to write this but don’t have the time.
The function is to be written in C with emphasis on reliability, readability and future maintenance. The files can be large so speed is a consideration. Memory and disk space are not an issue but any memory used should be released before leaving the function
Checks are to be included to pick up any errors with the errors written to a text string that is passed back to the calling program. The referenced files are called with the command \vimport{path/file.txt}
My preference is to format the code GNU style with 3 character tab.
I use Linux so the path is formatted accordingly.
See the attached files for example input and output files. Due to the pph limits, three input files are combined into one file.
THE BUDGET HAS BEEN REMOVED
The function is to be written in C with emphasis on reliability, readability and future maintenance. The files can be large so speed is a consideration. Memory and disk space are not an issue but any memory used should be released before leaving the function
Checks are to be included to pick up any errors with the errors written to a text string that is passed back to the calling program. The referenced files are called with the command \vimport{path/file.txt}
My preference is to format the code GNU style with 3 character tab.
I use Linux so the path is formatted accordingly.
See the attached files for example input and output files. Due to the pph limits, three input files are combined into one file.
THE BUDGET HAS BEEN REMOVED
Tim H.
100% (8)Projects Completed
9
Freelancers worked with
7
Projects awarded
56%
Last project
25 Nov 2021
United Kingdom
New Proposal
Login to your account and send a proposal now to get this project.
Log inClarification Board Ask a Question
-
How deeply nested can the referenced files be, I.e. how many levels of nesting?
Tim H.01 Apr 2020Ideally, the number of levels would be undefined, I had assumed that references to the open files would be stored on a stack. If you need a defined number then allow for 16 deep.
906996
We collect cookies to enable the proper functioning and security of our website, and to enhance your experience. By clicking on 'Accept All Cookies', you consent to the use of these cookies. You can change your 'Cookies Settings' at any time. For more information, please read ourCookie Policy
Cookie Settings
Accept All Cookies