Run all files modified by pr45 through nxstyle.

This commit is contained in:
Gregory Nutt 2020-02-03 07:35:37 -06:00
parent 37135e5dfe
commit 724a34bd3b
4 changed files with 74 additions and 62 deletions

View File

@ -178,6 +178,7 @@ static int nxterm_initialize(void)
printf("nxterm_initialize: nx_connect failed: %d\n", errno);
return ERROR;
}
return OK;
}
@ -223,6 +224,7 @@ int main(int argc, FAR char *argv[])
int ret;
/* General Initialization *************************************************/
/* Reset all global data */
printf("nxterm_main: Started\n");
@ -235,6 +237,7 @@ int main(int argc, FAR char *argv[])
#endif
/* NSH Initialization *****************************************************/
/* Initialize the NSH library */
printf("nxterm_main: Initialize NSH\n");
@ -255,7 +258,9 @@ int main(int argc, FAR char *argv[])
fprintf(stderr, "ERROR: Failed to start TELNET daemon: %d\n", ret);
}
#endif
/* NX Initialization ******************************************************/
/* Initialize NX */
printf("nxterm_main: Initialize NX\n");
@ -281,6 +286,7 @@ int main(int argc, FAR char *argv[])
}
/* Window Configuration ***************************************************/
/* Create a window */
printf("nxterm_main: Create window\n");
@ -352,7 +358,8 @@ int main(int argc, FAR char *argv[])
sleep(2);
/* NxTerm Configuration ************************************************/
/* NxTerm Configuration ***************************************************/
/* Use the window to create an NX console */
g_nxterm_vars.wndo.wcolor[0] = CONFIG_EXAMPLES_NXTERM_WCOLOR;
@ -392,8 +399,10 @@ int main(int argc, FAR char *argv[])
}
/* Start Console Task *****************************************************/
/* Now re-direct stdout and stderr so that they use the NX console driver.
* Note that stdin is retained (file descriptor 0, probably the serial console).
* Note that stdin is retained (file descriptor 0, probably the serial
* console).
*/
printf("nxterm_main: Starting the console task\n");
@ -431,6 +440,7 @@ errout_with_hwnd:
nxtk_closewindow(g_nxterm_vars.hwnd);
errout_with_nx:
/* Disconnect from the server */
nx_disconnect(g_nxterm_vars.hnx);

View File

@ -179,7 +179,8 @@ static int telnetd_daemon(int argc, FAR char *argv[])
/* Set socket to reuse address */
optval = 1;
if (setsockopt(listensd, SOL_SOCKET, SO_REUSEADDR, (void*)&optval, sizeof(int)) < 0)
if (setsockopt(listensd, SOL_SOCKET, SO_REUSEADDR,
(FAR void *)&optval, sizeof(int)) < 0)
{
nerr("ERROR: setsockopt SO_REUSEADDR failure: %d\n", errno);
goto errout_with_socket;

View File

@ -232,6 +232,7 @@ int main(int argc, FAR char *argv[])
{
return nsh_system(argc, argv);
}
else
#endif
{
return nsh_task();