I am putting together a 'Status Window' that will be used by a C program as it runs, compiled on the SCC compiler. (I did sometimg similar a year or two ago using Ftn95). It is opened at the beginning of the program, displaying a single short line of text. As the program runs, occasionally more lines will appear below the first line, keeping the user informed of various status items in the program.
I have put together a function that opens the window, using %ca to put the caption 'Status Window' in the top bar. It also loads the 1000-long buffer with its opening message, that says 'Program started', followed by a \n and a \0. This works adequately, showing that message in the window when the %eb command is given.
For the next step, I would like to append a second line (in this experiment, it simply says 'This is the second line') to the buffer, keeping the \n at the end of the 'Program started' so that the second line appears below the first.
My questions are:
1.) Is there a way to assign a string directly into a character array? Or, is there a special 'string' data type, and ways to convert from that to 'char' arrays?
2.) Do I need to remove the \0 from the end of the first line, before I append the second line to it? And do I then need to put a \0 at the end of the second line? Or can I do without \0 characters altogether?
3.) Once I append the characters of the second line, is there a way to 'refresh' what is showing in the window displaying that buffer, so that the (new) contents now show in the window? There was such a command in Ftn95, as I recall.