~m-grant-prg/libmgec/trunk

« back to all changes in this revision

Viewing changes to src/prg/c/src/libmgec/errors/errno.c

  • Committer: Mark Grant
  • Date: 2019-07-10 08:39:06 UTC
  • mfrom: (1.1.52)
  • Revision ID: m.grant.prg@gmail.com-20190710083906-s85yfmeoikzipcza
Merge new upstream development release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
 *
6
6
 * Definition of mge_errno error descriptions and global error variables.
7
7
 *
8
 
 * @author Copyright (C) 2017-2018  Mark Grant
 
8
 * @author Copyright (C) 2017-2019  Mark Grant
9
9
 *
10
10
 * Released under the GPLv3 only.\n
11
11
 * SPDX-License-Identifier: GPL-3.0
12
12
 *
13
 
 * @version _v1.0.9 ==== 09/09/2018_
 
13
 * @version _v1.0.10 ==== 08/06/2019_
14
14
 */
15
15
 
16
16
/* **********************************************************************
30
30
 *                              declarations.                           *
31
31
 * 09/09/2018   MG      1.0.9   Use ARRAY_SIZE macro from new           *
32
32
 *                              mge-general.h header file.              *
 
33
 * 08/06/2019   MG      1.0.10  clang-format coding style changes.      *
33
34
 *                                                                      *
34
35
 ************************************************************************
35
36
 */
36
37
 
37
 
 
38
38
#include <sys/types.h>
39
39
 
 
40
#include "internal.h"
40
41
#include <mge-errno.h>
41
42
#include <mge-general.h>
42
 
#include "internal.h"
43
 
 
44
43
 
45
44
/* Error variables. */
46
 
int mge_errno;  /**< Error number. */
47
 
int sav_errno;  /**< Used to store errno, gai_errno etc. */
 
45
int mge_errno; /**< Error number. */
 
46
int sav_errno; /**< Used to store errno, gai_errno etc. */
48
47
 
49
48
/**
50
49
 * Global array of mge-errno descriptions.
51
50
 */
52
 
const char *errno_desc[] = {
53
 
                "Success.",
54
 
                "sav_errno contains the errno error.",
55
 
                "sav_errno contains the getaddrinfo error.",
56
 
                "Bind or Connect failed on getaddrinfo data.",
57
 
                "Error in parameters passed.",
58
 
                "Duplicate node found.",
59
 
                "Node not found.",
60
 
                "Invalid config file parameter.",
61
 
                "Cannot parse config file.",
62
 
                "Invalid message received.",
63
 
                "SSH error.",
64
 
                "No such lock.",
65
 
                "Client is blocked."
66
 
                };
 
51
const char *errno_desc[] = { "Success.",
 
52
                             "sav_errno contains the errno error.",
 
53
                             "sav_errno contains the getaddrinfo error.",
 
54
                             "Bind or Connect failed on getaddrinfo data.",
 
55
                             "Error in parameters passed.",
 
56
                             "Duplicate node found.",
 
57
                             "Node not found.",
 
58
                             "Invalid config file parameter.",
 
59
                             "Cannot parse config file.",
 
60
                             "Invalid message received.",
 
61
                             "SSH error.",
 
62
                             "No such lock.",
 
63
                             "Client is blocked." };
67
64
 
68
65
/**
69
66
 * Size of the error description array.
70
67
 */
71
68
const size_t errno_desc_size = ARRAY_SIZE(errno_desc);
 
69