Mercurial > hg > xemacs-beta
comparison src/tparam.c @ 412:697ef44129c6 r21-2-14
Import from CVS: tag r21-2-14
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:20:41 +0200 |
parents | 74fd4e045ea6 |
children |
comparison
equal
deleted
inserted
replaced
411:12e008d41344 | 412:697ef44129c6 |
---|---|
55 This may be OUTSTRING or may be the address of a block got with `malloc'. | 55 This may be OUTSTRING or may be the address of a block got with `malloc'. |
56 In the latter case, the caller must free the block. | 56 In the latter case, the caller must free the block. |
57 | 57 |
58 The fourth and following args to tparam serve as the parameter values. */ | 58 The fourth and following args to tparam serve as the parameter values. */ |
59 | 59 |
60 static char *tparam1 (const char *string, char *outstring, int len, | 60 static char *tparam1 (CONST char *string, char *outstring, int len, |
61 const char *up, const char *left, | 61 CONST char *up, CONST char *left, |
62 int *argp); | 62 int *argp); |
63 | 63 |
64 /* XEmacs: renamed this function because just tparam() conflicts with | 64 /* XEmacs: renamed this function because just tparam() conflicts with |
65 ncurses */ | 65 ncurses */ |
66 char *emacs_tparam (const char *string, char *outstring, int len, int arg0, | 66 char *emacs_tparam (CONST char *string, char *outstring, int len, int arg0, |
67 int arg1, int arg2, int arg3); | 67 int arg1, int arg2, int arg3); |
68 char * | 68 char * |
69 emacs_tparam (const char *string, char *outstring, int len, int arg0, | 69 emacs_tparam (CONST char *string, char *outstring, int len, int arg0, |
70 int arg1, int arg2, int arg3) | 70 int arg1, int arg2, int arg3) |
71 { | 71 { |
72 int arg[4]; | 72 int arg[4]; |
73 arg[0] = arg0; | 73 arg[0] = arg0; |
74 arg[1] = arg1; | 74 arg[1] = arg1; |
75 arg[2] = arg2; | 75 arg[2] = arg2; |
76 arg[3] = arg3; | 76 arg[3] = arg3; |
77 return tparam1 (string, outstring, len, 0, 0, arg); | 77 return tparam1 (string, outstring, len, 0, 0, arg); |
78 } | 78 } |
79 | 79 |
80 const char *BC; | 80 CONST char *BC; |
81 const char *UP; | 81 CONST char *UP; |
82 | 82 |
83 static char tgoto_buf[50]; | 83 static char tgoto_buf[50]; |
84 | 84 |
85 char *tgoto (const char *cm, int hpos, int vpos); | 85 char *tgoto (CONST char *cm, int hpos, int vpos); |
86 char * | 86 char * |
87 tgoto (const char *cm, int hpos, int vpos) | 87 tgoto (CONST char *cm, int hpos, int vpos) |
88 { | 88 { |
89 int args[2]; | 89 int args[2]; |
90 if (!cm) | 90 if (!cm) |
91 return 0; | 91 return 0; |
92 args[0] = vpos; | 92 args[0] = vpos; |
93 args[1] = hpos; | 93 args[1] = hpos; |
94 return tparam1 (cm, tgoto_buf, 50, UP, BC, args); | 94 return tparam1 (cm, tgoto_buf, 50, UP, BC, args); |
95 } | 95 } |
96 | 96 |
97 static char * | 97 static char * |
98 tparam1 (const char *string, char *outstring, int len, const char *up, | 98 tparam1 (CONST char *string, char *outstring, int len, CONST char *up, |
99 const char *left, int *argp) | 99 CONST char *left, int *argp) |
100 { | 100 { |
101 int c; | 101 int c; |
102 const char *p = string; | 102 CONST char *p = string; |
103 char *op = outstring; | 103 char *op = outstring; |
104 char *outend; | 104 char *outend; |
105 int outlen = 0; | 105 int outlen = 0; |
106 | 106 |
107 int tem; | 107 int tem; |