From: Paolo Bonzini Date: Mon, 05 Mar 2007 17:22:24 GMT Subject: Re: [PATCH 1/3] git-branch: add --track and --no-track options Message-ID: <45EC51D0.7000406@lu.unisi.ch> In-Reply-To: >>>> + /* Try an exact match first. */ >>>> + sscanf(value, "refs/%*[^:]:%n", &len_first); >>> This is the first time I saw that sscanf format type. How portable is it? >> It is. At the very least it is in OpenGroup. > > That is not very reassuring for me. However, I learnt something new about > sscanf(), so it was not lost on me. Google books reveals that it's called a "scanset" (I didn't know that either). I found it in "C: The Complete Reference" by Herb Schildt (2000) and "POSIX Programmer's Guide" by D.A. Lewine (1991). I don't have K&R at hand to check. Paolo