moving from gitlab
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
#include <stdio.h>
|
||||
|
||||
FILE *openFile(const char *filename);
|
||||
void catFile(FILE *file);
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
|
||||
if (argc != 2) {
|
||||
printf("error: missing file\nusage: cat <filename>\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
FILE *file = openFile(argv[1]);
|
||||
if (!file) {
|
||||
printf("error: file (%s) not found\n", argv[1]);
|
||||
return -2;
|
||||
}
|
||||
|
||||
catFile(file);
|
||||
|
||||
fclose(file);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
FILE *openFile(const char *filename) {
|
||||
FILE *file;
|
||||
|
||||
file = fopen(filename, "r");
|
||||
|
||||
return file;
|
||||
}
|
||||
|
||||
void catFile(FILE *file) {
|
||||
char buf[512];
|
||||
while (fgets(buf, 512, file)) {
|
||||
printf("%s", buf);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
[Verse 1]
|
||||
We're no strangers to love
|
||||
You know the rules and so do I (Do I)
|
||||
A full commitment's what I'm thinking of
|
||||
You wouldn't get this from any other guy
|
||||
|
||||
[Pre-Chorus]
|
||||
I just wanna tell you how I'm feeling
|
||||
Gotta make you understand
|
||||
|
||||
[Chorus]
|
||||
Never gonna give you up
|
||||
Never gonna let you down
|
||||
Never gonna run around and desert you
|
||||
Never gonna make you cry
|
||||
Never gonna say goodbye
|
||||
Never gonna tell a lie and hurt you
|
||||
|
||||
[Verse 2]
|
||||
We've known each other for so long
|
||||
Your heart's been aching, but you're too shy to say it (To say it)
|
||||
Inside, we both know what's been going on (Going on)
|
||||
We know the game, and we're gonna play it
|
||||
|
||||
[Pre-Chorus]
|
||||
And if you ask me how I'm feeling
|
||||
Don't tell me you're too blind to see
|
||||
|
||||
[Chorus]
|
||||
Never gonna give you up
|
||||
Never gonna let you down
|
||||
Never gonna run around and desert you
|
||||
Never gonna make you cry
|
||||
Never gonna say goodbye
|
||||
Never gonna tell a lie and hurt you
|
||||
Never gonna give you up
|
||||
Never gonna let you down
|
||||
Never gonna run around and desert you
|
||||
Never gonna make you cry
|
||||
Never gonna say goodbye
|
||||
Never gonna tell a lie and hurt you
|
||||
|
||||
Reference in New Issue
Block a user