mirror of
https://github.com/kakwa/uts-server
synced 2025-07-04 20:47:09 +02:00
reformat source code
This commit is contained in:
parent
a0d5a683bb
commit
8fc0360824
6 changed files with 343 additions and 362 deletions
10
inc/config.h
10
inc/config.h
|
@ -1,13 +1,13 @@
|
|||
typedef struct uts_config {
|
||||
char * port;
|
||||
char * listen;
|
||||
char *port;
|
||||
char *listen;
|
||||
bool https;
|
||||
cert https_cert;
|
||||
void * ts_certs;
|
||||
void *ts_certs;
|
||||
|
||||
} uts_config;
|
||||
|
||||
typedef struct cert {
|
||||
char * cert_file;
|
||||
char * key_file;
|
||||
char *cert_file;
|
||||
char *key_file;
|
||||
} cert;
|
||||
|
|
14
inc/ini.h
14
inc/ini.h
|
@ -18,11 +18,11 @@ extern "C" {
|
|||
#include <stdio.h>
|
||||
|
||||
/* Typedef for prototype of handler function. */
|
||||
typedef int (*ini_handler)(void* user, const char* section,
|
||||
const char* name, const char* value);
|
||||
typedef int (*ini_handler)(void *user, const char *section, const char *name,
|
||||
const char *value);
|
||||
|
||||
/* Typedef for prototype of fgets-style reader function. */
|
||||
typedef char* (*ini_reader)(char* str, int num, void* stream);
|
||||
typedef char *(*ini_reader)(char *str, int num, void *stream);
|
||||
|
||||
/* Parse given INI-style file. May have [section]s, name=value pairs
|
||||
(whitespace stripped), and comments starting with ';' (semicolon). Section
|
||||
|
@ -37,16 +37,16 @@ typedef char* (*ini_reader)(char* str, int num, void* stream);
|
|||
stop on first error), -1 on file open error, or -2 on memory allocation
|
||||
error (only when INI_USE_STACK is zero).
|
||||
*/
|
||||
int ini_parse(const char* filename, ini_handler handler, void* user);
|
||||
int ini_parse(const char *filename, ini_handler handler, void *user);
|
||||
|
||||
/* Same as ini_parse(), but takes a FILE* instead of filename. This doesn't
|
||||
close the file when it's finished -- the caller must do that. */
|
||||
int ini_parse_file(FILE* file, ini_handler handler, void* user);
|
||||
int ini_parse_file(FILE *file, ini_handler handler, void *user);
|
||||
|
||||
/* Same as ini_parse(), but takes an ini_reader function pointer instead of
|
||||
filename. Used for implementing custom or string-based I/O. */
|
||||
int ini_parse_stream(ini_reader reader, void* stream, ini_handler handler,
|
||||
void* user);
|
||||
int ini_parse_stream(ini_reader reader, void *stream, ini_handler handler,
|
||||
void *user);
|
||||
|
||||
/* Nonzero to allow multi-line value parsing, in the style of Python's
|
||||
configparser. If allowed, ini_parse() will call the handler with the same
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue