comparison toys/lsb/killall.c @ 674:7e846e281e38

New build infrastructure to generate FLAG_ macros and TT alias, #define FOR_commandname before #including toys.h to trigger it. Rename DEFINE_GLOBALS() to just GLOBALS() (because I could never remember if it was DECLARE_GLOBALS). Convert existing commands to use new infrastructure, and replace optflag constants with FLAG_ macros where appropriate.
author Rob Landley <rob@landley.net>
date Mon, 08 Oct 2012 00:02:30 -0500
parents 6df4ccc0acbe
children 786841fdb1e0
comparison
equal deleted inserted replaced
673:c102f31a753e 674:7e846e281e38
18 18
19 -l print list of all available signals 19 -l print list of all available signals
20 -q don't print any warnings or error messages 20 -q don't print any warnings or error messages
21 */ 21 */
22 22
23 #define FOR_killall
23 #include "toys.h" 24 #include "toys.h"
24 25
25 #define FLAG_q 1 26 GLOBALS(
26 #define FLAG_l 2
27
28 DEFINE_GLOBALS(
29 int signum; 27 int signum;
30 ) 28 )
31 #define TT this.killall
32 29
33 static void kill_process(pid_t pid) 30 static void kill_process(pid_t pid)
34 { 31 {
35 int ret; 32 int ret;
36 33