Macros
mark.h File Reference
#include "nvim/macros.h"
#include "nvim/ascii.h"
#include "nvim/buffer_defs.h"
#include "nvim/func_attr.h"
#include "nvim/mark_defs.h"
#include "nvim/memory.h"
#include "nvim/pos.h"
#include "nvim/os/time.h"
#include "nvim/ex_cmds_defs.h"

Go to the source code of this file.

Macros

#define SET_FMARK(fmarkp_, mark_, fnum_)
 Set fmark using given value. More...
 
#define RESET_FMARK(fmarkp_, mark_, fnum_)
 Free and set fmark using given value. More...
 
#define CLEAR_FMARK(fmarkp_)   RESET_FMARK(fmarkp_, ((pos_T) { 0, 0, 0 }), 0)
 Clear given fmark. More...
 
#define SET_XFMARK(xfmarkp_, mark_, fnum_, fname_)
 Set given extended mark (regular mark + file name) More...
 
#define RESET_XFMARK(xfmarkp_, mark_, fnum_, fname_)
 Free and set given extended mark (regular mark + file name) More...
 

Macro Definition Documentation

#define CLEAR_FMARK (   fmarkp_)    RESET_FMARK(fmarkp_, ((pos_T) { 0, 0, 0 }), 0)

Clear given fmark.

#define RESET_FMARK (   fmarkp_,
  mark_,
  fnum_ 
)
Value:
do { \
fmark_T *const fmarkp___ = fmarkp_; \
free_fmark(*fmarkp___); \
SET_FMARK(fmarkp___, mark_, fnum_); \
} while (0)
#define SET_FMARK(fmarkp_, mark_, fnum_)
Set fmark using given value.
Definition: mark.h:15
struct filemark fmark_T
Structure defining single local mark.
void free_fmark(fmark_T fm)
Free fmark_T item.
Definition: mark.c:66

Free and set fmark using given value.

#define RESET_XFMARK (   xfmarkp_,
  mark_,
  fnum_,
  fname_ 
)
Value:
do { \
xfmark_T *const xfmarkp__ = xfmarkp_; \
free_xfmark(*xfmarkp__); \
xfmarkp__->fname = fname_; \
SET_FMARK(&(xfmarkp__->fmark), mark_, fnum_); \
} while (0)
#define SET_FMARK(fmarkp_, mark_, fnum_)
Set fmark using given value.
Definition: mark.h:15
struct xfilemark xfmark_T
Structure defining extended mark (mark with file name attached)
void free_xfmark(xfmark_T fm)
Free xfmark_T item.
Definition: mark.c:72

Free and set given extended mark (regular mark + file name)

#define SET_FMARK (   fmarkp_,
  mark_,
  fnum_ 
)
Value:
do { \
fmark_T *const fmarkp__ = fmarkp_; \
fmarkp__->mark = mark_; \
fmarkp__->fnum = fnum_; \
fmarkp__->timestamp = os_time(); \
fmarkp__->additional_data = NULL; \
} while (0)
pos_T mark
Cursor position.
Definition: mark_defs.h:36
return NULL
Definition: eval.c:22212
struct filemark fmark_T
Structure defining single local mark.
Timestamp os_time(void)
Definition: time.c:131

Set fmark using given value.

#define SET_XFMARK (   xfmarkp_,
  mark_,
  fnum_,
  fname_ 
)
Value:
do { \
xfmark_T *const xfmarkp__ = xfmarkp_; \
xfmarkp__->fname = fname_; \
SET_FMARK(&(xfmarkp__->fmark), mark_, fnum_); \
} while (0)
#define SET_FMARK(fmarkp_, mark_, fnum_)
Set fmark using given value.
Definition: mark.h:15
struct xfilemark xfmark_T
Structure defining extended mark (mark with file name attached)
char_u * fname
File name, used when fnum == 0.
Definition: mark_defs.h:45

Set given extended mark (regular mark + file name)