diff options
| author | Stefan Monnier | 2011-03-31 00:24:03 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2011-03-31 00:24:03 -0400 |
| commit | 40d83b412f584cc02e68d4eac8fd5e6eb769e2fe (patch) | |
| tree | b56f27a7e6d75a8c1fd27b00179a27b5efea0a32 /src/terminfo.c | |
| parent | f488fb6528738131ef41859e1f04125f2e50efce (diff) | |
| parent | 44f230aa043ebb222aa0876b44d70484d5dd38db (diff) | |
| download | emacs-40d83b412f584cc02e68d4eac8fd5e6eb769e2fe.tar.gz emacs-40d83b412f584cc02e68d4eac8fd5e6eb769e2fe.zip | |
Merge from trunk
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 | } | ||