prototypes into scope. Fix a couple of bugs revealed during the prototyping process.
added new code to support socket interface. borrowed code from linux/svr4 to use /emul pathnames. split ibcs2_misc.c into more managable files.