function fprint(fd, fmt) { /* * this is the closest i could get it to the real one. * the web sucks, what are you going to do about it? */ fmt = fmt || ""; switch(fd){ case 2: console.error(fmt); break; default: console.log(fmt); } return fmt.length; } function print(fmt) { fmt = fmt || ""; console.log(fmt); return fmt.length; }