necouchman commented on code in PR #504:
URL: https://github.com/apache/guacamole-server/pull/504#discussion_r1567182898


##########
src/terminal/terminal.c:
##########
@@ -2224,3 +2254,80 @@ void guac_terminal_remove_user(guac_terminal* terminal, 
guac_user* user) {
     /* Remove the user from the terminal cursor */
     guac_common_cursor_remove_user(terminal->cursor, user);
 }
+
+bool guac_terminal_is_part_of_word(int ascii_char) {
+    if ((ascii_char >= '0' && ascii_char <= '9') || 
+        (ascii_char >= 'A' && ascii_char <= 'Z') || 
+        (ascii_char >= 'a' && ascii_char <= 'z') ||
+        (ascii_char == '$') ||
+        (ascii_char == '%') ||
+        (ascii_char == '&') ||
+        (ascii_char == '-') ||
+        (ascii_char == '.') ||
+        (ascii_char == '/') ||
+        (ascii_char == ':') ||
+        (ascii_char == '=') ||
+        (ascii_char == '?') ||
+        (ascii_char == '\\') ||
+        (ascii_char == '_') ||
+        (ascii_char == '~'))
+        return true;
+    else
+        return false;

Review Comment:
   I believe this could be something like:
   ```
   return ((ascii_char >= '0' && ascii_char <= '9') || 
           (ascii_char >= 'A' && ascii_char <= 'Z') || 
           (ascii_char >= 'a' && ascii_char <= 'z') ||
           (ascii_char == '$') ||
           (ascii_char == '%') ||
           (ascii_char == '&') ||
           (ascii_char == '-') ||
           (ascii_char == '.') ||
           (ascii_char == '/') ||
           (ascii_char == ':') ||
           (ascii_char == '=') ||
           (ascii_char == '?') ||
           (ascii_char == '\\') ||
           (ascii_char == '_') ||
           (ascii_char == '~'));
   ```
   
   ?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@guacamole.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to