Parse lines from a runtime configuration (rc) file. More...
#include "core/lib.h"
Include dependency graph for rc.h:
This graph shows which files directly or indirectly include this file: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 47 of file rc.c.
Here is the call graph for this function:
Here is the caller graph for this function:| 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 109 of file rc.c.
Here is the call graph for this function:
Here is the caller graph for this function: