-/* $MirOS: contrib/code/jupp/uedit.c,v 1.15 2017/01/11 22:56:49 tg Exp $ */
+/* $MirOS: contrib/code/jupp/uedit.c,v 1.17 2017/03/19 19:19:51 tg Exp $ */
/*
* Basic user edit functions
* Copyright
#include "types.h"
#include <stdio.h>
+#include <string.h>
#ifdef HAVE_BSD_STRING_H
#include <bsd/string.h>
if (notify)
*notify = 1;
vsrm(s);
- if (num >= 1 && !merr) {
+ if (num >= 1 && !merrf) {
int tmp = mid;
if (num > bw->b->eof->line)
mid = tmp;
return 0;
} else {
- if (merr)
- msgnw(bw->parent, merr);
+ if (merrf)
+ msgnw(bw->parent, merrt);
else
msgnw(bw->parent, US "Invalid line number");
return -1;
if (notify)
*notify = 1;
vsrm(s);
- if (num >= 1 && !merr) {
+ if (num >= 1 && !merrf) {
int tmp = mid;
pcol(bw->cursor, num - 1), bw->cursor->xcol = piscol(bw->cursor);
mid = tmp;
return 0;
} else {
- if (merr)
- msgnw(bw->parent, merr);
+ if (merrf)
+ msgnw(bw->parent, merrt);
else
msgnw(bw->parent, US "Invalid column number");
return -1;
if (notify)
*notify = 1;
vsrm(s);
- if (num >= 0 && !merr) {
+ if (num >= 0 && !merrf) {
int tmp = mid;
pgoto(bw->cursor, num), bw->cursor->xcol = piscol(bw->cursor);
mid = tmp;
return 0;
} else {
- if (merr)
- msgnw(bw->parent, merr);
+ if (merrf)
+ msgnw(bw->parent, merrt);
else
msgnw(bw->parent, US "Invalid byte number");
return -1;