Line 1... |
Line 1... |
1 |
/* This file is part of the SvarCOM project and is published under the terms
|
1 |
/* This file is part of the SvarCOM project and is published under the terms
|
2 |
* of the MIT license.
|
2 |
* of the MIT license.
|
3 |
*
|
3 |
*
|
4 |
* Copyright (C) 2021-2022 Mateusz Viste
|
4 |
* Copyright (C) 2021-2024 Mateusz Viste
|
5 |
*
|
5 |
*
|
6 |
* Permission is hereby granted, free of charge, to any person obtaining a
|
6 |
* Permission is hereby granted, free of charge, to any person obtaining a
|
7 |
* copy of this software and associated documentation files (the "Software"),
|
7 |
* copy of this software and associated documentation files (the "Software"),
|
8 |
* to deal in the Software without restriction, including without limitation
|
8 |
* to deal in the Software without restriction, including without limitation
|
9 |
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
9 |
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
Line 129... |
Line 129... |
129 |
|
129 |
|
130 |
/* let's exec command (write it to start of cmdline and parse again) */
|
130 |
/* let's exec command (write it to start of cmdline and parse again) */
|
131 |
EXEC_S_CMD_IF_NEGFLAG_SET:
|
131 |
EXEC_S_CMD_IF_NEGFLAG_SET:
|
132 |
if (*s == 0) goto SYNTAX_ERR;
|
132 |
if (*s == 0) goto SYNTAX_ERR;
|
133 |
if (negflag == 0) return(CMD_OK);
|
133 |
if (negflag == 0) return(CMD_OK);
|
134 |
memmove((void *)(p->cmdline), s, strlen(s) + 1); /* cmdline and s share the same memory! */
|
134 |
memcpy_ltr((void *)(p->cmdline), s, sv_strlen(s) + 1); /* cmdline and s share the same memory! */
|
135 |
return(CMD_CHANGED);
|
135 |
return(CMD_CHANGED);
|
136 |
}
|
136 |
}
|