Hi Daniel, Thank you very much for that patch. I tried to apply it in the codec2-dev branch src directory rev 313 but it failed on several hunks:
david@bear:~/codec2-dev/src$ patch < /home/david/Desktop/c2sim-getopt.diff (Stripping trailing CRs from patch.) patching file c2sim.c Hunk #2 succeeded at 47 with fuzz 1. Hunk #3 FAILED at 58. Hunk #4 FAILED at 74. Hunk #5 FAILED at 112. Hunk #6 FAILED at 166. Hunk #7 FAILED at 658. patch unexpectedly ends in middle of line patch: **** malformed patch at line 409: Perhaps this is my mistake ? I should have pointed out I am using codec2-dev for my day-day development work. The reason is that I can leave the codec2 branch in a stable, working state. Did you make the mods to the codec2 or codec2-dev SVN branch? If the former I am happy to clean up the patch to fit codec2-dev/src/c2sim.c Thanks, David On Fri, 2012-02-17 at 14:20 +0000, Daniel Ankers wrote: > On 17 February 2012 00:29, David Rowe <da...@rowetel.com> wrote: > > Hi Dan, > > > > Yes using GNU-only options like that is fine. > > > > Thanks, > > > > David > > > > Hi, > Hopefully this patch will do what you need. > There are a few operational changes with it, though I've tried to > minimise these. > > (1) The input file name is now the last argument presented instead of > the first. The majority of command line utilities operate this way > round (and it fits better with the way getopt() works > (2) Specifying the codec rate has been changed from --2500, --1500 or > --1200 to --rate [2500|1500|1200]. > (3) The order in which options are given on the command line now > matters: later options can override earlier ones. > (4) The help text is now largely dynamically generated. > > I'm not an expert in this so there are probably better ways to do a > lot of things. > > This should work with most Unix-like OSs. Xgetopt under Windows does > not implement getopt_long(), so c2sim may need libiberty in order to > build under Windows. > > If this patch is OK, I'll add getopt to c2enc and c2dec over the > weekend, then look at picking up another task. > > Dan > ------------------------------------------------------------------------------ > Virtualization & Cloud Management Using Capacity Planning > Cloud computing makes use of virtualization - but cloud computing > also focuses on allowing computing to be delivered as a service. > http://www.accelacomm.com/jaw/sfnl/114/51521223/ > _______________________________________________ Freetel-codec2 mailing list > Freetel-codec2@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/freetel-codec2 ------------------------------------------------------------------------------ Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ _______________________________________________ Freetel-codec2 mailing list Freetel-codec2@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freetel-codec2