einfo.h File Reference

Describes how to interface with the einfo library. More...

#include <sys/types.h>
#include <stdbool.h>

Go to the source code of this file.

Enumerations

enum  einfo_color_t {
  ecolor_good, ecolor_warn, ecolor_bad, ecolor_hilite,
  ecolor_bracket, ecolor_normal
}
 Color types to use.

Functions

const char * ecolor (einfo_color_t)
 Returns the ASCII code for the color.
void elog (int level, const char *fmt,...)
 Writes to syslog.
int einfon (const char *fmt,...)
 Display informational messages.
int ewarnn (const char *fmt,...)
int eerrorn (const char *fmt,...)
int einfo (const char *fmt,...)
int ewarn (const char *fmt,...)
void ewarnx (const char *fmt,...)
int eerror (const char *fmt,...)
void eerrorx (const char *fmt,...)
int einfovn (const char *fmt,...)
int ewarnvn (const char *fmt,...)
int ebeginvn (const char *fmt,...)
int eendvn (int retval, const char *fmt,...)
int ewendvn (int retval, const char *fmt,...)
int einfov (const char *fmt,...)
int ewarnv (const char *fmt,...)
int ebeginv (const char *fmt,...)
 Display informational messages that may take some time.
int ebegin (const char *fmt,...)
int eend (int retval, const char *fmt,...)
 End an ebegin.
int ewend (int retval, const char *fmt,...)
void ebracket (int col, einfo_color_t color, const char *msg)
int eendv (int retval, const char *fmt,...)
int ewendv (int retval, const char *fmt,...)
void eindent (void)
 Indents the einfo lines.
void eoutdent (void)
void eindentv (void)
void eoutdentv (void)
void eprefix (const char *prefix)
 Prefix each einfo line with something.


Detailed Description

Describes how to interface with the einfo library.

Copyright 2007 Gentoo Foundation Released under the GPLv2


Function Documentation

int ebeginv ( const char *  fmt,
  ... 
)

Display informational messages that may take some time.

Similar to einfo, but we add ... to the end of the message

int eend ( int  retval,
const char *  fmt,
  ... 
)

End an ebegin.

If you ebegin, you should eend also. eend places [ ok ] or [ !! ] at the end of the terminal line depending on retval (0 or ok, anything else for !!)

ebracket allows you to specifiy the position, color and message

void eindent ( void   ) 

Indents the einfo lines.

For each indent you should outdent when done

int einfon ( const char *  fmt,
  ... 
)

Display informational messages.

The einfo family of functions display messages in a consistent manner across Gentoo applications. Basically they prefix the message with " * ". If the terminal can handle color then we color the * based on the command used. Otherwise we are identical to the printf function.

The n suffix denotes that no new line should be printed. The v suffix means only print if RC_VERBOSE is yes.


Generated on Tue Sep 25 16:24:20 2007 for rc by  doxygen 1.5.3