Fix long args bug

This commit is contained in:
Shav Kinderlehrer 2023-04-17 22:11:59 -04:00
parent b60ecd747b
commit 0247ecc2a1
2 changed files with 5 additions and 4 deletions

View File

@ -2,7 +2,7 @@
#define ARG_H
#include <stdbool.h>
#define LAT_VERSION "0.8.1"
#define LAT_VERSION "0.9.1"
struct config {
bool stdin;

View File

@ -1,9 +1,10 @@
#include "arg.h"
#include "util.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "arg.h"
#include "util.h"
#define LAT_USAGE "usage: lat [-cnbVh] [files..]"
void help(void) {
@ -41,7 +42,7 @@ void parselongarg(char *arg) {
return;
}
if (strcmp(arg, "--headers")) {
if (strcmp(arg, "--headers") == 0) {
conf.headers = !conf.headers;
return;
}