| 1 |
/*
|
| 2 |
* Copyright 2005 Gentoo Foundation
|
| 3 |
* Distributed under the terms of the GNU General Public License v2
|
| 4 |
* $Header: /var/cvsroot/gentoo-projects/portage-utils/qtemp.c,v 1.9 2005/06/19 04:54:15 solar Exp $
|
| 5 |
*
|
| 6 |
* 2005 Ned Ludd - <solar@gentoo.org>
|
| 7 |
* 2005 Mike Frysinger - <vapier@gentoo.org>
|
| 8 |
*
|
| 9 |
********************************************************************
|
| 10 |
* This program is free software; you can redistribute it and/or
|
| 11 |
* modify it under the terms of the GNU General Public License as
|
| 12 |
* published by the Free Software Foundation; either version 2 of the
|
| 13 |
* License, or (at your option) any later version.
|
| 14 |
*
|
| 15 |
* This program is distributed in the hope that it will be useful, but
|
| 16 |
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 17 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
| 18 |
* General Public License for more details.
|
| 19 |
*
|
| 20 |
* You should have received a copy of the GNU General Public License
|
| 21 |
* along with this program; if not, write to the Free Software
|
| 22 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston,
|
| 23 |
* MA 02111-1307, USA.
|
| 24 |
*
|
| 25 |
*/
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
#define QTEMP_FLAGS "" COMMON_FLAGS
|
| 30 |
static struct option const qtemp_long_opts[] = {
|
| 31 |
COMMON_LONG_OPTS
|
| 32 |
};
|
| 33 |
static const char *qtemp_opts_help[] = {
|
| 34 |
COMMON_OPTS_HELP
|
| 35 |
};
|
| 36 |
#define qtemp_usage(ret) usage(ret, QTEMP_FLAGS, qtemp_long_opts, qtemp_opts_help, APPLET_QTEMP)
|
| 37 |
|
| 38 |
|
| 39 |
|
| 40 |
int qtemp_main(int argc, char **argv)
|
| 41 |
{
|
| 42 |
int i;
|
| 43 |
|
| 44 |
DBG("argc=%d argv[0]=%s argv[1]=%s",
|
| 45 |
argc, argv[0], argc > 1 ? argv[1] : "NULL?");
|
| 46 |
|
| 47 |
while ((i = GETOPT_LONG(QTEMP, qtemp, "")) != -1) {
|
| 48 |
switch (i) {
|
| 49 |
COMMON_GETOPTS_CASES(qtemp)
|
| 50 |
}
|
| 51 |
}
|
| 52 |
|
| 53 |
|
| 54 |
|
| 55 |
return EXIT_SUCCESS;
|
| 56 |
}
|