| /openbsd-src/games/snake/ |
| H A D | snake.c | 61 int col, line; member 64 #define same(s1, s2) ((s1)->line == (s2)->line && (s1)->col == (s2)->col) 77 #define pchar(point, c) mvaddch((point)->line + 1, (point)->col + 1, (c)) 257 move(you.line + 1, you.col + 1); in mainloop() 299 repeat = you.col; in mainloop() 304 repeat = you.col - money.col; in mainloop() 317 repeat = ccnt - 1 - you.col; in mainloop() 322 repeat = money.col - you.col; in mainloop() 344 if (you.col > 0) { in mainloop() 347 you.col--; in mainloop() [all …]
|
| /openbsd-src/usr.bin/mandoc/ |
| H A D | out.c | 121 struct roffcol *col; in tblcalc() 150 icol = dp->layout->col; in tblcalc() 153 col = tbl->cols + icol; in tblcalc() 154 col->flags |= dp->layout->flags; in tblcalc() 159 if (col->width < dp->layout->width) in tblcalc() 160 col->width = dp->layout->width; in tblcalc() 162 (col->spacing == SIZE_MAX || in tblcalc() 163 col->spacing < dp->layout->spacing)) in tblcalc() 164 col->spacing = dp->layout->spacing; in tblcalc() 172 dp->hspans == 0 ? col in tblcalc() 122 struct roffcol *col; tblcalc() local 418 tblcalc_data(struct rofftbl * tbl,struct roffcol * col,const struct tbl_opts * opts,const struct tbl_dat * dp,size_t mw) tblcalc_data() argument 447 tblcalc_literal(struct rofftbl * tbl,struct roffcol * col,const struct tbl_dat * dp,size_t mw) tblcalc_literal() argument 484 tblcalc_number(struct rofftbl * tbl,struct roffcol * col,const struct tbl_opts * opts,const struct tbl_dat * dp) tblcalc_number() argument [all...] |
| H A D | term.c | 113 p->tcol->col = 0; in term_flushln() 171 for (ic = p->tcol->col; ic < p->tcol->lastcol; ic++) { in term_flushln() 199 while (p->tcol->col < p->tcol->lastcol && in term_flushln() 200 p->tcol->buf[p->tcol->col] == ' ') in term_flushln() 201 p->tcol->col++; in term_flushln() 229 p->col = p->tcol->col = p->tcol->lastcol = 0; in term_flushln() 270 for (ic = p->tcol->col; ic < p->tcol->lastcol; ic++) { in term_fill() 374 for (ic = p->tcol->col; ic < nbr; ic++) { in term_field() 431 p->tcol->col = nbr; in term_field() 664 uc = -p->col; in term_word() [all …]
|
| H A D | tbl_term.c | 290 tp->col = 0; in term_tbl() 428 if (tp->tcol->col < tp->tcol->lastcol) in term_tbl() 430 if (tp->tcol->col < tp->tcol->lastcol) in term_tbl() 497 sp->layout->last->col + 1 == sp->opts->cols) in term_tbl() 501 sp->next->layout->last->col + 1 == sp->opts->cols) in term_tbl() 505 sp->prev->layout->last->col + 1 == sp->opts->cols && in term_tbl() 512 sp->last->layout->col + 1 == sp->opts->cols) || in term_tbl() 514 sp->layout->last->col + 1 == sp->opts->cols) ? 2 : in term_tbl() 518 sp->last->layout->col + 1 == sp->opts->cols) || in term_tbl() 520 sp->layout->last->col + 1 == sp->opts->cols) ? 1 : 0; in term_tbl() [all …]
|
| /openbsd-src/usr.bin/ul/ |
| H A D | ul.c | 73 int col, maxcol; variable 169 col = 1; in mfilter() 171 while (col < MAXBUF) { in mfilter() 195 else if (col > 1) in mfilter() 196 if (obuf[--col].c_width > 1) in mfilter() 197 skip_bs = obuf[col].c_width - 1; in mfilter() 202 wt = (obuf[col - 1].c_pos + 8) & ~7; in mfilter() 205 while ((w = obuf[col].c_pos) > 0 && w <= wt) in mfilter() 206 col++; in mfilter() 210 w = obuf[col - 1].c_pos; in mfilter() [all …]
|
| /openbsd-src/usr.bin/vis/ |
| H A D | foldit.c | 35 int foldit(char *chunk, int col, int max); 38 foldit(char *chunk, int col, int max) in foldit() argument 41 int first = (col != 0); in foldit() 53 col = 0; in foldit() 56 col = (col + 8) & ~07; in foldit() 59 col = col ? col - 1 : 0; in foldit() 62 col++; in foldit() 64 if (col > (max - 2)) { in foldit() 66 return (col); in foldit() 68 col = 0; in foldit() [all …]
|
| /openbsd-src/usr.bin/column/ |
| H A D | column.c | 156 int col, numcols; in c_columnate() local 162 for (col = 0, row = table;; ++row) { in c_columnate() 166 if (++col == numcols) { in c_columnate() 167 col = 0; in c_columnate() 180 int base, col, numcols, numrows, row; in r_columnate() local 190 for (col = 0; col < numcols; ++col, base += numrows) { in r_columnate() 215 int col; in maketbl() local 218 for (col = 0; (*row)[col + 1].content != NULL; ++col) in maketbl() 219 printf("%s%*s ", (*row)[col].content, in maketbl() 220 maxwidths[col] - (*row)[col].width, ""); in maketbl() [all …]
|
| /openbsd-src/usr.bin/vi/ex/ |
| H A D | ex_print.c | 91 size_t col, len; in ex_print() local 97 col = 0; in ex_print() 110 if (ex_prchars(sp, p, &col, 8, 0, 0)) in ex_print() 124 else if (ex_ldisplay(sp, p, len, col, flags)) in ex_print() 140 ex_ldisplay(SCR *sp, const char *p, size_t len, size_t col, u_int flags) in ex_ldisplay() argument 142 if (len > 0 && ex_prchars(sp, p, &col, len, LF_ISSET(E_C_LIST), 0)) in ex_ldisplay() 146 if (ex_prchars(sp, p, &col, 1, LF_ISSET(E_C_LIST), 0)) in ex_ldisplay() 164 size_t col, len; in ex_scprint() local 166 col = 0; in ex_scprint() 169 if (ex_prchars(sp, p, &col, 8, 0, 0)) in ex_scprint() [all …]
|
| /openbsd-src/games/hunt/hunt/ |
| H A D | otto.c | 122 static int row, col; variable 152 row = y; col = x; in otto() 153 been_there[row][col] |= 1 << facing; in otto() 272 if (been_there[row - 1][col] & NORTH) in ottolook() 275 for (c = col - 1; c < col + 2; c++) { in ottolook() 277 if (stop_look(itemp, ch, row - r, c - col)) in ottolook() 279 if (c == col && !been_there[r][c]) in ottolook() 286 been_there[r][col] |= NORTH; in ottolook() 288 been_there[r][col] = ALLDIRS; in ottolook() 293 if (been_there[row + 1][col] & SOUTH) in ottolook() [all …]
|
| /openbsd-src/sys/dev/rasops/ |
| H A D | rasops4.c | 46 int rasops4_putchar(void *, int, int col, u_int, uint32_t); 48 int rasops4_putchar8(void *, int, int col, u_int, uint32_t); 49 int rasops4_putchar12(void *, int, int col, u_int, uint32_t); 50 int rasops4_putchar16(void *, int, int col, u_int, uint32_t); 99 rasops4_putchar(void *cookie, int row, int col, u_int uc, uint32_t attr) in rasops4_putchar() argument 113 if ((unsigned)col >= (unsigned)ri->ri_cols) in rasops4_putchar() 119 col *= width; in rasops4_putchar() 120 rp = (int32_t *)(ri->ri_bits + row * ri->ri_yscale + ((col >> 3) & ~3)); in rasops4_putchar() 121 col = col & 31; in rasops4_putchar() 139 if ((col + width) <= 32) { in rasops4_putchar() [all …]
|
| H A D | rasops1.c | 46 int rasops1_putchar(void *, int, int col, u_int, uint32_t); 48 int rasops1_putchar8(void *, int, int col, u_int, uint32_t); 49 int rasops1_putchar16(void *, int, int col, u_int, uint32_t); 85 rasops1_putchar(void *cookie, int row, int col, u_int uc, uint32_t attr) in rasops1_putchar() argument 100 if ((unsigned)col >= (unsigned)ri->ri_cols) in rasops1_putchar() 104 col *= ri->ri_font->fontwidth; in rasops1_putchar() 105 rp = (int32_t *)(ri->ri_bits + row * ri->ri_yscale + ((col >> 3) & ~3)); in rasops1_putchar() 108 col = col & 31; in rasops1_putchar() 126 if ((col + width) <= 32) { in rasops1_putchar() 127 rmask = rasops_pmask[col][width]; in rasops1_putchar() [all …]
|
| H A D | rasops_bitops.h | 40 NAME(erasecols)(void *cookie, int row, int col, int num, uint32_t attr) in NAME() 53 if (col < 0) { in NAME() 54 num += col; in NAME() 55 col = 0; in NAME() 58 if ((col + num) > ri->ri_cols) in NAME() 59 num = ri->ri_cols - col; in NAME() 64 col *= ri->ri_font->fontwidth << PIXEL_SHIFT; in NAME() 68 rp = (int32_t *)(ri->ri_bits + row*ri->ri_yscale + ((col >> 3) & ~3)); in NAME() 70 if ((col & 31) + num <= 32) { in NAME() 71 lmask = ~rasops_pmask[col & 31][num]; in NAME() [all …]
|
| H A D | rasops.c | 740 rasops_cursor(void *cookie, int on, int row, int col) in rasops_cursor() argument 763 else if (col < 0 || col >= ri->ri_cols) in rasops_cursor() 767 ri->ri_ccol = col; in rasops_cursor() 959 int full1, height, cnt, slop1, slop2, row, col; in rasops_do_cursor() local 966 col = ri->ri_rows - ri->ri_crow - 1; in rasops_do_cursor() 970 col = ri->ri_crow; in rasops_do_cursor() 975 col = ri->ri_ccol; in rasops_do_cursor() 978 rp = ri->ri_bits + row * ri->ri_yscale + col * ri->ri_xscale; in rasops_do_cursor() 1033 rasops_erasecols(void *cookie, int row, int col, int num, uint32_t attr) in rasops_erasecols() argument 1045 if (col < 0) { in rasops_erasecols() [all …]
|
| /openbsd-src/usr.bin/mg/ |
| H A D | paragraph.c | 36 int col, nospace; in gotobop() local 46 col = 0; in gotobop() 48 while (col < llength(curwp->w_dotp) && in gotobop() 49 (isspace(lgetc(curwp->w_dotp, col)))) in gotobop() 50 col++; in gotobop() 52 if (col >= llength(curwp->w_dotp)) { in gotobop() 82 int col, nospace, j = 0; in do_gotoeop() local 93 col = 0; in do_gotoeop() 96 while (col < llength(curwp->w_dotp) && in do_gotoeop() 97 (isspace(lgetc(curwp->w_dotp, col)))) in do_gotoeop() [all …]
|
| H A D | util.c | 26 ntabstop(int col, int tabw) in ntabstop() argument 28 return (((col + tabw) / tabw) * tabw); in ntabstop() 107 int col, i, c; in getcolpos() local 111 col = 0; in getcolpos() 116 col = ntabstop(col, wp->w_bufp->b_tabw); in getcolpos() 118 col += 2; in getcolpos() 120 col++; in getcolpos() 122 col += snprintf(tmp, sizeof(tmp), "\\%o", c); in getcolpos() 126 return (col); in getcolpos() 277 int col, s; in delwhite() local [all …]
|
| /openbsd-src/usr.sbin/lpr/filters/ |
| H A D | lpf.c | 68 int i, col; in main() local 112 col = indent; in main() 131 if (--col < indent) in main() 132 col = indent; in main() 136 col = indent; in main() 140 col = ((col - indent) | 07) + indent + 1; in main() 159 if (col >= width || (!literal && ch < ' ')) { in main() 160 col++; in main() 163 cp = &buf[0][col]; in main() 169 if (col > maxcol[i]) in main() [all …]
|
| /openbsd-src/sys/arch/luna88k/stand/boot/ |
| H A D | bmd.c | 210 int col; in bmd_escape_0() local 211 for (col = bq->bl_col; col < bp->bc_xmax; col++) in bmd_escape_0() 214 col, bp->bc_row); in bmd_escape_0() 243 int col = 0, row = 0; in bmd_escape_1() local 259 col = (col * 10) + (*p - 0x30); in bmd_escape_1() 261 bq->bl_col = col + bp->bc_xmin; in bmd_escape_1() 466 bmd_draw_char(char *raddr, char *waddr, int col, int row, int c) in bmd_draw_char() argument 474 switch (col % 4) { in bmd_draw_char() 477 p = (u_short *) ( raddr + (( row * FB_HEIGHT ) << 8 ) + (( col / 4 ) * 6 )); in bmd_draw_char() 478 q = (u_short *) ( waddr + (( row * FB_HEIGHT ) << 8 ) + (( col / 4 ) * 6 )); in bmd_draw_char() [all …]
|
| /openbsd-src/usr.bin/less/ |
| H A D | output.c | 187 int col; in less_printf() local 189 col = 0; in less_printf() 193 col++; in less_printf() 202 col++; in less_printf() 206 col += iprint_int(parg->p_int); in less_printf() 210 col += iprint_linenum(parg->p_linenum); in less_printf() 216 return (col); in less_printf() 241 int col = 0; in error() local 252 col += so_s_width; in error() 255 col += less_printf(fmt, parg); in error() [all …]
|
| /openbsd-src/lib/libcurses/base/ |
| H A D | lib_vline.c | 60 int col = win->_curx; in NCURSES_EXPORT() local 75 if (col > 0 && isWidecExt(line->text[col])) { in NCURSES_EXPORT() 76 SetChar2(line->text[col - 1], ' '); in NCURSES_EXPORT() 78 if (col < win->_maxx && isWidecExt(line->text[col + 1])) { in NCURSES_EXPORT() 79 SetChar2(line->text[col + 1], ' '); in NCURSES_EXPORT() 82 line->text[col] = wch; in NCURSES_EXPORT() 83 CHANGED_CELL(line, col); in NCURSES_EXPORT()
|
| H A D | wresize.c | 112 int col, row, size_x, size_y; in wresize() local 180 for (col = 0; col <= ToCols; ++col) { in wresize() 181 bool valid = (col <= size_x); in wresize() 183 if (col == ToCols in wresize() 184 && col < size_x in wresize() 185 && isWidecBase(win->_line[row].text[col])) { in wresize() 189 s[col] = (valid in wresize() 190 ? win->_line[row].text[col] in wresize() 200 for (col = 0; col <= ToCols; ++col) in wresize() 201 s[col] = win->_nc_bkgd; in wresize()
|
| /openbsd-src/games/bcd/ |
| H A D | bcd.c | 252 int col, i; in decode() local 278 for (col = 0; col < columns; col++) { in decode() 281 if (lines[i][col] == ']') in decode() 283 buf[col] = ' '; in decode() 286 buf[col] = i; in decode() 290 buf[col] = 0; in decode() 291 for (col = columns - 1; col >= 0; col--) { in decode() 292 if (buf[col] == ' ') in decode() 293 buf[col] = '\0'; in decode()
|
| /openbsd-src/games/boggle/boggle/ |
| H A D | mach.c | 141 int col, row; in results() local 151 getyx(stdscr, row, col); in results() 152 move(row + 1, col); in results() 155 move(row + 2, col); in results() 194 int row, col; in get_line() local 214 getyx(stdscr, row, col); in get_line() 215 move(row, col - 1); in get_line() 223 getyx(stdscr, row, col); in get_line() 224 move(row, col - (int) (p - q)); in get_line() 397 int col, row; in showword() local [all …]
|
| /openbsd-src/gnu/llvm/clang/lib/Headers/ |
| H A D | amxintrin.h | 308 const unsigned short col; member 328 dst->tile = _tile_loadd_internal(dst->row, dst->col, base, stride); in __tile_loadd() 349 dst->tile = _tile_loaddt1_internal(dst->row, dst->col, base, stride); in __tile_stream_loadd() 371 dst->tile = _tile_dpbssd_internal(src0.row, src1.col, src0.col, dst->tile, in __tile_dpbssd() 394 dst->tile = _tile_dpbsud_internal(src0.row, src1.col, src0.col, dst->tile, in __tile_dpbsud() 417 dst->tile = _tile_dpbusd_internal(src0.row, src1.col, src0.col, dst->tile, in __tile_dpbusd() 440 dst->tile = _tile_dpbuud_internal(src0.row, src1.col, src0.col, dst->tile, in __tile_dpbuud() 458 _tile_stored_internal(src.row, src.col, base, stride, src.tile); in __tile_stored() 471 dst->tile = __builtin_ia32_tilezero_internal(dst->row, dst->col); in __tile_zero() 492 dst->tile = _tile_dpbf16ps_internal(src0.row, src1.col, src0.col, dst->tile, in __tile_dpbf16ps() [all …]
|
| /openbsd-src/bin/ls/ |
| H A D | print.c | 166 int base, chcnt, col, colwidth, num; in printcol() local 203 for (base = row, col = 0;;) { in printcol() 207 if (++col == numcols) in printcol() 273 int chcnt, col, colwidth; in printacol() local 282 col = 0; in printacol() 286 if (col >= numcols) { in printacol() 287 col = 0; in printacol() 291 col++; in printacol() 292 if (col < numcols) in printacol() 304 int col; in printstream() local [all …]
|
| /openbsd-src/sys/arch/armv7/exynos/ |
| H A D | crosec_kbd.c | 177 int col, row, s; in cros_ec_get_keystate() local 180 for (col = 0; col < sc->keyboard.cols; col++) { in cros_ec_get_keystate() 183 int pressed = !!(state[col] & (1 << row)); in cros_ec_get_keystate() 184 if (pressed && !sc->keyboard.state[off+col]) { in cros_ec_get_keystate() 186 sc->keyboard.state[off+col] = 1; in cros_ec_get_keystate() 188 return off+col; in cros_ec_get_keystate() 190 wskbd_input(sc->keyboard.wskbddev, WSCONS_EVENT_KEY_DOWN, off+col); in cros_ec_get_keystate() 192 } else if (!pressed && sc->keyboard.state[off+col]) { in cros_ec_get_keystate() 194 sc->keyboard.state[off+col] = 0; in cros_ec_get_keystate() 196 return off+col; in cros_ec_get_keystate() [all …]
|