• Main Page
  • Related Pages
  • Modules
  • Data Structures
  • Files
  • File List
  • Globals

rpmcli-common.c

Go to the documentation of this file.
00001 #include "system.h"
00002 #include <stdlib.h>
00003 #include <rpm/rpmlog.h>
00004 #include "rpmcli-common.h"
00005 #include "debug.h"
00006 
00007 RPM_GNUC_NORETURN
00008 void argerror(const char * desc)
00009 {
00010     fprintf(stderr, _("%s: %s\n"), __progname, desc);
00011     exit(EXIT_FAILURE);
00012 }
00013 
00014 static void printVersion(FILE * fp)
00015 {
00016     fprintf(fp, _("RPM version %s\n"), rpmEVR);
00017 }
00018 
00019 static void printBanner(FILE * fp)
00020 {
00021     fprintf(fp, _("Copyright (C) 1998-2002 - Red Hat, Inc.\n"));
00022     fprintf(fp, _("This program may be freely redistributed under the terms of the GNU GPL\n"));
00023 }
00024 
00025 void printUsage(poptContext con, FILE * fp, int flags)
00026 {
00027     printVersion(fp);
00028     printBanner(fp);
00029     fprintf(fp, "\n");
00030 
00031     if (rpmIsVerbose())
00032         poptPrintHelp(con, fp, flags);
00033     else
00034         poptPrintUsage(con, fp, flags);
00035 }
00036 

Generated on Fri Aug 20 2010 for rpm by  doxygen 1.7.1