Hi Marcin,

I integrated your patch, and added your example and more details in the 
usage() function.

But correct me if I am wrong, "continue" should be "break" here :

    // Now execute the merge process once for each existing file:
    for (int i=2; i < argc; i++) {
        char * sourceFileName = argv[i];
        if (strlen(sourceFileName) == 1 && sourceFileName[0] == '-')
        {
            char thisFile[1024] = "";
            while( fgets(thisFile, sizeof(thisFile), stdin) ) {
                int l = strlen(thisFile);
                if( l <= 1)
                    break;//continue; <- or how do we stop the process ?
                if( thisFile[l-1] != '\n') {
                    fprintf(stderr, "File name too long (max: %d chars)\n",

Or I don't understand how someone can stop entering base names by hand.

Pascal

Marcin Kasperski a écrit :
> The following patch (written against scid-3.6.19-rc2) adds new 
> way of running scmerge. One can now write
>
>     scmerge newbase -
>
> and supply the list of merged bases on standard input (one by 
> one, separated by newline).
>
> I wrote it after getting 'argument list too long' error once more 
> (not that hard to obtain, spliteco to 1000 parts and then try 
> merging them back). It may also make shell scripts marginally 
> simpler, one can now for instance write 
>
>    find . -name '*.si3' | sed s/\.si3// | scmerge newbase -
>
> Note: the patch is smaller than it seems. I factored out the
> merging code to separate function, so the diff is pretty large, 
> but the main difference is just in the handling of '-' arg...
>
> PS Traditional "scmerge newbase oldbase1 oldbase2" of course
> still works. 
>   
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> ------------------------------------------------------------------------
>
> _______________________________________________
> Scid-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/scid-users


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Scid-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/scid-users

Reply via email to