CFLAGS=`wx-config --cflags`
LFLAGS=`wx-config --libs`
+all: daphne
+
+.SUFFIXES: .cpp .o .hpp
+
+.cpp.o:
+ c++ $(CFLAGS) -c $<
+
+
daphne: main.o citclient.o userlogin.o testwindow.o who.o \
utils.o express_message.o send_express.o \
roomtree.o roomview.o tcp_sockets.o
roomtree.o roomview.o tcp_sockets.o \
$(LFLAGS) -o daphne
-main.o: main.cpp includes.hpp
- c++ -c $(CFLAGS) main.cpp
-
-citclient.o: citclient.cpp includes.hpp
- c++ -c $(CFLAGS) citclient.cpp
-
-userlogin.o: userlogin.cpp includes.hpp
- c++ -c $(CFLAGS) userlogin.cpp
-
-testwindow.o: testwindow.cpp includes.hpp
- c++ -c $(CFLAGS) testwindow.cpp
-
-who.o: who.cpp includes.hpp
- c++ -c $(CFLAGS) who.cpp
-
-utils.o: utils.cpp includes.hpp
- c++ -c $(CFLAGS) utils.cpp
-
-express_message.o: express_message.cpp includes.hpp
- c++ -c $(CFLAGS) express_message.cpp
-
-send_express.o: send_express.cpp includes.hpp
- c++ -c $(CFLAGS) send_express.cpp
-
-roomtree.o: roomtree.cpp includes.hpp
- c++ -c $(CFLAGS) roomtree.cpp
-
-roomview.o: roomview.cpp includes.hpp
- c++ -c $(CFLAGS) roomview.cpp
-
-tcp_sockets.o: tcp_sockets.cpp includes.hpp
- c++ -c $(CFLAGS) tcp_sockets.cpp
+clean:
+ rm -f *.o core daphne
// If a mutex is to be wrapped around this function in the future,
// it must begin HERE.
+ cout << "<" << command << "\n" ;
serv_puts(command);
serv_gets(response);
+ cout << ">" << response << "\n" ;
first_digit = (response.GetChar(0)) - '0';
if (response.GetChar(3) == '*')
void RoomView::do_readloop(wxString readcmd) {
wxString sendcmd, recvcmd, buf;
- wxStringList xferbuf;
- int i;
+ wxStringList xferbuf, msgbuf;
+ int i, r;
if (message_window != NULL) {
delete message_window;
for (i=0; i<xferbuf.Number(); ++i) {
buf.Printf("%s", (wxString *)xferbuf.Nth(i)->GetData());
sendcmd = "MSG0 " + buf;
- cout << "Sending cmd: <" << sendcmd << ">\n";
- i = citsock->serv_trans(sendcmd, recvcmd, xferbuf, ThisRoom);
- cout << "return code " << i << "\n";
- if (i == 1) {
- ListToMultiline(buf, xferbuf);
+ r = citsock->serv_trans(sendcmd, recvcmd, msgbuf, ThisRoom);
+ if (r == 1) {
+ ListToMultiline(buf, msgbuf);
message_window->WriteText(buf);
message_window->WriteText("\n\n");
}
- cout << "done outputttting\n";
}
}