=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mg/Attic/random.c,v retrieving revision 1.31 retrieving revision 1.32 diff -u -r1.31 -r1.32 --- src/usr.bin/mg/Attic/random.c 2012/05/18 02:13:44 1.31 +++ src/usr.bin/mg/Attic/random.c 2013/03/25 11:41:44 1.32 @@ -1,4 +1,4 @@ -/* $OpenBSD: random.c,v 1.31 2012/05/18 02:13:44 lum Exp $ */ +/* $OpenBSD: random.c,v 1.32 2013/03/25 11:41:44 florian Exp $ */ /* This file is in the public domain. */ @@ -68,12 +68,12 @@ /* NOSTRICT */ ratio = nchar ? (100L * cchar) / nchar : 100; ewprintf("Char: %c (0%o) point=%ld(%d%%) line=%d row=%d col=%d", - cbyte, cbyte, cchar, ratio, cline, row, getcolpos()); + cbyte, cbyte, cchar, ratio, cline, row, getcolpos(curwp)); return (TRUE); } int -getcolpos(void) +getcolpos(struct mgwin *wp) { int col, i, c; char tmp[5]; @@ -81,11 +81,11 @@ /* determine column */ col = 0; - for (i = 0; i < curwp->w_doto; ++i) { - c = lgetc(curwp->w_dotp, i); + for (i = 0; i < wp->w_doto; ++i) { + c = lgetc(wp->w_dotp, i); if (c == '\t' #ifdef NOTAB - && !(curbp->b_flag & BFNOTAB) + && !(wp->w_bufp->b_flag & BFNOTAB) #endif /* NOTAB */ ) { col |= 0x07;