Lines Matching refs:wp

80 EXPORT	void	settmodes	__PR((ewin_t *wp));
81 EXPORT void rsttmodes __PR((ewin_t *wp));
136 ewin_t *wp = &rootwin; local
172 &wp->raw8,
173 &wp->dosmode, &wp->dosmode, &no_dos,
175 &wp->wrapmargin, &wp->wrapmargin,
176 &wp->maxlinelen, &wp->maxlinelen,
205 wp->dosmode = FALSE;
206 if (no_dos || wp->dosmode)
217 if (strchr((char *)errstr, 'w') && wp->maxlinelen == 0)
218 wp->maxlinelen = 78; /* Try to follow RFC-2822 */
225 get_modes(wp); /* Get old ttymodes from tty driver */
236 if ((errstr = t_start(wp)) != NULL)
237 exitcomerr(wp, "%s\r\n", errstr);
238 if (wp->llen <= 0 || wp->psize <= 0) /* Paranoia: check screen size */
239 excomerrno(wp, EX_BAD,
243 excomerrno(wp, EX_BAD,
247 wp->markwrap = TRUE;
248 wp->magic = TRUE;
249 wp->eflags = COLUPDATE|SAVEDEL;
250 wp->number = 1; /* curnum is copied from this mult # master */
251 wp->curnum = 1; /* mult # fot next edit command */
252 wp->tabstop = 8; /* Breite eines 'tabs' */
253 wp->optline = wp->psize/2; /* set standard screen adjustment */
254 wp->curfd = -1; /* Kein File writelock vorhanden */
264 wp->curfile = gethelpfile();
271 openrecoverfile(wp, cav[0]);
272 wp->curfile = getrecoverfile(&pos, &wp->column);
273 errmsgno(EX_BAD, "Recoverfile: %s.\r\n", wp->curfile);
275 excomerrno(wp, EX_BAD,
285 wp->curfile = UC cav[0];
289 if (get_vedtmp(wp, &pos, &wp->column)) {
292 wp->column = 0;
297 put_vedtmp(wp, FALSE);
305 if (get_vedtmp(wp, &pos, &wp->column)) {
308 wp->column = 0;
311 wp->curfile = curfname;
314 if (wp->curfile != 0)
315 *wp->curfile = '\0';
319 if (wp->curfile == curfname && curfname[0] == '\0') {
332 if (wp->curfile == 0 || *wp->curfile == '\0') {
333 excomerrno(wp, EX_BAD,
345 init_charset(wp); /* Initialisierung der char Laengen */
356 initbuffers(wp, buffers);
357 bufdebug(wp);
358 initmessage(wp);
360 defaultinfo(wp, UC "ved-1.8");
364 writemsg(wp, "%d files to edit.", nfiles);
367 switch (gettag(&wp->curfile)) {
370 termbuffers(wp);
371 excomerrno(wp, EX_BAD, "No such Tag.\n");
376 termbuffers(wp);
377 excomerrno(wp, err, "Cannot open 'tags'.\n");
381 strncpy(C curfname, C wp->curfile, sizeof (curfname));
383 wp->curfile = curfname;
389 wp->curftime = gftime(C wp->curfile);
390 if (!loadfile(wp, wp->curfile, TRUE)) {
394 termbuffers(wp);
395 excomerrno(wp, err, "Cannot open '%s'.\n", wp->curfile);
398 if (pos < 0 || pos > wp->eof) {
400 termbuffers(wp);
401 excomerrno(wp, EX_BAD,
405 wp->column = 0;
406 writeerr(wp, "BAD POS IN .vedtmp");
411 wp->dosmode = isdos(wp);
413 if (dotags && (pos = searchtag(wp, (epos_t)0)) > wp->eof)
416 namemsg(wp->curfile);
417 CLEAR_SCREEN(wp);
418 refreshmsg(wp);
420 tmpopen(wp); /* Open several temporary files */
422 settakename(wp, UC "default");
423 if (wp->dosmode)
424 writemsg(wp, "DOS MODE");
425 (void) wrtcheck(wp, FALSE);
426 writelockmsg(wp);
427 writenum(wp, wp->number);
428 macro_init(wp);
434 wp->dot = pos;
435 if (startline > 1 && wp->dot == 0)
436 wp->dot = forwline(wp, wp->dot, (ecnt_t)startline - 1);
438 vagainsrch(wp);
439 newwindow(wp);
441 wp->modflg = 0;
442 newprot(wp);
443 edit(wp);
493 settmodes(wp) in settmodes() argument
494 ewin_t *wp; in settmodes()
496 get_modes(wp);
506 rsttmodes(wp) in rsttmodes() argument
507 ewin_t *wp; in rsttmodes()
509 if (wp == NULL)
510 wp = &rootwin;
513 MOVE_CURSOR(wp, wp->psize, 0);
514 CLEAR_TO_EOF_LINE(wp);