gsasl  2.2.0
About: GNU SASL is an implementation of the Simple Authentication and Security Layer (SASL).
  Fossies Dox: gsasl-2.2.0.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

Loading...
Searching...
No Matches
print-errors.c
Go to the documentation of this file.
1/* print-errors.c --- Print error codes.
2 * Copyright (C) 2002-2022 Simon Josefsson
3 *
4 * This file is part of GNU SASL.
5 *
6 * This program is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 *
19 */
20
21#ifdef HAVE_CONFIG_H
22# include "config.h"
23#endif
24
25#include <stdio.h>
26#include <stdarg.h>
27#include <stdlib.h>
28#include <string.h>
29
30#include <gsasl.h>
31
32int
33main (void)
34{
35 const char *errstr;
36 const char *name;
37 size_t i = 0;
38
39 printf ("@c This file is automatically generated. DO NOT EDIT!\n");
40 printf ("@c Instead, edit print-errors.c and re-run.\n");
41
42 do
43 {
45 errstr = gsasl_strerror (i);
46
47 if (name != NULL)
48 printf ("\n@item @code{%s}\n%s\n", name, errstr);
49
50 if (name == NULL && errstr == NULL)
51 return EXIT_FAILURE;
52
53 i++;
54 }
55 while (i < 100);
56
57 return EXIT_SUCCESS;
58}
#define EXIT_SUCCESS
Definition: stdlib.in.h:152
#define EXIT_FAILURE
Definition: stdlib.in.h:157
const char * gsasl_strerror(int err)
Definition: error.c:184
const char * name
Definition: error.c:37
const char * gsasl_strerror_name(int err)
Definition: error.c:222
int main(void)
Definition: print-errors.c:33