From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 58190 invoked by alias); 15 Sep 2019 15:32:17 -0000 Mailing-List: contact cygwin-cvs-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: cygwin-cvs-owner@cygwin.com Received: (qmail 58175 invoked by uid 9996); 15 Sep 2019 15:32:17 -0000 Date: Sun, 15 Sep 2019 15:32:00 -0000 Message-ID: <20190915153217.58174.qmail@sourceware.org> Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Ken Brown To: cygwin-cvs@sourceware.org Subject: [newlib-cygwin] Cygwin: pty: Correct typos that do not fit the coding style. X-Act-Checkin: newlib-cygwin X-Git-Author: Takashi Yano X-Git-Refname: refs/heads/master X-Git-Oldrev: 244f03627d37ea5ba642fc9a4b7c7b4a1a7be11d X-Git-Newrev: fac5a01aec19480a1c1b039788cd26714928335f X-SW-Source: 2019-q3/txt/msg00075.txt.bz2 https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=fac5a01aec19480a1c1b039788cd26714928335f commit fac5a01aec19480a1c1b039788cd26714928335f Author: Takashi Yano Date: Sun Sep 15 13:36:23 2019 +0900 Cygwin: pty: Correct typos that do not fit the coding style. Diff: --- winsup/cygwin/fhandler_tty.cc | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index 5c27510..5072c62 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -45,7 +45,7 @@ details. */ #endif /* ENABLE_VIRTUAL_TERMINAL_INPUT */ extern "C" int sscanf (const char *, const char *, ...); -extern "C" int ttyname_r(int, char*, size_t); +extern "C" int ttyname_r (int, char*, size_t); #define close_maybe(h) \ do { \ @@ -2147,7 +2147,7 @@ fhandler_pty_master::close () else if (obi.HandleCount == (getPseudoConsole () ? 2 : 1)) /* Helper process has inherited one. */ { - termios_printf("Closing last master of pty%d", get_minor ()); + termios_printf ("Closing last master of pty%d", get_minor ()); /* Close Pseudo Console */ if (getPseudoConsole ()) { @@ -2446,9 +2446,9 @@ get_locale_from_env (char *locale) char lang[ENCODING_LEN + 1] = {0, }, country[ENCODING_LEN + 1] = {0, }; env = getenv ("LC_ALL"); if (env == NULL || !*env) - env = getenv("LC_CTYPE"); + env = getenv ("LC_CTYPE"); if (env == NULL || !*env) - env = getenv("LANG"); + env = getenv ("LANG"); if (env == NULL || !*env) { if (GetLocaleInfo (LOCALE_CUSTOM_UI_DEFAULT, @@ -2476,7 +2476,7 @@ get_locale_from_env (char *locale) LOCALE_SISO3166CTRYNAME, country, sizeof (country)); if (strlen (lang) && strlen (country)) - __small_sprintf (lang + strlen(lang), "_%s.UTF-8", country); + __small_sprintf (lang + strlen (lang), "_%s.UTF-8", country); else strcpy (lang , "C.UTF-8"); env = lang; @@ -2492,7 +2492,7 @@ get_langinfo (char *locale_out, char *charset_out) get_locale_from_env (new_locale); __locale_t loc; - memset(&loc, 0, sizeof (loc)); + memset (&loc, 0, sizeof (loc)); const char *locale = __loadlocale (&loc, LC_CTYPE, new_locale); if (!locale) locale = "C"; @@ -2565,8 +2565,8 @@ get_langinfo (char *locale_out, char *charset_out) return 0; /* Set results */ - strcpy(locale_out, new_locale); - strcpy(charset_out, charset); + strcpy (locale_out, new_locale); + strcpy (charset_out, charset); return lcid; } @@ -2670,7 +2670,7 @@ fhandler_pty_slave::fixup_after_attach (bool native_maybe, int fd_set) get_ttyp ()->pcon_pid = myself->pid; get_ttyp ()->switch_to_pcon_out = true; } - init_console_handler(false); + init_console_handler (false); } else if (fd == 0 && native_maybe) /* Read from unattached pseudo console cause freeze, @@ -2754,7 +2754,7 @@ fhandler_pty_slave::fixup_after_exec () { \ void *api = hook_api (module, #name, (void *) name##_Hooked); \ name##_Orig = (__typeof__ (name) *) api; \ - /*if (api) system_printf(#name " hooked.");*/ \ + /*if (api) system_printf (#name " hooked.");*/ \ } DO_HOOK (NULL, WriteFile); DO_HOOK (NULL, WriteConsoleA); @@ -3118,7 +3118,7 @@ fhandler_pty_master::setup_pseudoconsole () if (res != S_OK) { system_printf ("CreatePseudoConsole() failed. %08x\n", - GetLastError()); + GetLastError ()); CloseHandle (from_master); CloseHandle (to_slave); from_master = from_master_cyg; @@ -3230,7 +3230,7 @@ fhandler_pty_master::setup () termios_printf ("can't set output_handle(%p) to non-blocking mode", get_output_handle ()); - char pipename[sizeof("ptyNNNN-to-master-cyg")]; + char pipename[sizeof ("ptyNNNN-to-master-cyg")]; __small_sprintf (pipename, "pty%d-to-master", unit); res = fhandler_pipe::create (&sec_none, &from_slave, &to_master, fhandler_pty_common::pipesize, pipename, 0); @@ -3406,7 +3406,7 @@ fhandler_pty_common::process_opost_output (HANDLE h, const void *ptr, ssize_t& l break; else { - set_errno(EAGAIN); + set_errno (EAGAIN); len = -1; return TRUE; }