Skip to content
  • Mohammad Akhlaghi's avatar
    Saving and writing string options now simplified · b9f2c31a
    Mohammad Akhlaghi authored
    Until now, for each string option (for example `--hdu'), I would check
    and allocate the space, individually. Also when printing, I had to
    check individually to see if it has a space character or not! So I
    wrote a simple function in checkset.c and a macro in checkset.h to do
    the job and now for all the options in all the programs, we can simply
    call those functions. This significantly increases the readability and
    decreases the potential for bugs in the code.
    
    Until now there was only a small number of cases in each each program,
    so it wasn't bothering me. But while making MakeProfiles (which has
    lots of such functions), I noticed how stupidly repetative the checks
    are! So I wrote this function and the macro. When I saw how convenient
    they are, I applied them to all the programs, to enhance them too.
    b9f2c31a
To find the state of this project's repository at the time of any of these versions, check out the tags.