forked from CESNET/libyang
-
Notifications
You must be signed in to change notification settings - Fork 0
/
commands.h
46 lines (36 loc) · 1.04 KB
/
commands.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/**
* @file main.c
* @author Michal Vasko <mvasko@cesnet.cz>
* @brief libyang's yanglint tool commands header
*
* Copyright (c) 2015 CESNET, z.s.p.o.
*
* This source code is licensed under BSD 3-Clause License (the "License").
* You may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://opensource.org/licenses/BSD-3-Clause
*/
#ifndef COMMANDS_H_
#define COMMANDS_H_
#ifdef __GNUC__
# define UNUSED(x) UNUSED_ ## x __attribute__((__unused__))
#else
# define UNUSED(x) UNUSED_ ## x
#endif
#include <stdlib.h>
#include "libyang.h"
#define PROMPT "> "
struct model_hint {
char* hint;
struct model_hint* next;
};
typedef struct {
char *name; /* User printable name of the function. */
int (*func)(const char*); /* Function to call to do the command. */
void (*help_func)(void); /* Display command help. */
char *helpstring; /* Documentation for this function. */
} COMMAND;
LYS_INFORMAT get_schema_format(const char *path);
extern COMMAND commands[];
#endif /* COMMANDS_H_ */