diff options
author | dos-reis <gdr@axiomatics.org> | 2008-08-19 22:34:56 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2008-08-19 22:34:56 +0000 |
commit | 3fe344d2eb5c1155ecccd85fe6a994276c5f0cdb (patch) | |
tree | 874a5f2495a475f2451fa3e5d286b296140aab8b | |
parent | ee89a54eb72128aa7c4655d12a5c5e9a97858172 (diff) | |
download | open-axiom-3fe344d2eb5c1155ecccd85fe6a994276c5f0cdb.tar.gz |
* include/open-axiom.h (oa_buffer_address): New macro.
* sman/session.c (read_from_spad_io): Use It.
(accept_session_connection): Likewise.
(read_from_session): Likewise.
* sman/sman.c (read_from_spad_io): Likewise.
(read_from_manager): Likewise.
(exec_command_env): Explicitly cast the null pointer
to char*.
-rw-r--r-- | src/ChangeLog | 11 | ||||
-rw-r--r-- | src/include/open-axiom.h | 7 | ||||
-rw-r--r-- | src/sman/session.c | 14 | ||||
-rw-r--r-- | src/sman/sman.c | 7 |
4 files changed, 30 insertions, 9 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index bfaf4ae0..12ef3193 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,16 @@ 2008-08-19 Gabriel Dos Reis <gdr@cs.tamu.edu> + * include/open-axiom.h (oa_buffer_address): New macro. + * sman/session.c (read_from_spad_io): Use It. + (accept_session_connection): Likewise. + (read_from_session): Likewise. + * sman/sman.c (read_from_spad_io): Likewise. + (read_from_manager): Likewise. + (exec_command_env): Explicitly cast the null pointer + to char*. + +2008-08-19 Gabriel Dos Reis <gdr@cs.tamu.edu> + * interp/lisplib.boot (compDefineLisplib): Don't update $CategoryFrame with modemap for the constructor we just finished compiling. diff --git a/src/include/open-axiom.h b/src/include/open-axiom.h index 378e1802..391e12e3 100644 --- a/src/include/open-axiom.h +++ b/src/include/open-axiom.h @@ -70,4 +70,11 @@ typedef void* openaxiom_handle; # define OPENAXIOM_HAVE_GRAPHICS 1 #endif + +/* Return the address of the data buffer `BUF'. */ + +#define oa_buffer_address(BUF) ((openaxiom_byte*)&BUF[0]) + + + #endif /* OPENAXIOM_included */ diff --git a/src/sman/session.c b/src/sman/session.c index 3aacb787..4addf254 100644 --- a/src/sman/session.c +++ b/src/sman/session.c @@ -274,11 +274,12 @@ static void read_from_spad_io(void) { int ret_code; - ret_code = sread(spad_io, big_bad_buf, BufSize, "session: stdout socket"); + ret_code = sread(spad_io, oa_buffer_address(big_bad_buf), BufSize, + "session: stdout socket"); if (ret_code == -1) return; if(active_session != (openaxiom_sio *) 0) { - ret_code = swrite(active_session, big_bad_buf, ret_code, - NULL); + ret_code = swrite(active_session, oa_buffer_address(big_bad_buf), + ret_code, NULL); } } @@ -350,7 +351,8 @@ accept_session_connection(openaxiom_sio *server_sock) plSock->Socket.frame = get_int(spad_server); active_session = (openaxiom_sio *)plSock; get_string_buf(spad_server, big_bad_buf, BufSize); - ret_code = swrite((openaxiom_sio *)plSock, big_bad_buf, + ret_code = swrite((openaxiom_sio *)plSock, + oa_buffer_address(big_bad_buf), strlen(big_bad_buf)+1, "session: writing to InterpWindow"); if (ret_code == -1) @@ -373,14 +375,14 @@ read_from_session(openaxiom_sio *sock) send_int(spad_server, sock->frame); } active_session = sock; - ret_code = sread(sock, big_bad_buf, BufSize, + ret_code = sread(sock, oa_buffer_address(big_bad_buf), BufSize, "session: reading InterpWindow"); if (ret_code == -1) { active_session = (openaxiom_sio *) 0; reading_output = 0; return; } - ret_code = swrite(spad_io, big_bad_buf, ret_code, + ret_code = swrite(spad_io, oa_buffer_address(big_bad_buf), ret_code, "session: writing SessionIO"); if (ret_code == -1) { active_session = (openaxiom_sio *)0 ; diff --git a/src/sman/sman.c b/src/sman/sman.c index a92980b8..c7b5aa62 100644 --- a/src/sman/sman.c +++ b/src/sman/sman.c @@ -403,7 +403,7 @@ exec_command_env(char *command,char ** env) { char new_command[512]; sprintf(new_command, "exec %s", command); - execle("/bin/sh","/bin/sh", "-c", new_command, 0, env); + execle("/bin/sh","/bin/sh", "-c", new_command, (char*)NULL, env); } static SpadProcess * @@ -611,7 +611,7 @@ read_from_spad_io(int ptcNum) } } else - ret_code = swrite(session_io, big_bad_buf, ret_code, + ret_code = swrite(session_io, oa_buffer_address(big_bad_buf), ret_code, "writing to session man"); if (ret_code == -1) { perror("writing output to session manager"); @@ -624,7 +624,8 @@ static void read_from_manager(int ptcNum) { int ret_code; - ret_code = sread(session_io, big_bad_buf, BufSize, "reading session io"); + ret_code = sread(session_io, oa_buffer_address(big_bad_buf), BufSize, + "reading session io"); if (ret_code == -1) { return; } |