X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=cde%2Flib%2FDtTerm%2FTerm%2FTermParse.c;h=594b3c62a4519c26c84f8c937d8d23d4e895ab2b;hb=aa1bfc0ab33ff7b8863a3623c599c015263bf1d2;hp=b92418be20a319a4ac5cd52846047d331aa9cd4c;hpb=83b6996daa2c5ae22fc2b69093814cb08314954a;p=oweals%2Fcde.git diff --git a/cde/lib/DtTerm/Term/TermParse.c b/cde/lib/DtTerm/Term/TermParse.c index b92418be..594b3c62 100644 --- a/cde/lib/DtTerm/Term/TermParse.c +++ b/cde/lib/DtTerm/Term/TermParse.c @@ -1,3 +1,25 @@ +/* + * CDE - Common Desktop Environment + * + * Copyright (c) 1993-2012, The Open Group. All rights reserved. + * + * These libraries and programs are free software; you can + * redistribute them and/or modify them under the terms of the GNU + * Lesser General Public License as published by the Free Software + * Foundation; either version 2 of the License, or (at your option) + * any later version. + * + * These libraries and programs are distributed in the hope that + * they will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU Lesser General Public License for more + * details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with these libraries and programs; if not, write + * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth + * Floor, Boston, MA 02110-1301 USA + */ #ifndef lint #ifdef VERBOSE_REV_INFO static char rcs_id[] = "$TOG: TermParse.c /main/3 1999/10/15 12:25:13 mgreess $"; @@ -14,6 +36,8 @@ static char rcs_id[] = "$TOG: TermParse.c /main/3 1999/10/15 12:25:13 mgreess $" * (c) Copyright 1996 Hitachi. * */ +#include + #include "TermHeader.h" #include "TermPrimDebug.h" #include "TermPrimP.h" @@ -28,6 +52,8 @@ static char rcs_id[] = "$TOG: TermParse.c /main/3 1999/10/15 12:25:13 mgreess $" #include "TermFunctionKey.h" #include "TermParseTableP.h" #include "TermBufferP.h" +#include "TermPrimUtil.h" +#include "TermPrimParseTable.h" #if defined (__hpux) /* @@ -35,11 +61,10 @@ static char rcs_id[] = "$TOG: TermParse.c /main/3 1999/10/15 12:25:13 mgreess $" */ #undef MAXINT #endif -#include - -#if defined(USL) || defined(__uxp__) -#include -#include +#if defined(CSRG_BASED) +#define MAXSHORT SHRT_MAX +#else +#include #endif /*****************************************************************************/ @@ -248,7 +273,7 @@ _DtTermPModeSet(Widget w) /* DECSET CSI?ph */ /* case 2: can't return from vt52 mode */ case 3: /* Column (132) */ if ( vtw->vt.c132 ) { /* xterm allow 132 mode */ - (void) _DtTermFuncClearBuffer(w, NULL, fromParser); + (void) _DtTermFuncClearBuffer(w, 0, fromParser); vtw->term.tpd->cursorRow = TOPROW(vtw) ; vtw->term.tpd->cursorColumn = FIRSTCOLUMN(vtw) ; vtw->term.tpd->scrollLockTopRow = TOPROW(vtw); @@ -336,7 +361,7 @@ _DtTermPModeReset(Widget w) /* DECRST CSI?pl */ /* case 2: ** set vt52 mode */ case 3: /* Column (80) */ if (vtw->vt.c132) { /* allow 132 mode */ - (void) _DtTermFuncClearBuffer(w, NULL, fromParser); + (void) _DtTermFuncClearBuffer(w, 0, fromParser); vtw->term.tpd->cursorRow = TOPROW(vtw) ; vtw->term.tpd->cursorColumn = FIRSTCOLUMN(vtw) ; vtw->term.tpd->scrollLockTopRow = TOPROW(vtw); @@ -2171,7 +2196,7 @@ _DtTermParseSunMisc /* Misc sun esc seqs */ s = XtMalloc(strlen(icon) + strlen(fmt) + 1); else s = buf; - sprintf(s,fmt); + sprintf(s, "%s", fmt); sendEscSequence(w,s) ; if (s != buf) XtFree(s); break ; @@ -2182,7 +2207,7 @@ _DtTermParseSunMisc /* Misc sun esc seqs */ s = XtMalloc(strlen(icon) + strlen(fmt) + 1); else s = buf; - sprintf(s,fmt); + sprintf(s, "%s", fmt); sendEscSequence(w,s) ; if (s != buf) XtFree(s); break ;