search for: winsize

Displaying 20 results from an estimated 61 matches for "winsize".

Did you mean: minsize
2002 Feb 06
2
SFTP Status Bar..
...r (from src/usr.bin/ftp/util.c) */ +static int +foregroundproc(void) +{ + static pid_t pgrp = -1; + int ctty_pgrp; + + if (pgrp == -1) + pgrp = getpgrp(); + + return ((ioctl(STDOUT_FILENO, TIOCGPGRP, &ctty_pgrp) != -1 && + ctty_pgrp == pgrp)); +} + +int +getttywidth(void) +{ + struct winsize winsize; + + if (ioctl(fileno(stdout), TIOCGWINSZ, &winsize) != -1) + return (winsize.ws_col ? winsize.ws_col : 80); + else + return (80); +} + +void +progressmeter(off_t statbytes, off_t totalbytes, char *filename) +{ +#define STALLTIME 5 /* number of seconds before xfer assumed "...
2009 May 15
3
[LLVMdev] [Cygwin] bug on SVN
...: error: 'TIOCGWINSZ' was not declared in this scope make[1]: *** [/home/ang/build/workbench/lib/System/Debug/Process.o] Error 1 make[1]: Leaving directory `/home/ang/build/workbench/lib/System' make: *** [all] Error 1 Having IOCTL.H does not seem to be a strict enough test for struct winsize'es presence. #ifdef HAVE_SYS_IOCTL_H // Try to determine the width of the terminal. struct winsize ws; if (ioctl(FileID, TIOCGWINSZ, &ws) == 0) Columns = ws.ws_col; #endif I could not see any changes in Process.cpp's SVN that could have caused this. Anyone got a clue ? Aaro...
2009 May 15
0
[LLVMdev] [Cygwin] bug on SVN
...declared in this scope > make[1]: *** [/home/ang/build/workbench/lib/System/Debug/Process.o] > Error 1 > make[1]: Leaving directory `/home/ang/build/workbench/lib/System' > make: *** [all] Error 1 > > Having IOCTL.H does not seem to be a strict enough test for struct > winsize'es presence. > > #ifdef HAVE_SYS_IOCTL_H > // Try to determine the width of the terminal. > struct winsize ws; > if (ioctl(FileID, TIOCGWINSZ, &ws) == 0) > Columns = ws.ws_col; > #endif > > I could not see any changes in Process.cpp's SVN that could...
2002 Jan 30
1
Quick sftp status indicator.
...d:%02d%s", i / 60, i % 60, + (flag != 1) ? " ETA" : " "); + } + atomicio(write, fileno(stdout), buf, strlen(buf)); + + if (flag == 1) { + alarm(0); + atomicio(write, fileno(stdout), "\n", 1); + statbytes = 0; + } +} + +int +getttywidth(void) +{ + struct winsize winsize; + + if (ioctl(fileno(stdout), TIOCGWINSZ, &winsize) != -1) + return (winsize.ws_col ? winsize.ws_col : 80); + else + return (80); +} Index: misc.h =================================================================== RCS file: /cvs/src/usr.bin/ssh/misc.h,v retrieving revision 1.11 diff...
2002 Feb 02
0
Version two of progressbar for scp/sftp
..." ETA" : " "); + } + atomicio(write, fileno(stdout), buf, strlen(buf)); + + if (totalbytes == statbytes) { + atomicio(write, fileno(stdout), "\n", 1); + + /* Clean up for next usage */ + xfree(start); + start = NULL; + } +} + +int +getttywidth(void) +{ + struct winsize winsize; + + if (ioctl(fileno(stdout), TIOCGWINSZ, &winsize) != -1) + return (winsize.ws_col ? winsize.ws_col : 80); + else + return (80); +} Index: misc.h =================================================================== RCS file: /cvs/src/usr.bin/ssh/misc.h,v retrieving revision 1.11 diff...
2009 May 15
5
[LLVMdev] [Cygwin] bug on SVN
...INSZ' was not declared in this scope make[1]: *** [/home/ang/build/workbench/lib/System/Debug/Process.o] Error 1 make[1]: Leaving directory `/home/ang/build/workbench/lib/System' make: *** [all] Error 1 Having IOCTL.H does not seem to be a strict enough test for struct winsize'es presence. #ifdef HAVE_SYS_IOCTL_H // Try to determine the width of the terminal. struct winsize ws; if (ioctl(FileID, TIOCGWINSZ, &ws) == 0) Columns = ws.ws_col; #endif I could not see any changes in Process.cpp's SVN that could have caused thi...
2009 May 18
0
[LLVMdev] [Cygwin] bug on SVN
...> make[1]: *** [/home/ang/build/workbench/lib/System/Debug/Process.o] >> Error 1 >> make[1]: Leaving directory `/home/ang/build/workbench/lib/System' >> make: *** [all] Error 1 >> >> Having IOCTL.H does not seem to be a strict enough test for struct >> winsize'es presence. >> >> #ifdef HAVE_SYS_IOCTL_H >> // Try to determine the width of the terminal. >> struct winsize ws; >> if (ioctl(FileID, TIOCGWINSZ, &ws) == 0) >> Columns = ws.ws_col; >> #endif >> >> I could not see any changes...
1999 Nov 15
1
(no subject)
...this b->ptr[0]|=value<<b->endbit; // } //////////////////////////////////////////////////// 2.) undefined under win32 so define them: #define M_PI (3.14159265359) #define rint(x) (floor((x)+0.5)) // is this correct? 3.) thousands of tons things like that had become double out[winsize/2]; to double *out=(double *) _alloca((winsize/2)*sizeof(double)); 4.) I found different behaviour between gcc and msvc when dividing very small doubles (like 2.13e-312) void _vs_residue_quantize(double *data,double *curve, vorbis_info *vi,int n){ /* The follow...
2015 Aug 31
3
COLUMNS and LINES environment variables
Hello openssh developers, Instead of just playing nethack, I've been building a client that would log in to nethack at alt.org and using a pipe to get the login data from pwsafe directly onto the server. All of this works brilliantly after playing with some stty magic (full script in [0]), however, this way the terminal size is burned into 80x24, which is way smaller than my graphical
2012 Feb 12
0
Bug#659642: xen-hypervisor-4.0-amd64: outl segfaults when restoring monitor from sleep with DPMS
...4 625 +hsync +vsync (46.9 kHz) (II) VESA(0): Modeline "1152x864"x0.0 108.00 1152 1216 1344 1600 864 865 868 900 +hsync +vsync (67.5 kHz) (II) VESA(0): Searching for matching VESA mode(s): Mode: 160 (0x0) ModeAttributes: 0x0 WinAAttributes: 0x0 WinBAttributes: 0x0 WinGranularity: 0 WinSize: 0 WinASegment: 0x0 WinBSegment: 0x0 WinFuncPtr: 0x0 BytesPerScanline: 0 XResolution: 0 YResolution: 0 XCharSize: 0 YCharSize: 0 NumberOfPlanes: 0 BitsPerPixel: 0 NumberOfBanks: 0 MemoryModel: 0 BankSize: 0 NumberOfImages: 0 RedMaskSize: 0 RedFieldPosition: 0 GreenMaskSize: 0 Gree...
2013 May 15
2
FLAC currently won't compile for Android [bisected]
Felix Homann wrote: > Here are the warnings I get with 03a9e6064d406e3656afacdbe50e8e47ebfa0de3: It seems Android sys/param.h doesn't define MIN/MAX. Could you try to revert this commit on current master (or simply change line 35 of src/libFLAC/include/private/macros.h back to #if defined(__GNUC__) ) and recompile? Or possibly bisect 03a9e60..master to find out when the
1999 Nov 15
3
vorbis under win32
...this b->ptr[0]|=value<<b->endbit; // } //////////////////////////////////////////////////// 2.) undefined under win32 so define them: #define M_PI (3.14159265359) #define rint(x) (floor((x)+0.5)) // is this correct? 3.) thousands of tons things like that had become double out[winsize/2]; to double *out=(double *) _alloca((winsize/2)*sizeof(double)); 4.) I found different behaviour between gcc and msvc when dividing very small doubles (like 2.13e-312) void _vs_residue_quantize(double *data,double *curve, vorbis_info *vi,int n){ /* The follow...
2003 Oct 13
1
Problem in sftp 'ls' command output
...ile names are concatenated, without spaces in-between] Known problem ? If so, my apologies. If not, I did a little homework and found that the sftp-int.c/do_ls_dir function seems to be the culprit. We have first : -------- if (!(lflag & SHORT_VIEW)) { int m = 0, width = 80; struct winsize ws; /* Count entries for sort and find longest filename */ for (n = 0; d[n] != NULL; n++) m = MAX(m, strlen(d[n]->filename)); if (ioctl(fileno(stdin), TIOCGWINSZ, &ws) != -1) width = ws.ws_col; columns = width / (m + 2); columns = MAX(columns, 1)...
2009 Nov 10
3
[PATCH 1/8] virtio: console: comment cleanup
Remove old lguest-style comments. Signed-off-by: Rusty Russell <rusty at rustcorp.com.au> --- drivers/char/virtio_console.c | 30 ++++++------------------------ 1 file changed, 6 insertions(+), 24 deletions(-) diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c --- a/drivers/char/virtio_console.c +++ b/drivers/char/virtio_console.c @@ -1,18 +1,5 @@ -/*D:300 - *
2009 Nov 10
3
[PATCH 1/8] virtio: console: comment cleanup
Remove old lguest-style comments. Signed-off-by: Rusty Russell <rusty at rustcorp.com.au> --- drivers/char/virtio_console.c | 30 ++++++------------------------ 1 file changed, 6 insertions(+), 24 deletions(-) diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c --- a/drivers/char/virtio_console.c +++ b/drivers/char/virtio_console.c @@ -1,18 +1,5 @@ -/*D:300 - *
2002 Mar 08
0
[Bug 152] New: Build failure on Sparc/Solaris 2.8 with Sun cc or gcc
.../free/libexec/ssh-askpass\" -D_PATH_SFTP_SERVER=\"/usr/local/free/libexec/sftp-server\" -D_PATH_SSH_PIDDIR=\"/var/run\" -DSSH_RAND_HELPER=\"/usr/local/free/libexec/ssh-rand-helper\" -DHAVE_CONFIG_H -c ssh.c "ssh.c", line 898: incomplete struct/union/enum winsize: ws "ssh.c", line 936: undefined symbol: TIOCGWINSZ "ssh.c", line 938: undefined struct/union member: ws_row "ssh.c", line 939: undefined struct/union member: ws_col "ssh.c", line 940: undefined struct/union member: ws_xpixel "ssh.c", line 941: unde...
2008 Jan 16
8
PATCH [xenconsoled]: makes pty slave raw early
Hi, on my system (Linux 2.6.18.8 - ia64), if a domain write on the xencons before xenconsole is initialized the domain gets back what it wrote. This patch fixes this issue by making raw the pty slave very early. (I suppose it doesn''t happen with linux as a guest because it takes a little bit of time before writing to xencons). Tristan. _______________________________________________
2013 May 15
2
FLAC currently won't compile for Android [bisected]
Hi, I couldn't figure out how to file a bug in the bugtracker at sourceforge. So I send a report this way. Building FLAC from git for Android fails with the following message: utils.c: In function 'get_console_width': utils.c:181:17: error: storage size of 'w' isn't known utils.c:181:17: warning: unused variable 'w' [-Wunused-variable] make[3]: *** [utils.o]
2013 May 23
2
FLAC currently won't compile for Android [bisected]
...ft; int get_console_width(void) { int width = 80; -#ifdef _WIN32 +#if defined _WIN32 width = win_get_console_width(); #elif defined __EMX__ - int s[2]; - _scrsize (s); - width = s[0]; -#else + int s[2]; + _scrsize (s); + width = s[0]; +#elif !defined __ANDROID__ struct winsize w; if (ioctl(STDOUT_FILENO, TIOCGWINSZ, &w) != -1) width = w.ws_col; #endif
2002 Oct 21
1
[Bug 315] add missing includes and defines for FREEBSD
...and |defines for FREEBSD |defines for FREEBSD ------- Additional Comments From dirk.meyer at dinoex.sub.org 2002-10-21 14:57 ------- used for calls to: int openpty __P((int *_amaster, int *_aslave, char *_name, struct termios *_termp, struct winsize *_winp)); In openssh.3.5 this funtions have beenn moved to: sshpty.c --- sshpty.c.orig Wed Jun 26 01:21:42 2002 +++ sshpty.c Fri Jun 28 07:09:38 2002 @@ -30,6 +30,9 @@ #ifdef HAVE_PTY_H # include <pty.h> #endif +#ifdef HAVE_LIBUTIL_H +#include <libutil.h> +#endif #if defin...