NeoMutt  2021-02-05-666-ge300cd
Teaching an old dog new tricks
DOXYGEN
enter_state.h File Reference

Struct to store the cursor position when entering text. More...

#include <stddef.h>
#include <wchar.h>
+ Include dependency graph for enter_state.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  EnterState
 Keep our place when entering a string. More...
 

Functions

void mutt_enter_state_free (struct EnterState **ptr)
 Free an EnterState. More...
 
struct EnterStatemutt_enter_state_new (void)
 Create a new EnterState. More...
 

Detailed Description

Struct to store the cursor position when entering text.

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 enter_state.h.

Function Documentation

◆ mutt_enter_state_free()

void mutt_enter_state_free ( struct EnterState **  ptr)

Free an EnterState.

Parameters
[out]ptrEnterState to free

Definition at line 818 of file enter.c.

819 {
820  if (!ptr || !*ptr)
821  return;
822 
823  struct EnterState *es = *ptr;
824 
825  FREE(&es->wbuf);
826  FREE(ptr);
827 }
wchar_t * wbuf
Definition: enter_state.h:34
Keep our place when entering a string.
Definition: enter_state.h:32
#define FREE(x)
Definition: memory.h:40
+ Here is the caller graph for this function:

◆ mutt_enter_state_new()

struct EnterState* mutt_enter_state_new ( void  )

Create a new EnterState.

Return values
ptrNew EnterState

Definition at line 130 of file enter.c.

131 {
132  return mutt_mem_calloc(1, sizeof(struct EnterState));
133 }
void * mutt_mem_calloc(size_t nmemb, size_t size)
Allocate zeroed memory on the heap.
Definition: memory.c:50
Keep our place when entering a string.
Definition: enter_state.h:32
+ Here is the call graph for this function:
+ Here is the caller graph for this function: