Code indentation in src/consaver directory
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Этот коммит содержится в:
родитель
1ff8b77f92
Коммит
61345bd8e2
@ -63,6 +63,17 @@
|
||||
#define LINUX_CONS_SAVER_C
|
||||
#include "cons.saver.h"
|
||||
|
||||
/*** global variables ****************************************************************************/
|
||||
|
||||
/*** file scope macro definitions ****************************************************************/
|
||||
|
||||
/*** file scope type declarations ****************************************************************/
|
||||
|
||||
/*** file scope variables ************************************************************************/
|
||||
|
||||
/*** file scope functions ************************************************************************/
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
||||
static void
|
||||
send_contents (char *buffer, unsigned int columns, unsigned int rows)
|
||||
{
|
||||
@ -118,6 +129,8 @@ send_contents (char *buffer, unsigned int columns, unsigned int rows)
|
||||
return;
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
||||
static void __attribute__ ((noreturn)) die (void)
|
||||
{
|
||||
unsigned char zero = 0;
|
||||
@ -126,6 +139,10 @@ static void __attribute__ ((noreturn)) die (void)
|
||||
exit (3);
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
/*** public functions ****************************************************************************/
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
@ -248,3 +265,5 @@ main (int argc, char **argv)
|
||||
|
||||
exit (0);
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/** \file cons.saver.h
|
||||
* \brief Header: general purpose Linux console screen save/restore server
|
||||
*
|
||||
@ -10,10 +9,15 @@
|
||||
* root is even worse.
|
||||
*/
|
||||
|
||||
#ifndef MC_CONS_SAVER_H
|
||||
#define MC_CONS_SAVER_H
|
||||
#ifndef MC__CONS_SAVER_H
|
||||
#define MC__CONS_SAVER_H
|
||||
|
||||
enum {
|
||||
/*** typedefs(not structures) and defined constants **********************************************/
|
||||
|
||||
/*** enums ***************************************************************************************/
|
||||
|
||||
enum
|
||||
{
|
||||
CONSOLE_INIT = '1',
|
||||
CONSOLE_DONE,
|
||||
CONSOLE_SAVE,
|
||||
@ -21,15 +25,23 @@ enum {
|
||||
CONSOLE_CONTENTS
|
||||
};
|
||||
|
||||
/*** structures declarations (and typedefs of structures)*****************************************/
|
||||
|
||||
/*** global variables defined in .c file *********************************************************/
|
||||
|
||||
#ifndef LINUX_CONS_SAVER_C
|
||||
/* Used only in mc, not in cons.saver */
|
||||
|
||||
extern signed char console_flag;
|
||||
|
||||
void show_console_contents (int starty, unsigned char begin_line, unsigned char end_line);
|
||||
void handle_console (unsigned char action);
|
||||
|
||||
extern int cons_saver_pid;
|
||||
#endif /* !LINUX_CONS_SAVER_C */
|
||||
|
||||
#endif
|
||||
/*** declarations of public functions ************************************************************/
|
||||
|
||||
#ifndef LINUX_CONS_SAVER_C
|
||||
/* Used only in mc, not in cons.saver */
|
||||
void show_console_contents (int starty, unsigned char begin_line, unsigned char end_line);
|
||||
void handle_console (unsigned char action);
|
||||
#endif /* !LINUX_CONS_SAVER_C */
|
||||
|
||||
/*** inline functions ****************************************************************************/
|
||||
#endif /* MC__CONS_SAVER_H */
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user