replace cleanup() with exit() in usage() - gramscii - A simple editor for ASCII box-and-arrow charts
DIR Log
DIR Files
DIR Refs
DIR Tags
DIR README
DIR LICENSE
---
DIR commit a46183e96042cf751199f0a06d437a599f7f5bf8
DIR parent e4c527b0f07b91fb3cd9ba58ba057dfea9da9356
HTML Author: KatolaZ <katolaz@freaknet.org>
Date: Sun, 11 Aug 2019 08:46:24 +0100
replace cleanup() with exit() in usage()
Diffstat:
M gramscii.c | 2 +-
M screen.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
---
DIR diff --git a/gramscii.c b/gramscii.c
@@ -147,7 +147,7 @@ void commands(FILE *fc){
void usage(){
fprintf(stderr, "Usage: %s [-s] [-h] [file ...]\n", argv0);
- cleanup(1);
+ exit(1);
}
DIR diff --git a/screen.c b/screen.c
@@ -421,7 +421,7 @@ void init_screen(){
screen.sz = HEIGHT;
screen.num = HEIGHT;
if (screen.l == NULL){
- perror("allocating screen");
+ fprintf(stderr, "Error allocating screen");
cleanup(1);
}
for (i=0; i<HEIGHT; i++){