[hackers] [sltar] USAGE macro is useless, removed. || gottox

From: <hg_AT_suckless.org>
Date: Sun, 11 Nov 2012 17:23:39 +0100 (CET)

changeset: 4:f7ee26a7be4e
user: gottox_AT_rootkit.lan
date: Wed Dec 19 10:47:24 2007 +0100
files: Makefile sltar.c
description:
USAGE macro is useless, removed.


diff -r 32318838d4c8 -r f7ee26a7be4e Makefile
--- a/Makefile Wed Dec 19 10:41:03 2007 +0100
+++ b/Makefile Wed Dec 19 10:47:24 2007 +0100
_AT_@ -1,4 +1,4 @@
-# sltar - a minimal implementation of tar
+# sltar - suckless tar
 # (c) 2007 Enno Boland
 
 include config.mk
diff -r 32318838d4c8 -r f7ee26a7be4e sltar.c
--- a/sltar.c Wed Dec 19 10:41:03 2007 +0100
+++ b/sltar.c Wed Dec 19 10:47:24 2007 +0100
_AT_@ -1,4 +1,4 @@
-/* cmarkdown
+/* sltar - suckless tar
  * Copyright (C) <2007> Enno boland <g s01 de>
  *
  * See LICENSE for further informations
_AT_@ -9,8 +9,6 @@
 #include <string.h>
 #include <sys/stat.h>
 
-#define USAGE { puts("tar [xt]"); exit(EXIT_FAILURE); }
-
 enum Header {
         MODE = 100, UID = 108, GID = 116, SIZE = 124, MTIME = 136,
         TYPE = 156, LINK = 157, DEVMAJOR = 329, DEVMINOR = 337,
_AT_@ -23,8 +21,10 @@
         FILE *f;
 
         if((argc != 2 || (a = argv[1][0]) == '\0') ||
- argv[1][1] != '\0' || (a != 't' && a != 'x'))
- USAGE;
+ argv[1][1] != '\0' || (a != 't' && a != 'x')) {
+ puts("sltar-" VERSION " - suckless tar\nsltar [xt]");
+ exit(EXIT_FAILURE);
+ }
         lname[100] = fname[100] = '\0';
         for(l = 0, f = NULL; fread(b,END,1,stdin); l -= END) {
                  if(l <= 0) {
Received on Sun Nov 11 2012 - 17:23:39 CET

This archive was generated by hypermail 2.3.0 : Sun Nov 11 2012 - 17:24:17 CET