Room Manager 0.1
room reservation management system
roommandef.h File Reference

Library-internal definitions. More...

#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/time.h>
#include <unistd.h>
#include <limits.h>
#include <assert.h>
#include "include/roomman.h"

Go to the source code of this file.

Data Structures

struct  roomman
 Structure of an entry in the database. More...
 

Macros

#define DATAFILE   "roommanfile.dat"
 
#define INTERMEDIATE_FILE   "roommanfile.bak"
 
#define INITIAL_VALUE   (5381)
 
#define M   (33)
 
#define ROOMMAN_CAPACITY   (10) /* Default room capacity */
 
#define debug1(x)   do{if(verbose >= 1){ printf x ;fflush(stdout);}}while(0)
 Debug support macros.
 
#define debug2(x)   do{if(verbose >= 2){ printf x ;fflush(stdout);}}while(0)
 
#define debug3(x)   do{if(verbose >= 3){ printf x ;fflush(stdout);}}while(0)
 
#define debug4(x)   do{if(verbose >= 4){ printf x ;fflush(stdout);}}while(0)
 

Typedefs

typedef struct roomman roomman_t
 Structure of an entry in the database.
 

Variables

char roomman_current_user [ROOMMAN_MAX_NAME+1]
 

Detailed Description

Library-internal definitions.

Copyright (C) 2017 by Arno Nuehm

This software is distributed in the hope that it will be useful, or at least interesting, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

This file contains definitions which are global within the roomman library but are not used (and should not be visible) to users of the library.

Definition in file roommandef.h.

Macro Definition Documentation

◆ DATAFILE

#define DATAFILE   "roommanfile.dat"

Definition at line 36 of file roommandef.h.

◆ debug1

#define debug1 ( x)    do{if(verbose >= 1){ printf x ;fflush(stdout);}}while(0)

Debug support macros.

Output messages if verbose is higher than a given level.

NOTE: Usage debug((<printf-params>)); i.e. use two brackets to enclose the printf parameter list!

Definition at line 75 of file roommandef.h.

◆ debug2

#define debug2 ( x)    do{if(verbose >= 2){ printf x ;fflush(stdout);}}while(0)

Definition at line 76 of file roommandef.h.

◆ debug3

#define debug3 ( x)    do{if(verbose >= 3){ printf x ;fflush(stdout);}}while(0)

Definition at line 77 of file roommandef.h.

◆ debug4

#define debug4 ( x)    do{if(verbose >= 4){ printf x ;fflush(stdout);}}while(0)

Definition at line 78 of file roommandef.h.

◆ INITIAL_VALUE

#define INITIAL_VALUE   (5381)

Definition at line 43 of file roommandef.h.

◆ INTERMEDIATE_FILE

#define INTERMEDIATE_FILE   "roommanfile.bak"

Definition at line 37 of file roommandef.h.

◆ M

#define M   (33)

Definition at line 44 of file roommandef.h.

◆ ROOMMAN_CAPACITY

#define ROOMMAN_CAPACITY   (10) /* Default room capacity */

Definition at line 46 of file roommandef.h.

Typedef Documentation

◆ roomman_t

typedef struct roomman roomman_t

Structure of an entry in the database.

Variable Documentation

◆ roomman_current_user

char roomman_current_user[ROOMMAN_MAX_NAME+1]
extern

The name of the currently configured user.