defcon_chan/main.c

26 lines
No EOL
579 B
C

/*
defcon-chan: a simple C program that fetches current/last known DEFCON level into your terminal!
requirements: libcurl
compiling w/ GCC: gcc main.c -o defcon -lcurl
running: ./defcon
author: hornetmaidan
*/
#define FILENAME "/tmp/defcon.dat"
#define URL "https://defconwarningsystem.com/code.dat"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <curl/curl.h>
#include "src/globals.h"
#include "src/cache.h"
#include "src/network.h"
#include "src/output.h"
int main(void) {
check_cache();
query_defcon();
print_output();
}