OS4 DepotLogo by Nickman 
(anonymous IP: 54.145.51.250,0) 
 HomeRecentStatsSearchMirrorsContactInfoDisclaimerConfigAdmin
 Menu

 Features
   Crashlogs
   Bug tracker
   Locale browser
 
 Categories

   o Audio (328)
   o Datatype (47)
   o Demo (180)
   o Development (529)
   o Document (21)
   o Driver (87)
   o Emulation (141)
   o Game (852)
   o Graphics (457)
   o Library (88)
   o Network (200)
   o Office (56)
   o Utility (804)
   o Video (60)

Total files: 3850

Full index file. Download
Recent index file. Download




 Links

  Amigans.net
  OpenAmiga
  Aminet
  UtilityBase
  IntuitionBase
  AmigaBounty


Support the site


 Readme for:  Driver » Input » arabic_console_devicepro2.lha

Arabic console

Description: An arabic console device, line & full-page editors
Download: arabic_console_devicepro2.lha       (TIPS: Use the right click menu if your browser takes you back here all the time)
Size: 4Mb
Version: 1.699g332
Date: 15 Dec 17
Author: DRIDI
Submitter: DRIDI
Requirements: AmigaOS4 (test on Sam440EP with AOS4.1u0 & AOS4.1FEu0)
Category: driver/input
Replaces: driver/input/arabic_console_devicepro2.lha
License: Other
Distribute: no
Min OS Version: 4.1
FileID: 10427
 
 
Comments: 4
Snapshots: 2
Downloads:  (Current version)

[Show comments] [Show snapshots] [Show content] [Show crashlogs] 
Set up an arabic console device.

Even if graphics/console.device (Text(), ANSI cursor addressing sequence) do not
support Right-to-Left fonts.

Arabic keymaps were added.

For hybrid RTL only mode, launch 'com0x20' program.

For LeftToRight and RTL launch 'com' program ; and use F10 to change the
keyboard from latin to arabic.

There is no support for arabic numerals, excepted with 8 bits ASMO_449+ 'plus'
encoding (for hybrid also).

---- In version 1.0 ----

Added a handler for AmigaDOS which DOS name is ARABCON:

I experiment an hypothetical Arabic_C to conventional C language, by mean of
transcoding with a (f)lex translator. That is to code Arabic identifiers in
Capital with "__ar" at the end (so Arabic names are visibile and quick
mind-translated from latin) side by side with C library name space.
This is planned for future ; so only a .pdf is provided.

I also experiment "Lisp small language ambitus Arabic compatibility" with the
minimal Lisp implementation from Andru Luvisi.

Eventually, added a slightly customized 'ed' line-editor.

---- version 1.1 ----

Enabled multitasking (polling loop replaced by waiting state).

---- version 1.2 & 1.21 & 1.22 ----

o Better integration of ARABCON:

o Better concurrency due to adapted priority for each of the two internal tasks.

---- version 1.3 & 1.31 & 1.32 ----

Strongly enhance the editor, like the 's'ubstitute command, for arabic.

Use from CLI "mount arabcon: from mountlista" ,
then launch the "eda" (program envelope that launches the actual 'ed') being in
the "Editor/ed/" directory and verify that a /tmp directory above exists i.e :
"Editor/tmp/".

If you want to write your own envelope for 'ed', look at mlispa.c in the
archive.

(version 1.31) correct the operating of final letter (latin extended, capital)
to char-class i.e [[:z:]] , in the pattern part of the substitute command i.e
s/Z//. 

For instance with the 's//' command, you can load an ASCII file and try
"araberize" to actual Arabic words (following ArabSCII full 8-bit code table).

In regular expression /pattern/, char-class are automatically entered when a
"capital" (ASCII extended) letter is encountered or encountered at the beginning
of a word(-pattern) ; use Alt- key pressed.

(version 1.32) enhance char-class, correct a bug when searching for word like
"salamalakoum" due to a miss behavior of 0xC0 to a forgotten instruction.

It is advised to consider lam+alif as an unbreakable bloc in regular expression
patterns.

---- version 1.4 & 1.41 & 1.42 ----

o Basic support for tabulation and line numbering ;
  Tabs can be set by environment variable as "setenv tabstop=8" (the default).

