Sat 27 Mar 2004 08:07:13 AM UTC, original submission:
Problem: Option "--retype-file" fails to set the mode, causing the option to fail.
Version affected: CVS
Steps to reproduce the bug:
1. Create text file /tmp/test.xnee. The contents of the file do not matter.
2. Enter the following command:
cnee --verbose --retype-file /tmp/test.xnee
One of the lines of the verbose output will be: "No mode specified... leaving".
Cause: Missing call to xnee_set_retyper in file parse.c (directory cnee/src)
Here is the corrected code segment for parse.c:
else if(xnee_check(argv[i], "--retype-file", "-rtf" ))
{
xnee_set_retyper(xd); /* this is the fix */
if (++i >= argc)
{
xnee_usage(stderr);
xnee_close_down(xd);
exit(XNEE_WRONG_PARAMS);
}
if ( xnee_set_rt_name (xd, argv[i]) != XNEE_OK)
{
xnee_print_error ("Unable to open retype file\n");
xnee_verbose ((xd, "Could not open retype file\n"));
xnee_verbose ((xd, "... leaving\n"));
xnee_close_down(xd);
exit(XNEE_WRONG_PARAMS);
}
continue;
}
Notice the new line designated as the fix. Adding this line solved the problem for me. Running cnee as indicated in step 2 works correctly with this change in place.
Please review this code change. If you find the fix acceptable, please update CVS.
Thank you for your time.
|