This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Locadora | |
* Exercicio Reduzido | |
* Armazenamento em memória | |
* Apenas dados | |
Compilação normal com GCC | |
gcc locadora.c | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Includes for the types and the I/O of main function | |
#include <stdio.h> | |
#include <stddef.h> | |
#include <stdint.h> | |
// The type discovery macro | |
#define typename(x) (__builtin_types_compatible_p(__typeof__(x), long int)) ? "long int" : \ | |
(__builtin_types_compatible_p(__typeof__(x), char *)) ? "pointer to char" : \ | |
(__builtin_types_compatible_p(__typeof__(x), char)) ? "char" : \ | |
(__builtin_types_compatible_p(__typeof__(x), _Bool)) ? "_Bool" : \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Some servers like Amazon (Github use Amazon) set timeout limits to downloads | |
# If you must download some big file (lets say 500mb) you will be kicked out in middle of download | |
# That will always happen, blocking you from download. | |
# To work around this problem you will only need a program that listem for timeouts and can continuate where stops | |
# I will use Wget (linux) for that | |
wget -c -O <filename to write> --read-timeout=10 <url> | |
# -c tells wget to continue where stops | |
# -O tells wget to write the contents to file specified |