From 58e3c8604a37e0b8ed1546af3615ddeb3e6f0349 Mon Sep 17 00:00:00 2001 From: lpow100 Date: Thu, 31 Jul 2025 16:16:07 -0700 Subject: [PATCH] Added setup for the rename command (NOT TESTED) --- examples/rexm.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/examples/rexm.c b/examples/rexm.c index d40c2ce1c..21f26ceb2 100644 --- a/examples/rexm.c +++ b/examples/rexm.c @@ -141,12 +141,18 @@ int main(int argc, char *argv[]) else if (strcmp(argv[1], "rename") == 0) { if (argc == 2) LOG("WARNING: No filename provided to create\n"); - else if (argc == 3) LOG("WARNING: No enough arguments provided\n"); - else if (argc > 4) LOG("WARNING: Too many arguments provided\n"); + //else if (argc == 3) LOG("WARNING: No enough arguments provided\n"); All the documentation says 3 args but I don't mind being wrong + else if (argc > 3) LOG("WARNING: Too many arguments provided\n"); else { - // TODO: Register exName, exCategory and exRename - + strcpy(exName, argv[2]); + for (int index = 0; index < 32; index++) + { + if (exName[index] == '_') break; + exCategory[index] = exName[index]; + } + strcpy(exRename, argv[3]); + opCode = 3; } }