sillerud / c-assignment-ascii-merger Goto Github PK
View Code? Open in Web Editor NEWSimple ascii merger written in C
License: MIT License
Simple ascii merger written in C
License: MIT License
My solution is based on 3 files, a merge.c which has a header merge.h and main.c which makes use of the logic in merge.c. I’ve chosen to create my own struct to avoid a triple pointer and because all parts of the result is used all all times, also I wanted to be able to use the return value to give feedback if the function was ran successfully. I chose to parse the filenames for the parts with a regex, this is because it’s a flexible way to do it and if I want it to make it work on another format I can just change the regex. The strings returned is based on a char pointer pointer which works as a array of strings, I’ve made it so the file read method reads directly into the char pointer pointer. When compiled you can print it to stdout using ./merge /path/to/folder if you want to output it to a file without using piping you can do ./merge /path/to/folder /path/to/output.txt or if you’re in the same folder just do ./merge folder ./merge folder output.txt To compile you can use the command gcc -o merge merge.c merge.h main.c
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.