o Bug in search for lam+alif removed.

Now you can use ed commands 'g'lobal search with 'n'umbering : g/re/n or g/RE/n 
The last with RegularExpression /pattern/ in extended ASCII "Capital" not only
matches all forms of a letter but vowels too, if present.

Also use ",n" instead of ",p" ed command if you like.

(version 1.41) add an experimental pretty-printer for arabic.
No modification to the text in memory is done, and for now the justification is
only displayed.
The dimension of the page can be set by the environment variable as "setenv
gauge=10" following the use of ",p" lower case commands.
Also, the big ",P" command starts pretty printing with a page dimension
according to the length of the first line displayed.
"0p" is used to stop pretty printing.

(version 1.42)
a) tabular form of pretty printing a bit corrected.

b) Try to display ASCII (with 'eda' program editor for instance) in a
Left-to-Right readable manner, when in Arabic RTL only mode.
That is decoding ASCII from word (only, no Extended-(A)SCII which are so to say
finals in Arabics) when escaped from Arabic stream.
For examples :
echo "ac" >arabcon:  is in ASCII                   (displayed LTR when escaped)
echo "ać" >arabcon:  is in ArabSCII=Arabic_ASCII   (displayed RTL,means father)
echo "ća" >arabcon:  is neither ASCII nor ArabSCII (displayed RTL for debugging
purpose also when escaped)

c) Minors corrections :
- Bug on 'ed' global search command for : g/hamza_alone which appeared
alif-hamza, corrected ;
- lam+alif(es) no more stretched by the pretty-printer ;
- bug on g/#x corrected ('#' means Alt-Shift-# and is the arabic soft-hyphen) ;
- '_' tatweel after and no more before a letter on regular exp. pattern (re.c) ;
- To change one letter inside a word use the ed substitute command :
s/a-zA-Z/a-zA-Z/ with ASCII typesetted.

---- version 1.5 & 1.51 & 1.52 & 1.524 & 1.53 & 1.54 & 1.541 & 1.55 & 1.56 &
1.561 & 1.562 & 1.563 & 1.564 & 1.57 ----

Add a unix-like 'cat' filter, for full 8-bit arabic encoding, named 'cata' ;
Beware that the output is arabic, line by line, peek&pokes appropriate letter ;
Now (version 1.51) it "by-passes" ASCII and processes only ArabSCII words.

It is used to automate "araberization" and "strict conformation" of arab file.

For instance after modification with 'ed' editor and some substitute s/x/y
command(s), if you want to be in strict conformation, follow this two steps
(output1.txt is a file, arabsciiOut.txt another file) :
>W T:output1.txt
>e !cata <T:output1.txt
or run "!cata <output1.txt >arabsciiOut.txt" and "e arabsciiOut.txt" in 3 steps.

To display changed values in memory use ",l" command editing instead of ",p".

Nevertheless, it is advised to change a whole word when editing arabic with
ARABCON: because this version uses 0x20 hybrid full 8-bit arabic only mode.

When launching 'cata' program, a default screen and window will appear shortly
because the underlying 'arabicconsole.device' needs a window.

The system console lacks copy/paste but it multitasks fully ;
also the ARABCON: DOS console lacks multi-session windows management.

(version 1.51)
Now it is easy to replace letter(s) inside a word, when in Arabic : \\s using
soft-hyphenation code, by entering Alt-Shift-# on a US keyboard layout.

(version 1.52)
1. correct a bug on seizing of indecise-final (alif, da, dha, ra, za) letters ;
2. an initial, mid, final or isolated letter X, on the replacement part s/re/X
of the substitute command of 'ed'(eda) can be used without worrying about
soft-hyphenation code entered (0xAD erased, Alt-Shift-# must be in the middle to
get itself) ;
3. the s// substitute command can (now) use ArabSCII/ASCII or ASCII/ArabSCII
replacement forms : s/\ or /\s (use Escape twice to get itself) instead of s// ;
4. integration of 'cata' arabic filter program when saving 'w' with the 'ed'
editor ('cata' must be in the same directory as 'ed' ; look at "scmd" in main.c)

