NeoMutt  2025-01-09-144-gb44c67
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
objects.h File Reference

Parse the Command Line. More...

#include <stdbool.h>
#include "mutt/lib.h"
+ Include dependency graph for objects.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  CliShared
 Shared Command Line options. More...
 
struct  CliHelp
 Help Mode Command Line options. More...
 
struct  CliInfo
 Info Mode Command Line options. More...
 
struct  CliSend
 Send Mode Command Line options. More...
 
struct  CliTui
 TUI Mode Command Line options. More...
 
struct  CommandLine
 Command Line options. More...
 

Enumerations

enum  HelpMode {
  HM_NONE , HM_SHARED , HM_HELP , HM_INFO ,
  HM_SEND , HM_TUI , HM_ALL
}
 Show detailed help. More...
 

Functions

 ARRAY_HEAD (StringArray, char *)
 
struct CommandLinecommand_line_new (void)
 Create a new CommandLine.
 
void command_line_free (struct CommandLine **ptr)
 Free a CommandLine.
 

Detailed Description

Parse the Command Line.

Authors
  • 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 objects.h.

Enumeration Type Documentation

◆ HelpMode

enum HelpMode

Show detailed help.

Enumerator
HM_NONE 

No extra help.

HM_SHARED 

Help about shared config options.

HM_HELP 

Help about help.

HM_INFO 

Help about info options.

HM_SEND 

Help about sending email options.

HM_TUI 

Help about starting the tui options.

HM_ALL 

Help about all options.

Definition at line 34 of file objects.h.

35{
36 HM_NONE,
37 HM_SHARED,
38 HM_HELP,
39 HM_INFO,
40 HM_SEND,
41 HM_TUI,
42 HM_ALL,
43};
@ HM_SEND
Help about sending email options.
Definition: objects.h:40
@ HM_ALL
Help about all options.
Definition: objects.h:42
@ HM_HELP
Help about help.
Definition: objects.h:38
@ HM_INFO
Help about info options.
Definition: objects.h:39
@ HM_TUI
Help about starting the tui options.
Definition: objects.h:41
@ HM_NONE
No extra help.
Definition: objects.h:36
@ HM_SHARED
Help about shared config options.
Definition: objects.h:37

Function Documentation

◆ ARRAY_HEAD()

ARRAY_HEAD ( StringArray  ,
char *   
)

◆ command_line_new()

struct CommandLine * command_line_new ( void  )

Create a new CommandLine.

Return values
ptrNew CommandLine

Definition at line 105 of file objects.c.

106{
107 return MUTT_MEM_CALLOC(1, struct CommandLine);
108}
#define MUTT_MEM_CALLOC(n, type)
Definition: memory.h:40
Command Line options.
Definition: objects.h:130
+ Here is the caller graph for this function:

◆ command_line_free()

void command_line_free ( struct CommandLine **  ptr)

Free a CommandLine.

Parameters
ptrCommandLine to free

Definition at line 114 of file objects.c.

115{
116 if (!ptr || !*ptr)
117 return;
118
119 struct CommandLine *cl = *ptr;
120
121 // cl->help - nothing to do
123 cli_info_clear(&cl->info);
124 cli_send_clear(&cl->send);
125 cli_tui_clear(&cl->tui);
126
127 FREE(ptr);
128}
#define FREE(x)
Definition: memory.h:55
static void cli_shared_clear(struct CliShared *shared)
Clear a CliShared.
Definition: objects.c:55
static void cli_send_clear(struct CliSend *send)
Clear a CliSend.
Definition: objects.c:79
static void cli_tui_clear(struct CliTui *tui)
Clear a CliTui.
Definition: objects.c:95
static void cli_info_clear(struct CliInfo *info)
Clear a CliInfo.
Definition: objects.c:69
struct CliSend send
Send Mode command line options.
Definition: objects.h:134
struct CliShared shared
Shared command line options.
Definition: objects.h:131
struct CliInfo info
Info Mode command line options.
Definition: objects.h:133
struct CliTui tui
Tui Mode command line options.
Definition: objects.h:135
+ Here is the call graph for this function:
+ Here is the caller graph for this function: