Skip to content
Snippets Groups Projects
Select Git revision
  • c074cad497442bfcc78f83b65311a3db03e3c538
  • main default protected
  • cont-frb/moberg-review
  • v0.9.26
  • v0.9.25
  • v0.9.24
  • v0.9.23
  • v0.9.22
  • v0.9.21
  • v0.9.20
  • v0.9.19
  • v0.9.18
  • v0.9.17
  • v0.9.16
  • v0.9.15
  • v0.9.14
  • v0.9.13
  • v0.9.12
  • v0.9.11
  • v0.9.10
  • v0.9.9
  • v0.9.8
  • v0.9.7
23 results

getProperty_os_arch

Blame
  • moberg_inline.h 1.65 KiB
    /*
        moberg_inline.h -- useful short names for moberg implementation
    
        Copyright (C) 2019 Anders Blomdell <anders.blomdell@gmail.com>
    
        This file is part of Moberg.
    
        Moberg is free software: you can redistribute it and/or modify
        it under the terms of the GNU General Public License as published by
        the Free Software Foundation, either version 3 of the License, or
        (at your option) any later version.
    
        This program is distributed in the hope that it will be useful,
        but WITHOUT ANY WARRANTY; without even the implied warranty of
        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
        GNU General Public License for more details.
    
        You should have received a copy of the GNU General Public License
        along with this program.  If not, see <https://www.gnu.org/licenses/>.
    */
        
    #ifndef __MOBERG_INLINE_H__
    #define __MOBERG_INLINE_H__
    
    #include <moberg.h>
    #include <moberg_module.h>
    
    /* Error handling */
    
    #define MOBERG_OK (struct moberg_status){ .result=0 }
    #define MOBERG_ERRNO(errno) (struct moberg_status){ .result=errno }
    
    static int inline OK(struct moberg_status status)
    {
      return moberg_OK(status);
    }
    
    /* Config file parsing */
    
    typedef enum moberg_parser_token_kind kind_t;
    typedef struct moberg_parser_token token_t;
    typedef struct moberg_parser_ident ident_t;
    typedef struct moberg_parser_context context_t;
    
    static inline int acceptsym(context_t *c,
                                kind_t kind,
                                token_t *token)
    {
      return moberg_parser_acceptsym(c, kind, token);
    }
      
    static inline int acceptkeyword(context_t *c,
    				const char *keyword)
    {
      return moberg_parser_acceptkeyword(c, keyword);
    }
    
    #endif