+2003-11-03 Bernhard Held <bernhard@bernhardheld.de>
+
+ Use headers defined in the C[++] standards:
+ * sim/ucsim/gui.src/serio.src/fileio.cc
+ * sim/ucsim/gui.src/serio.src/frontend.cc
+ * sim/ucsim/gui.src/serio.src/main.cc
+ * sim/ucsim/gui.src/serio.src/posix_signal.cc
+ * support/Util/NewAlloc.c
+ * as/hc08/lklibr.c
+ * as/mcs51/lklibr.c
+ * as/z80/aslist.c
+ * as/z80/assym.c
+
2003-11-03 Jesus Calvino-Fraga <jesusc@ece.ubc.ca>
* Added MSVC projects for hc08 assembler and linker:
* fileio.cc - file input and output *
******************************************************************************/
#include <sys/types.h>
-#include <iostream.h>
+#include <iostream>
#include <stdlib.h>
#include <sys/stat.h>
#include <fcntl.h>
// make the input fifo
if(mkfifo(DEF_INFILE, S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH) == -1) {
if(errno != EEXIST) {
- cerr << "mkfifo(): Error number " << errno << " occourred: " << strerror(errno) << "\n";
+ std::cerr << "mkfifo(): Error number " << errno << " occourred: " << strerror(errno) << "\n";
exit(-1);
}
}
// the input fifo - non blocking
if ((fdin = open(DEF_INFILE, O_RDONLY|O_NONBLOCK)) == -1) {
- cerr << "open(): Error number " << errno << " occourred: " << strerror(errno) << "\n";
+ std::cerr << "open(): Error number " << errno << " occourred: " << strerror(errno) << "\n";
exit(-1);
}
// make the output fifo
if(mkfifo(DEF_OUTFILE, S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH) == -1) {
if(errno != EEXIST) {
- cerr << "mkfifo(): Error number " << errno << " occourred: " << strerror(errno) << "\n";
+ std::cerr << "mkfifo(): Error number " << errno << " occourred: " << strerror(errno) << "\n";
exit(-1);
}
}
// the output fifo
if ((fdout = open(DEF_OUTFILE, O_RDWR|O_NONBLOCK)) == -1) {
- cerr << "open(): Error number " << errno << " occourred: " << strerror(errno) << "\n";
+ std::cerr << "open(): Error number " << errno << " occourred: " << strerror(errno) << "\n";
exit(-1);
}
}
// make the input fifo
if(mkfifo(infile, S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH) == -1) {
if(errno != EEXIST) {
- cerr << "mkfifo(): Error number " << errno << " occourred: " << strerror(errno);
+ std::cerr << "mkfifo(): Error number " << errno << " occourred: " << strerror(errno);
exit(-1);
}
}
// the input fifo - non blocking
if ((fdin = open(infile, O_RDONLY|O_NONBLOCK)) == -1) {
- cerr << "open(): Error number " << errno << " occourred: " << strerror(errno);
+ std::cerr << "open(): Error number " << errno << " occourred: " << strerror(errno);
exit(-1);
}
// make the output fifo
if(mkfifo(outfile, S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH) == -1) {
if(errno != EEXIST) {
- cerr << "mkfifo(): Error number " << errno << " occourred: " << strerror(errno);
+ std::cerr << "mkfifo(): Error number " << errno << " occourred: " << strerror(errno);
exit(-1);
}
}
// the output fifo
if ((fdout = open(outfile, O_RDWR|O_NONBLOCK)) == -1) {
- cerr << "open(): Error number " << errno << " occourred: " << strerror(errno);
+ std::cerr << "open(): Error number " << errno << " occourred: " << strerror(errno);
exit(-1);
}
}
if((ret = write(fdout, &b, 1)) != 1)
{
- cerr << "write(): Error number " << errno << " occourred: " << strerror(errno);
+ std::cerr << "write(): Error number " << errno << " occourred: " << strerror(errno);
exit(-1);
}
if((ret == -1) && (errno != EAGAIN))
{
- cerr << "read(): Error number " << errno << " occourred: " << strerror(errno);
+ std::cerr << "read(): Error number " << errno << " occourred: " << strerror(errno);
exit(-1);
}
if((ret = write(fdout, str, strlen(str))) != (int)strlen(str))
{
- cerr << "write(): Error number " << errno << " occourred: " << strerror(errno);
+ std::cerr << "write(): Error number " << errno << " occourred: " << strerror(errno);
exit(-1);
}
if((ret == -1) && (errno != EAGAIN))
{
- cerr << "read(): Error number " << errno << " occourred: " << strerror(errno);
+ std::cerr << "read(): Error number " << errno << " occourred: " << strerror(errno);
exit(-1);
}
* main.cc - the main stuff *
******************************************************************************/
#include <sys/types.h>
-#include <iostream.h>
+#include <iostream>
#include <stdlib.h>
#include <sys/stat.h>
#include <fcntl.h>
// usage
void PrintUsage(char *progname)
{
-cout << "Usage: " << progname << " [-i <filename>] [-o <filename>] [-h]\n";
-cout << "-i <filename>\t<filename> is the pipe to the controllers' serial input\n";
-cout << "-o <filename>\t<filename> is the pipe to the controllers' serial output\n";
-cout << "-h\t\tshow the help\n";
-cout << "\nTim Hurman - t.hurman@virgin.net\n";
+std::cout << "Usage: " << progname << " [-i <filename>] [-o <filename>] [-h]\n";
+std::cout << "-i <filename>\t<filename> is the pipe to the controllers' serial input\n";
+std::cout << "-o <filename>\t<filename> is the pipe to the controllers' serial output\n";
+std::cout << "-h\t\tshow the help\n";
+std::cout << "\nTim Hurman - t.hurman@virgin.net\n";
exit(0);
}
errflg++;
break;
default:
- cerr << "Invalid or unknown switch\n";
+ std::cerr << "Invalid or unknown switch\n";
errflg++;
break;
}
if(string[0] != 0)
fobj->SendByte(string[0]);
-
+
if(fobj->RecvStr(string) > 0)
view->AddStrOutWin(string);
*/
#include <sys/types.h>
-#include <iostream.h>
+#include <iostream>
#include <sys/wait.h> /* header for waitpid() and various macros */
#include <signal.h> /* header for signal functions */
#include <stdlib.h>
/* set the signal handler */
if(sigaction(SIGNAL, &act, NULL) < 0)
{
- cerr << "sigaction(): " << strerror(errno) << "\n";
+ std::cerr << "sigaction(): " << strerror(errno) << "\n";
exit(-1);
}
/* block it */
if(sigprocmask(SIG_BLOCK, &set, NULL) < 0)
{
- cerr << "sigprocmask(): " << strerror(errno) << "\n";
+ std::cerr << "sigprocmask(): " << strerror(errno) << "\n";
exit(-1);
}
/* block it */
if(sigprocmask(SIG_UNBLOCK, &set, NULL) < 0)
{
- cerr << "sigprocmask(): " << strerror(errno) << "\n";
+ std::cerr << "sigprocmask(): " << strerror(errno) << "\n";
exit(-1);
}