"Fossies" - the Fresh Open Source Software Archive

Member "cook-2.34/cook/cook.h" (25 Sep 2010, 2937 Bytes) of package /linux/misc/old/cook-2.34.tar.gz:


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 "cook.h" see the Fossies "Dox" file reference documentation.

    1 /*
    2  *      cook - file construction tool
    3  *      Copyright (C) 1993-1997, 1999, 2001, 2006-2008 Peter Miller
    4  *
    5  *      This program is free software; you can redistribute it and/or modify
    6  *      it under the terms of the GNU General Public License as published by
    7  *      the Free Software Foundation; either version 3 of the License, or
    8  *      (at your option) any later version.
    9  *
   10  *      This program is distributed in the hope that it will be useful,
   11  *      but WITHOUT ANY WARRANTY; without even the implied warranty of
   12  *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   13  *      GNU General Public License for more details.
   14  *
   15  *      You should have received a copy of the GNU General Public License
   16  *      along with this program. If not, see
   17  *      <http://www.gnu.org/licenses/>.
   18  */
   19 
   20 #ifndef COOK_COOK_H
   21 #define COOK_COOK_H
   22 
   23 #include <common/ac/time.h>
   24 
   25 #include <common/main.h>
   26 
   27 struct opcode_context_ty; /* existence */
   28 struct recipe_ty; /* existence */
   29 struct string_ty; /* existence */
   30 struct string_list_ty; /* existence */
   31 
   32 int cook(struct string_list_ty *);
   33 int cook_pairs(struct string_list_ty *);
   34 int cook_script(struct string_list_ty *);
   35 int cook_web(struct string_list_ty *);
   36 
   37 time_t cook_mtime_oldest(const struct opcode_context_ty *,
   38         struct string_ty *, long *, long);
   39 time_t cook_mtime_newest(const struct opcode_context_ty *,
   40         struct string_ty *, long *, long);
   41 
   42 /**
   43   * The cook_mtime_resolve function is used to determine the actual path
   44   * of a list of files, by examining files in the search path.
   45   *
   46   * @param ocp
   47   *     Pointer to the opcode context.
   48   * @param out
   49   *     Resulting list of strings
   50   * @param in
   51   *     Input list of strings
   52   * @param start
   53   *     element to start from
   54   * @returns
   55   *     0 on success, -1 on failure
   56   */
   57 int cook_mtime_resolve(const struct opcode_context_ty *ocp,
   58         struct string_list_ty *out, const struct string_list_ty *in, int start);
   59 
   60 /**
   61   * The cook_mtime_resolve1 function is used to determine the actual path
   62   * of a file, by examining files in the search path.
   63   *
   64   * @param ocp
   65   *     Pointer to the opcode context.
   66   * @param fn
   67   *     Name of the file file to search for
   68   * @returns
   69   *     pointer to new string on success, NULL on failure
   70   */
   71 struct string_ty *cook_mtime_resolve1(const struct opcode_context_ty *ocp,
   72         struct string_ty *fn);
   73 
   74 void cook_auto(struct string_list_ty *);
   75 int cook_auto_required(void);
   76 void cook_reset(void);
   77 void cook_find_default(struct string_list_ty *);
   78 void cook_search_list(const struct opcode_context_ty *,
   79         struct string_list_ty *slp);
   80 
   81 void cook_explicit_append(struct recipe_ty *);
   82 const struct recipe_list_ty *cook_explicit_by_name(struct string_ty *);
   83 void cook_implicit_append(struct recipe_ty *);
   84 struct recipe_ty *cook_implicit_nth(long);
   85 struct recipe_ty *cook_implicit_nth_by_name(long, struct string_ty *);
   86 
   87 #endif /* COOK_COOK_H */