Magellan Linux

Diff of /trunk/mkinitrd-magellan/busybox/libbb/parse_config.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 983 by niro, Fri Apr 24 18:33:46 2009 UTC revision 984 by niro, Sun May 30 11:32:42 2010 UTC
# Line 5  Line 5 
5   * Copyright (C) 2008 by Vladimir Dronnikov <dronnikov@gmail.com>   * Copyright (C) 2008 by Vladimir Dronnikov <dronnikov@gmail.com>
6   *   *
7   * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.   * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
8     * Also for use in uClibc (http://uclibc.org/) licensed under LGPLv2.1 or later.
9   */   */
10    
11  #include "libbb.h"  #include "libbb.h"
# Line 78  parser_t* FAST_FUNC config_open(const ch Line 79  parser_t* FAST_FUNC config_open(const ch
79   return config_open2(filename, fopen_or_warn_stdin);   return config_open2(filename, fopen_or_warn_stdin);
80  }  }
81    
82  static void config_free_data(parser_t *const parser)  static void config_free_data(parser_t *parser)
83  {  {
84   free(parser->line);   free(parser->line);
85   parser->line = NULL;   parser->line = NULL;
# Line 101  void FAST_FUNC config_close(parser_t *pa Line 102  void FAST_FUNC config_close(parser_t *pa
102  0. If parser is NULL return 0.  0. If parser is NULL return 0.
103  1. Read a line from config file. If nothing to read then return 0.  1. Read a line from config file. If nothing to read then return 0.
104     Handle continuation character. Advance lineno for each physical line.     Handle continuation character. Advance lineno for each physical line.
105     Discard everything past comment characher.     Discard everything past comment character.
106  2. if PARSE_TRIM is set (default), remove leading and trailing delimiters.  2. if PARSE_TRIM is set (default), remove leading and trailing delimiters.
107  3. If resulting line is empty goto 1.  3. If resulting line is empty goto 1.
108  4. Look for first delimiter. If !PARSE_COLLAPSE or !PARSE_TRIM is set then  4. Look for first delimiter. If !PARSE_COLLAPSE or !PARSE_TRIM is set then

Legend:
Removed from v.983  
changed lines
  Added in v.984