This commit is contained in:
2025-08-03 20:43:36 -04:00
parent c48809aea9
commit 0ef8ca973c
9 changed files with 2 additions and 57 deletions

Binary file not shown.

Binary file not shown.

View File

@@ -1,4 +0,0 @@
PREFIX=/usr/bin/
CFLAGS=-Wall -Wextra -ggdb
LDFLAGS=
CC=clang

View File

@@ -15,28 +15,10 @@
#define DEFAULT_DIR_PERMISSIONS 0755
#define MAX_PATH_LENGTH 1024
/**
* Create directory and change into it
* @param dirname Directory name to create and enter
* @return 0 on success, errno on failure
*/
int create_and_enter_directory (const char *dirname);
/**
* Create a file with formatted content
* @param path File path to create
* @param format Format string for file content
* @param ... Variable arguments for formatting
* @return 0 on success, -1 on failure
*/
int create_file_with_content (char *path, char *format, ...);
/**
* Create a directory with formatted path
* @param format Format string for directory path
* @param ... Variable arguments for formatting
* @return 0 on success, errno on failure
*/
int create_directory (char *format, ...);
#endif

View File

@@ -11,7 +11,7 @@
#include <stdio.h>
int
print_error_with_prefix (char *format, ...)
printfn (char *format, ...)
{
int len;
va_list args;

View File

@@ -12,15 +12,6 @@
#include <stdarg.h>
#include <stdio.h>
/**
* Print a formatted message to stderr with program prefix and newline
* @param format Format string (printf-style)
* @param ... Variable arguments for formatting
* @return Number of characters printed
*/
int print_error_with_prefix (char *format, ...);
/* Legacy function name for backward compatibility */
#define printfn print_error_with_prefix
int printfn (char *format, ...);
#endif

View File

@@ -38,11 +38,3 @@ parse_standard_options (void (*usage) (int), int argc, char **argv)
}
return HELP_REQUESTED;
}
int
initialize_main (int *argc, char ***argv)
{
(*argc)--;
(*argv)++;
return 0;
}

View File

@@ -9,21 +9,6 @@
#ifndef STANDARD_H
#define STANDARD_H
/**
* Parse standard command line options (--help, --version)
* @param usage_func Function pointer to usage display function
* @param argc Argument count
* @param argv Argument vector
* @return 0 on success, 1 if help/version requested, errno on error
*/
int parse_standard_options (void (*usage_func) (), int argc, char **argv);
/**
* Setup the program
* @param argc Argument count
* @param argv Argument vector
* @return 0 on success, 1 if something fails
*/
int initialize_main (int *, char ***);
#endif

View File

@@ -385,7 +385,6 @@ main (int argc, char **argv)
return 1;
}
status = initialize_main (&argc, &argv);
status = parse_standard_options (usage, argc, argv);
if (status && status != HELP_REQUESTED)