(version 1.524) follows 1.52 point four
o Reintegration or unfolding of the ad-hoc vowelized hamza with proper support
_algorithm_ into the put_stream_line() function of the 'io.c' module ;
o A Certification of this code is in progress...
o In theory (mine), there should be no more difference with the 'cata' filter
program, in the hamza letters, than the difference between an hamza letter
(0x41, 0xB4, 0xBA etc) and always, an hamza without support (0xA6) ;
o Use "we file" ed command to chain a 'w' with an 'e' commands ;
o Use "w0" to stay with the original write to file command of ed.

(version 1.53)
Actually unfolding the (full) Arabic algorithm (see note version 1.524 above).
If you reuse my work, don't forget to end the final letter of an ArabSCII word,
before passing it to the algorithm (see paragraph "be" of version 1.42).

(version 1.54)
Unleashing Arabic-C_to_C language frontal program from "a2cfront-excerpt-l.pdf".
'a2cfront' frontal is in the C_language directory as hello.ca .C_Arabic files.
For instance, transcode hello4.ca by running : a2cfront <hello4.ca >hello4.c ;
Compile hello4.c by : gcc -ohello4 hello4.c ;
Run "hello4 >arabcon:" (don't forget to "mount arabcon: from mountlista" before)

To display a C_Arabic .ca file, you can only use the 'ed(a)' editor.
C files (.c) are regular ones excepted for arabic string which are ExtendedSCII.

(version 1.541)
'arabscii' displays the ArabSCII table, 8bits full and 7bits at the bottom ;

If you modified the source-code 'ac.ca', with 'ed(a)', follow the two steps :
i.  a2cfront <ac.ca >ac.c
ii. gcc -oarabscii ac.c

Use "arabscii >arabcon:"  or  "!:arabscii" inside the ed-arabic editor.

(version 1.55)
o Arabic algorithm enhanced with finals (see 'io.c' file of the .lha archive) ;
o Arabic-C keywords added to 'a2cfront' ; see diff. between 'ac.ca'/'aca.ca' ;
o No semantic change to arabcon:

(version 1.56)
o lam in 'aca.ca' changed to lam+soft-hyphen also backspace redefined to start ;
o Escape(Alt-/) of double quote added and ha letter allowed in string(a2cfront);
o Fatha/dhamma/kasra on alif bended (0xA7 ; 0xAA) policies updated (io.c, dev) ;
o Finally, a new directory 'a2pr' for "ArabicToPrinter" contains a flex filter
to reverse numbers and, almost ASCII, words when those in escape sequence.
  This is for MultiView when Right-To-Left system font support becomes a reality
  (wondering how the engine of printer works for Arabic when in character mode).

(version 1.561) -- Bugs correction
arabicconsole.device (no source-code) - tanwin input, chadda begins long vowel ;

io.c[contains the source-code for a scientific approach to the Arabic algorithm]
- chadda on the beginning of long vowel, to be coherent with arabic device above
- alif-hamza when 0xAD instead of wa-hamze with vowel on 'iqra#'oun functionnal
- error on wa that infers current fatha vowel erased (previous == 0x5D .. 0xFD)
- miss of simple lam-alif (one of the four bended) as a long vowel added(0xC0)
- chaioun (thing) with sukun on ya mandatory to end with a hamza without support
- alif-maqsoura policy restricted (actually near ya if not at the end of a word)
- alif-bended(all lam-alif) added to final when ended by hamza w/ support(0xA6);

a2cfront[ArabicToCfront] (no source-code) - quote (\' = Alt-/ ') can be escaped;

a2pr[printing] - 'd'(~) and 'D'(^) added (no change implied), \n reinits Escape.

(version 1.562) -- Rectification of decision taken in bugs correction above
arabicconsole.device, io.c - chadda with no vowel allows to start a long vowel ;

a2pr[ArabicToPrint] - rework to better reverse ASCII words(if escaped)& numbers.
  (for futurs printing and "basic" viewing with MultiView AmigaOS tool)

(version 1.563)
arabicconsole.device, io.c - chadda with no vowel on wa-hamza is as an implicit.

(version 1.564) -- minor corrections & possible bug removed
  In io.c (full Arabic with ad-hoc vowelization algorithm -- rigorous approach):
- policy on alif-bended-hamze with chadda alone corrected (0xAA chadda as 0xAA);
- policy on alif-hamza-kasra with chadda alone corrected (0xB9 chadda as 0xB9) ;
- wa-hamze at the end with a final with sukun before no longer unchanged (tied);
  (these two, below at '+', are given as binaries only, no source-code)
+ In arabcon-handler : display of debugging (latin letters below) when vowel ON;
  (arabicconsole.device implements an Arabic algorithm but an handcrafted one)
+ In arabicconsole.device : poking at 0xbfe001 (power led blinking) removed.

(version 1.57) FinalEdition release
  arabicconsole.device : internal changes so that internal CMD_WRITE be the same

  ARABCON: (arabcon-handler, no source-code given)
- possible DOS guru 0x07000004 (Unexpected packet received) normally deleted ;
- increase priority to the task which communicates with (arabic)console.device ;
  Thus, the arabic editor 'eda' works fully with AmigaOS_FinalEdition(Update 0).

---- version 1.6 & 1.61 & 1.62 & 1.63 & 1.64 & 1.65 & 1.66 & 1.67 & 1.68 & 1.69
& 1.691 & 1.692 & 1.693 & 1.694 & 1.695 & 1.696 & 1.697 & 1.698 & 1.699 & 1.699a
& 1.699b & 1.699c & 1.699d & 1.699e & 1.699f & 1.699g ----

Add a full-page editor called STeVia for "STevie for Arabics" in "stevie/src" :

1. Update your 'arabicconsole.device'(v1.699), put the updated one in devs: and,
2. Update your 'arabcon-handler' in L directory to mount, before running steviA;
3. If versions 1.61-699 : update 'stevie' program too(not stevia envelope only).

Remarks about this full-page editor :

o Use Ctrl-U(p) Ctrl-D(own) and PageUp/PageDown instead of maintaining cursor
down continuously, to quickly browse a multi-page file ;

o I'm not an AmigaDOS Guru or Expert and my implementation of raw (versus
cooked) mode is an handcrafted one, but I've experienced that the display is
slower with AOS4.1FEu0 than with the AOS4.1 without update (perhaps
console.device writes are a bit faster but multitasking seems to be affected by
interleaved read/write operations when continuously cursor (press) down at
page/screen boundaries).
Also, input events queue? of AOS4.1FEu0 seems too big, or continues to queue
keyboard events even if a Key-Up event is supposed to be received (vanilla mode?
).

