Subversion Repositories planix.SVN

Rev

Rev 36 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 36 Rev 38
Line 29... Line 29...
29
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31
 * SUCH DAMAGE.
31
 * SUCH DAMAGE.
32
 */
32
 */
33
 
33
 
-
 
34
#include <string.h>
-
 
35
 
-
 
36
/*
34
#ifndef lint
37
#ifndef lint
35
static char sccsid[] = "@(#)tgoto.c	5.4 (Berkeley) 6/1/90";
38
static char sccsid[] = "@(#)tgoto.c	5.4 (Berkeley) 6/1/90";
36
#endif /* not lint */
39
#endifi*/ /* not lint */
37
 
40
 
38
#define	CTRL(c)	((c) & 037)
41
#define	CTRL(c)	((c) & 037)
39
 
42
 
40
#define MAXRETURNSIZE 64
43
#define MAXRETURNSIZE 64
41
 
44
 
42
char	*UP;
45
char	*UP;
43
char	*BC;
46
char	*BC;
-
 
47
 
44
 
48
 
45
/*
49
/*
46
 * Routine to perform cursor addressing.
50
 * Routine to perform cursor addressing.
47
 * CM is a string containing printf type escapes to allow
51
 * CM is a string containing printf type escapes to allow
48
 * cursor addressing.  We start out ready to print the destination
52
 * cursor addressing.  We start out ready to print the destination
Line 85... Line 89...
85
		 * ``We don't do that under BOZO's big top''
89
		 * ``We don't do that under BOZO's big top''
86
		 */
90
		 */
87
		return ("OOPS");
91
		return ("OOPS");
88
	}
92
	}
89
	added[0] = 0;
93
	added[0] = 0;
90
	while (c = *cp++) {
94
	while ( (c = *cp++) ) {
91
		if (c != '%') {
95
		if (c != '%') {
92
			*dp++ = c;
96
			*dp++ = c;
93
			continue;
97
			continue;
94
		}
98
		}
95
		switch (c = *cp++) {
99
		switch (c = *cp++) {
Line 136... Line 140...
136
		case '+':
140
		case '+':
137
			which += *cp++;
141
			which += *cp++;
138
			/* fall into... */
142
			/* fall into... */
139
 
143
 
140
		case '.':
144
		case '.':
141
casedot:
145
/*casedot:*/
142
			/*
146
			/*
143
			 * This code is worth scratching your head at for a
147
			 * This code is worth scratching your head at for a
144
			 * while.  The idea is that various weird things can
148
			 * while.  The idea is that various weird things can
145
			 * happen to nulls, EOT's, tabs, and newlines by the
149
			 * happen to nulls, EOT's, tabs, and newlines by the
146
			 * tty driver, arpanet, and so on, so we don't send
150
			 * tty driver, arpanet, and so on, so we don't send