use puts("x") instead of fputs("x\n",stdout) -- Bernhard Reutner-Fischer