Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][tlug] Bad attitude Wednesday [C&C maybe]
- Date: Thu, 20 Mar 2008 02:27:57 +0900
- From: "Stephen J. Turnbull" <stephen@example.com>
- Subject: [tlug] Bad attitude Wednesday [C&C maybe]
- References: <op.t756gdbtp3esx5@mail.gol.com> <200803180822.19747.daniel.ramaley@drake.edu> <20080318155544.79e7efac.attila@kinali.ch> <200803181314.01992.daniel.ramaley@drake.edu> <78d7dd350803181916w70c71d9bp52c0505584bf829f@mail.gmail.com> <d8fcc0800803181938s73c902d8s6b650c511e59d41b@mail.gmail.com> <ed10ee420803182359m4af2dac1jfe0099a3040d74bb@mail.gmail.com> <47E10F4E.80404@simon-cozens.org>
Simon Cozens writes: > GNU, needless to say, does not. You'd think that instead of having all the bogus conventionally- required option cruft, GNU would have allowed you to write -------------------------------------------------------------------------------- /* GNU sync is free software. That means that you can do with it whatever His Imperial Richardness says you can do, and no more. Fortunately, he's in a good mood today, you can use it anywhere you like but not in proprietary and permissively licensed free software, nor in non-GPL B&D-licensed software, nor in public domain software. It's for your own good! For legal details, see the GNU Grossly Protectionist License. Remember, GNU's Not Unix! Just look at our code, Dennis, Brian, and Rob would never write anything like this! This file comes with full warranty. Void if open(2)ed. */ /* gnu_source_name = "GNU sync"; gnu_program_version = "27.3.4"; gnu_short_usage = NULL; gnu_long_usage = NULL; */ #include "bsd_sync.c" -------------------------------------------------------------------------------- Then GCC would automagically run the gnu_system_info program on it, extract those variables into a database. There would be commands (not options) help and version which would access the database, and exit functions for command error conditions: #include <stdio.h> void gnu_fatal_usage_external (char *invocation, char *program, int code) { char *usage = gnu_db_get_usage (program); gnu_fatal_usage_internal (invocation, usage, code); } void gnu_fatal_usage_internal (char *invocation, char *usage, int code) { fprintf (stderr, "usage: %s%s%s\n", invocation, usage ? " " : "", usage ? usage : ""); exit (code); } (not used in the example above). Obviously these would be typically invoked in very stylized fashion: gnu_fatal_usage_external (argv[0], gnu_source_name, -1); gnu_fatal_usage_internal (argv[0], gnu_short_usage, -1); For the more security-conscious, you could uncomment, in which case help and version would behave like a variant of nm and snorfle the values out of the binary. But noooooo!
- References:
- [tlug] The Mother of All (bash) Commands
- From: Greg Thomson
- Re: [tlug] The Mother of All (bash) Commands
- From: Daniel A. Ramaley
- Re: [tlug] The Mother of All (bash) Commands
- From: Attila Kinali
- Re: [tlug] The Mother of All (bash) Commands
- From: Daniel A. Ramaley
- Re: [tlug] The Mother of All (bash) Commands
- From: Nguyen Vu Hung
- Re: [tlug] The Mother of All (bash) Commands
- From: Josh Glover
- Re: [tlug] The Mother of All (bash) Commands
- From: SL Baur
- Re: [tlug] The Mother of All (bash) Commands
- From: Simon Cozens
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] Lanmap or something of the likes.
- Next by Date: [tlug] Audio editing software
- Previous by thread: Re: [tlug] The Mother of All (bash) Commands
- Next by thread: Re: [tlug] The Mother of All (bash) Commands
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links