MCPcopy Create free account
hub / github.com/boostorg/build / check_cmd_for_too_long_lines

Function check_cmd_for_too_long_lines

src/engine/execcmd.cpp:77–94  ·  view source on GitHub ↗

Returns whether the given command string contains lines longer than the given * maximum. */

Source from the content-addressed store, hash-verified

75 * maximum.
76 */
77int check_cmd_for_too_long_lines( char const * command, int32_t max,
78 int32_t * const error_length, int32_t * const error_max_length )
79{
80 while ( *command )
81 {
82 int32_t const l = int32_t(strcspn( command, "\n" ));
83 if ( l > max )
84 {
85 *error_length = l;
86 *error_max_length = max;
87 return EXEC_CHECK_LINE_TOO_LONG;
88 }
89 command += l;
90 if ( *command )
91 ++command;
92 }
93 return EXEC_CHECK_OK;
94}
95
96
97/* Checks whether the given shell list is actually a request to execute raw

Callers 3

exec_checkFunction · 0.85
exec_checkFunction · 0.85
exec_checkFunction · 0.85

Calls 1

strcspnFunction · 0.85

Tested by

no test coverage detected