NeoMutt  2024-11-14-34-g5aaf0d
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
config.c File Reference

Config used by libpager. More...

#include "config.h"
#include <stdbool.h>
#include <stddef.h>
#include "mutt/lib.h"
#include "config/lib.h"
#include "expando/lib.h"
+ Include dependency graph for config.c:

Go to the source code of this file.

Functions

const char * pager_get_pager (struct ConfigSubset *sub)
 Get the value of $pager.
 
bool config_init_pager (struct ConfigSet *cs)
 Register pager config variables - Implements module_init_config_t -.
 

Variables

const struct ExpandoDefinition IndexFormatDef []
 Expando definitions.
 
static struct ConfigDef PagerVars []
 Config definitions for the Pager.
 

Detailed Description

Config used by libpager.

Authors
  • Ihor Antonov
  • Richard Russon
  • наб

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 config.c.

Function Documentation

◆ pager_get_pager()

const char * pager_get_pager ( struct ConfigSubset sub)

Get the value of $pager.

Parameters
subConfig Subset
Return values
strExternal command to use
NULLThe internal pager will be used
Note
If $pager has the magic value of "builtin", NULL will be returned

Definition at line 108 of file config.c.

109{
110 const char *c_pager = cs_subset_string(sub, "pager");
111 if (!c_pager || mutt_str_equal(c_pager, "builtin"))
112 return NULL;
113
114 return c_pager;
115}
const char * cs_subset_string(const struct ConfigSubset *sub, const char *name)
Get a string config item by name.
Definition: helpers.c:291
bool mutt_str_equal(const char *a, const char *b)
Compare two strings.
Definition: string.c:660
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ IndexFormatDef

const struct ExpandoDefinition IndexFormatDef[]
extern

Expando definitions.

Config:

  • $attribution_intro
  • $attribution_trailer
  • $forward_attribution_intro
  • $forward_attribution_trailer
  • $forward_format
  • $index_format
  • $message_format
  • $pager_format
Note
Longer Expandos must precede any similar, but shorter Expandos

Definition at line 313 of file mutt_config.c.

◆ PagerVars

struct ConfigDef PagerVars[]
static

Config definitions for the Pager.

Definition at line 43 of file config.c.