Skip to content

Commit

Permalink
XtermSetTerminalSize
Browse files Browse the repository at this point in the history
  • Loading branch information
ColumPaget committed Nov 2, 2022
1 parent 6578bc4 commit d617861
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 5 deletions.
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
CC = gcc
VERSION = 4.83
CFLAGS = -g -O2 -mmmx -msse -msse2
VERSION = 4.84
CFLAGS = -g -O2
LDFLAGS=
LIBS = -lssl -lcrypto -lc -lc -lc -lc -lc -lc -lc -lc -lc -lc -lc
FLAGS=$(LDFLAGS) $(CPPFLAGS) $(CFLAGS) -fPIC -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -D_FILE_OFFSET_BITS=64 -DHAVE_LIBC=1 -DHAVE_PTSNAME_R=1 -DHAVE_LIBC=1 -DHAVE_CLEARENV=1 -DHAVE_LIBC=1 -DHAVE_SETRESUID=1 -DHAVE_LIBC=1 -DHAVE_INITGROUPS=1 -DHAVE_LIBC=1 -DHAVE_GET_CURR_DIR=1 -DHAVE_LIBC=1 -DHAVE_UMOUNT2=1 -DHAVE_LIBC=1 -DHAVE_UMOUNT=1 -DHAVE_LIBC=1 -DHAVE_MKOSTEMP=1 -DHAVE_LIBC=1 -DHAVE_POLL=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DUSE_SENDFILE=1 -DUSE_INET6=1 -DHAVE_LIBC=1 -DHAVE_UNSHARE=1 -DHAVE_LIBC=1 -DHAVE_SETNS=1 -DHAVE_LIBCRYPTO=1 -DHAVE_LIBSSL=1 -DHAVE_EVP_BF_CBC=1 -DHAVE_EVP_RC2_CBC=1 -DHAVE_EVP_RC4=1 -DHAVE_EVP_DES_CBC=1 -DHAVE_EVP_DESX_CBC=1 -DHAVE_EVP_CAST5_CBC=1 -DHAVE_EVP_IDEA_CBC=1 -DHAVE_EVP_AES_128_CBC=1 -DHAVE_EVP_AES_256_CBC=1 -DHAVE_X509_CHECK_HOST=1 -DHAVE_SSL_SET_MIN_PROTO_VERSION=1 -DHAVE_DECL_OPENSSL_ADD_ALL_ALGORITHMS=1 -DHAVE_OPENSSL_ADD_ALL_ALGORITHMS=1 -DHAVE_DECL_SSL_SET_TLSEXT_HOST_NAME=1 -DHAVE_SSL_SET_TLSEXT_HOST_NAME=1 -DHAVE_MADVISE -DHAVE_MADVISE_NOFORK -DHAVE_MADVISE_DONTDUMP -DHAVE_MLOCK -DVERSION=\"$(VERSION)\"
LIBS = -lc -lc -lc -lc -lc -lc -lc -lc -lc
FLAGS=$(LDFLAGS) $(CPPFLAGS) $(CFLAGS) -fPIC -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -D_FILE_OFFSET_BITS=64 -DHAVE_LIBC=1 -DHAVE_PTSNAME_R=1 -DHAVE_LIBC=1 -DHAVE_CLEARENV=1 -DHAVE_LIBC=1 -DHAVE_SETRESUID=1 -DHAVE_LIBC=1 -DHAVE_INITGROUPS=1 -DHAVE_LIBC=1 -DHAVE_GET_CURR_DIR=1 -DHAVE_LIBC=1 -DHAVE_UMOUNT2=1 -DHAVE_LIBC=1 -DHAVE_UMOUNT=1 -DHAVE_LIBC=1 -DHAVE_MKOSTEMP=1 -DHAVE_LIBC=1 -DHAVE_POLL=1 -DHAVE_MADVISE -DHAVE_MADVISE_NOFORK -DHAVE_MADVISE_DONTDUMP -DHAVE_MLOCK -DVERSION=\"$(VERSION)\"
prefix=/usr/local
OBJ=String.o Array.o List.o IPAddress.o Socket.o Server.o UnixSocket.o Stream.o Errors.o Unicode.o TerminalKeys.o Terminal.o TerminalWidget.o TerminalMenu.o TerminalChoice.o TerminalBar.o FileSystem.o GeneralFunctions.o DataProcessing.o Pty.o Log.o Http.o Gemini.o Smtp.o inet.o Expect.o base64.o crc32.o md5c.o sha1.o sha2.o whirlpool.o jh_ref.o Hash.o Ssh.o Compression.o OAuth.o LibSettings.o Vars.o Time.o Markup.o SpawnPrograms.o Tokenizer.o PatternMatch.o URL.o DataParser.o ConnectionChain.o OpenSSL.o Process.o Encodings.o RawData.o SecureMem.o CommandLineParser.o SysInfo.o

Expand Down
2 changes: 1 addition & 1 deletion Makefile.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
CC = @CC@
VERSION = 4.83
VERSION = 4.84
CFLAGS = @CFLAGS@ @SIMD_CFLAGS@
LDFLAGS=@LDFLAGS@
LIBS = @LIBS@
Expand Down
11 changes: 11 additions & 0 deletions Terminal.c
Original file line number Diff line number Diff line change
Expand Up @@ -735,6 +735,17 @@ void TerminalPutStr(const char *Str, STREAM *S)
}


void XtermSetTerminalSize(STREAM *Term, int wide, int high)
{
char *Tempstr=NULL;

Tempstr=FormatStr(Tempstr, "\x1b[8;%d;%dt", high, wide);
STREAMWriteLine(Tempstr, Term);
STREAMFlush(Term);
Destroy(Tempstr);
}


void XtermStringCommand(const char *Prefix, const char *Str, const char *Postfix, STREAM *S)
{
char *Cmd=NULL, *Tempstr=NULL;
Expand Down
1 change: 1 addition & 0 deletions Terminal.h
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ void TerminalReset(STREAM *S);
//centisecs. Any keypresses queued when this function is called will be lost.
char *XtermGetClipboard(char *RetStr, STREAM *S);
char *XtermGetSelection(char *RetStr, STREAM *S);
void XTermSetTerminalSize(STREAM *S, int wide, int high);

//generic function for building xterm query escape sequences
void XtermStringCommand(const char *Prefix, const char *Str, const char *Postfix, STREAM *S);
Expand Down

0 comments on commit d617861

Please sign in to comment.