larsbrinkhoff / terminal-simulator

Simulation of VT52 and VT100 terminal hardware.
GNU General Public License v3.0
113 stars 17 forks source link

Screen switch #49

Closed barbican-youth closed 5 months ago

barbican-youth commented 8 months ago

Option -s which opens a screen session using the line "screen /dev/serial0 9600"

larsbrinkhoff commented 8 months ago

Thank you. Did you really mean to submit this as a pull request? There are changes in there that seem to only apply to your own fork.

larsbrinkhoff commented 8 months ago

As for the -s switch, I can see it's a useful addition. I would like to suggest a generalization: the ability to send any user-specified string to the child process.

barbican-youth commented 8 months ago

@larsbrinkhoff My mistake, I didn't intend to merge this into the base repo. I went ahead and separated my fork so I can maintain my own repo. You are correct that the changes are specific to my use case.

Regarding the -s switch, the way I implemented it was by passing an ASCII string to the "send_character" function. I wonder if there is a more efficient way to do this? Perhaps there is already something in the code that can covert text to ASCII?

larsbrinkhoff commented 8 months ago

I don't think there is any ready to use text to ASCII function, but it would be trivial to make one iterating over characters in a char * input.