Too many functions, too many arguments, how to simplify?

I've been writing a program and it's going great but production has been slowing down due to the fact that it's an exclusively old-style console program. It currently takes about 7 command-line arguments but if I keep producing, it'll need wayyy more. I know that it's too much to ask a user to type more than 7 arguments per run and I want this program to be big. It seems a few dropdown menus and stuff should help out, so a GUI seems reasonable, but I'd like it to be cross platform and I'm only doing simple stuff. I don't want my program to be bloated with GUI stuff and barely have any actual functions behind it. It seems ncurses is an option but it's quite old. Any recommendations?
I don't mean too many arguments for a function, I mean too many arguments for a user to type into the terminal.

Syntax: command <ifile> <ofile> <strt> <stop> <every> <operation> <additional>
what kind of program you write actually?
> It seems ncurses is an option but it's quite old. Any recommendations?

Use ncurses.
It is still in wide use, and actively maintained. (ncurses 6.0 was released in August this year.)
It is cross-platform (Cygwin/MinGW on windows).
closed account (E0p9LyTq)
Put all your command line arguments into a separate file. Then one command line argument is needed, the name/location of your "ini" file.

That gives you the flexibility to have multiple files with differing parameters for easy testing.
Honestly, I'm writing a cross platform ROM corrupter. I'm hoping that it'll someday compete with other corrupters (There aren't any on Linux, except for mine and there are very few modern ones on Windows but they're getting popular again.) and with this competition comes the vast need to improve an reinvent the wheel.

Unfortunately, an ini file wouldn't work because then the user would have to modify the file every time they want to run a new corruption.

I'll try out ncurses, it seems to be the best option I have. By the way, any suggestions for features?
closed account (E0p9LyTq)
You either need a slew of command line arguments, or repetitive altering of a file. That is not a good user interface designed for ease of use.
FurryGuy, do you have any other ideas? And yes, a slew of command line arguments...
> command <ifile> <ofile> <strt> <stop> <every> <operation> <additional>
please explain the purpose of each argument and the values that it may take.

you may provide a default value for some (by instance, the output file), or separate your program into several ones (perhaps by operation)
From output:

Syntax error. Syntax is:
corrupt <ifile> <ofile> <strt> <stop> <every> <operation> <additional>
ifile is the path to the input file.
ofile is the path to the output file.
strt or "start" is the position in the file to start corrupting.
stop is the position in the file to stop corrupting.
every is the frequency of memory to ignore.

Operations:
add	Adds current byte to addative
sub	Subtracts current byte from addative
mul	Multiplies current byte by addative
div	Divides current byte by addative
mod	Modular current byte by addative
xor	Xor's current byte by addative
and	And's current byte by addative
 or	Or's current byte by addative
ran	Randomizes current byte
not	Not's current byte


Default values seem like a great idea. Separating the program is unfortunately not an option.
Topic archived. No new replies allowed.