Commit Graph

24 Commits (74c0f189a07ec9b6eaf9cee4421c81cab4c41288)

Author SHA1 Message Date
Justin Reichardt 74c0f189a0 Log level is set to WARNING unless -d flag is used
-d flag now sets logging to debug
2021-08-30 11:46:02 -05:00
Justin Reichardt 0e431bec54 Finished adding every print to clogs 2021-08-30 10:55:24 -05:00
Justin Reichardt c286c78c1f Added libclogs
Added custom logging library
2021-08-30 10:44:18 -05:00
Justin Reichardt 98d1442a41 Removed excessive comments
The functions are fairly self explanatory, no need to comment on every
function
2021-08-28 14:15:44 -05:00
Justin Reichardt 128b20d857 Corrected the license notice
Turns out the program is not called Foobar. Forgot to replace one of the
Foobar entries.
2021-08-28 14:04:45 -05:00
Justin Reichardt a3607e7717 Improved the the Copyright
Changed the Licence file to Copying
Added license notices to the source files
2021-08-28 13:59:33 -05:00
Justin Reichardt 1f6dfc6d90 Changed reallocarray to realloc
Some of my other systems fail to find reallocarray
2021-08-27 15:53:58 -05:00
Justin Reichardt 50cdb303b9 Added download.c
Moved the download functions from rhosts to their own file
2021-08-27 10:10:08 -05:00
Justin Reichardt d2d092ed31 Copy tmp file to hosts file when complete 2021-08-26 19:17:57 -05:00
Justin Reichardt f2a4447bd3 If fails to download, it will reuse the local copy 2021-08-26 19:07:45 -05:00
Justin Reichardt bba9693138 Added libcurl to download remote repos
Added the functions to download and add the contents to tmpfile
Updated the Makefile and README.md
2021-08-26 18:03:17 -05:00
Justin Reichardt 7de6403f27 Added add_site_entries
Added the function for adding static sites
Also remembered to close the files before exiting the download_entries
function
2021-08-26 15:58:35 -05:00
Justin Reichardt 20da1348fa downloading does everything except download
Creates blank entries in the tmp file
Safely closes
2021-08-26 15:32:41 -05:00
Justin Reichardt 66251c6c2a Error checking and marking in preserve_static_entr
Appends "# rhosts begin\n" after static entries
Cleanly errors out if failes to write to tmp file
2021-08-26 15:13:36 -05:00
Justin Reichardt 8c377d6234 Logs static hosts 2021-08-26 14:57:55 -05:00
Justin Reichardt 4c443474e5 Added download_entries
It currently doesn't funtion
2021-08-26 14:53:54 -05:00
Justin Reichardt 4789384846 Parses the static entries from hosts
pulls the static entries and stores them in the tmp file
2021-08-26 14:39:50 -05:00
Justin Reichardt 89a122ed16 Added MAXSTRSIZE
To unify the string buffer sizes
2021-08-26 10:37:44 -05:00
Justin Reichardt 6ffc10a91e main no longer opens files it doesn't use 2021-08-25 21:33:51 -05:00
Justin Reichardt 4766abd773 main checks for error returns
If parse_config or preserve_static_entries returns an error, main will
report it and close with an error.
2021-08-25 21:31:38 -05:00
Justin Reichardt 9b45bc2382 Created preserve_static_entries()
It opens hosts and a tmp file and then closes them
2021-08-25 21:28:02 -05:00
Justin Reichardt a48ef05bf7 Cleaned up parse_config
Added comments and whitespace to make it more legible
Also added a description to determine_config_entry_value
2021-08-25 21:12:05 -05:00
Justin Reichardt f318271a28 Parses the config file
Added parse_config and determine_config_entry_value functions and entry
types definitions in order to parse the config file
2021-08-25 21:02:35 -05:00
Justin Reichardt 3bf49028a4 Initialized the rhosts c files 2021-08-24 10:27:46 -05:00