From 000ef2dc58416cd09dc177ab863a2d6f1ab9ba28 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Thu, 28 Jan 2021 22:47:25 -0800 Subject: Converted block comments to line comments --- terminal.c | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'terminal.c') diff --git a/terminal.c b/terminal.c index 2dda072..27b8e2f 100644 --- a/terminal.c +++ b/terminal.c @@ -1,11 +1,11 @@ -/* - * terminal.c - * Copyright 2019 Bruce Hill - * Released under the MIT License - * - * Implementations of some basic terminal stuff, like reading keys and some - * terminal escape sequences. - */ +// +// terminal.c +// Copyright 2019 Bruce Hill +// Released under the MIT License +// +// Implementations of some basic terminal stuff, like reading keys and some +// terminal escape sequences. +// #include #include @@ -71,11 +71,11 @@ static inline int nextnum(int fd, int c, int *n) return c; } -/* - * Get one key of input from the given file. Returns -1 on failure. - * If mouse_x or mouse_y are non-null and a mouse event occurs, they will be - * set to the position of the mouse (0-indexed). - */ +// +// Get one key of input from the given file. Returns -1 on failure. +// If mouse_x or mouse_y are non-null and a mouse event occurs, they will be +// set to the position of the mouse (0-indexed). +// int bgetkey(FILE *in, int *mouse_x, int *mouse_y) { if (mouse_x) *mouse_x = -1; @@ -220,9 +220,9 @@ int bgetkey(FILE *in, int *mouse_x, int *mouse_y) return -1; } -/* - * Populate `buf` with the name of a key. - */ +// +// Populate `buf` with the name of a key. +// char *bkeyname(int key, char *buf) { if (key & MOD_META) buf = stpcpy(buf, "Super-"); @@ -241,10 +241,10 @@ char *bkeyname(int key, char *buf) return buf + sprintf(buf, "\\x%02X", key); } -/* - * Return the key with the given name, if one exists, otherwise -1. - * (i.e. bkeywithname("Space") == ' ', bkeywithname("x") == 'x', bkeywithname("F1") == KEY_F1, bkeywithname("???") == -1) - */ +// +// Return the key with the given name, if one exists, otherwise -1. +// (i.e. bkeywithname("Space") == ' ', bkeywithname("x") == 'x', bkeywithname("F1") == KEY_F1, bkeywithname("???") == -1) +// int bkeywithname(const char *name) { int modifiers = 0; -- cgit v1.2.3