Gammu internals  1.38.0
gsmcomon.c File Reference
#include <ctype.h>
#include <string.h>
#include <time.h>
#include <stdio.h>
#include "misc/locales.h"
#include "debug.h"
#include <gammu-debug.h>
#include "gsmcomon.h"
Include dependency graph for gsmcomon.c:

Go to the source code of this file.

Data Structures

struct  PrintErrorEntry
 

Functions

GSM_Error NoneFunction (void)
 
GSM_Error NotImplementedFunction (void)
 
GSM_Error NotSupportedFunction (void)
 
void GSM_InitLocales (const char UNUSED *path)
 
const char * GSM_ErrorName (GSM_Error e)
 
const char * GSM_ErrorString (GSM_Error e)
 
const char * GetGammuLocalePath (void)
 
const char * GetGammuVersion (void)
 
GSM_Debug_InfoGSM_GetGlobalDebug ()
 
void GSM_LogError (GSM_StateMachine *s, const char *message, const GSM_Error err)
 

Variables

static PrintErrorEntry PrintErrorEntries []
 

Function Documentation

§ GetGammuLocalePath()

const char* GetGammuLocalePath ( void  )

Returns path to Gammu locales.

Definition at line 200 of file gsmcomon.c.

References LOCALE_PATH.

201 {
202 #ifdef LOCALE_PATH
203  static const char Buffer[] = LOCALE_PATH;
204  return Buffer;
205 #else
206  return NULL;
207 #endif
208 }
#define LOCALE_PATH
Definition: gammu-config.h:377

§ GetGammuVersion()

const char* GetGammuVersion ( void  )

Gets Gammu library version.

Definition at line 210 of file gsmcomon.c.

References GAMMU_VERSION.

211 {
212  static const char Buffer[] = GAMMU_VERSION;
213  return Buffer;
214 }
#define GAMMU_VERSION
Definition: gammu-config.h:7

§ GSM_InitLocales()

void GSM_InitLocales ( const char UNUSED path)

Initializes locales from given path or from system default.

Parameters
pathOptional path to locales, can be NULL.

Definition at line 57 of file gsmcomon.c.

Referenced by NotSupportedFunction().

57  {
58  setlocale(LC_ALL, "");
59 }

§ NoneFunction()

GSM_Error NoneFunction ( void  )

Definition at line 23 of file gsmcomon.c.

References ERR_NONE.

24 {
25  return ERR_NONE;
26 }

§ NotImplementedFunction()

GSM_Error NotImplementedFunction ( void  )

Definition at line 28 of file gsmcomon.c.

References ERR_NOTIMPLEMENTED.

29 {
30  return ERR_NOTIMPLEMENTED;
31 }

§ NotSupportedFunction()

GSM_Error NotSupportedFunction ( void  )

Definition at line 33 of file gsmcomon.c.

References ERR_NOTSUPPORTED, GSM_InitLocales(), and LOCALE_PATH.

34 {
35  return ERR_NOTSUPPORTED;
36 }

Variable Documentation

§ PrintErrorEntries

PrintErrorEntry PrintErrorEntries[]
static

Mapping of error numbers to descriptions.

Definition at line 83 of file gsmcomon.c.