chg_char.c revision 2
2N/A * The contents of this file are subject to the terms of the 2N/A * Common Development and Distribution License, Version 1.0 only 2N/A * (the "License"). You may not use this file except in compliance 2N/A * See the License for the specific language governing permissions 2N/A * and limitations under the License. 2N/A * When distributing Covered Code, include this CDDL HEADER in each 2N/A * If applicable, add the following below this CDDL HEADER, with the 2N/A * fields enclosed by brackets "[]" replaced with your own identifying 2N/A * information: Portions Copyright [yyyy] [name of copyright owner] 2N/A/* Copyright (c) 1988 AT&T */ 2N/A/* All Rights Reserved */ 2N/A * Copyright (c) 1997, by Sun Microsystems, Inc. 2N/A * All rights reserved. 2N/A#
pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.5 */ 2N/A /* from v through end */ 2N/A/* _next_char move to next char with wrap to next line at end of line */ 2N/A * _prev_char - move to previous char with 2N/A * wrap to previous line at beginning of line 2N/A/* _next_line - move to beginning of next line */ 2N/A/* _prev_line - move to beginning of previous line */ 2N/A/* _next_word - move to beginning of next word */ 2N/A char * v =
LineBuf(c, Y(f)) + X(f);
/* position in buffer */ 2N/A /* one row and field has grown */ 2N/A while (*t !=
' ' && *t !=
'\0')
/* find end of word + 1 */ 2N/A /* word longer than visible field */ 2N/A/* _prev_word - move to beginning of previous word */ 2N/A char * v =
LineBuf(c, Y(f)) + X(f);
/* position in buffer */ 2N/A/* _beg_field - move to first non-pad char in field */ 2N/A/* _end_field - move after last non-pad char in field */ 2N/A/* _beg_line - move to first non-pad char on current line */ 2N/A/* _end_line - move after last non-pad char on current line */ 2N/A/* _left_char - move left */ 2N/A/* _right_char - move right */ 2N/A/* _up_char - move up */ 2N/A/* _down_char - move down */ 2N/A/* _scr_fline - scroll forward one line */ 2N/A/* _scr_bline - scroll backward one line */ 2N/A/* _scr_fpage - scroll forward one page(C(f) -> rows) */ 2N/A/* _scr_bpage - scroll backward one page(C(f) -> rows) */ 2N/A/* _scr_fhpage - scroll forward one half page(C(f)->rows + 1)/2) */ 2N/A int n = h < m ? h : m;
2N/A/* _scr_bhpage - scroll backward one half page(C(f)->rows + 1)/2) */ 2N/A int n = h < m ? h : m;
2N/A/* _scr_fchar - horizontal scroll forward one char */ 2N/A/* _scr_bchar - horizontal scroll backward one char */ 2N/A/* _scr_hfline - horizontal scroll forward one line(C(f)->cols) */ 2N/A/* _scr_hbline - horizontal scroll backward one line(C(f)->cols) */ 2N/A/* _scr_hfhalf - horizontal scroll forward one half line(C(f)->cols/2) */ 2N/A int n = h < m ? h : m;
2N/A/* _scr_hbhalf - horizontal scroll backward one half line(C(f)->cols/2) */ 2N/A int n = h < m ? h : m;