(version 1.61) -- eda bug on termination removal ; proper search '/' for STeViA.

(version 1.62) -- For search '/','?' use Alt- key combined to end an Arabic word
(no regexp with this version of "STevie for Arabics" but "plain" search as usual
with ArabSCII), bug on cursor displayed in the bottom window/status bar removed,
and, no more glitches when cursor press down continuously at screen boundaries.

(version 1.63) -- No more (visual) jitters with AOS4.1u0 thanks to serialized
I/O, dealing with long lines with the full-page editor STeVia is better, 0xAD
(hyphenation) only at the beginning of search '/','?' (so 0xAD is available
inside words).

(version 1.64) -- Display downwards now, one line at a time, even if long-lines
(start/stop perfect under AOS4.1u0, investigation is needed under AOS4.1FEu0),
lost cursor at the bottom when input on a blank page, fixed.

(version 1.65) -- Input in the middle of a file, optimized (in quasi-constant
time for arabic word insertion), search '/' or '?' followed by ESC for ASCII
word, improved.

(version 1.66) -- slightly change in the initial part of the Arabic algo for
0xBC|0xBD to be 0xBB instead of 0xBD; outside of the algo, alif-hamze 0x61|E1 is
transformed in hamza without support (0xA6) when at end of word; bug on
insertion-optimization fixed (caused vowelization of the hamza support not to
stay); better multi-line support; 'A'ppend (shift-A) command editor added.

(version 1.67)
1. bug in strRchr() (my version of strrchr() found at the end of main.c) fixed ;
2. deleting a char now ends a word if necessary (done in delchar() for 'x', bs);
3. a more proper line delete (display garbage on 'dd' command removed) ;
4. tackling the cursor vanishing problem (totally resolved in v1.68) ;
5. drastic speed-up optimization on multi-line insertion.

