FreeBSD Bugzilla – Attachment 220581 Details for
Bug 251868
Add tcgetwinsize() and tcsetwinsize() to termios.h
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
test program
test.c (text/plain), 820 bytes, created by
SOUMENDRA GANGULY
on 2020-12-15 14:43:39 UTC
(
hide
)
Description:
test program
Filename:
MIME Type:
Creator:
SOUMENDRA GANGULY
Created:
2020-12-15 14:43:39 UTC
Size:
820 bytes
patch
obsolete
>#include <stdio.h> >#include <termios.h> > >int main() >{ > struct winsize w, y; > printf("getting winsize\n"); > if (tcgetwinsize(0, &w) == -1) { > printf("error: tcgetwinsize\n"); > return -1; > } > > y = w; > printf("winsize: %d %d %d %d\n", w.ws_row, w.ws_col, w.ws_xpixel, w.ws_ypixel); > > w.ws_row /= 5; > w.ws_col /= 5; > w.ws_xpixel /= 5; > w.ws_ypixel /= 5; > > printf("setting winsize to 1/5 of all members\n"); > if (tcsetwinsize(0, &w) == -1) { > printf("error: tcsetwinsize\n"); > return -1; > } > > printf("getting winsize\n"); > if (tcgetwinsize(0, &w) == -1) { > printf("error: tcgetwinsize\n"); > return -1; > } > > printf("winsize: %d %d %d %d\n", w.ws_row, w.ws_col, w.ws_xpixel, w.ws_ypixel); > > printf("restoring winsize\n"); > if (tcsetwinsize(0, &y) == -1) { > printf("error: tcsetwinsize\n"); > return -1; > } > > return 0; >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 251868
:
220579
|
220580
| 220581 |
220607
|
220616
|
220654