src/lib/scan.c
char *strip_trailing_newline(char *cmd)
{
   char *p;
   p = cmd - 1 + strlen(cmd);
   while ((p >= cmd) && (*p == '\n' || *p == '\r')) *p-- = 0;
   return cmd;
}
/* Strip any trailing newline characters from the string */
Strip any trailing newline characters from the string
Strip any trailing newline characters from the string
char *strip_trailing_newline(char *cmd)
{
   char *p;
   p = cmd - 1 + strlen(cmd);
   while ((p >= cmd) && (*p == '\n' || *p == '\r')) *p-- = 0;
   return cmd;
}
char * strip_trailing_newline ( char * cmd ) { char * p ; p = cmd - 1 + strlen ( cmd ) ; while ( ( p >= cmd ) && ( * p == ' \n ' || * p == ' \r ' ) ) * p -- = 0 ; return cmd ; }
Strip any trailing newline characters from the string
Strip any trailing newline characters from the string