(version 1.68) -- a regression for multi-line at top dropped, Arabic algorithm
in edit.c and in cmdline.c (2 lines commented on curVoyImp at the beginning) so
to be the same (excepted alif-maqsura-kasra final as usual),  multi-line support
is better again, 'tabstop' environment variable supported.

(version 1.69) -- bad coded instruction could cause a bug with a full vowel
multi-line ; insertion of a non-letter in an arabic word ends words at the two
new boundaries ; the Arabic algorithm is now called when deleting, in delchar().

(version 1.691) -- primarily bugs correction
o if internal cursor (Curschar) overflows (== Fileend) words were not ended ;
o internal reinit. of long_vowel was not done correctly in the Arabic algorithm;
o better support of lam+alif-hamze(0xA7) to operate like other alif-hamze(0x41);
o singleton-word append to other when deleting, needs two calls to the (Arabic)
Algo() function: one for opening the single-letter and one to do append really.

(version 1.692) -- continues singleton (last point of 1.691)
[1.691] continues append with the indecise letters (alif, wa, da, dha, ra, za,
alif-hamze/madde) to poke the end of a word with an alif-hamze(0xE1) instead of
an hamza alone(0xA6) at the end, because we cannot "reopen" an indecise (initial
or isolated) and instead we choose to parse all the word-letters and do the most
inner appropriate modifications.
[1.692] correct input hamza alone when at the beginning of a line (source-code
is just above the last point one, and also at the outside of the Arabic-algo
when transforming an alif-hamze to an hamza alone).

(version 1.693) -- fever falls down !
a) simplify double_hamza_alones of singleton, starting at point 1.691 to 1.692 ;
b) suppress a bug when we delete all lines (dd) followed by deleting a char (x);
c) calling algo() function at better place and ASCII detection reinit when '\n'.

(version 1.694)
- vowel at start on alif did not transform it to hamza alone ;
- lam+alif-hamze-kasra alone now tied ;
- 0xA0 et 0x1F when keystroke on Shift+Letter, functionnal ;
- bug on Shift-D command (partial delete until the end of the line) fixed.

(version 1.695)
- Minor regression on alif-madde initial when searching alone ('/') dropped ;
- bug removed in the algorithm when arabic word starts with tatweel, was
transformed to 0x7F (arabic algorithm of 'io.c' of ed(a) modified accordingly).

(version 1.696) -- an indecise (alif, da, dhal, ra, za, wa), initial or medial
in an arabic word, now (with the full page editor) becomes an indecise isolated
or ended when a blank (a non-letter) is inserted after.

(version 1.697) -- all this points concern STeVia, as usual for 1.6xx
1. Alif-hamza re-allows (0xC1 instead of 0xA6) at the end of an arabic word when
input in "Capital" (CAPSLOCK or Alt-Letter entered). Note that a primitive
arabic algorithm, a common one, with which you can enter hamza alone everywhere
in a word and thus insensitive for hamza-letters to vowel is used then ;
2. Because we have limited complexity for SYN with only one previous, no vowels
too, for the STeVia editor, 0xA6 is not permitted to be a previous when syncing;
3. Parasiting vowel at the beginning, below the current line is eliminated.

(version 1.698)
- The display is now proper using backspace when deleting at the end of line ;
- Bug fixed for 'r'ead command when the buffer is empty.

(version 1.699)
1. The display is ok using backspace even when deleting initial input with '\n';
2. With the STeVia editor (raw mode is set), the correct form of letter is only
due to the algo() of the full-page editor. The arabicconsole.device do not
interfers (choose the appropriate form) anymore, thanks to an idle mode (0x27) ;
3. The ":wa" command editor(s) writes arabic even if a word is not terminated
with an arabic final (ascii protected by 0x1B is not affected) ;
4. Management of the hamza alone starting an arabic word followed by an alif in
"Capital" (0xA6 0xC2) enhanced. Try to input with CAPSLOCK on.

Arabic console uses a "common" algorithm (hamza, not sensitive to context and
vowel) when input/encoding starts with a final form ; or input with CAPSLOCK on.

(version 1.699a) -- point four of 1.699 [4.](0xA6 0xC2) introduces a regression:
corrected ; hamza alone (0xA6) inside an arabic word was not correctly handled.

