diff options
Diffstat (limited to 'usr/src/tools/cscope-fast/command.c')
-rw-r--r-- | usr/src/tools/cscope-fast/command.c | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/usr/src/tools/cscope-fast/command.c b/usr/src/tools/cscope-fast/command.c index 4744178d0e..4e19850705 100644 --- a/usr/src/tools/cscope-fast/command.c +++ b/usr/src/tools/cscope-fast/command.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,16 +18,13 @@ * * CDDL HEADER END */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ - /* - * Copyright (c) 1999 by Sun Microsystems, Inc. - * All rights reserved. + * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. */ -#pragma ident "%Z%%M% %I% %E% SMI" +/* Copyright (c) 1988 AT&T */ +/* All Rights Reserved */ /* * cscope - interactive C symbol or text cross-reference @@ -235,7 +231,7 @@ command(int commandc) } if (c != '\r' && c != '\n' && c != KEY_ENTER && c != KEY_BREAK && - getline(newpat, COLS - sizeof (appendprompt), c, + getaline(newpat, COLS - sizeof (appendprompt), c, NO) > 0) { shellpath(filename, sizeof (filename), newpat); if ((file = fopen(filename, s)) == NULL) { @@ -256,7 +252,7 @@ command(int commandc) case '<': /* read lines from a file */ (void) move(PRLINE, 0); (void) addstr(readprompt); - if (getline(newpat, COLS - sizeof (readprompt), '\0', + if (getaline(newpat, COLS - sizeof (readprompt), '\0', NO) > 0) { clearprompt(); shellpath(filename, sizeof (filename), newpat); @@ -278,7 +274,7 @@ command(int commandc) /* get the shell command */ (void) move(PRLINE, 0); (void) addstr(pipeprompt); - if (getline(newpat, + if (getaline(newpat, COLS - sizeof (pipeprompt), '\0', NO) == 0) { clearprompt(); return (NO); @@ -391,7 +387,7 @@ command(int commandc) } else { (void) move(PRLINE, 0); (void) addstr(selectionprompt); - if (getline(newpat, + if (getaline(newpat, COLS - sizeof (selectionprompt), commandc, NO) > 0 && (i = atoi(newpat)) > 0) { @@ -402,7 +398,7 @@ command(int commandc) } else if (isprint(commandc)) { /* this is the start of a pattern */ ispat: - if (getline(newpat, COLS - fldcolumn - 1, commandc, + if (getaline(newpat, COLS - fldcolumn - 1, commandc, caseless) > 0) { (void) strcpy(pattern, newpat); resetcmd(); /* reset history */ @@ -412,7 +408,7 @@ repeat: /* prompt for the new text */ (void) move(PRLINE, 0); (void) addstr(toprompt); - (void) getline(newpat, + (void) getaline(newpat, COLS - sizeof (toprompt), '\0', NO); } /* search for the pattern */ @@ -594,7 +590,7 @@ changestring(void) clearprompt(); (void) move(PRLINE, 0); (void) addstr(selectionprompt); - if (getline(buf, + if (getaline(buf, COLS - sizeof (selectionprompt), c, NO) > 0 && (i = atoi(buf)) > 0) { |