Use this for passing the 'struct stat' for doc:same-file.
Signed-off-by: NeilBrown <neil@brown.name>
ci2.key = "doc:same-file";
ci2.focus = p;
ci2.extra = -1;
- ci2.str2 = (void*)&stb;
+ ci2.misc = &stb;
if (key_handle_focus(&ci2) > 0)
return p;
}
char *str, *str2;
struct mark *mark, *mark2;
struct command *comm, *comm2;
+ void *misc; /* command specific */
};
#define NO_NUMERIC (INT_MAX/2)
#define RPT_NUM(ci) ((ci)->numeric == NO_NUMERIC ? 1 : (ci)->numeric)
{
struct doc *d = ci->home->data;
int fd = ci->extra;
- struct stat *stb = (void*)ci->str2;
+ struct stat *stb = ci->misc;
struct directory *dr = container_of(d, struct directory, doc);
if (!dr->fname)
DEF_CMD(text_same_file)
{
struct doc *d = ci->home->data;
- struct stat *stb = (void*)ci->str2;
+ struct stat *stb = ci->misc;
struct text *t = container_of(d, struct text, doc);
if (t->fname == NULL)