Search notes:

VIM: sruct source_cookie

The source_cookie struct is used to store info for each sourced file.
It is shared between do_source() and getsourceline().
This is required because it needs to be handed to do_cmdline() and sourcing can be done recursively.
struct source_cookie
{
    FILE        *fp;            // opened file for sourcing
    char_u      *nextline;      // if not NULL: line that was read ahead
    linenr_T    sourcing_lnum;  // line number of the source file
    int         finished;       // ":finish" used
#ifdef USE_CRNL
    int         fileformat;     // EOL_UNKNOWN, EOL_UNIX or EOL_DOS
    int         error;          // TRUE if LF found after CR-LF
#endif
#ifdef FEAT_EVAL
    linenr_T    breakpoint;     // next line with breakpoint or zero
    char_u      *fname;         // name of sourced file
    int         dbg_tick;       // debug_tick when breakpoint was set
    int         level;          // top nesting level of sourced file
#endif
    vimconv_T   conv;           // type of conversion
};

Index