C, I love you!
Yes, I really prefer C/C++ to Java because of many things but there are some issues where I could throw my keyboard onto the wall!
gchar buffer; /* We assume the string will never be longer */
Great, I love people who make assumptions about segmentation faults. But computers are incorrupt, they don't make assumptions and users maybe corrupt but they don't care about assumptions and they both know Murphy's Law.
This may work for years but some time is will crash and this time was: today! Bless god that this was just about Anjuta and not about a mars mission!
Please, do not ever do this! You have been warned!