Code:
if (savehistory == 1)
{
hist = write_history(NULL);
printf("%d",saved);
}
This is the small section I am trying to understand, savehistory is set further in the code. This works fine, it saves the code to ~/.history. If I now try to change it to my own filename such as:
Code:
char *fname
if (savehistory == 1)
{
hist = write_history(fname);
printf("%d",hist);
}
This gives me a segmentation fault. I could guess it's because fname does not exist? I currently have no tests to make sure it does exist before accessing it, but that's simply because I don't know where fname should actually be or what exactly it should be called.
Thank you
Forg