Your code adds one to the LENGTH of the string, and appends an "X" on the end of the string - or at least it looks like that's what you were trying to do, but did things a little bit wrong order - I can't see how that is of any use to anyone (not that adding/subtracting one from each character is particularly useful either, unless you are using it for very basic encryption).
I have to have it. The ++ operators are supposed to add one to each character in the string literal pointed at by buf. The --operators subtract one from each character.
Does anybody seen any errors or have any other suggestions?