Subversion Repositories SvarDOS

Rev

Rev 989 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 989 Rev 2214
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 41... Line 41...
41
 
41
 
42
  /* no argument? do nothing */
42
  /* no argument? do nothing */
43
  if (p->argc == 0) return(CMD_OK);
43
  if (p->argc == 0) return(CMD_OK);
44
 
44
 
45
  /* change the command by moving batch filename and arguments to the start of the string */
45
  /* change the command by moving batch filename and arguments to the start of the string */
46
  memmove((void *)(p->cmdline), p->cmdline + p->argoffset, strlen(p->cmdline + p->argoffset) + 1);
46
  memcpy_ltr((void *)(p->cmdline), p->cmdline + p->argoffset, sv_strlen(p->cmdline + p->argoffset) + 1);
47
 
47
 
48
  return(CMD_CHANGED_BY_CALL); /* notify callee that command needs to be reevaluated */
48
  return(CMD_CHANGED_BY_CALL); /* notify callee that command needs to be reevaluated */
49
}
49
}