Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

console: handle escape character specification #92

Open
brauner opened this issue Nov 6, 2017 · 1 comment
Open

console: handle escape character specification #92

brauner opened this issue Nov 6, 2017 · 1 comment
Labels
Feature New feature, not a bug

Comments

@brauner
Copy link
Member

brauner commented Nov 6, 2017

Currently the console code assumes that the escape character can be simply specified as a rune/char passed into the corresponding C function. But actually lxc_console() assumes that 1 == 'a', 2 == 'b' so you need something similar to this C function in go-lxc:

inline char etoc(const char c)
{
	/* returns "control code" of given expression */
	return 1 + ((c > 'Z') ? (c - 'a') : (c - 'Z'));
}
@restototicoserra
Copy link

restototicoserra commented Aug 21, 2018

inline char etoc(const char c)
{
/* returns "control code" of given expression */
return 120 + ((c > 'Z') ? (c - 'a') : (c - 'Z'));
}

@stgraber stgraber added the Feature New feature, not a bug label Apr 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New feature, not a bug
Development

No branches or pull requests

3 participants