"Fossies" - the Fresh Open Source Software Archive

Member "dateutils-0.4.6/lib/dt-core-strpf.h" (19 Mar 2019, 2495 Bytes) of package /linux/privat/dateutils-0.4.6.tar.xz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "dt-core-strpf.h" see the Fossies "Dox" file reference documentation and the latest Fossies "Diffs" side-by-side code changes report: 0.4.5_vs_0.4.6.

    1 /*** dt-core-strpf.h -- parser and formatter funs for dt-core
    2  *
    3  * Copyright (C) 2011-2019 Sebastian Freundt
    4  *
    5  * Author:  Sebastian Freundt <freundt@ga-group.nl>
    6  *
    7  * This file is part of dateutils.
    8  *
    9  * Redistribution and use in source and binary forms, with or without
   10  * modification, are permitted provided that the following conditions
   11  * are met:
   12  *
   13  * 1. Redistributions of source code must retain the above copyright
   14  *    notice, this list of conditions and the following disclaimer.
   15  *
   16  * 2. Redistributions in binary form must reproduce the above copyright
   17  *    notice, this list of conditions and the following disclaimer in the
   18  *    documentation and/or other materials provided with the distribution.
   19  *
   20  * 3. Neither the name of the author nor the names of any contributors
   21  *    may be used to endorse or promote products derived from this
   22  *    software without specific prior written permission.
   23  *
   24  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR
   25  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
   26  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   27  * DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
   28  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
   29  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
   30  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
   31  * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
   32  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
   33  * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
   34  * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
   35  *
   36  **/
   37 
   38 #if !defined INCLUDED_dt_core_strpf_h_
   39 #define INCLUDED_dt_core_strpf_h_
   40 
   41 #if defined __cplusplus
   42 extern "C" {
   43 #endif  /* __cplusplus */
   44 
   45 
   46 #if defined INCLUDED_dt_core_h_
   47 /**
   48  * Parse STR with the standard parser, put the end of the parsed string in EP.*/
   49 extern struct dt_dt_s __strpdt_std(const char *str, char **ep);
   50 #endif  /* INCLUDED_dt_core_h_ */
   51 
   52 /* self-explanatory funs, innit? */
   53 extern int
   54 __strpdt_card(struct strpdt_s*, const char *sp, struct dt_spec_s s, char **ep);
   55 
   56 extern size_t
   57 __strfdt_card(
   58     char *buf, size_t bsz, struct dt_spec_s s,
   59     struct strpdt_s *d, struct dt_dt_s that);
   60 
   61 extern size_t
   62 __strfdt_dur(
   63     char *buf, size_t bsz, struct dt_spec_s s,
   64     struct strpdt_s *d, struct dt_dtdur_s that);
   65 
   66 #if defined __cplusplus
   67 }
   68 #endif  /* __cplusplus */
   69 
   70 #endif  /* INCLUDED_dt_core_strpf_h_ */