diff -rc pine4.55/pico/basic.c pine4.55.WrtAcc/pico/basic.c *** pine4.55/pico/basic.c Mon Mar 10 19:27:40 2003 --- pine4.55.WrtAcc/pico/basic.c Wed Apr 16 20:09:43 2003 *************** *** 329,343 **** return(TRUE); } /* ! * go forword to the end of the current paragraph * here we look for a or or * combination to delimit the begining of a paragraph */ gotoeop(f, n) int f, n; /* default Flag & Numeric argument */ - { int quoted, qlen; char qstr[NLINE], qstr2[NLINE]; --- 329,525 ---- return(TRUE); } + GetAccent() + { + char c,d; + c = (char) GetKey(); + if ((c == '?') || (c == '!')) { + d = c; + c = '\\'; + } + else + if ((c == 's') || (c == 'S')){ + c = d = 's'; + } + else + if ((c == 'l') || (c == 'L')){ + c = d = 'l'; + } + else + d = (char) GetKey(); + return (int) accent(c,d); + } + pineaccent(f,n) + int f,n; + { int e; + + if (e = GetAccent()) + execute(e,0,1); + return 1; + } + + unsigned char accent(f,n) + int f,n; + { char c,d; + + c = (char) f; + d = (char) n; + switch(c){ + case '~' : + switch(d){ + case 'a' : return '\343'; + case 'n' : return '\361'; + case 'o' : return '\365'; + case 'A' : return '\303'; + case 'N' : return '\321'; + case 'O' : return '\325'; + } + break; + case '\047' : + switch(d){ + case 'a' : return '\341'; + case 'e' : return '\351'; + case 'i' : return '\355'; + case 'o' : return '\363'; + case 'u' : return '\372'; + case 'y' : return '\375'; + case 'A' : return '\301'; + case 'E' : return '\311'; + case 'I' : return '\315'; + case 'O' : return '\323'; + case 'U' : return '\332'; + case 'Y' : return '\335'; + } + break; + case '"' : + switch(d){ + case 'a' : return '\344'; + case 'e' : return '\353'; + case 'i' : return '\357'; + case 'o' : return '\366'; + case 'u' : return '\374'; + case 'y' : return '\377'; + case 'A' : return '\304'; + case 'E' : return '\313'; + case 'I' : return '\317'; + case 'O' : return '\326'; + case 'U' : return '\334'; + } + break; + case '^' : + switch(d){ + case 'a' : return '\342'; + case 'e' : return '\352'; + case 'i' : return '\356'; + case 'o' : return '\364'; + case 'u' : return '\373'; + case 'A' : return '\302'; + case 'E' : return '\312'; + case 'I' : return '\316'; + case 'O' : return '\324'; + case 'U' : return '\333'; + case '0' : return '\260'; + case '1' : return '\271'; + case '2' : return '\262'; + case '3' : return '\263'; + } + break; + case '`' : + switch(d){ + case 'a' : return '\340'; + case 'e' : return '\350'; + case 'i' : return '\354'; + case 'o' : return '\362'; + case 'u' : return '\371'; + case 'A' : return '\300'; + case 'E' : return '\310'; + case 'I' : return '\314'; + case 'O' : return '\322'; + case 'U' : return '\331'; + } + break; + case 'o' : + switch(d){ + case 'a' : return '\345'; + case 'A' : return '\305'; + case '/' : return '\370'; + case 'r' : return '\256'; + case 'R' : return '\256'; + case 'c' : return '\251'; + case 'C' : return '\251'; + } + break; + case '-' : + switch(d){ + case 'o' : return '\272'; + case 'O' : return '\272'; + case '0' : return '\272'; + case 'a' : return '\252'; + case 'A' : return '\252'; + case 'l' : return '\243'; + case 'L' : return '\243'; + } + break; + case 'O' : + switch(d){ + case '/' : return '\330'; + case 'r' : return '\256'; + case 'R' : return '\256'; + case 'c' : return '\251'; + case 'C' : return '\251'; + } + case '/' : + switch(d){ + case 'o' : return '\370'; + case 'O' : return '\330'; + } + break; + case 'a' : + switch(d){ + case 'e' : return '\346'; + case 'E' : return '\346'; + } + break; + case 'A' : + switch(d){ + case 'E' : return '\306'; + case 'e' : return '\306'; + } + break; + case ',' : + switch(d){ + case 'c' : return '\347'; + case 'C' : return '\307'; + } + break; + case '\\' : + switch(d){ + case '?' : return '\277'; + case '!' : return '\241'; + } + break; + case 's' : + switch(d){ + case 's' : return '\337'; + } + break; + case 'l' : + switch(d){ + case 'l' : return '\243'; + } + break; + } + return '\0'; + } + /* ! * go forward to the end of the current paragraph * here we look for a or or * combination to delimit the begining of a paragraph */ gotoeop(f, n) int f, n; /* default Flag & Numeric argument */ { int quoted, qlen; char qstr[NLINE], qstr2[NLINE]; diff -rc pine4.55/pico/composer.c pine4.55.WrtAcc/pico/composer.c *** pine4.55/pico/composer.c Tue Apr 15 17:39:40 2003 --- pine4.55.WrtAcc/pico/composer.c Wed Apr 16 20:09:43 2003 *************** *** 1615,1621 **** } if(VALID_KEY(ch)){ /* char input */ ! /* * if we are allowing editing, insert the new char * end up leaving tbufp pointing to newly * inserted character in string, and offset to the --- 1615,1621 ---- } if(VALID_KEY(ch)){ /* char input */ ! insert_char:/* * if we are allowing editing, insert the new char * end up leaving tbufp pointing to newly * inserted character in string, and offset to the *************** *** 1699,1704 **** --- 1699,1711 ---- } else { /* interpret ch as a command */ switch (ch = normalize_cmd(ch, ckm, 2)) { + case (CTRL|'\\') : + if (ch = GetAccent()) + goto insert_char; + else + clearcursor(); + break; + case (CTRL|'@') : /* word skip */ while(strng[ods.p_off] && isalnum((unsigned char)strng[ods.p_off])) diff -rc pine4.55/pico/display.c pine4.55.WrtAcc/pico/display.c *** pine4.55/pico/display.c Tue Dec 3 17:15:20 2002 --- pine4.55.WrtAcc/pico/display.c Wed Apr 16 20:09:43 2003 *************** *** 1509,1514 **** --- 1509,1519 ---- b--; continue; + case (CTRL|'\\'): + if (c = GetAccent()) + goto text; + continue; + case KEY_RIGHT: if(*b != '\0') b++; *************** *** 1560,1565 **** --- 1565,1571 ---- #endif default : + text: if(strlen(buf) >= maxl){ /* contain the text */ (*term.t_beep)(); continue; diff -rc pine4.55/pico/ebind.h pine4.55.WrtAcc/pico/ebind.h *** pine4.55/pico/ebind.h Tue Dec 3 17:15:20 2002 --- pine4.55.WrtAcc/pico/ebind.h Wed Apr 16 20:09:43 2003 *************** *** 105,111 **** {CTRL|'^', setmark}, {CTRL|'_', alt_editor}, {0x7F, backdel}, ! {0, NULL} }; --- 105,113 ---- {CTRL|'^', setmark}, {CTRL|'_', alt_editor}, {0x7F, backdel}, ! {CTRL|'\\', pineaccent}, ! {0, ! NULL} }; diff -rc pine4.55/pico/efunc.h pine4.55.WrtAcc/pico/efunc.h *** pine4.55/pico/efunc.h Wed Apr 9 11:35:04 2003 --- pine4.55.WrtAcc/pico/efunc.h Wed Apr 16 20:09:43 2003 *************** *** 73,78 **** --- 73,81 ---- extern int setimark PROTO((int, int)); extern int swapimark PROTO((int, int)); extern int mousepress PROTO((int, int)); + extern unsigned char accent PROTO((int, int)); + extern int pineaccent PROTO((int, int)); + extern int GetAccent PROTO((void)); /* bind.c */ extern int whelp PROTO((int, int)); diff -rc pine4.55/pico/main.c pine4.55.WrtAcc/pico/main.c *** pine4.55/pico/main.c Tue Apr 15 23:17:08 2003 --- pine4.55.WrtAcc/pico/main.c Wed Apr 16 20:09:43 2003 *************** *** 302,307 **** --- 302,313 ---- emlwrite("You may possibly have new mail.", NULL); } + if (c == (CTRL|'\\')){ + c = GetAccent(); + if (!c) + c = NODATA; + } + if(km_popped) switch(c){ case NODATA: diff -rc pine4.55/pico/search.c pine4.55.WrtAcc/pico/search.c *** pine4.55/pico/search.c Tue Dec 3 17:15:22 2002 --- pine4.55.WrtAcc/pico/search.c Wed Apr 16 20:09:43 2003 *************** *** 106,112 **** pc -= 0x20; } ! return(bc == pc); } --- 106,112 ---- pc -= 0x20; } ! return(((char) bc) == ((char) pc)); } *************** *** 805,814 **** int maxlength; /* maximum chars in destination */ { ! char c; /* current char to translate */ /* scan through the string */ ! while ((c = *srcstr++) != 0) { if (c == '\n') { /* its an EOL */ *deststr++ = '<'; *deststr++ = 'N'; --- 805,814 ---- int maxlength; /* maximum chars in destination */ { ! unsigned char c; /* current char to translate */ /* scan through the string */ ! while ((c = (unsigned char) *srcstr++) != 0) { if (c == '\n') { /* its an EOL */ *deststr++ = '<'; *deststr++ = 'N';