Parse lines from a runtime configuration (rc) file. More...
#include "core/lib.h"
Go to the source code of this file.
Functions | |
enum CommandResult | parse_rc_buffer (struct Buffer *line, struct Buffer *token, struct Buffer *err) |
Parse a line of user config. | |
enum CommandResult | parse_rc_line (const char *line, struct Buffer *err) |
Parse a line of user config. | |
Parse lines from a runtime configuration (rc) file.
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 http://www.gnu.org/licenses/.
Definition in file rc.h.
enum CommandResult parse_rc_buffer | ( | struct Buffer * | line, |
struct Buffer * | token, | ||
struct Buffer * | err | ||
) |
Parse a line of user config.
line | config line to read |
token | scratch buffer to be used by parser |
err | where to write error messages |
CommandResult | Result e.g. MUTT_CMD_SUCCESS |
The reason for token
is to avoid having to allocate and deallocate a lot of memory if we are parsing many lines. the caller can pass in the memory to use, which avoids having to create new space for every call to this function.
Definition at line 46 of file rc.c.
enum CommandResult parse_rc_line | ( | const char * | line, |
struct Buffer * | err | ||
) |
Parse a line of user config.
line | Config line to read |
err | Where to write error messages |
CommandResult | Result e.g. MUTT_CMD_SUCCESS |
Definition at line 104 of file rc.c.