diff options
Diffstat (limited to 'src/terminfo.c')
| -rw-r--r-- | src/terminfo.c | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/src/terminfo.c b/src/terminfo.c index 905a8edacc7..c0418984efa 100644 --- a/src/terminfo.c +++ b/src/terminfo.c | |||
| @@ -17,6 +17,8 @@ You should have received a copy of the GNU General Public License | |||
| 17 | along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | 17 | along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ |
| 18 | 18 | ||
| 19 | #include <config.h> | 19 | #include <config.h> |
| 20 | #include "tparam.h" | ||
| 21 | |||
| 20 | #include <setjmp.h> | 22 | #include <setjmp.h> |
| 21 | #include "lisp.h" | 23 | #include "lisp.h" |
| 22 | 24 | ||
| @@ -33,18 +35,19 @@ char *UP, *BC, PC; | |||
| 33 | format is different too. | 35 | format is different too. |
| 34 | */ | 36 | */ |
| 35 | 37 | ||
| 38 | extern char *tparm (const char *str, ...); | ||
| 39 | |||
| 40 | |||
| 36 | char * | 41 | char * |
| 37 | tparam (char *string, char *outstring, | 42 | tparam (const char *string, char *outstring, int len, |
| 38 | int len, int arg1, int arg2, int arg3, int arg4, | 43 | int arg1, int arg2, int arg3, int arg4) |
| 39 | int arg5, int arg6, int arg7, int arg8, int arg9) | ||
| 40 | { | 44 | { |
| 41 | char *temp; | 45 | char *temp; |
| 42 | extern char *tparm (char *str, ...); | ||
| 43 | 46 | ||
| 44 | temp = tparm (string, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9); | 47 | /* Emacs always should pass a null OUTSTRING and zero LEN. */ |
| 45 | if (outstring == 0) | 48 | if (outstring || len) |
| 46 | outstring = ((char *) (xmalloc ((strlen (temp)) + 1))); | 49 | abort (); |
| 47 | strcpy (outstring, temp); | ||
| 48 | return outstring; | ||
| 49 | } | ||
| 50 | 50 | ||
| 51 | temp = tparm (string, arg1, arg2, arg3, arg4); | ||
| 52 | return xstrdup (temp); | ||
| 53 | } | ||