You can subscribe to this list here.
| 2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(22) |
Aug
(395) |
Sep
(142) |
Oct
(7) |
Nov
(8) |
Dec
(2) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2002 |
Jan
(48) |
Feb
(79) |
Mar
(10) |
Apr
|
May
(4) |
Jun
(6) |
Jul
(3) |
Aug
(5) |
Sep
(1) |
Oct
|
Nov
(4) |
Dec
(22) |
| 2003 |
Jan
(10) |
Feb
(6) |
Mar
(1) |
Apr
|
May
|
Jun
(24) |
Jul
(4) |
Aug
|
Sep
(1) |
Oct
(46) |
Nov
(1) |
Dec
(11) |
| 2004 |
Jan
(2) |
Feb
(8) |
Mar
|
Apr
(16) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2010 |
Jan
|
Feb
|
Mar
|
Apr
(11) |
May
|
Jun
|
Jul
|
Aug
(2) |
Sep
(3) |
Oct
|
Nov
|
Dec
|
|
From: Alex M. S. <arc...@us...> - 2010-09-21 17:46:22
|
Update of /cvsroot/nettle/nettle In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv20419 Modified Files: GNUmakefile Log Message: Largely commit James Bursa's changes for SSH support - some slight tweaks to the code in c/wimp which was preventing it building with Norcroft, and I've removed the \!Run wimpslot changes for the time being (I guess I'd like to do something clever based on whether it's Norcroft-built or gcc-built). Doesn't quite seem to work for me as-is (claims to be missing ciphers), but I don't think that's directly caused by anything in this patch. Index: GNUmakefile =================================================================== RCS file: /cvsroot/nettle/nettle/GNUmakefile,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** GNUmakefile 29 Aug 2010 19:45:29 -0000 1.1 --- GNUmakefile 21 Sep 2010 17:46:13 -0000 1.2 *************** *** 5,8 **** --- 5,9 ---- CC = /home/riscos/cross/bin/arm-unknown-riscos-gcc CFLAGS = -c -std=c9x -Wall -mpoke-function-name -I/home/riscos/env/include + CONFIG = -DWITH_SSH LIBS = -L/home/riscos/env/lib -lssh2 -lgcrypt -lgpg-error *************** *** 27,37 **** RunImage,e1f: $(OBJS) @echo " LINK:" $@ ! @$(CC) -o $@ $(OBJS) $(LIBS) ! $(OBJS): $(HEADERS) %.o: %.c @echo " COMPILE:" $< ! @$(CC) $(CFLAGS) -o $@ $< # intentionally compiled using native compiler --- 28,38 ---- RunImage,e1f: $(OBJS) @echo " LINK:" $@ ! @$(CC) -static -o $@ $(OBJS) $(LIBS) ! $(OBJS): $(HEADERS) GNUmakefile %.o: %.c @echo " COMPILE:" $< ! @$(CC) $(CFLAGS) $(CONFIG) -o $@ $< # intentionally compiled using native compiler |
|
From: Alex M. S. <arc...@us...> - 2010-09-21 17:46:22
|
Update of /cvsroot/nettle/nettle/h In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv20419/h Modified Files: globals nettle Log Message: Largely commit James Bursa's changes for SSH support - some slight tweaks to the code in c/wimp which was preventing it building with Norcroft, and I've removed the \!Run wimpslot changes for the time being (I guess I'd like to do something clever based on whether it's Norcroft-built or gcc-built). Doesn't quite seem to work for me as-is (claims to be missing ciphers), but I don't think that's directly caused by anything in this patch. Index: globals =================================================================== RCS file: /cvsroot/nettle/nettle/h/globals,v retrieving revision 1.89 retrieving revision 1.90 diff -C2 -d -r1.89 -r1.90 *** globals 2 Apr 2004 06:32:00 -0000 1.89 --- globals 21 Sep 2010 17:46:13 -0000 1.90 *************** *** 12,15 **** --- 12,19 ---- #include "dnslib.h" + #ifdef WITH_SSH + #include <libssh2.h> + #endif + /**** GLOBAL DEFAULT/OPTIONS ***************/ *************** *** 164,167 **** --- 168,181 ---- dns_t *dns; /* handle for dns lookup */ char socket_state; /* state of socket (see nettle.h for states) */ + + #ifdef WITH_SSH + LIBSSH2_SESSION *ssh_session; /* SSH session object (libssh2) */ + LIBSSH2_CHANNEL *ssh_channel; /* SSH channel object (libssh2) */ + unsigned int ssh_negotiate_state; /* SSH negotiation state + see connect_session_ssh() */ + bool ssh_more_read; /* wimp_pollsocket() needs to be called on + this session */ + #endif + char current_fg; /* current foreground colour */ char current_bg; /* current background colour */ Index: nettle =================================================================== RCS file: /cvsroot/nettle/nettle/h/nettle,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** nettle 26 Oct 2003 16:44:51 -0000 1.40 --- nettle 21 Sep 2010 17:46:13 -0000 1.41 *************** *** 14,20 **** #define NETTLE_SESSION_NONE 0 ! #define NETTLE_SESSION_RESOLVE 1 ! #define NETTLE_SESSION_CONNECT 2 ! #define NETTLE_SESSION_CONNECTED 3 #define NETTLE_ESCAPE_NONE 0 --- 14,24 ---- #define NETTLE_SESSION_NONE 0 ! #define NETTLE_SESSION_START 1 ! #define NETTLE_SESSION_PROMPT_USER 2 ! #define NETTLE_SESSION_PROMPT_PASS 3 ! #define NETTLE_SESSION_RESOLVE 4 ! #define NETTLE_SESSION_CONNECT 5 ! #define NETTLE_SESSION_NEGOTIATE 6 ! #define NETTLE_SESSION_CONNECTED 7 #define NETTLE_ESCAPE_NONE 0 *************** *** 138,141 **** --- 142,147 ---- bool nettle_start_taskwindow(const char *cmd); + bool connect_session_ssh(struct session_struct *session); + void write_out_string(struct session_struct *, const char *); void write_out_strings(struct session_struct *, ...); /* term with NUL ptr */ |
|
From: Alex M. S. <arc...@us...> - 2010-09-21 17:46:22
|
Update of /cvsroot/nettle/nettle/c In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv20419/c Modified Files: keyboard nettle wimp Log Message: Largely commit James Bursa's changes for SSH support - some slight tweaks to the code in c/wimp which was preventing it building with Norcroft, and I've removed the \!Run wimpslot changes for the time being (I guess I'd like to do something clever based on whether it's Norcroft-built or gcc-built). Doesn't quite seem to work for me as-is (claims to be missing ciphers), but I don't think that's directly caused by anything in this patch. Index: keyboard =================================================================== RCS file: /cvsroot/nettle/nettle/c/keyboard,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** keyboard 1 Dec 2002 17:22:56 -0000 1.12 --- keyboard 21 Sep 2010 17:46:13 -0000 1.13 *************** *** 79,82 **** --- 79,86 ---- SETBLOCK (1, "\r"); } + else if (session->connection_type == NETTLE_SSH) + { + SETBLOCK (1, "\n"); + } else if (session->other_session_flags & NETTLE_OTHER_LINEFEED_MODE) { Index: nettle =================================================================== RCS file: /cvsroot/nettle/nettle/c/nettle,v retrieving revision 1.122 retrieving revision 1.123 diff -C2 -d -r1.122 -r1.123 *** nettle 13 Apr 2004 20:30:56 -0000 1.122 --- nettle 21 Sep 2010 17:46:13 -0000 1.123 *************** *** 165,170 **** } } - else - *port = 23; /* if the port is <1, then it's either invalid or was too big and got wrapped */ --- 165,168 ---- *************** *** 195,198 **** --- 193,199 ---- return false; + port = 23; + if (params->connection_type == NETTLE_SSH) + port = 22; if (get_host_port (host, &port) == false) return false; *************** *** 323,326 **** --- 324,330 ---- return false; + port = 23; + if (connection_type == NETTLE_SSH) + port = 22; if (get_host_port(string, &port) == false) return false; *************** *** 567,570 **** --- 571,580 ---- session->want_blink = false; session->socket_state = NETTLE_SESSION_NONE; + #ifdef WITH_SSH + session->ssh_session = NULL; + session->ssh_channel = NULL; + session->ssh_negotiate_state = 0; + session->ssh_more_read = false; + #endif session->dns = NULL; /* Should be null for non telnet/ssh sessions */ *************** *** 574,590 **** case NETTLE_TELNET: case NETTLE_SSH: ! /* host, port already parsed */ ! session->socket_handle=-1; ! session->socket_state=NETTLE_SESSION_RESOLVE; session->socket_port = params->port; ! strcpy (session->socket_host, params->host); ! session->dns = dns_gethostbyname(session->socket_host); ! assert(session->dns != NULL); ! ! if (params->connection_type==NETTLE_SSH) { session->local_echo=false; } - break; --- 584,595 ---- case NETTLE_TELNET: case NETTLE_SSH: ! session->socket_handle = -1; ! session->socket_state = NETTLE_SESSION_START; session->socket_port = params->port; ! strcpy(session->socket_host, params->host); ! if (params->connection_type == NETTLE_SSH) { session->local_echo=false; } break; *************** *** 767,774 **** case NETTLE_SSH: set_title_bar(session->window_handle, lookup_static ("title_conn")); - write_out_strings (session, - lookup_static_var ("lookup", 1, - session->socket_host), - "\r\n", 0); main_requirenull = true; break; --- 772,775 ---- *************** *** 798,801 **** --- 799,919 ---- } + + #ifdef WITH_SSH + /** + * Start SSH on a connected socket. + * + * Returns true on success, false on failure. + */ + bool connect_session_ssh(struct session_struct *session) + { + LIBSSH2_SESSION *ssh = session->ssh_session; + LIBSSH2_CHANNEL *channel = session->ssh_channel; + const char *fingerprint; + unsigned int i; + int code = 0; + char *errmsg; + + assert(session->connection_type == NETTLE_SSH); + assert(session->socket_state == NETTLE_SESSION_NEGOTIATE); + + if (ssh == NULL) + { + write_out_strings(session, "Nettle: Creating SSH session", 0); + + ssh = libssh2_session_init(); + if (!ssh) + return false; + + libssh2_session_set_blocking(ssh, 0); + + session->ssh_session = ssh; + } + + switch (session->ssh_negotiate_state) + { + case 0: + code = libssh2_session_startup(ssh, session->socket_handle); + if (code == 0) + { + fingerprint = libssh2_hostkey_hash(ssh, LIBSSH2_HOSTKEY_HASH_MD5); + write_out_strings(session, "\r\n", "Nettle: Fingerprint: ", 0); + for (i = 0; i < 16; i++) { + char hex[10]; + snprintf(hex, sizeof hex, "%02x ", (unsigned char) fingerprint[i]); + write_out_strings(session, hex, 0); + } + write_out_strings(session, "\r\n", 0); + } + break; + + case 1: + code = libssh2_userauth_password(ssh, session->login_user, + session->login_pass); + break; + + case 2: + channel = libssh2_channel_open_session(ssh); + if (channel) + session->ssh_channel = channel; + else + code = libssh2_session_last_errno(ssh); + break; + + case 3: + code = libssh2_channel_request_pty_ex(channel, + terminal_name[session->terminal_type], + strlen(terminal_name[session->terminal_type]), + NULL, 0, + session->terminal_size.x, + session->terminal_size.y, + 0, 0); + break; + + case 4: + code = libssh2_channel_shell(channel); + if (code == 0) + session->socket_state = NETTLE_SESSION_CONNECTED; + break; + } + + if (code == 0) + { + char state[10]; + session->ssh_negotiate_state++; + snprintf(state, sizeof state, "%i", session->ssh_negotiate_state); + write_out_strings(session, state, 0); + } + else if (code == LIBSSH2_ERROR_EAGAIN) + { + write_out_strings(session, ".", 0); + main_requirenull = true; + } + else + { + char message[20]; + snprintf(message, sizeof message, "%i", + session->ssh_negotiate_state); + libssh2_session_last_error(ssh, &errmsg, 0, 0); + write_out_strings(session, "\r\n", + "Nettle: SSH connection failed in step ", + message, ": ", errmsg, "\r\n", 0); + if (channel) + libssh2_channel_free(channel); + libssh2_session_disconnect(ssh, ""); + libssh2_session_free(ssh); + return false; + } + + if (session->socket_state == NETTLE_SESSION_CONNECTED) + { + write_out_strings(session, "\r\n", "Nettle: SSH connected", "\r\n", 0); + } + + return true; + } + #endif + + void write_out_string(struct session_struct *session, const char *string) { *************** *** 1008,1011 **** --- 1126,1132 ---- break; case NETTLE_SSH: + #ifdef WITH_SSH + return libssh2_channel_write(session->ssh_channel, data, length); + #endif break; case NETTLE_TASKWINDOW: *************** *** 1565,1568 **** --- 1686,1697 ---- break; + + case NETTLE_SSH: + #ifdef WITH_SSH + libssh2_channel_request_pty_size(session->ssh_channel, + session->terminal_size.x, + session->terminal_size.y); + #endif + break; } } Index: wimp =================================================================== RCS file: /cvsroot/nettle/nettle/c/wimp,v retrieving revision 1.198 retrieving revision 1.199 diff -C2 -d -r1.198 -r1.199 *** wimp 29 Aug 2010 19:45:29 -0000 1.198 --- wimp 21 Sep 2010 17:46:13 -0000 1.199 *************** *** 190,199 **** set_title_bar(session->window_handle,string); ! session->socket_state = NETTLE_SESSION_CONNECTED; ! write_out_strings(session, ! lookup_static_var("connected", 1, ! socket_ip_string(session->socket_ip)), ! "\r\n", ! 0); main_requirenull = true; /* read any data waiting on the socket */ --- 190,206 ---- set_title_bar(session->window_handle,string); ! if (session->connection_type == NETTLE_SSH) ! { ! session->socket_state = NETTLE_SESSION_NEGOTIATE; ! } ! else ! { ! session->socket_state = NETTLE_SESSION_CONNECTED; ! write_out_strings(session, ! lookup_static_var("connected", 1, ! socket_ip_string(session->socket_ip)), ! "\r\n", ! 0); ! } main_requirenull = true; /* read any data waiting on the socket */ *************** *** 226,229 **** --- 233,247 ---- + static void wimp_pollnegotiate(struct session_struct *session) + { + #ifdef WITH_SSH + if (!connect_session_ssh(session)) { + socket_close(session->socket_handle); + session->socket_handle = -1; + session->socket_state = NETTLE_SESSION_NONE; + } + #endif + } + static void wimp_pollsocket(struct session_struct *session) *************** *** 231,234 **** --- 249,254 ---- int packet_length=-1; char receive_block[RECEIVE_BLOCK_LENGTH]; + bool eof = false; + const char *error = NULL; switch (session->connection_type) *************** *** 237,258 **** packet_length = recv(session->socket_handle, receive_block, RECEIVE_BLOCK_LENGTH, 0); break; case NETTLE_SSH: break; } ! if (packet_length == -1 && errno == EWOULDBLOCK) ! /* we've read all the available data */ ! return; ! ! if (packet_length == 0 || packet_length == -1) { /* EOF or error condition */ set_title_bar(session->window_handle, lookup_static("title_disconnect")); reset_terminal(session); ! if (packet_length == 0) { - /* EOF received */ write_out_strings(session, "\r\n", lookup_static("closed"), "\r\n", 0); } --- 257,293 ---- packet_length = recv(session->socket_handle, receive_block, RECEIVE_BLOCK_LENGTH, 0); + if (packet_length == -1 && errno == EWOULDBLOCK) + /* we've read all the available data */ + return; + else if (packet_length == -1) + error = socket_strerror(errno); + else if (packet_length == 0) + /* EOF received */ + eof = true; break; case NETTLE_SSH: + #ifdef WITH_SSH + packet_length = libssh2_channel_read(session->ssh_channel, receive_block, + RECEIVE_BLOCK_LENGTH); + if (packet_length == 0 || packet_length == LIBSSH2_ERROR_EAGAIN) + /* we've read all the available data */ + return; + else if (packet_length < 0) + libssh2_session_last_error(session->ssh_session, &error, 0, 0); + else + /* there may be more data to read next time */ + session->ssh_more_read = true; + #endif break; } ! if (eof || error) { /* EOF or error condition */ set_title_bar(session->window_handle, lookup_static("title_disconnect")); reset_terminal(session); ! if (eof) { write_out_strings(session, "\r\n", lookup_static("closed"), "\r\n", 0); } *************** *** 261,265 **** write_out_strings(session, "\r\n", lookup_static_var("socketerror", 1, ! socket_strerror(errno)), "\r\n", 0); } --- 296,300 ---- write_out_strings(session, "\r\n", lookup_static_var("socketerror", 1, ! error), "\r\n", 0); } *************** *** 304,307 **** --- 339,370 ---- switch (session->socket_state) { + case NETTLE_SESSION_START: + if (session->connection_type == NETTLE_SSH && + session->login_user == NULL) { + write_out_strings(session, "SSH user: ", 0); + session->line_editor_buffer[0] = 0; + session->socket_state = NETTLE_SESSION_PROMPT_USER; + } else if (session->connection_type == NETTLE_SSH && + session->login_pass == NULL) { + write_out_strings(session, "SSH password: ", 0); + session->line_editor_buffer[0] = 0; + session->socket_state = NETTLE_SESSION_PROMPT_PASS; + } else { + write_out_strings (session, + lookup_static_var ("lookup", 1, + session->socket_host), + "\r\n", 0); + session->dns = dns_gethostbyname(session->socket_host); + assert(session->dns != NULL); + session->socket_state = NETTLE_SESSION_RESOLVE; + main_requirenull = true; + } + break; + + case NETTLE_SESSION_PROMPT_USER: + case NETTLE_SESSION_PROMPT_PASS: + /* awaiting entry - see key_pressed() */ + break; + case NETTLE_SESSION_RESOLVE: wimp_pollresolve(session); *************** *** 312,316 **** --- 375,388 ---- break; + case NETTLE_SESSION_NEGOTIATE: + wimp_pollnegotiate(session); + break; + case NETTLE_SESSION_CONNECTED: + #ifdef WITH_SSH + if (session->ssh_more_read) + wimp_pollsocket(session); + #endif + if (session->connection_type != NETTLE_TASKWINDOW) { *************** *** 1768,1771 **** --- 1840,1901 ---- } } + else if (session->socket_state == NETTLE_SESSION_PROMPT_USER) + { + if ((' ' <= key && key <= '~') || + (128 <= key && key <= 255)) + { + char s[2]; + + s[0] = key; + s[1] = '\0'; + + if (strlen(session->line_editor_buffer) < + MAX_LINEEDITOR_LENGTH - 2) + { + strcat(session->line_editor_buffer, s); + write_out_strings(session, s, 0); + } + key_status = true; + } + else if (key == 13) + { + session->login_user = strdup(session->line_editor_buffer); + write_out_strings(session, "\r\n", "SSH password: ", 0); + session->line_editor_buffer[0] = 0; + session->socket_state = NETTLE_SESSION_PROMPT_PASS; + key_status = true; + } + } + else if (session->socket_state == NETTLE_SESSION_PROMPT_PASS) + { + if ((' ' <= key && key <= '~') || + (128 <= key && key <= 255)) + { + char s[2]; + + s[0] = key; + s[1] = '\0'; + + if (strlen(session->line_editor_buffer) < + MAX_LINEEDITOR_LENGTH - 2) + { + strcat(session->line_editor_buffer, s); + write_out_strings(session, "*", 0); + } + key_status = true; + } + else if (key == 13) + { + session->login_pass = strdup(session->line_editor_buffer); + write_out_strings (session, "\r\n", + lookup_static_var ("lookup", 1, + session->socket_host), + "\r\n", 0); + session->dns = dns_gethostbyname(session->socket_host); + assert(session->dns != NULL); + session->socket_state = NETTLE_SESSION_RESOLVE; + key_status = true; + } + } } } *************** *** 3170,3174 **** --- 3300,3308 ---- char *menu_title =get_menu_item("Connection"); char *menu_telnet =get_menu_item("Telnet"); + #ifdef WITH_SSH + char *menu_ssh =get_menu_item("SSH"); + #else char *menu_ssh =get_grey_menu_item("SSH"); + #endif char *menu_taskwindow=get_last_menu_item("Taskwindow"); |
|
From: Alex M. S. <arc...@us...> - 2010-08-29 19:45:38
|
Update of /cvsroot/nettle/nettle/c In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv30625/c Modified Files: choices dnslib main socket sockwatch wimp Log Message: Committing James Bursa's changes for building with GCC. Haven't tested this aspect of it, but verified that it still builds OK with Norcroft C 5.54 with these changes applied. Index: choices =================================================================== RCS file: /cvsroot/nettle/nettle/c/choices,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** choices 11 Apr 2010 21:39:02 -0000 1.42 --- choices 29 Aug 2010 19:45:29 -0000 1.43 *************** *** 23,27 **** --- 23,30 ---- /*#include <errno.h>*/ + #include "sys/types.h" + #ifndef __UNIXLIB_TYPES_H #define errno __errno + #endif extern int errno; Index: dnslib =================================================================== RCS file: /cvsroot/nettle/nettle/c/dnslib,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** dnslib 20 Oct 2003 20:39:24 -0000 1.12 --- dnslib 29 Aug 2010 19:45:29 -0000 1.13 *************** *** 10,14 **** --- 10,16 ---- #include "sys/types.h" + #ifndef __UNIXLIB_TYPES_H #include "inetlib.h" + #endif #include "netinet/in.h" Index: main =================================================================== RCS file: /cvsroot/nettle/nettle/c/main,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** main 10 Feb 2002 03:12:59 -0000 1.45 --- main 29 Aug 2010 19:45:29 -0000 1.46 *************** *** 24,28 **** * and during dns / connect, etc.) */ ! const char *__dynamic_da_name = "Nettle Heap"; --- 24,28 ---- * and during dns / connect, etc.) */ ! const char * const __dynamic_da_name = "Nettle Heap"; Index: socket =================================================================== RCS file: /cvsroot/nettle/nettle/c/socket,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** socket 13 Apr 2004 20:30:56 -0000 1.39 --- socket 29 Aug 2010 19:45:29 -0000 1.40 *************** *** 15,20 **** --- 15,22 ---- #include "sys/ioctl.h" #include "sys/socket.h" + #ifndef __UNIXLIB_TYPES_H #include "socklib.h" #include "inetlib.h" + #endif #include "sys/errno.h" #include "sys/time.h" *************** *** 28,33 **** --- 30,39 ---- #include "sockwatch.h" + #ifndef __UNIXLIB_TYPES_H #define ioctl socketioctl #define close socketclose + #else + #define timerclear(tvp) ((tvp)->tv_sec = (tvp)->tv_usec = 0) + #endif int socket_connecttoip(unsigned long ip_address,int port_number) Index: sockwatch =================================================================== RCS file: /cvsroot/nettle/nettle/c/sockwatch,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** sockwatch 26 Oct 2003 13:45:20 -0000 1.7 --- sockwatch 29 Aug 2010 19:45:29 -0000 1.8 *************** *** 11,14 **** --- 11,15 ---- #include <stdio.h> + #include <unistd.h> #include "kernel.h" *************** *** 19,24 **** --- 20,27 ---- #include "sys/ioctl.h" #include "sys/socket.h" + #ifndef __UNIXLIB_TYPES_H #include "socklib.h" #include "sys/filio.h" + #endif #include "generic.h" *************** *** 32,37 **** --- 35,42 ---- #define SocketWatch_DeallocPW 0x52284 + #ifndef __UNIXLIB_TYPES_H #define ioctl socketioctl #define close socketclose + #endif typedef struct *************** *** 47,50 **** --- 52,60 ---- return; + #ifdef __UNIXLIB_TYPES_H + /* get the underlying RISC OS socket handle from the Unixlib socket */ + socket = __unixlib_getdev(socket); + #endif + if ( newinternet ) { *************** *** 68,71 **** --- 78,85 ---- return; + #ifdef __UNIXLIB_TYPES_H + socket = __unixlib_getdev(socket); + #endif + if ( newinternet ) { Index: wimp =================================================================== RCS file: /cvsroot/nettle/nettle/c/wimp,v retrieving revision 1.197 retrieving revision 1.198 diff -C2 -d -r1.197 -r1.198 *** wimp 13 Dec 2003 17:42:56 -0000 1.197 --- wimp 29 Aug 2010 19:45:29 -0000 1.198 *************** *** 13,18 **** --- 13,21 ---- #include "sys/errno.h" + #include "sys/types.h" + #ifndef __UNIXLIB_TYPES_H #include "socklib.h" #include "unixlib.h" + #endif #include "sys/time.h" |
|
From: Alex M. S. <arc...@us...> - 2010-08-29 19:45:38
|
Update of /cvsroot/nettle/nettle In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv30625 Added Files: GNUmakefile Log Message: Committing James Bursa's changes for building with GCC. Haven't tested this aspect of it, but verified that it still builds OK with Norcroft C 5.54 with these changes applied. --- NEW FILE: GNUmakefile --- # # Makefile for cross-compiling Nettle # CC = /home/riscos/cross/bin/arm-unknown-riscos-gcc CFLAGS = -c -std=c9x -Wall -mpoke-function-name -I/home/riscos/env/include LIBS = -L/home/riscos/env/lib -lssh2 -lgcrypt -lgpg-error OBJS = chardefn.o choices.o dnslib.o globals.o init.o keyboard.o lineedit.o \ main.o misc.o hotlist.o nettle.o process.o socket.o quit.o seln.o \ wimp.o zapgen.o fortify.o sockwatch.o messages.o termlist.o url.o \ wimputil.o spool.o mouse.o scripts.o processesc.o processiac.o \ procesescx.o HEADERS = chardefn.h choices.h dnslib.h fortify.h generic.h globals.h \ graphics.h hotlist.h init.h keyboard.h lineedit.h main.h messages.h \ misc.h mouse.h nettle.h process.h quit.h scripts.h seln.h socket.h \ sockwatch.h spool.h templ.h termlist.h ufortify.h url.h wimp.h \ wimputil.h zapredraw.h TEMPLATES = !Nettle/Resources/UK/Templates,fec all: !Nettle/!RunImage,ff8 !Nettle/!RunImage,ff8: RunImage,e1f @echo " ELF2AIF:" $@ @/home/riscos/cross/bin/elf2aif $< $@ RunImage,e1f: $(OBJS) @echo " LINK:" $@ @$(CC) -o $@ $(OBJS) $(LIBS) $(OBJS): $(HEADERS) %.o: %.c @echo " COMPILE:" $< @$(CC) $(CFLAGS) -o $@ $< # intentionally compiled using native compiler templheadr: templheadr.c gcc -o $@ $(LINKFLAGS) $? templ.h: templheadr $(TEMPLATES) ./templheadr $(TEMPLATES) $@ # convert RISC OS style c and h directories into extensions using symlinks %.h: h/% ln -s $< $@ %.c: c/% @ln -s $< $@ clean: rm --force --verbose *.o templ.h templheadr rm --force --verbose RunImage,e1f !Nettle/!RunImage,ff8 |
|
From: Alex M. S. <arc...@us...> - 2010-04-11 21:56:52
|
Update of /cvsroot/nettle/nettle In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv19722 Modified Files: !RelSrc,fd7 !Release,fd7 Log Message: Add in code to the release scripts to remove the new ZRMessages etc. CVS directories. ***** Bogus filespec: !RelSrc,fd7,1.8,1.9 ***** Bogus filespec: !Release,fd7,1.9,1.10 |
|
From: Alex M. S. <arc...@us...> - 2010-04-11 21:39:11
|
Update of /cvsroot/nettle/nettle/!Nettle/Resources/ZRMessages/UK In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv13883/!Nettle/Resources/ZRMessages/UK Added Files: Messages Log Message: Update release scripts for beta release. Update various dates from 2003/2004 to 2010. Update ZapRedraw to 0.48 for BeagleBoard compatibility - this also requires a 'fake' ZapFontsMessages path to be configured in the event that the user doesn't have a ZapFonts installation, so have added these messages too, and configuration of them into the !Run file. Change the build options to add -c90 (this seems to fix the __assert2 issue that Castle's C compiler causes with stubsg), -Wp to suppress the non-ANSI include warnings that TCPIPLibs generates, and -memaccess -L22-S22-L41 to build the binary in a way that the BeagleBoard should be happy with. (These changes are partly based on the ones that James Peacock sent me). And do a nasty change to c/choices to allow the errno.h that I have to build with -c90 - it appears to fail to build for me, so temporarily disable the #include and locally declare errno. Tested/built on RPCEmu and it seems to run/display OK. --- NEW FILE: Messages --- # UK Messages file for ZapFonts # (c) 2001-2004 Zap Developers NoHandles:No more font handles NoEHandles:No more encoding handles CantDie:ZapRedraw is in use BadHandle:Invalid font handle BadEHandle:Invalid encoding handle NotFont:Font file corrupt NotEnc:Encoding file corrupt NotFound:Font '%0' not found ENotFound:Encoding '%0' not found BadLink:Invalid font link file FontCache:Zap font cache NoCache:Font handles require RISC OS 3.50 or later UKSWI:Unknown ZapRedraw SWI NotVDU:Attempt to use a DSA font in VDU mode NotImpl:ZapRedraw_RedrawRaster is no longer implemented BadMenu:Unrecognised font in menu in ZapRedraw_DecodeMenu BadReason:Unknown ZapRedraw_Encoding reason code FontList:Font list Encodings:Encodings SysFont:System font Regular:(Regular) Name:Name NBar:---- Size:Size SBar:---- Cols:Colours OBar:------- UseH:Use UBar:--- CMem:Cache memory CBar:------------ SysFntV:System font (VDU) SysFntD:System font (DSA) CSize:Cache size: CFree:free: HZRDTDY:* HZRDLST:* HZRDCAT:* HZRDINS:* SZRDCAT SZRDTDY SZRDLST:Syntax: * SZRDINS:Syntax: * |
|
From: Alex M. S. <arc...@us...> - 2010-04-11 21:39:11
|
Update of /cvsroot/nettle/nettle/!Nettle/Resources In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv13883/!Nettle/Resources Modified Files: ZapRedraw,ffa Log Message: Update release scripts for beta release. Update various dates from 2003/2004 to 2010. Update ZapRedraw to 0.48 for BeagleBoard compatibility - this also requires a 'fake' ZapFontsMessages path to be configured in the event that the user doesn't have a ZapFonts installation, so have added these messages too, and configuration of them into the !Run file. Change the build options to add -c90 (this seems to fix the __assert2 issue that Castle's C compiler causes with stubsg), -Wp to suppress the non-ANSI include warnings that TCPIPLibs generates, and -memaccess -L22-S22-L41 to build the binary in a way that the BeagleBoard should be happy with. (These changes are partly based on the ones that James Peacock sent me). And do a nasty change to c/choices to allow the errno.h that I have to build with -c90 - it appears to fail to build for me, so temporarily disable the #include and locally declare errno. Tested/built on RPCEmu and it seems to run/display OK. ***** Bogus filespec: ZapRedraw,ffa,1.1.1.1,1.2 |
|
From: Alex M. S. <arc...@us...> - 2010-04-11 21:39:11
|
Update of /cvsroot/nettle/nettle/!Nettle/Resources/UK In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv13883/!Nettle/Resources/UK Modified Files: Messages Log Message: Update release scripts for beta release. Update various dates from 2003/2004 to 2010. Update ZapRedraw to 0.48 for BeagleBoard compatibility - this also requires a 'fake' ZapFontsMessages path to be configured in the event that the user doesn't have a ZapFonts installation, so have added these messages too, and configuration of them into the !Run file. Change the build options to add -c90 (this seems to fix the __assert2 issue that Castle's C compiler causes with stubsg), -Wp to suppress the non-ANSI include warnings that TCPIPLibs generates, and -memaccess -L22-S22-L41 to build the binary in a way that the BeagleBoard should be happy with. (These changes are partly based on the ones that James Peacock sent me). And do a nasty change to c/choices to allow the errno.h that I have to build with -c90 - it appears to fail to build for me, so temporarily disable the #include and locally declare errno. Tested/built on RPCEmu and it seems to run/display OK. Index: Messages =================================================================== RCS file: /cvsroot/nettle/nettle/!Nettle/Resources/UK/Messages,v retrieving revision 1.61 retrieving revision 1.62 diff -C2 -d -r1.61 -r1.62 *** Messages 1 Apr 2004 21:21:42 -0000 1.61 --- Messages 11 Apr 2010 21:39:02 -0000 1.62 *************** *** 3,9 **** AppName:Nettle ! AppPurpose:Arachnid telnet client ! AppAuthor:© Nettle developers, 2000-2004 ! AppVersion:v0.2042r (04 April 2004) Info:Info> --- 3,9 ---- AppName:Nettle ! AppPurpose:Telnet client ! AppAuthor:© Nettle developers, 2000-2010 ! AppVersion:v0.2043b (11 April 2010) Info:Info> |
|
From: Alex M. S. <arc...@us...> - 2010-04-11 21:39:11
|
Update of /cvsroot/nettle/nettle/!Nettle/Resources/Germany In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv13883/!Nettle/Resources/Germany Modified Files: Messages Log Message: Update release scripts for beta release. Update various dates from 2003/2004 to 2010. Update ZapRedraw to 0.48 for BeagleBoard compatibility - this also requires a 'fake' ZapFontsMessages path to be configured in the event that the user doesn't have a ZapFonts installation, so have added these messages too, and configuration of them into the !Run file. Change the build options to add -c90 (this seems to fix the __assert2 issue that Castle's C compiler causes with stubsg), -Wp to suppress the non-ANSI include warnings that TCPIPLibs generates, and -memaccess -L22-S22-L41 to build the binary in a way that the BeagleBoard should be happy with. (These changes are partly based on the ones that James Peacock sent me). And do a nasty change to c/choices to allow the errno.h that I have to build with -c90 - it appears to fail to build for me, so temporarily disable the #include and locally declare errno. Tested/built on RPCEmu and it seems to run/display OK. Index: Messages =================================================================== RCS file: /cvsroot/nettle/nettle/!Nettle/Resources/Germany/Messages,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Messages 1 Apr 2004 22:31:58 -0000 1.3 --- Messages 11 Apr 2010 21:39:02 -0000 1.4 *************** *** 3,9 **** AppName:Nettle ! AppPurpose:Telnet Client ! AppAuthor:© Nettle Entwickler, 2000-2004 ! AppVersion:v0.2040pre (04 April 2004) Info:Info> --- 3,9 ---- AppName:Nettle ! AppPurpose:Telnet client ! AppAuthor:© Nettle Entwickler, 2000-2010 ! AppVersion:v0.2043b (11 April 2010) Info:Info> |
|
From: Alex M. S. <arc...@us...> - 2010-04-11 21:39:11
|
Update of /cvsroot/nettle/nettle/!Nettle/Resources/France In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv13883/!Nettle/Resources/France Modified Files: Messages Log Message: Update release scripts for beta release. Update various dates from 2003/2004 to 2010. Update ZapRedraw to 0.48 for BeagleBoard compatibility - this also requires a 'fake' ZapFontsMessages path to be configured in the event that the user doesn't have a ZapFonts installation, so have added these messages too, and configuration of them into the !Run file. Change the build options to add -c90 (this seems to fix the __assert2 issue that Castle's C compiler causes with stubsg), -Wp to suppress the non-ANSI include warnings that TCPIPLibs generates, and -memaccess -L22-S22-L41 to build the binary in a way that the BeagleBoard should be happy with. (These changes are partly based on the ones that James Peacock sent me). And do a nasty change to c/choices to allow the errno.h that I have to build with -c90 - it appears to fail to build for me, so temporarily disable the #include and locally declare errno. Tested/built on RPCEmu and it seems to run/display OK. Index: Messages =================================================================== RCS file: /cvsroot/nettle/nettle/!Nettle/Resources/France/Messages,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Messages 1 Apr 2004 21:21:42 -0000 1.11 --- Messages 11 Apr 2010 21:39:02 -0000 1.12 *************** *** 4,9 **** AppName:Nettle AppPurpose:Client telnet arachnéen ! AppAuthor:© Développeurs de Nettle, 2000-2004 ! AppVersion:v0.2042r (04 Avril 2004) Info:Info> --- 4,9 ---- AppName:Nettle AppPurpose:Client telnet arachnéen ! AppAuthor:© Développeurs de Nettle, 2000-2010 ! AppVersion:v0.2043b (11 Avril 2010) Info:Info> |
|
From: Alex M. S. <arc...@us...> - 2010-04-11 21:39:11
|
Update of /cvsroot/nettle/nettle In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv13883 Modified Files: !RelSrc,fd7 !Release,fd7 License Makefile,fe1 Log Message: Update release scripts for beta release. Update various dates from 2003/2004 to 2010. Update ZapRedraw to 0.48 for BeagleBoard compatibility - this also requires a 'fake' ZapFontsMessages path to be configured in the event that the user doesn't have a ZapFonts installation, so have added these messages too, and configuration of them into the !Run file. Change the build options to add -c90 (this seems to fix the __assert2 issue that Castle's C compiler causes with stubsg), -Wp to suppress the non-ANSI include warnings that TCPIPLibs generates, and -memaccess -L22-S22-L41 to build the binary in a way that the BeagleBoard should be happy with. (These changes are partly based on the ones that James Peacock sent me). And do a nasty change to c/choices to allow the errno.h that I have to build with -c90 - it appears to fail to build for me, so temporarily disable the #include and locally declare errno. Tested/built on RPCEmu and it seems to run/display OK. ***** Bogus filespec: !RelSrc,fd7,1.7,1.8 ***** Bogus filespec: !Release,fd7,1.8,1.9 Index: License =================================================================== RCS file: /cvsroot/nettle/nettle/License,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** License 18 Feb 2004 23:28:55 -0000 1.5 --- License 11 Apr 2010 21:39:02 -0000 1.6 *************** *** 1,3 **** ! Copyright (c) 2000-2004, Nettle developers All rights reserved. --- 1,3 ---- ! Copyright (c) 2000-2010, Nettle developers All rights reserved. ***** Bogus filespec: Makefile,fe1,1.33,1.34 |
|
From: Alex M. S. <arc...@us...> - 2010-04-11 21:39:11
|
Update of /cvsroot/nettle/nettle/c In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv13883/c Modified Files: choices Log Message: Update release scripts for beta release. Update various dates from 2003/2004 to 2010. Update ZapRedraw to 0.48 for BeagleBoard compatibility - this also requires a 'fake' ZapFontsMessages path to be configured in the event that the user doesn't have a ZapFonts installation, so have added these messages too, and configuration of them into the !Run file. Change the build options to add -c90 (this seems to fix the __assert2 issue that Castle's C compiler causes with stubsg), -Wp to suppress the non-ANSI include warnings that TCPIPLibs generates, and -memaccess -L22-S22-L41 to build the binary in a way that the BeagleBoard should be happy with. (These changes are partly based on the ones that James Peacock sent me). And do a nasty change to c/choices to allow the errno.h that I have to build with -c90 - it appears to fail to build for me, so temporarily disable the #include and locally declare errno. Tested/built on RPCEmu and it seems to run/display OK. Index: choices =================================================================== RCS file: /cvsroot/nettle/nettle/c/choices,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** choices 2 Apr 2004 06:31:59 -0000 1.41 --- choices 11 Apr 2010 21:39:02 -0000 1.42 *************** *** 19,23 **** #include "zapredraw.h" ! #include <errno.h> #include <time.h> --- 19,29 ---- #include "zapredraw.h" ! /* FIXME archifishal 11/04/2010: The version of errno.h I have doesn't build ! * with -c90 defined, for now just define 'errno' locally */ ! /*#include <errno.h>*/ ! ! #define errno __errno ! extern int errno; ! #include <time.h> |
|
From: Alex M. S. <arc...@us...> - 2010-04-11 21:39:11
|
Update of /cvsroot/nettle/nettle/!Nettle In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv13883/!Nettle Modified Files: !Run,feb Log Message: Update release scripts for beta release. Update various dates from 2003/2004 to 2010. Update ZapRedraw to 0.48 for BeagleBoard compatibility - this also requires a 'fake' ZapFontsMessages path to be configured in the event that the user doesn't have a ZapFonts installation, so have added these messages too, and configuration of them into the !Run file. Change the build options to add -c90 (this seems to fix the __assert2 issue that Castle's C compiler causes with stubsg), -Wp to suppress the non-ANSI include warnings that TCPIPLibs generates, and -memaccess -L22-S22-L41 to build the binary in a way that the BeagleBoard should be happy with. (These changes are partly based on the ones that James Peacock sent me). And do a nasty change to c/choices to allow the errno.h that I have to build with -c90 - it appears to fail to build for me, so temporarily disable the #include and locally declare errno. Tested/built on RPCEmu and it seems to run/display OK. ***** Bogus filespec: !Run,feb,1.17,1.18 |
|
From: Alex M. S. <arc...@us...> - 2010-04-11 21:09:02
|
Update of /cvsroot/nettle/nettle/!Nettle/Resources/ZRMessages/UK In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv2728/UK Log Message: Directory /cvsroot/nettle/nettle/!Nettle/Resources/ZRMessages/UK added to the repository |
|
From: Alex M. S. <arc...@us...> - 2010-04-11 21:07:45
|
Update of /cvsroot/nettle/nettle/!Nettle/Resources/ZRMessages In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv2290/ZRMessages Log Message: Directory /cvsroot/nettle/nettle/!Nettle/Resources/ZRMessages added to the repository |
|
From: Alex M. S. <arc...@us...> - 2004-05-02 08:43:40
|
Update of /cvsroot/nettle/nettle/c In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14935/c Modified Files: process Log Message: Nettle was redrawing too large an area when windows were being updated. This fixes it. Index: process =================================================================== RCS file: /cvsroot/nettle/nettle/c/process,v retrieving revision 1.91 retrieving revision 1.92 diff -C2 -d -r1.91 -r1.92 *** process 1 Feb 2004 09:50:26 -0000 1.91 --- process 2 May 2004 08:43:25 -0000 1.92 *************** *** 34,39 **** { changedsession = session; ! changedbox.tl.x = 255; ! changedbox.tl.y = 255; changedbox.br.x = 0; changedbox.br.y = 0; --- 34,39 ---- { changedsession = session; ! changedbox.tl.x = session->terminal_size.x; ! changedbox.tl.y = session->terminal_size.y + session->scrollback; changedbox.br.x = 0; changedbox.br.y = 0; |
|
From: Alex M. S. <arc...@us...> - 2004-04-13 20:45:00
|
Update of /cvsroot/nettle/nettle/h In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26817/h Modified Files: socket Log Message: Allows us to use named ports for ports in host:port strings, so we can do pop.freeserve.net:pop3 rather than having to know it's 110 and stuff Index: socket =================================================================== RCS file: /cvsroot/nettle/nettle/h/socket,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** socket 9 Sep 2001 21:33:31 -0000 1.13 --- socket 13 Apr 2004 20:30:56 -0000 1.14 *************** *** 36,40 **** --- 36,48 ---- int socket_connected(int socket_handle); + /** + * Tries to convert a port name (eg. pop3) into a numeric one + * + * @param port_name string containing port name + * + * @return port number, or 0 if unknown + */ + int socket_port_number_from_name(const char *port_name); /** |
|
From: Alex M. S. <arc...@us...> - 2004-04-13 20:44:59
|
Update of /cvsroot/nettle/nettle/c In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26817/c Modified Files: socket nettle Log Message: Allows us to use named ports for ports in host:port strings, so we can do pop.freeserve.net:pop3 rather than having to know it's 110 and stuff Index: socket =================================================================== RCS file: /cvsroot/nettle/nettle/c/socket,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** socket 2 Apr 2004 06:31:59 -0000 1.38 --- socket 13 Apr 2004 20:30:56 -0000 1.39 *************** *** 1,5 **** /** * Socket code ! * (C) Nettle developers 2000-2001 * * $Id$ --- 1,5 ---- /** * Socket code ! * (C) Nettle developers 2000-2004 * * $Id$ *************** *** 175,178 **** --- 175,191 ---- } + int socket_port_number_from_name(const char *port_name) + { + struct servent *port_lookup = NULL; + + port_lookup = getservbyname(port_name, "tcp"); + if (port_lookup != NULL) + { + return ntohs(port_lookup->s_port); + } + + return 0; + } + const char *socket_strerror(int errnum) { Index: nettle =================================================================== RCS file: /cvsroot/nettle/nettle/c/nettle,v retrieving revision 1.121 retrieving revision 1.122 diff -C2 -d -r1.121 -r1.122 *** nettle 3 Apr 2004 10:18:51 -0000 1.121 --- nettle 13 Apr 2004 20:30:56 -0000 1.122 *************** *** 159,162 **** --- 159,167 ---- *sptr = '\0'; *port = atoi (sptr + 1); + + if (*port == 0) + { + *port = socket_port_number_from_name(sptr + 1); + } } else |
|
From: Alex M. S. <arc...@us...> - 2004-04-03 10:31:07
|
Update of /cvsroot/nettle/nettle/c In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1987/c Modified Files: nettle Log Message: Reconnect didn't work properly, and showed looking up host %0... <host>... instead of Looking up host <host>... Index: nettle =================================================================== RCS file: /cvsroot/nettle/nettle/c/nettle,v retrieving revision 1.120 retrieving revision 1.121 diff -C2 -d -r1.120 -r1.121 *** nettle 13 Dec 2003 17:42:56 -0000 1.120 --- nettle 3 Apr 2004 10:18:51 -0000 1.121 *************** *** 1691,1696 **** set_title_bar(session->window_handle, lookup_static ("title_conn")); ! write_out_strings (session, lookup_static ("lookup"), ! session->socket_host, "...\r\n", 0); main_requirenull = true; --- 1691,1698 ---- set_title_bar(session->window_handle, lookup_static ("title_conn")); ! write_out_strings (session, ! lookup_static_var ("lookup", 1, ! session->socket_host), ! "\r\n", 0); main_requirenull = true; |
|
From: Alex M. S. <no...@ar...> - 2004-04-02 06:48:24
|
Piece of shit. Backing out last night's changes. *cvsssh --ext update -kk -j 1.15 -j 1.14 c/chardefn *cvsssh --ext update -kk -j 1.40 -j 1.39 c/choices *cvsssh --ext update -kk -j 1.37 -j 1.36 c/socket *cvsssh --ext update -kk -j 1.38 -j 1.37 c/zapgen *cvsssh --ext update -kk -j 1.7 -j 1.6 h/chardefn *cvsssh --ext update -kk -j 1.88 -j 1.87 h/globals *cvsssh --ext update -kk -j 1.14 -j 1.13 h/zapredraw was what it said. In message <E1B...@sc...> you wrote: > Update of /cvsroot/nettle/nettle/h > In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11512/h >=20 > Modified Files: > chardefn globals zapredraw=20 > Log Message: > Backing out last night's changes.nn*cvsssh --ext update -kk -j 1.15 -j = 1.14 c/chardefnn*cvsssh --ext update -kk -j 1.40 -j 1.39 c/choicesn*cvsss= h --ext update -kk -j 1.37 -j 1.36 c/socketn*cvsssh --ext update -kk -j 1= .38 -j 1.37 c/zapgenn*cvsssh --ext update -kk -j 1.7 -j 1.6 h/chardefnn*c= vsssh --ext update -kk -j 1.88 -j 1.87 h/globalsn*cvsssh --ext update -kk= -j 1.14 -j 1.13 h/zapredraw >=20 > Index: chardefn > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > RCS file: /cvsroot/nettle/nettle/h/chardefn,v > retrieving revision 1.7 > retrieving revision 1.8 > diff -C2 -d -r1.7 -r1.8 > *** chardefn 1 Apr 2004 22:31:59 -0000 1.7 > --- chardefn 2 Apr 2004 06:32:00 -0000 1.8 > *************** > *** 1,5 **** > /** > * Zap font character definitions > ! * (C) Nettle developers 2000-2004 > * > * $Id$ > --- 1,5 ---- > /** > * Zap font character definitions > ! * (C) Nettle developers 2000-2001 > * > * $Id$ > *************** > *** 9,55 **** > #define CHARDEFN_H > =20 > - /* FIXME: We shouldn't be including this really as globals are evil *= / > - #include "globals.h" > -=20 > /* Number of additional characters we are going to define at 0x100 in= > chardefn.c */ > #define EXTRA_ZAP_CHARS (0x1e) > =20 > ! /** > ! * Takes an array of character data, and fills in the cursor characte= rs > ! *required by Nettle > ! * > ! * @param int_area pointer to character data > ! * @param char_size size of character in bytes > ! * @param width width of character > ! * @param height height of character > ! * @param cursor_type the type of the cursor we're using > ! */ > ! char *chardefn_define_cursors(int *int_area, > ! int char_size, > ! int width, > ! int height, > ! cursor_t cursor_type); > !=20 > ! /** > ! * Takes an array of character data, and fills in the additional symb= ol/ > ! * cursor characters required by Nettle > ! * > ! * @param int_area pointer to character data > ! * @param first_char first character defined by the Zap font > ! * @param last_char last character defined by the Zap font > ! * @param char_size size of character in bytes > ! * @param width width of character > ! * @param height height of character > ! */ > !=20 > ! void chardefn_define_characters(int *int_area, > ! int first_char, > ! int last_char, > ! int char_size, > ! int width, > ! int height, > ! cursor_t cursor_type); > !=20 > =20 > ! #endif /* CHARDEFN_H */ > --- 9,18 ---- > #define CHARDEFN_H > =20 > /* Number of additional characters we are going to define at 0x100 in= > chardefn.c */ > #define EXTRA_ZAP_CHARS (0x1e) > =20 > ! extern void define_zap_chars(int *, int, int, int); > ! extern void define_zap_undef_chars(int *, int, int, int, int, int); > =20 > ! #endif >=20 > Index: globals > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > RCS file: /cvsroot/nettle/nettle/h/globals,v > retrieving revision 1.88 > retrieving revision 1.89 > diff -C2 -d -r1.88 -r1.89 > *** globals 1 Apr 2004 22:31:59 -0000 1.88 > --- globals 2 Apr 2004 06:32:00 -0000 1.89 > *************** > *** 137,143 **** > typedef enum { > cursor_solid, > ! cursor_underline, > !=20 > ! cursor_last > } cursor_t; > =20 > --- 137,141 ---- > typedef enum { > cursor_solid, > ! cursor_underline > } cursor_t; > =20 >=20 > Index: zapredraw > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > RCS file: /cvsroot/nettle/nettle/h/zapredraw,v > retrieving revision 1.14 > retrieving revision 1.15 > diff -C2 -d -r1.14 -r1.15 > *** zapredraw 1 Apr 2004 22:31:59 -0000 1.14 > --- zapredraw 2 Apr 2004 06:32:00 -0000 1.15 > *************** > *** 1,10 **** > /** > - * > * ZapRedraw structure code > * > ! * =A9 Nettle developers 2000-2004 > ! * > ! * @version $Id$ > ! * > */ > =20 > --- 1,7 ---- > /** > * ZapRedraw structure code > + * (C) Nettle developers 2000-2002 > * > ! * $Id$ > */ > =20 > *************** > *** 14,20 **** > #define ZAPREDRAW_H > =20 > - /* FIXME: we shouldn't be including this */ > - #include "globals.h" > -=20 > #ifndef ZapRedraw_RedrawArea > =20 > --- 11,14 ---- > *************** > *** 42,46 **** > #define ZapRedraw_PlotRectangle 0x48495 > =20 > ! #endif /* ZapRedraw_RedrawArea */ > =20 > struct zapredraw_block > --- 36,40 ---- > #define ZapRedraw_PlotRectangle 0x48495 > =20 > ! #endif > =20 > struct zapredraw_block > *************** > *** 76,86 **** > extern char *zapgen_code(int *, struct term_char **, int, int, int, i= nt, int, int, int, int); > =20 > ! /** > ! * Update the cursors in a given font_area > ! * > ! * @param font_area the area, as returned from load_font > ! * @param cursor_type the cursor type we want to use > */ > ! void zapredraw_update_cursors(int *font_area, cursor_t cursor_type); > =20 > extern int *load_font(char *); > --- 70,82 ---- > extern char *zapgen_code(int *, struct term_char **, int, int, int, i= nt, int, int, int, int); > =20 > ! /* > ! * Description: Update the cursors in a given font_area > ! * Parameters: font_area-> the area, as returned from load_font > ! * Returns: none > ! * Note: Will also update all the other special characters; > ! * this is not intentional and should be replaced with > ! * /just/ the cursors being updated. > */ > ! void update_cursors(int *font_area); > =20 > extern int *load_font(char *); >=20 >=20 >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=3D1470&alloc_id=3D3638&op=3Dc= lick > _______________________________________________ > Nettle-commits mailing list > Net...@li... > https://lists.sourceforge.net/lists/listinfo/nettle-commits >=20 Alex. --=20 E-mail: al...@ar... WWW: http://www.archifishal.co.uk/ MSN: arc...@gm... |
|
From: Alex M. S. <arc...@us...> - 2004-04-02 06:44:05
|
Update of /cvsroot/nettle/nettle/c In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11512/c Modified Files: chardefn choices socket zapgen Log Message: Backing out last night's changes.nn*cvsssh --ext update -kk -j 1.15 -j 1.14 c/chardefnn*cvsssh --ext update -kk -j 1.40 -j 1.39 c/choicesn*cvsssh --ext update -kk -j 1.37 -j 1.36 c/socketn*cvsssh --ext update -kk -j 1.38 -j 1.37 c/zapgenn*cvsssh --ext update -kk -j 1.7 -j 1.6 h/chardefnn*cvsssh --ext update -kk -j 1.88 -j 1.87 h/globalsn*cvsssh --ext update -kk -j 1.14 -j 1.13 h/zapredraw Index: chardefn =================================================================== RCS file: /cvsroot/nettle/nettle/c/chardefn,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** chardefn 1 Apr 2004 22:31:59 -0000 1.15 --- chardefn 2 Apr 2004 06:31:59 -0000 1.16 *************** *** 1,10 **** /** - * * Zap font character definitions * ! * © Nettle developers 2000-2004 ! * ! * @version $Id$ ! * */ --- 1,7 ---- /** * Zap font character definitions + * (C) Nettle developers 2000-2001 * ! * $Id$ */ *************** *** 16,74 **** #include "zapredraw.h" ! /** ! * Takes 2 characters, puts upper in the topleft of a character, and ! * lower in the bottomright of a chracter, and stores it in area ! * ! * @param area Character to be filled in ! * @param step Step size in bytes ! * @param height Height of the character ! * @param base Base of ZapRedraw font area ! * @param upper Character to be used in upper-left corner ! * @param lower Character to be used in lower-right corner ! */ static void copypair (char *area, int step, int height, ! const char *base, char upper, char lower); - /** - * Takes a character area, and underlines it - * - * @param area Character to be filled in - * @param step Step size in bytes - * @param height Height of the character - */ - static void make_underline (char *area, int step, int height); ! /** ! * Takes an array of character data, and fills in the undefined characters ! * (ie. those not defined by the Zap font) required by Nettle ! * ! * @param int_area pointer to character data ! * @param first_char first character defined by the Zap font ! * @param last_char last character defined by the Zap font ! * @param char_size size of character in bytes ! * @param width width of character ! * @param height height of character ! */ ! static void define_undefined_characters(int *int_area, ! int first_char, ! int last_char, ! int char_size, ! int width, int height); ! /* ----------------------------------------------------------------------- */ ! char *chardefn_define_cursors(int *int_area, int char_size, ! int width, int height, cursor_t cursor_type) { int loop; int step=char_size/height; char *area=(char *) int_area; /* define characters */ area += 0x100 * char_size; ! /* initialise cursor character area to 0 */ ! memset (area, 0, cursor_last * char_size); /* Active Cursor 0x100 */ --- 13,72 ---- #include "zapredraw.h" ! /* Define Zap graphics characters */ ! static void copypair (char *area, int step, int height, ! const char *base, char upper, char lower) ! { ! int x, y; ! const char *ptr = base + upper * step * height; ! for (y = 0; y < height; y++) ! { ! memcpy (area, ptr, step); ! if ((height & 1) && y == height / 2) ! ptr = base + lower * step * height; ! else ! ptr += step; ! for (x = step - 1; x >= 0; x--) ! area[x] |= ptr[x]; ! if ((height & 1) == 0 && y == (height - 1) / 2) ! ptr = base + lower * step * height; ! else ! ptr += step; ! area += step; ! } ! } ! static void make_underline (char *area, int step, int height) ! { ! char pixels[8] = {0}; /* hmm, trouble if the font is > 64 pixels wide... */ ! int x; ! area += step * height; ! while (--height > 1) ! { ! area -= step; ! for (x = step - 1; x >= 0; --x) ! { ! area[x >> 3] |= area[(x >> 3) - 2 * step] & ~pixels[x >> 3]; ! pixels[x >> 3] |= area[x >> 3]; ! } ! } ! } ! ! void define_zap_chars(int *int_area, int char_size, int width, int height) { int loop; int step=char_size/height; char *area=(char *) int_area; + const char *base = area; /* define characters */ area += 0x100 * char_size; ! /* initialise extra character area (chars 0x100-<end>) to 0 */ ! memset (area, 0, EXTRA_ZAP_CHARS * char_size); /* Active Cursor 0x100 */ *************** *** 132,162 **** area+=char_size; - return area; - } - - /* ----------------------------------------------------------------------- */ - - void chardefn_define_characters(int *int_area, int first_char, - int last_char, int char_size, - int width, int height, cursor_t cursor_type) - { - int loop; - int step=char_size/height; - char *area=(char *) int_area; - const char *base = area; - /* define characters */ - area += 0x100 * char_size; - - /* initialise extra character area (chars 0x100-<end>) to 0 */ - memset (area, 0, EXTRA_ZAP_CHARS * char_size); - - /* define the undefined characters */ - define_undefined_characters(int_area, first_char, last_char, char_size, - width, height); - - /* define the cursor characters */ - area = chardefn_define_cursors(int_area, char_size, width, height, - cursor_type); - /* Diamond 0x102 */ { --- 130,133 ---- *************** *** 368,421 **** } - /* ----------------------------------------------------------------------- */ ! static void copypair (char *area, int step, int height, ! const char *base, char upper, char lower) ! { ! int x, y; ! const char *ptr = base + upper * step * height; ! for (y = 0; y < height; y++) ! { ! memcpy (area, ptr, step); ! if ((height & 1) && y == height / 2) ! ptr = base + lower * step * height; ! else ! ptr += step; ! for (x = step - 1; x >= 0; x--) ! area[x] |= ptr[x]; ! if ((height & 1) == 0 && y == (height - 1) / 2) ! ptr = base + lower * step * height; ! else ! ptr += step; ! area += step; ! } ! } ! ! /* ----------------------------------------------------------------------- */ ! ! static void make_underline (char *area, int step, int height) ! { ! char pixels[8] = {0}; /* hmm, trouble if the font is > 64 pixels wide... */ ! int x; ! ! area += step * height; ! ! while (--height > 1) ! { ! area -= step; ! for (x = step - 1; x >= 0; --x) ! { ! area[x >> 3] |= area[(x >> 3) - 2 * step] & ~pixels[x >> 3]; ! pixels[x >> 3] |= area[x >> 3]; ! } ! } ! } ! ! /* ----------------------------------------------------------------------- */ ! ! static void define_undefined_characters(int *int_area, ! int first_char, ! int last_char, int char_size, ! int width, int height) { char *area = (char *)int_area; --- 339,345 ---- } ! void define_zap_undef_chars(int *int_area, int first_char, int last_char, ! int char_size, int width, int height) { char *area = (char *)int_area; *************** *** 467,471 **** } } - - /* ----------------------------------------------------------------------- */ - --- 391,392 ---- Index: choices =================================================================== RCS file: /cvsroot/nettle/nettle/c/choices,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** choices 1 Apr 2004 22:31:59 -0000 1.40 --- choices 2 Apr 2004 06:31:59 -0000 1.41 *************** *** 536,541 **** * stressful operation anyhow */ ! zapredraw_update_cursors(zap_font_area, cursor_type); ! zapredraw_update_cursors(zap_lowres_font_area, cursor_type); } } --- 536,541 ---- * stressful operation anyhow */ ! update_cursors(zap_font_area); ! update_cursors(zap_lowres_font_area); } } Index: socket =================================================================== RCS file: /cvsroot/nettle/nettle/c/socket,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** socket 1 Apr 2004 22:31:59 -0000 1.37 --- socket 2 Apr 2004 06:31:59 -0000 1.38 *************** *** 54,63 **** } - if (setsockopt(socket_handle, SOL_SOCKET, SO_OOBINLINE, (char *) &data, sizeof(data))) - { - close(socket_handle); - return -1; - } - socketwatch_register(socket_handle); --- 54,57 ---- Index: zapgen =================================================================== RCS file: /cvsroot/nettle/nettle/c/zapgen,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** zapgen 1 Apr 2004 22:31:59 -0000 1.38 --- zapgen 2 Apr 2004 06:31:59 -0000 1.39 *************** *** 306,319 **** ! ! void zapredraw_update_cursors(int *font_area, cursor_t cursor_type) { ! int width = font_area[2]; ! int height = font_area[3]; int char_size = ((width+ 7) & ~7)*height/8; /* fill in graphics chars */ ! chardefn_define_cursors(font_area+8, char_size, width, height, ! cursor_type); } --- 306,325 ---- ! /* ! * Description: Update the cursors in a given font_area ! * Parameters: font_area-> the area, as returned from load_font ! * Returns: none ! * Note: Will also update all the other special characters; ! * this is not intentional and should be replaced with ! * /just/ the cursors being updated. ! */ ! void update_cursors(int *font_area) { ! int width = font_area[2]; ! int height = font_area[3]; int char_size = ((width+ 7) & ~7)*height/8; /* fill in graphics chars */ ! define_zap_chars(font_area+8, char_size, width, height); } *************** *** 467,475 **** fclose(file_handle); ! /* fill in graphics characters and undefined characters */ ! /* FIXME: cursor_type is a global here, we shouldn't have globals */ ! chardefn_define_characters(zap_load_area+8, first_char, ! last_char, char_size, width, ! height, cursor_type); zap_load_area[4]=0; --- 473,482 ---- fclose(file_handle); ! /* fill in graphics chars */ ! define_zap_chars(zap_load_area+8, char_size, width, height); ! ! /* fill in some undefined characters in range 0x00-0xFF*/ ! define_zap_undef_chars (zap_load_area+8, first_char, last_char, ! char_size, width, height); zap_load_area[4]=0; |
|
From: Alex M. S. <arc...@us...> - 2004-04-02 06:44:04
|
Update of /cvsroot/nettle/nettle/h In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11512/h Modified Files: chardefn globals zapredraw Log Message: Backing out last night's changes.nn*cvsssh --ext update -kk -j 1.15 -j 1.14 c/chardefnn*cvsssh --ext update -kk -j 1.40 -j 1.39 c/choicesn*cvsssh --ext update -kk -j 1.37 -j 1.36 c/socketn*cvsssh --ext update -kk -j 1.38 -j 1.37 c/zapgenn*cvsssh --ext update -kk -j 1.7 -j 1.6 h/chardefnn*cvsssh --ext update -kk -j 1.88 -j 1.87 h/globalsn*cvsssh --ext update -kk -j 1.14 -j 1.13 h/zapredraw Index: chardefn =================================================================== RCS file: /cvsroot/nettle/nettle/h/chardefn,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** chardefn 1 Apr 2004 22:31:59 -0000 1.7 --- chardefn 2 Apr 2004 06:32:00 -0000 1.8 *************** *** 1,5 **** /** * Zap font character definitions ! * (C) Nettle developers 2000-2004 * * $Id$ --- 1,5 ---- /** * Zap font character definitions ! * (C) Nettle developers 2000-2001 * * $Id$ *************** *** 9,55 **** #define CHARDEFN_H - /* FIXME: We shouldn't be including this really as globals are evil */ - #include "globals.h" - /* Number of additional characters we are going to define at 0x100 in chardefn.c */ #define EXTRA_ZAP_CHARS (0x1e) ! /** ! * Takes an array of character data, and fills in the cursor characters ! *required by Nettle ! * ! * @param int_area pointer to character data ! * @param char_size size of character in bytes ! * @param width width of character ! * @param height height of character ! * @param cursor_type the type of the cursor we're using ! */ ! char *chardefn_define_cursors(int *int_area, ! int char_size, ! int width, ! int height, ! cursor_t cursor_type); ! ! /** ! * Takes an array of character data, and fills in the additional symbol/ ! * cursor characters required by Nettle ! * ! * @param int_area pointer to character data ! * @param first_char first character defined by the Zap font ! * @param last_char last character defined by the Zap font ! * @param char_size size of character in bytes ! * @param width width of character ! * @param height height of character ! */ ! ! void chardefn_define_characters(int *int_area, ! int first_char, ! int last_char, ! int char_size, ! int width, ! int height, ! cursor_t cursor_type); ! ! #endif /* CHARDEFN_H */ --- 9,18 ---- #define CHARDEFN_H /* Number of additional characters we are going to define at 0x100 in chardefn.c */ #define EXTRA_ZAP_CHARS (0x1e) ! extern void define_zap_chars(int *, int, int, int); ! extern void define_zap_undef_chars(int *, int, int, int, int, int); ! #endif Index: globals =================================================================== RCS file: /cvsroot/nettle/nettle/h/globals,v retrieving revision 1.88 retrieving revision 1.89 diff -C2 -d -r1.88 -r1.89 *** globals 1 Apr 2004 22:31:59 -0000 1.88 --- globals 2 Apr 2004 06:32:00 -0000 1.89 *************** *** 137,143 **** typedef enum { cursor_solid, ! cursor_underline, ! ! cursor_last } cursor_t; --- 137,141 ---- typedef enum { cursor_solid, ! cursor_underline } cursor_t; Index: zapredraw =================================================================== RCS file: /cvsroot/nettle/nettle/h/zapredraw,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** zapredraw 1 Apr 2004 22:31:59 -0000 1.14 --- zapredraw 2 Apr 2004 06:32:00 -0000 1.15 *************** *** 1,10 **** /** - * * ZapRedraw structure code * ! * © Nettle developers 2000-2004 ! * ! * @version $Id$ ! * */ --- 1,7 ---- /** * ZapRedraw structure code + * (C) Nettle developers 2000-2002 * ! * $Id$ */ *************** *** 14,20 **** #define ZAPREDRAW_H - /* FIXME: we shouldn't be including this */ - #include "globals.h" - #ifndef ZapRedraw_RedrawArea --- 11,14 ---- *************** *** 42,46 **** #define ZapRedraw_PlotRectangle 0x48495 ! #endif /* ZapRedraw_RedrawArea */ struct zapredraw_block --- 36,40 ---- #define ZapRedraw_PlotRectangle 0x48495 ! #endif struct zapredraw_block *************** *** 76,86 **** extern char *zapgen_code(int *, struct term_char **, int, int, int, int, int, int, int, int); ! /** ! * Update the cursors in a given font_area ! * ! * @param font_area the area, as returned from load_font ! * @param cursor_type the cursor type we want to use */ ! void zapredraw_update_cursors(int *font_area, cursor_t cursor_type); extern int *load_font(char *); --- 70,82 ---- extern char *zapgen_code(int *, struct term_char **, int, int, int, int, int, int, int, int); ! /* ! * Description: Update the cursors in a given font_area ! * Parameters: font_area-> the area, as returned from load_font ! * Returns: none ! * Note: Will also update all the other special characters; ! * this is not intentional and should be replaced with ! * /just/ the cursors being updated. */ ! void update_cursors(int *font_area); extern int *load_font(char *); |
|
From: Alex M. S. <arc...@us...> - 2004-04-01 22:46:54
|
Update of /cvsroot/nettle/nettle/!Nettle/Resources/UK In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28592/!Nettle/Resources/UK Modified Files: Templates,fec Log Message: Backing out Templates,fec changes - they shouldn't have gone in ***** Bogus filespec: Templates,fec,1.16,1.17 |
|
From: Alex M. S. <arc...@us...> - 2004-04-01 22:44:02
|
Update of /cvsroot/nettle/nettle/c In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27888/c Modified Files: chardefn choices socket zapgen Log Message: Part 1 of many - let's tidy up the codebase a bit. This week: c/chardefn and friends Index: chardefn =================================================================== RCS file: /cvsroot/nettle/nettle/c/chardefn,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** chardefn 2 Feb 2002 21:30:45 -0000 1.14 --- chardefn 1 Apr 2004 22:31:59 -0000 1.15 *************** *** 1,7 **** /** * Zap font character definitions - * (C) Nettle developers 2000-2001 * ! * $Id$ */ --- 1,10 ---- /** + * * Zap font character definitions * ! * © Nettle developers 2000-2004 ! * ! * @version $Id$ ! * */ *************** *** 13,72 **** #include "zapredraw.h" ! /* Define Zap graphics characters */ ! static void copypair (char *area, int step, int height, ! const char *base, char upper, char lower) ! { ! int x, y; ! const char *ptr = base + upper * step * height; ! for (y = 0; y < height; y++) ! { ! memcpy (area, ptr, step); ! if ((height & 1) && y == height / 2) ! ptr = base + lower * step * height; ! else ! ptr += step; ! for (x = step - 1; x >= 0; x--) ! area[x] |= ptr[x]; ! if ((height & 1) == 0 && y == (height - 1) / 2) ! ptr = base + lower * step * height; ! else ! ptr += step; ! area += step; ! } ! } ! ! static void make_underline (char *area, int step, int height) ! { ! char pixels[8] = {0}; /* hmm, trouble if the font is > 64 pixels wide... */ ! int x; ! area += step * height; ! while (--height > 1) ! { ! area -= step; ! for (x = step - 1; x >= 0; --x) ! { ! area[x >> 3] |= area[(x >> 3) - 2 * step] & ~pixels[x >> 3]; ! pixels[x >> 3] |= area[x >> 3]; ! } ! } ! } ! void define_zap_chars(int *int_area, int char_size, int width, int height) { int loop; int step=char_size/height; char *area=(char *) int_area; - const char *base = area; /* define characters */ area += 0x100 * char_size; ! /* initialise extra character area (chars 0x100-<end>) to 0 */ ! memset (area, 0, EXTRA_ZAP_CHARS * char_size); /* Active Cursor 0x100 */ --- 16,74 ---- #include "zapredraw.h" ! /** ! * Takes 2 characters, puts upper in the topleft of a character, and ! * lower in the bottomright of a chracter, and stores it in area ! * ! * @param area Character to be filled in ! * @param step Step size in bytes ! * @param height Height of the character ! * @param base Base of ZapRedraw font area ! * @param upper Character to be used in upper-left corner ! * @param lower Character to be used in lower-right corner ! */ static void copypair (char *area, int step, int height, ! const char *base, char upper, char lower); ! /** ! * Takes a character area, and underlines it ! * ! * @param area Character to be filled in ! * @param step Step size in bytes ! * @param height Height of the character ! */ ! static void make_underline (char *area, int step, int height); ! /** ! * Takes an array of character data, and fills in the undefined characters ! * (ie. those not defined by the Zap font) required by Nettle ! * ! * @param int_area pointer to character data ! * @param first_char first character defined by the Zap font ! * @param last_char last character defined by the Zap font ! * @param char_size size of character in bytes ! * @param width width of character ! * @param height height of character ! */ ! static void define_undefined_characters(int *int_area, ! int first_char, ! int last_char, ! int char_size, ! int width, int height); + /* ----------------------------------------------------------------------- */ ! char *chardefn_define_cursors(int *int_area, int char_size, ! int width, int height, cursor_t cursor_type) { int loop; int step=char_size/height; char *area=(char *) int_area; /* define characters */ area += 0x100 * char_size; ! /* initialise cursor character area to 0 */ ! memset (area, 0, cursor_last * char_size); /* Active Cursor 0x100 */ *************** *** 130,133 **** --- 132,162 ---- area+=char_size; + return area; + } + + /* ----------------------------------------------------------------------- */ + + void chardefn_define_characters(int *int_area, int first_char, + int last_char, int char_size, + int width, int height, cursor_t cursor_type) + { + int loop; + int step=char_size/height; + char *area=(char *) int_area; + const char *base = area; + /* define characters */ + area += 0x100 * char_size; + + /* initialise extra character area (chars 0x100-<end>) to 0 */ + memset (area, 0, EXTRA_ZAP_CHARS * char_size); + + /* define the undefined characters */ + define_undefined_characters(int_area, first_char, last_char, char_size, + width, height); + + /* define the cursor characters */ + area = chardefn_define_cursors(int_area, char_size, width, height, + cursor_type); + /* Diamond 0x102 */ { *************** *** 339,345 **** } ! void define_zap_undef_chars(int *int_area, int first_char, int last_char, ! int char_size, int width, int height) { char *area = (char *)int_area; --- 368,421 ---- } + /* ----------------------------------------------------------------------- */ ! static void copypair (char *area, int step, int height, ! const char *base, char upper, char lower) ! { ! int x, y; ! const char *ptr = base + upper * step * height; ! for (y = 0; y < height; y++) ! { ! memcpy (area, ptr, step); ! if ((height & 1) && y == height / 2) ! ptr = base + lower * step * height; ! else ! ptr += step; ! for (x = step - 1; x >= 0; x--) ! area[x] |= ptr[x]; ! if ((height & 1) == 0 && y == (height - 1) / 2) ! ptr = base + lower * step * height; ! else ! ptr += step; ! area += step; ! } ! } ! ! /* ----------------------------------------------------------------------- */ ! ! static void make_underline (char *area, int step, int height) ! { ! char pixels[8] = {0}; /* hmm, trouble if the font is > 64 pixels wide... */ ! int x; ! ! area += step * height; ! ! while (--height > 1) ! { ! area -= step; ! for (x = step - 1; x >= 0; --x) ! { ! area[x >> 3] |= area[(x >> 3) - 2 * step] & ~pixels[x >> 3]; ! pixels[x >> 3] |= area[x >> 3]; ! } ! } ! } ! ! /* ----------------------------------------------------------------------- */ ! ! static void define_undefined_characters(int *int_area, ! int first_char, ! int last_char, int char_size, ! int width, int height) { char *area = (char *)int_area; *************** *** 391,392 **** --- 467,471 ---- } } + + /* ----------------------------------------------------------------------- */ + Index: choices =================================================================== RCS file: /cvsroot/nettle/nettle/c/choices,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** choices 13 Dec 2003 17:42:56 -0000 1.39 --- choices 1 Apr 2004 22:31:59 -0000 1.40 *************** *** 536,541 **** * stressful operation anyhow */ ! update_cursors(zap_font_area); ! update_cursors(zap_lowres_font_area); } } --- 536,541 ---- * stressful operation anyhow */ ! zapredraw_update_cursors(zap_font_area, cursor_type); ! zapredraw_update_cursors(zap_lowres_font_area, cursor_type); } } Index: socket =================================================================== RCS file: /cvsroot/nettle/nettle/c/socket,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** socket 25 Oct 2003 23:44:47 -0000 1.36 --- socket 1 Apr 2004 22:31:59 -0000 1.37 *************** *** 54,57 **** --- 54,63 ---- } + if (setsockopt(socket_handle, SOL_SOCKET, SO_OOBINLINE, (char *) &data, sizeof(data))) + { + close(socket_handle); + return -1; + } + socketwatch_register(socket_handle); Index: zapgen =================================================================== RCS file: /cvsroot/nettle/nettle/c/zapgen,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** zapgen 20 Oct 2003 23:48:19 -0000 1.37 --- zapgen 1 Apr 2004 22:31:59 -0000 1.38 *************** *** 306,325 **** ! /* ! * Description: Update the cursors in a given font_area ! * Parameters: font_area-> the area, as returned from load_font ! * Returns: none ! * Note: Will also update all the other special characters; ! * this is not intentional and should be replaced with ! * /just/ the cursors being updated. ! */ ! void update_cursors(int *font_area) { ! int width = font_area[2]; ! int height = font_area[3]; int char_size = ((width+ 7) & ~7)*height/8; /* fill in graphics chars */ ! define_zap_chars(font_area+8, char_size, width, height); } --- 306,319 ---- ! ! void zapredraw_update_cursors(int *font_area, cursor_t cursor_type) { ! int width = font_area[2]; ! int height = font_area[3]; int char_size = ((width+ 7) & ~7)*height/8; /* fill in graphics chars */ ! chardefn_define_cursors(font_area+8, char_size, width, height, ! cursor_type); } *************** *** 473,482 **** fclose(file_handle); ! /* fill in graphics chars */ ! define_zap_chars(zap_load_area+8, char_size, width, height); ! ! /* fill in some undefined characters in range 0x00-0xFF*/ ! define_zap_undef_chars (zap_load_area+8, first_char, last_char, ! char_size, width, height); zap_load_area[4]=0; --- 467,475 ---- fclose(file_handle); ! /* fill in graphics characters and undefined characters */ ! /* FIXME: cursor_type is a global here, we shouldn't have globals */ ! chardefn_define_characters(zap_load_area+8, first_char, ! last_char, char_size, width, ! height, cursor_type); zap_load_area[4]=0; |