parent
fafcb942e0
commit
520520e576
24
src/main.c
24
src/main.c
|
@ -13,6 +13,16 @@ void notify_exit(void)
|
||||||
DEBUG("Exiting gemstone...");
|
DEBUG("Exiting gemstone...");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Closes File after compiling.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
void close_file(char file_to_close)
|
||||||
|
{
|
||||||
|
fclose(file_to_close);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Run compiler setup here
|
* @brief Run compiler setup here
|
||||||
*
|
*
|
||||||
|
@ -31,27 +41,17 @@ void setup(void)
|
||||||
// actual setup
|
// actual setup
|
||||||
|
|
||||||
DEBUG("finished starting up gemstone...");
|
DEBUG("finished starting up gemstone...");
|
||||||
}
|
atexit(close_file(filename));
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Closes File after compiling.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
void close_file(char file_to_close)
|
|
||||||
{
|
|
||||||
fclose(file_to_close);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char *argv[]) {
|
int main(int argc, char *argv[]) {
|
||||||
|
|
||||||
setup();
|
setup();
|
||||||
atexit(close_file(filename);
|
|
||||||
|
|
||||||
// Check for file input as argument
|
// Check for file input as argument
|
||||||
if (2 != argc)
|
if (2 != argc)
|
||||||
{
|
{
|
||||||
printf("Usage: %s <filename>\n", argv[0]);
|
INFO("Usage: %s <filename>\n", argv[0]);
|
||||||
PANIC("No File could be found");
|
PANIC("No File could be found");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue