If I use e.g. sparc6-rtems-sis and query the terminal window 
size within rtems_task_Init, the output for winsize.ws_row and winsize.ws_col 
is "0”.

/*
 * get winsize example
 */
#include <rtems.h>
#include <stdlib.h>
#include <stdio.h>

#include <sys/ioctl.h>
#include <unistd.h>

rtems_task Init(
  rtems_task_argument ignored
)
{
  struct winsize w;

 /* gets for both values “0” */
  ioctl(STDOUT_FILENO, TIOCGWINSZ, &w);
  printf("lines %d\n", w.ws_row);
  printf("columns %d\n", w.ws_col);

  /* this sets the terminal size, works with terminal emulator (vt100?) … */
  printf("\033[8;10;100”);
  
 /* but still “0” gets read */
  ioctl(STDOUT_FILENO, TIOCGWINSZ, &w);
  printf("lines %d\n", w.ws_row);
  printf("columns %d\n", w.ws_col);

/* setting values with TIOCSWINZ has no impact on the terminal */

  exit( 0 );
}

Is it possible to define the size of the terminals when starting the 
simulators/emulators?

Danke Heinz
 

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
users mailing list
[email protected]
http://lists.rtems.org/mailman/listinfo/users

Reply via email to