File: subst.h

package info (click to toggle)
wmweather+ 2.15-1.1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 1,100 kB
  • ctags: 579
  • sloc: ansic: 5,822; sh: 1,294; makefile: 42
file content (23 lines) | stat: -rw-r--r-- 663 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#ifndef SUBST_H
#define SUBST_H

struct subst_val {
    char id;         /* if id=='X', %X will be substituted */
    enum {
        INT     ='i', /* val => signed int */
        UINT    ='u', /* val => unsigned int */
        OCTAL   ='o', /* val => unsigned int */
        HEX     ='x', /* val => unsigned int */
        FLOAT_E ='e', /* val => double */
        FLOAT_F ='f', /* val => double */
        FLOAT_G ='g', /* val => double */
        FLOAT_A ='a', /* val => double */
        CHAR    ='c', /* val => char */
        STRING  ='s'  /* val => char * */
    } type;
    void *val;
};

char *subst(const char *s, struct subst_val *substitutes);

#endif