(version 1.699b) -- bugs correction
- There was a bug if the second letter of an arabic word was vowelized and the
first letter was hamza alone (0xA6 vowel 0xXX) : it remains 0xA6 and that's what
we want, only for the starting of 0xA6 0xC2 "Capital sequence" which is never to
be vowelized ;
- Backspace on the first input frame, remains an initial letter left: not ended;
- Deleting ascii (inside 0x1B .. 0x1B) is better (this time do not ends letter).

(version 1.699c) -- policy of alif-hamze-kasra (alif (i) at beginning) reviewed.

(version 1.699d) -- 2 minor bugs in the algo with alif-maqsura(0xDF|0xFF) fixed.

(version 1.699e) -- minor corrections in the algo
- alif-hamze(-kasra) after lam at the end of line, won't stay 0xB8 (if entered
alone by Alt-';') or tied again as 0xAA ;
- a Capital arabic word (mainly 0xC0-0xDF) when only at the beginning, is
prevented to restart in the middle of this word, if all letters aren't Capitals;
- hamza alone or wa-hamze at the end, instead of alif-hamza, for word like
"Vice", "Vices".

(version 1.699f) -- bug on hamza alone/alif-hamza after multiple long vowels in
the same arabic word, removed.

(version 1.699g) -- input of vowel(s) at the end of line enhanced ; hamza alone
after alif-madde, supported.

(version 1.699g1) -- input of vowel at the beginning in reverse video, too.

(version 1.699g2) -- input of vowel at the beginning in reverse video : a clean
(in edit.c) and better solution (it was not mandatory but
devs/arabicconsole.device with only a 0x16 byte (SYNc alone) works correctly in
regard to not, even, displaying the cursor).

(version 1.699g3) -- better, if not total support for vowelization in the public
arabic algorithm (STeVia) where orthographic rules attempted to replace
comparisons followed by adjustements on peculiar cases (when several hamzas
follow each other) ; for an handcrafted algorithm use ed(a) line-editor instead.

(version 1.699g31) -- bug fixes of version 1699g3
o bad support for the final hamza on multiple & contiguous hamzas, corrected ;
o enhancements of the default support on the last hamza.

(version 1.699g32) -- bug fixes of version 1699g3 (continuation)
  improvement  of the default support on the last hamza : wa-hamze with fatha
above with a before-last letter with sukun, now yields hamza alone.

(version 1.699g33) -- bug fixes of version 1699g3 (continuation)
o optimization : scanning only the changed line in insert mode ;
o systematic closure in front of 0x1F (implies better robustness from keyboard);

o better behavior of 2 letters arabic-word, ending with an hamza alone.

(version 1.699g331)
- finalized behavior of 2 letters arabic-word, ending with an hamza ;
- deleting inside, ends the previous if it's the final letter of an arabic-word.

(version 1.699g332) -- regression on 'w'rite command for eda (io.c) fixed.


---- END OF RELEASE INFORMATION ----


Remarks : 'ed' is not the Amiga one's, but the one written by Ken Thompson for
the Unix operating system.
'STeVIe' Vi clone for Enthousiasts is due to Tim Thompson, a great composer too.

I put a default Escape code (033 in octal) at the end of the command prompt to
"disable arabic". Search for 'prompt' in main.c of the archive.

In fact, 'Esc' (not followed by '[' or ']') continues to display from
Right-to-Left but uses a latin font and simply disable arabic letter processing.
That is the peek/poke appropriate form's letter compiling due to
arabicconsole.device.

When you issued DOS commands to ARABCON: like echo "test" > arabcon:
it now closes the window just after writing ; no arabcon://///WAIT option, yet!


gdridi()club.fr

http://obligement.free.fr/articles/arabicconsole.php

























































File Version Size Date OS Dls Readme
arabic_console_dev.lha2Mb18 Jul 154.0¤ Arabic console - An arabic console device
arabic_console_device.lha1.5244Mb08 Feb 174.1¤ Arabic console - An arabic console device
Copyright (c) 2004-2017 by Björn Hagström All Rights Reserved
Amiga OS and its logos are registered trademarks of Hyperion Entertainment