This digest for list amigae-list has been created on Sun Feb 1 15:37:40 1998 ------- THIS IS A RFC934 COMPLIANT DIGEST, YOU CAN BURST IT ------- Date: Sun, 01 Feb 1998 15:34:56 +0100 From: gamboni@fastnet.ch (Jacques Gamboni) Subject: Re: Update the size of a string... kyz wrote:> >When I try to use this part of the program, the line that should be> >changed contains strange characters, like if it was a random address... > Have you checked what lvt[i] actually contains? Use EDBG or Explorer...There is something strange: I've put a command in my program that displays informations, like the contents of lvt[i] (i is not used in any other part of the program)and I've seen that lvt[i] contains the correct string, but Mui that (should?) use the same string displays random characters. I also checked that the addresses did not change (At the beginning, I send to Mui the address of the array so that it can display the strings). The others elements of the list are displayed correctely and correspond to the lvt list. Maxime ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- Date: Sun, 1 Feb 1998 15:00:34 +0000 (GMT) From: sac@csd.abdn.ac.uk (kyz) Subject: Re: Update the size of a string... On Sun, 1 Feb 1998, Jacques Gamboni wrote: =>I've seen that lvt[i] contains the correct string, but Mui that (should?) use =>the same string displays random characters. I also checked that the addresses =>did not change (At the beginning, I send to Mui the address of the array so =>that it can display the strings). The others elements of the list are =>displayed correctely and correspond to the lvt list. I don't program MUI, but is there a special hook/function/method/call that says 'update this particular string in the listview'? kyz ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- Date: 01 Feb 98 13:43:32 -0400 From: victord@netrover.com ("Victor Ducedre") Subject: Re: comp.sys.amiga.e Quoting kyz >alt.sys.amiga.e does in fact exist, initiated by Victor Prassad (sp?), IIRC. (sp?) indeed. I've seen my name badly mangled before, but this... :) >It's pretty much a ghost town, sadly. Rather foolish on my part, I'm afraid, trying to replace the previous non-working mailing list with yet another alt. group, since it's now destined to become the spam-filled, useless usenet group that 99% of alt.* tend to become. - -- Victor Ducedre (victord@netrover.com) Team AMIGA "Thank you for calling The Big Giant Head." ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- Date: Tue, 3 Feb 1998 15:11:49 +0100 (MET) From: s879@brems.ii.uib.no (Jan Ove Aase) Subject: Sine - Cosine Are there any sine - cosine functions available in/from E? And if it is not too much throuble, could someone explain how they are used? ____________________________________________________ _ _ \___/ Jan Ove Aase, Fantoft Stud.by, E-921, 5036 Fantoft (o o)__ janove@GalaxyCorp.com \_/\_ \ http://www.GalaxyCorp.com/janove ___/) \ http://www.GalaxyCorp.com/jan_ove (English) / ( _\ ____________________________________________________ \ _// \\_/ ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- Date: Tue, 03 Feb 1998 15:46:08 +0100 From: Fabio.Rotondo@deagostini.it (Fabio Rotondo) Subject: (no subject) MID amigae-list ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- Date: Tue, 03 Feb 1998 15:46:39 +0100 From: Fabio.Rotondo@deagostini.it (Fabio Rotondo) Subject: (no subject) HELP ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- Date: Tue, 03 Feb 1998 17:17:08 +0100 From: gamboni@fastnet.ch (Jacques Gamboni) Subject: Sorting arrays Can someone suggest me a fast way to sort Strings? I have an array (bigger than 200) of strings that have usually three or four characters. I first thought to look the whole list to see which is the first string, the search the list to find the second, search the list to find the third and so on, but with an array of 200 elements, it would force the computer to do about 20000 comparisons, which would be a bit slow... Maxime ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- Date: Tue, 3 Feb 1998 16:57:21 +0000 (GMT) From: sac@csd.abdn.ac.uk (kyz) Subject: Re: Sorting arrays On Tue, 3 Feb 1998, Jacques Gamboni wrote: =>Can someone suggest me a fast way to sort Strings? Use any one of many sorting sources hiding in E's Src/ directory: Src/Various/radixsort.e ? kyz ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- Date: Tue, 3 Feb 1998 12:02:18 -0500 (EST) From: ejames@iucf.indiana.edu (Eric James) Subject: Re: Sorting arrays > Can someone suggest me a fast way to sort Strings? > > I have an array (bigger than 200) of strings that have usually three or four > characters. Here's a simple PROC that will get the job done a bit faster than the method you mentioned. A more complicated quick sort algorithm would be even better though. PROC sortListOfStrings(lst:PTR TO LONG) DEF llen,i,j,k llen :=ListLen(lst)-1 FOR i :=0 TO llen-1 FOR j :=i+1 TO llen IF OstrCmp(lst[i],lst[j])< k :=lst[i] lst[i] :=lst[j] lst[j] :=k ENDIF ENDFOR ENDFOR ENDPROC Eric James ejames@iucf.indiana.edu http://www.iucf.indiana.edu/~ejames/ ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- Date: Tue, 03 Feb 1998 19:00:33 +0100 From: gamboni@fastnet.ch (Jacques Gamboni) Subject: Re: Sine - Cosine > Are there any sine - cosine functions available in/from E? If you use SinglePrecision, here is an example: DEF x,s,c ->Declare the float variables DEF i ->Declare the increment PROC main() FOR i:=0 TO 360 STEP 10 x:=i!/180.*3.14159265 /*the '.' after 180 shows it's a real*/ - ->Convert integer i into float x s:=Fsin(x) /*the calculation above converts degrees into radians, because*/ c:=Fcos(x) /*the trigonometrics functions works in radians.*/ WriteF('\r\d[3] ',i) RealF(str,s,8) /*Convert s into string str*/ WriteF('\s ',str) RealF(str,c,8) WriteF('\s\n',str) ENDFOR ENDPROC This little program displays a table of sines and cosines from zero to 360. There is a whole chapter about float numbers in the user manual (and beginner's manual.) If you want to use Double precision, I recommend the 'longreal' MODULE. Remember to put dInit(TRUE) at the beginning of your code and dCleanup() at the end. You can read the source code of the longreal MODULE, that explains how to use it. Maxime ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- Date: Wed, 04 Feb 1998 08:33:17 +0100 From: Fabio.Rotondo@deagostini.it (Fabio Rotondo) Subject: Re: Sorting arrays Jacques Gamboni wrote: Hi Jacques, > Can someone suggest me a fast way to sort Strings? If you are handling strings, why don't you try the StringNode? StringNode has also a _great_ sorting algo based upon quick sort. It is the fastest way: believe me. Ciao, Fabio ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- Date: Wed, 04 Feb 1998 11:44:54 +0100 From: Rainer.m.Mueller@uni-konstanz.de (Rainer =?iso-8859-1?Q?M=FCller?=) Subject: Re: Sample doublebuffering. At 12:12 31.01.98 +0100, you wrote: Hi ! > I'm writing yet another sample player but I have one BIG problem - it >calls DoubleBuffering. I have all sample data in memory and want to play >it. samples 64KB is simple just BeginIO() but longer needs DB. If you have >any sources for that please send it to me. Somewhere in the E-example sources, there should be a drawer "tools" and in there, a drawer called "async". There is a simple play-sample-direct-from-disc player using doublebuffering. If you can't find,understand etc. it, then write me again! BTW. samples may be played up to a size of 128KB directly, bigger samples have to be doublebuffered. Greetings, Rainer ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- From: samwel@algonet.se (Harry Samwel) Date: Wed, 04 Feb 1998 19:13:53 CST-2 Subject: Re: Sorting arrays FR>> Can someone suggest me a fast way to sort Strings? FR>If you are handling strings, why don't you try the StringNode? FR>StringNode has also a _great_ sorting algo based upon quick sort. FR>It is the fastest way: believe me. FR>Ciao, FR> Fabio Well Fabio, if you use StringNode your stuck with alot of extra code :( When you compile the source becomes almost 4Kb bigger just by using the sort :(( Please put your sort in a single PROC/module :) I would appriciate it!!! - -- Best Regards, Harry Samwel - - -- --- --------------------------------------------------- --- -- - M1500 Z3i/OS3.1/CS060 mk3/1.3Gb/34Mb/1.76Mb/Nec M.Sync/33600/200W Team *AMiGA* member *wOLFMAN/iLT!* Coder of the dreamdoors for daydream! e-mail: *samwel@algonet.se* or *wolfm@mailbox.passagen.se* homepage: *http://www.algonet.se/~samwel/* ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- Date: Sat, 07 Feb 1998 11:18:38 +0100 From: gamboni@fastnet.ch (Jacques Gamboni) Subject: dos.library? Could someone tell my the syntax of Execute()? (I currently always put Execute('a command',NIL,NIL), without knowing what those NIL,NIL are... And the AddPart() function? I want to use an Asl requester in a program, and everything they tell in an RKRM source that tells how to use a requester is 'use the AddPart() function' to put the path and file together. Where can I know about others functions of the dos.library? It is not mentionned in the RKRM! Maxime ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- Date: Sat, 7 Feb 1998 11:58:44 +0100 (MET) From: szczepan@cksr.ac.bialystok.pl ("Marcin Juszkiewicz (Szczepan/SubBlaBla)") Subject: Re: dos.library? On Sat, 7 Feb 1998, Jacques Gamboni wrote: - ->Could someone tell my the syntax of Execute()? - ->(I currently always put Execute('a command',NIL,NIL), without knowing - ->what those NIL,NIL are... - ->And the AddPart() function? I want to use an Asl requester in a program, - ->and everything they tell in an RKRM source that tells how to use a - ->requester is 'use the AddPart() function' to put the path and file - ->together. - ->Where can I know about others functions of the dos.library? It is not - ->mentionned in the RKRM! You really need autodocs. Try Amiga Developer CD or http://www.redrobe.demon.co.uk/amiga/ - ------ Marcin Juszkiewicz (Szczepan/SubBlaBla) *Team Amiga* szczepan@cksr.ac.bialystok.pl http://cksr.ac.bialystok.pl/szczepan/ A1200 BlizzIv 2+8MB RAM 425MB HDD Author of MultiView for OS 2.0+ -> Aminet:util/sys/2b_mv_os2_x.lha ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- From: merlin@thule.no (Eric Sauvageau) Date: Sat, 7 Feb 1998 13:28:15 +0500 Subject: Re: dos.library? On Sat, 7 Feb 1998, we received a letter from about 'dos.library?': > Could someone tell my the syntax of Execute()? > (I currently always put Execute('a command',NIL,NIL), without knowing > what those NIL,NIL are... Input handle and output handle. > And the AddPart() function? I want to use an Asl requester in a program, > and everything they tell in an RKRM source that tells how to use a > requester is 'use the AddPart() function' to put the path and file > together. > Where can I know about others functions of the dos.library? It is not > mentionned in the RKRM! They're all explained in your Autodocs. I do hope you have them if you intend to program ANYTHING on the Amiga, or else you won't get far :) ... "I think ye gave me too much time, Captain!" - Scotty. - -- ===--- - - - Eric Sauvageau http://www.thule.no/~merlin/ merlin@thule.no Amiga wizard known as Merlin, casting with E runes, resulting in: DevsMan - MFormat - NewIcons4 - SysInspector - XPKatana - - - - ---=== ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- Date: Sun, 8 Feb 1998 00:38:19 +0000 (GMT) From: sac@csd.abdn.ac.uk (kyz) Subject: Re: dos.library? On Sat, 7 Feb 1998, Eric Sauvageau wrote: =>On Sat, 7 Feb 1998, we received a letter from about 'dos.library?': => =>> Could someone tell my the syntax of Execute()? =>> (I currently always put Execute('a command',NIL,NIL), without knowing =>> what those NIL,NIL are... => =>Input handle and output handle. Nope, AFAIK It's Execute(CommandString, BOOL interactive, BPTR output) Basically, if interactive is non-0, then after the command you give has executed, dos will write to the output a prompt, and read from the output to get another command from the user. The call will not return until the user 'ends' the session with Ctrl-\ or endcli/endshell. Therfore, to open a new shell, you say something like: Execute('', TRUE, Open('CON:',MODE_READWRITE)) And to execute a command you say: Execute('mycommand', FALSE, Output()) or Execute(..., FALSE, NIL) to hide any output. =>They're all explained in your Autodocs. I do hope you have them if you intend =>to program ANYTHING on the Amiga, or else you won't get far :) Get Aminet:dev/misc/QuickAutodocs.lha for an example (but you'll still need the whole load of autodocs - they're around the net in certain places) kyz ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- From: merlin@thule.no (Eric Sauvageau) Date: Sat, 7 Feb 1998 23:41:24 +0500 Subject: Re[2]: dos.library? On Sat, 7 Feb 1998, we received a letter from about 'Re: dos.library?': > On Sat, 7 Feb 1998, Eric Sauvageau wrote: > > =>On Sat, 7 Feb 1998, we received a letter from about 'dos.library?': > => > =>> Could someone tell my the syntax of Execute()? > =>> (I currently always put Execute('a command',NIL,NIL), without knowing > =>> what those NIL,NIL are... > => > =>Input handle and output handle. > > Nope, AFAIK It's > > Execute(CommandString, BOOL interactive, BPTR output) You are wrong, look in your Autodocs. NAME Execute -- Execute a CLI command SYNOPSIS success = Execute( commandString, input, output ) D0 D1 D2 D3 BOOL Execute(STRPTR, BPTR BPTR.) FUNCTION This function attempts to execute the string commandString as a Shell command and arguments. The string can contain any valid input that you could type directly in a Shell, including input and output redirection using < and >. Note that Execute() doesn't return until the command(s) in commandstring have returned. The input file handle will normally be zero, and in this case Execute() will perform whatever was requested in the commandString and then return. If the input file handle is nonzero then after the (possibly empty) commandString is performed subsequent input is read from the specified input file handle until end of that file is reached. In most cases the output file handle must be provided, and is used by the Shell commands as their output stream unless output redirection was specified. If the output file handle is set to zero then the current window, normally specified as *, is used. Note that programs running under the Workbench do not normally have a current window. Execute() may also be used to create a new interactive Shell process just like those created with the NewShell command. In order to do this you would call Execute() with an empty commandString, and pass a file handle relating to a new window as the input file handle. The output file handle would be set to zero. The Shell will read commands from the new window, and will use the same window for output. This new Shell window can only be terminated by using the EndCLI command. Under V37, if an input filehandle is passed, and it's either interactive or a NIL: filehandle, the pr_ConsoleTask of the new process will be set to that filehandle's process (the same applies to SystemTagList()). For this command to work the program Run must be present in C: in versions before V36 (except that in 1.3.2 and any later 1.3 versions, the system first checks the resident list for Run). INPUTS commandString - pointer to a null-terminated string input - BCPL pointer to a file handle output - BCPL pointer to a file handle@{b} RESULTS success - BOOLEAN indicating whether Execute was successful in finding and starting the specified program. Note this is NOT the return code of the command(s). SEE ALSO SystemTagList(), NewShell, EndCLI, Run ... Commander Data used Doublespace on himself and turned into a VIC-20! - -- ===--- - - - Eric Sauvageau http://www.thule.no/~merlin/ merlin@thule.no Amiga wizard known as Merlin, casting with E runes, resulting in: DevsMan - MFormat - NewIcons4 - SysInspector - XPKatana - - - - ---=== ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- Date: Mon, 9 Feb 1998 00:21:10 +0000 (GMT) From: sac@csd.abdn.ac.uk (kyz) Subject: Re: Re[2]: dos.library? On Sat, 7 Feb 1998, Eric Sauvageau wrote: =>> =>Input handle and output handle. =>> Nope, AFAIK It's =>> Execute(CommandString, BOOL interactive, BPTR output) =>You are wrong, look in your Autodocs. [snip] => The input file handle will normally be zero, and in this case => Execute() will perform whatever was requested in the commandString => and then return. If the input file handle is nonzero then after the => (possibly empty) commandString is performed subsequent input is read => from the specified input file handle until end of that file is => reached. It's almost exactly like I said. If input is non-zero, then Execute() goes interactive after the command. The only difference is, I said arg 2 is bool, and the output FH is used for reading. The truth is arg 2 is BPTR, and it itself is used for reading. Just for that, I'm keeping all the autodocs online, and I'll quote every time ;-P. kyz ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- From: merlin@thule.no (Eric Sauvageau) Date: Sun, 8 Feb 1998 19:42:18 +0500 Subject: Re[2]: dos.library? On Sun, 8 Feb 1998, we received a letter from about 'Re: Re[2]: dos.library?': > It's almost exactly like I said. If input is non-zero, then Execute() goes > interactive after the command. The only difference is, I said arg 2 is If you set Input to TRUE (meaning -1), then you end up reading from $FFFFFFFF. Hardly useful, and potentialy causing Enforcer hits since you don't have a real file handle there. This is such "assumptions" that causes programs to behave erraticaly on some systems but fine on others. :) ... Air conditioned environment; do not open Windows! - -- ===--- - - - Eric Sauvageau http://www.thule.no/~merlin/ merlin@thule.no Amiga wizard known as Merlin, casting with E runes, resulting in: DevsMan - MFormat - NewIcons4 - SysInspector - XPKatana - - - - ---=== ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- Date: Mon, 09 Feb 1998 14:03:32 +0100 From: Fabio.Rotondo@deagostini.it (Fabio Rotondo) Subject: NewIcons Questions I have some NI questions for this list :-) - - Is there any special TAG I should provide creating a custom Screen to support NI? (If so, please, tell me what I should provide) - - Does NI work also under OS2.0+ ? - - Is there any size limit of a NI? Thanks, Fabio ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- Date: Mon, 9 Feb 1998 14:59:30 +0100 (MET) From: rade@coli.uni-sb.de (Ralph Debusmann) Subject: Asynchronous System() Hi! I wonder how to interrupt a program which I started asynchronously with 'SystemTagList'. I don't know how to get the task structure which I need when I want to 'Signal' the task a CTRL_C-signal which should cause it to exit. I tried 'FindTask' then, but it never found the task, although it's perfectly visible in Executive's 'Commander' for instance and signalling via the 'Commander' works flawlessly. Ciao, Ralph - -- Fachschaft CL, Geb. 17.3, Raum 6.03 (Keller), Tel.: 0681-302-4178 HiWi im Projekt LISA, Geb. 17.3, Raum 1.11, Tel.: 0681-302-4496 Homepage, http://www.coli.uni-sb.de/~rade ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- From: a9660319@wlv.ac.uk Subject: Clipping. Date: Mon, 9 Feb 1998 14:07:38 +0000 (GMT) Hi there List! I`m having trouble clipping Polygons to a screen (intui screen.) Lets see, first I used layers, to clip the Line(), this worked fine, but I need Filled Polygons, so I learnt how to clip the line to a rectangle (Sunderland-Hothersomething routine), but using AreaMove() AreaDraw() AreaEnd() is a right pain, and I`m having trouble getting the Poly clipper to work, Have I missed an easy way of doing it? Can I clip the TmpRas? Or am I just going to have to continue trying to program the poly clipper? Thanks. Andrew :) ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- Date: Mon, 9 Feb 1998 17:09:18 +0100 (MET) From: subvcbhd@calvados.zrz.TU-Berlin.DE (Henk Jonas) Subject: Re: Clipping. On Mon, 9 Feb 1998, a9660319 wrote: > Hi there List! Hi Andrew, > =09I`m having trouble clipping Polygons to a screen (intui screen.) I believe it :-) > Lets see, first I used layers, to clip the Line(), this worked fine,=20 There are no problems. > but I need Filled Polygons, so I learnt how to clip the line to a=20 > rectangle (Sunderland-Hothersomething routine), but using AreaMove()=20 > AreaDraw() AreaEnd() is a right pain, and I`m having trouble getting=20 > the Poly clipper to work, Have I missed an easy way of doing it? Can I=20 > clip the TmpRas? Or am I just going to have to continue trying to=20 > program the poly clipper? You have to allocate a tmpras in the size of your complete (unclipped) drawing. That can be realy big. If you dont want this big tmpras then use your own poly clipper, or look at aminet dev/c there is a safeclip for c. Perhaps you can translate it to E? Henk - ---------------------------------------------------------------- Henk Jonas | subvcbhd@linux.zrz.tu-berlin.de Student der | Energietechnik | http://www.cs.tu-berlin.de/~jonash > Ich lehne Atomenergie als Energiealternative ab! niX=B3 Castor < - ---------------------------------------------------------------- * AmigaMetaFileFormat * MetaView * Messlabor * Voxelflight * - ---------------------------------------------------------------- Fuer die 'Mitleser': ANARCHIEBNDAKWPKKRAFRADIKALTNTKPDPDSREVOLUT ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- From: a9660319@wlv.ac.uk Subject: Re: Clipping. Date: Mon, 9 Feb 1998 16:29:36 -0500 (EST) > > I`m having trouble clipping Polygons to a screen (intui screen.) > I believe it :-) > > > Lets see, first I used layers, to clip the Line(), this worked fine, > There are no problems. > > > but I need Filled Polygons, so I learnt how to clip the line to a > > rectangle (Sunderland-Hothersomething routine), but using AreaMove() > > AreaDraw() AreaEnd() is a right pain, and I`m having trouble getting > > the Poly clipper to work, Have I missed an easy way of doing it? Can I > > clip the TmpRas? Or am I just going to have to continue trying to > > program the poly clipper? > You have to allocate a tmpras in the size of your complete (unclipped) > drawing. That can be realy big. If you dont want this big tmpras then use > your own poly clipper, or look at aminet dev/c there is a safeclip for c. > Perhaps you can translate it to E? > I`ve seen SafeClip, it`s mostly in Machine code..... (whats it doing in the C drawer then? Hm....) I was kind of hoping it wouldn`t come to that, oh well..... Andrew :) ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- Date: Mon, 9 Feb 1998 17:47:26 +0100 (MET) From: subvcbhd@calvados.zrz.TU-Berlin.DE (Henk Jonas) Subject: Re: Clipping. On Mon, 9 Feb 1998, a9660319 wrote: > I`ve seen SafeClip, it`s mostly in Machine code..... (whats it doing in= =20 > the C drawer then? Hm....) I was kind of hoping it wouldn`t come to=20 > that, oh well..... Maybe you try my AmigaMetaFormat.library, the strip.driver for drawing on screen, rastports etc. have a clipping part. I think it works now fine after many weeks of work and debugging :-) Henk - ---------------------------------------------------------------- Henk Jonas | subvcbhd@linux.zrz.tu-berlin.de Student der | Energietechnik | http://www.cs.tu-berlin.de/~jonash > Ich lehne Atomenergie als Energiealternative ab! niX=B3 Castor < - ---------------------------------------------------------------- * AmigaMetaFileFormat * MetaView * Messlabor * Voxelflight * - ---------------------------------------------------------------- Fuer die 'Mitleser': ANARCHIEBNDAKWPKKRAFRADIKALTNTKPDPDSREVOLUT ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- From: merlin@thule.no (Eric Sauvageau) Date: Mon, 9 Feb 1998 13:53:00 +0500 Subject: Re: NewIcons Questions On Mon, 9 Feb 1998, we received a letter from about 'NewIcons Questions': > I have some NI questions for this list :-) > > - Is there any special TAG I should provide creating a custom Screen to > support NI? All NI needs is that the screen be public, with sharable pens. I never really played with opening new screens so I don't know from memory exactly which tags are needed, but it shouldn't be a problem to find. > - Does NI work also under OS2.0+ ? NI upto V4.1 works under OS 2.04, tho with very limited functionality. OS 2.04 lacks ObtainBestPen(), so NI must rely on FindColor() and hope that nobody changes the colors while NI uses them. If you're opening your own screen, providing your own palette to the screen while under OS 2.04 should do the trick. Note that future versions of NI will *NOT* work under OS 2.04. I decided to drop such support for various reasons, one being I believe that by supporting obsolete versions of the OS you're only promoting the "let's stick to our 8 years old junk since it's still supported" mentality that is hindering the Amiga evolution since day one. Users upgrade when the applications they need require more up-to-date stuff. More users upgrading means lower prices, a more up-to-date userbase, a more attractive market for new third party developers, and results overall in an healthier platform. (Oops, looks like I once again got carried on... Sorry :) > - Is there any size limit of a NI? 93x93. This was a design decision taken by Nicola back then, and changing it would mean quite a bit of fiddling with the library code and an increased memory usage on icon saving (NI allocates memory for the worse case before encoding data). Ciao! ... Star Trek XXVII - The Search for Shatner's Teeth. - -- ===--- - - - Eric Sauvageau http://www.thule.no/~merlin/ merlin@thule.no Amiga wizard known as Merlin, casting with E runes, resulting in: DevsMan - MFormat - NewIcons4 - SysInspector - XPKatana - - - - ---=== ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- From: merlin@thule.no (Eric Sauvageau) Date: Mon, 9 Feb 1998 13:43:33 +0500 Subject: Re: Asynchronous System() On Mon, 9 Feb 1998, we received a letter from about 'Asynchronous System()': > Hi! > > I wonder how to interrupt a program which I started asynchronously with > 'SystemTagList'. I don't know how to get the task structure which I need > when I want to 'Signal' the task a CTRL_C-signal which should cause it to > exit. > > I tried 'FindTask' then, but it never found the task, although it's > perfectly visible in Executive's 'Commander' for instance and signalling > via the 'Commander' works flawlessly. Processes launched with a CLI structure won't show the command name in task.ln.name, but something like "Background Process". You will have to look at all these, your command name will be somewhere in cli.commandname (not sure of the exact location, look in your dos/dos and dos/dosextens includes). Managing an async process in AmigaDOS is a pain, as SystemTagList() can't return a Task pointer, and all the task termination notification stuff is labeled as "Not implemented yet" in the Includes :( I ran into that problem with CAMP, and ressorted to using NewLoadSeg(), CreateNewProc() and giving the new process a name easy to find with FindTask(). You can find the example code on my website, download the CAMP archive from the Laboratory page. Ciao! ... Step out of the channel, I clocked your I.Q. at over 60 in a Mac zone. - -- ===--- - - - Eric Sauvageau http://www.thule.no/~merlin/ merlin@thule.no Amiga wizard known as Merlin, casting with E runes, resulting in: DevsMan - MFormat - NewIcons4 - SysInspector - XPKatana - - - - ---=== ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- Date: Mon, 9 Feb 1998 20:11:06 +0000 (GMT) From: sac@csd.abdn.ac.uk (kyz) Subject: Re: Re[2]: dos.library? On Sun, 8 Feb 1998, Eric Sauvageau wrote: =>> It's almost exactly like I said. If input is non-zero, then Execute() goes =>> interactive after the command. The only difference is, I said arg 2 is =>If you set Input to TRUE (meaning -1), then you end up reading from $FFFFFFFF. => Hardly useful, and potentialy causing Enforcer hits since you don't have a real =>file handle there. => =>This is such "assumptions" that causes programs to behave erraticaly on some =>systems but fine on others. :) Don't care :) I've never used arg 2 of Execute() with any value other than NIL, as it's outdated - you're meant to use SystemTagList('NewShell ... to open a new shell. kyz ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- From: merlin@thule.no (Eric Sauvageau) Date: Mon, 9 Feb 1998 13:53:00 +0500 Subject: Re: NewIcons Questions On Mon, 9 Feb 1998, we received a letter from about 'NewIcons Questions': > I have some NI questions for this list :-) > > - Is there any special TAG I should provide creating a custom Screen to > support NI? All NI needs is that the screen be public, with sharable pens. I never really played with opening new screens so I don't know from memory exactly which tags are needed, but it shouldn't be a problem to find. > - Does NI work also under OS2.0+ ? NI upto V4.1 works under OS 2.04, tho with very limited functionality. OS 2.04 lacks ObtainBestPen(), so NI must rely on FindColor() and hope that nobody changes the colors while NI uses them. If you're opening your own screen, providing your own palette to the screen while under OS 2.04 should do the trick. Note that future versions of NI will *NOT* work under OS 2.04. I decided to drop such support for various reasons, one being I believe that by supporting obsolete versions of the OS you're only promoting the "let's stick to our 8 years old junk since it's still supported" mentality that is hindering the Amiga evolution since day one. Users upgrade when the applications they need require more up-to-date stuff. More users upgrading means lower prices, a more up-to-date userbase, a more attractive market for new third party developers, and results overall in an healthier platform. (Oops, looks like I once again got carried on... Sorry :) > - Is there any size limit of a NI? 93x93. This was a design decision taken by Nicola back then, and changing it would mean quite a bit of fiddling with the library code and an increased memory usage on icon saving (NI allocates memory for the worse case before encoding data). Ciao! ... Star Trek XXVII - The Search for Shatner's Teeth. - -- ===--- - - - Eric Sauvageau http://www.thule.no/~merlin/ merlin@thule.no Amiga wizard known as Merlin, casting with E runes, resulting in: DevsMan - MFormat - NewIcons4 - SysInspector - XPKatana - - - - ---=== ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- Date: Mon, 9 Feb 1998 15:00:37 GMT From: jason@fsel.com (Jason Hulance) Subject: Re: Clipping. wrote: > I`m having trouble clipping Polygons to a screen (intui screen.) > Lets see, first I used layers, to clip the Line(), this worked fine, > but I need Filled Polygons, so I learnt how to clip the line to a > rectangle (Sunderland-Hothersomething routine), but using AreaMove() > AreaDraw() AreaEnd() is a right pain, and I`m having trouble getting > the Poly clipper to work, Have I missed an easy way of doing it? Can I > clip the TmpRas? Or am I just going to have to continue trying to > program the poly clipper? Unless you've dismissed this for being too obvious, or not suited to what you want, why don't you try the layers.library functions for installing a clipping region? Look at: Src/Rkrm/Graphics_Libraries/Layers/clipping.e Cheers! - -- The conundrum for today is "neunrmide". Your numbers are 75, 10, 5, 10, 8 and 4. The target value is 348. ====================================================================== Jason R. Hulance Email: jason@fsel.com Formal Systems (Europe) Ltd Tel: [+44] (0)1865 728460 3 Alfred Street, Oxford OX1 4EH, UK Fax: [+44] (0)1865 201114 ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- From: Alfred.P.Schwarz@kerckhoff.med.uni-giessen.de ("Alfred Schwarz") Subject: Re: NewIcons Questions Date: Tue, 10 Feb 1998 10:19:17 +0100 >Note that future versions of NI will *NOT* work under OS 2.04. I decided to >drop such support for various reasons, one being I believe that by supporting >obsolete versions of the OS you're only promoting the "let's stick to our 8 years >old junk since it's still supported" mentality that is hindering the Amiga evolution >since day one. Users upgrade when the applications they need require more up-to-date >stuff. More users upgrading means lower prices, a more up-to-date userbase, >a more attractive market for new third party developers, and results overall >in an healthier platform. I think this is something that cannot be said often enough. We already had a discussion about this on the list and it is nice to see that other have the same opinion :) >> - Is there any size limit of a NI? > >93x93. This was a design decision taken by Nicola back then, and changing it >would mean quite a bit of fiddling with the library code and an increased memory >usage on icon saving (NI allocates memory for the worse case before encoding >data). It's strange, I already made icons bigger then 93x93. Sometimes the machines crashes but not always ;-) It seems, NI has no check when writing icons bigger than this limit but prefers to crash silently, is this correct? Ciao, A. Schwarz ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- From: a9660319@wlv.ac.uk Subject: Re: Clipping. Date: Tue, 10 Feb 1998 16:30:30 -0500 (EST) > wrote: > > > I`m having trouble clipping Polygons to a screen (intui screen.) > > Lets see, first I used layers, to clip the Line(), this worked fine, > > but I need Filled Polygons, so I learnt how to clip the line to a > > rectangle (Sunderland-Hothersomething routine), but using AreaMove() > > AreaDraw() AreaEnd() is a right pain, and I`m having trouble getting > > the Poly clipper to work, Have I missed an easy way of doing it? Can I > > clip the TmpRas? Or am I just going to have to continue trying to > > program the poly clipper? > > Unless you've dismissed this for being too obvious, or not suited to > what you want, why don't you try the layers.library functions for > installing a clipping region? Look at: > > Src/Rkrm/Graphics_Libraries/Layers/clipping.e > > Cheers! That dosn`t work, as to use a AreaDraw() AreaMove() you use a tmpras, on which the poly is drawn, and the poly is then blitted to the rastport. Layers only clips the rastport, not the tmpras, so, I can use a VERY large TmpRas, (but even after obvious clipping it still nedds to be about 2000x2000!) But, that`s just a bit unprofessional, and dosn`t actually garuntee that AreaDraw() wont cause GBH to the memorey anyway. The only query is can I use layers to clip the Tmpras? This would solve just about all my problems, as I already use ClipRegion() to clip the screen.... I`ve pulled apart the above source, it only clips the rastport, and not the tmpras.... irritating.... This seems one of the things in the OS which is totally missing, clipped polygons..... Oh for hardware clipping... Thanks Andrew :) ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- From: merlin@thule.no (Eric Sauvageau) Date: Tue, 10 Feb 1998 14:06:56 +0500 Subject: Re[2]: NewIcons Questions On Tue, 10 Feb 1998, we received a letter from about 'Re: NewIcons Questions': > >> - Is there any size limit of a NI? > > > >93x93. This was a design decision taken by Nicola back then, and > > It's strange, I already made icons bigger then 93x93. Sometimes the machines > crashes but not always ;-) > It seems, NI has no check when writing icons bigger than this limit but > prefers to crash silently, is this correct? If the tool you use to create an icon is buggy, there's not much that I can do :) InjectBrush checks that the source brush isn't larger than 93x93. Since speed is the most asked improvement for NI, I prefer to keep the sanity checks as low as possible, and rely on the NI creation tools working correctly. Ciao! ... Jesus saves...but Gretzky gets the rebound! - -- ===--- - - - Eric Sauvageau http://www.thule.no/~merlin/ merlin@thule.no Amiga wizard known as Merlin, casting with E runes, resulting in: DevsMan - MFormat - NewIcons4 - SysInspector - XPKatana - - - - ---=== ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- Date: Wed, 11 Feb 1998 08:36:05 GMT From: jason@fsel.com (Jason Hulance) Subject: Re: Clipping. quoted and wrote: > > Unless you've dismissed this for being too obvious, or not suited to > > what you want, why don't you try the layers.library functions for > > installing a clipping region? Look at: > > > > Src/Rkrm/Graphics_Libraries/Layers/clipping.e > > > > Cheers! > > That dosn`t work, as to use a AreaDraw() AreaMove() you use a tmpras, > on which the poly is drawn, and the poly is then blitted to the > rastport. Layers only clips the rastport, not the tmpras, so, I can use > a VERY large TmpRas, (but even after obvious clipping it still nedds to > be about 2000x2000!) But, that`s just a bit unprofessional, and dosn`t > actually garuntee that AreaDraw() wont cause GBH to the memorey anyway. > > The only query is can I use layers to clip the Tmpras? This would solve > just about all my problems, as I already use ClipRegion() to clip the > screen.... Um... sorry about that. I should have read what you'd asked a bit better. And no, I the Layers clipping functions work on Layers (which are on-screen things), so you're a bit stuck. Cheers! - -- The conundrum for today is "attapatel". Your numbers are 75, 8, 7, 2, 4 and 4. The target value is 201. ====================================================================== Jason R. Hulance Email: jason@fsel.com Formal Systems (Europe) Ltd Tel: [+44] (0)1865 728460 3 Alfred Street, Oxford OX1 4EH, UK Fax: [+44] (0)1865 201114 ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- Date: Wed, 11 Feb 1998 11:03:59 +0100 (MET) From: subvcbhd@calvados.zrz.TU-Berlin.DE (Henk Jonas) Subject: Re: Clipping. On Wed, 11 Feb 1998, Jason Hulance wrote: > > rastport. Layers only clips the rastport, not the tmpras, so, I can use= =20 > > a VERY large TmpRas, (but even after obvious clipping it still nedds to= =20 > > be about 2000x2000!) But, that`s just a bit unprofessional, and dosn`t= =20 > > actually garuntee that AreaDraw() wont cause GBH to the memorey anyway. > >=20 > > The only query is can I use layers to clip the Tmpras? This would solve= =20 > > just about all my problems, as I already use ClipRegion() to clip the= =20 > > screen.... >=20 > Um... sorry about that. I should have read what you'd asked a bit > better. And no, I the Layers clipping functions work on Layers (which > are on-screen things), so you're a bit stuck. This was also discussed on news:comp.sys.amiga.programmer for some times. The OS can only clip the copy from tmpras to the screen. So tmpras have to be big enough to hold the complete drawing. Therefore extern clipping are needed, like AMF.library strip.driver or Aminet:dev/c/safe_clip. What the OS really need, are the change from BitMap-system to device-independent gfx-system and this must include a fast clipping routine. Henk - ---------------------------------------------------------------- Henk Jonas | subvcbhd@linux.zrz.tu-berlin.de Student der | Energietechnik | http://www.cs.tu-berlin.de/~jonash > Ich lehne Atomenergie als Energiealternative ab! niX=B3 Castor < - ---------------------------------------------------------------- * AmigaMetaFileFormat * MetaView * Messlabor * Voxelflight * - ---------------------------------------------------------------- Fuer die 'Mitleser': ANARCHIEBNDAKWPKKRAFRADIKALTNTKPDPDSREVOLUT ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- Date: Thu, 12 Feb 1998 09:23:26 +0100 From: Fabio.Rotondo@deagostini.it (Fabio Rotondo) Subject: Windows & Messages Hi List, I have a non trivial problem with Windows and Messages Handling. Preface: I would like to get all user mouse clicks on a Window and perform some actions. I have opened a window with *just* IDCMP_MOUSEBUTTONS and my message handling routine is written in this way: Wait(...) imsg:=GetMsg(win.userport) class:=imsg.class SELECT class CASE IDCMP_MOUSEBUTTONS do_stuff() ENDSELECT ReplyMsg(imsg) The problem is that I get *TWO* messages for *ONE* mouseclick. I think the events are MOUSEDOWN/UP but I don't know how to clear some of them. I have tried this flush events proc: PROC flush_events(port) DEF imsg WHILE (imsg:=GetMsg(port)) ReplyMsg(imsg) ENDWHILE ENDPROC but if i click wildly on the window, I get a GURU... :-( What is missing??? Ciao, Fabio P.S: Please HELP!! it is important ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- Date: Thu, 12 Feb 1998 09:47:33 GMT From: jason@fsel.com (Jason Hulance) Subject: Re: Windows & Messages Fabio Rotondo wrote: > I have opened a window with *just* IDCMP_MOUSEBUTTONS > and my message handling routine is written in this way: > > Wait(...) > > imsg:=GetMsg(win.userport) > class:=imsg.class > SELECT class > CASE IDCMP_MOUSEBUTTONS > do_stuff() > ENDSELECT > > ReplyMsg(imsg) > > The problem is that I get *TWO* messages for *ONE* mouseclick. Yes, as documented, you get the up *and* down messages. > I think the events are MOUSEDOWN/UP but I don't know how to clear some > of them. SELECT on the message code, as in: Src/Rkrm/Intuition/Mouse_Keyboard/mousetest.e > I have tried this flush events proc: > > PROC flush_events(port) > DEF imsg > > WHILE (imsg:=GetMsg(port)) > ReplyMsg(imsg) > ENDWHILE > ENDPROC You shouldn't need to do this, as closing the window is safe enough (all the messages get deallocated). The only time you need to do things like this is when you're sharing an IDCMP port, or some such. > but if i click wildly on the window, I get a GURU... :-( > > What is missing??? Hmmm... sounds weird. Try the above RKRM example and see if that does the same. Cheers! - -- The conundrum for today is "eldatomau". Your numbers are 1, 6, 5, 6, 4 and 6. The target value is 855. ====================================================================== Jason R. Hulance Email: jason@fsel.com Formal Systems (Europe) Ltd Tel: [+44] (0)1865 728460 3 Alfred Street, Oxford OX1 4EH, UK Fax: [+44] (0)1865 201114 ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- From: turrican@starbase.inka.de (Grundler Mathias) Date: Sat, 14 Feb 1998 11:38:35 +0100 Subject: Re: Windows & Messages Am 12-Feb-98 schrieb Fabio Rotondo: >Hi List, Hi! > Wait(...) > imsg:=GetMsg(win.userport) > class:=imsg.class > SELECT class > CASE IDCMP_MOUSEBUTTONS > do_stuff() > ENDSELECT > ReplyMsg(imsg) You should make a copy from the Message and send the original message as FAST as possible back to Intuition! >The problem is that I get *TWO* messages for *ONE* mouseclick. I think >the events are MOUSEDOWN/UP >but I don't know how to clear some of them. >I have tried this flush events proc: Yes, you get the BUTTONUP and BUTTONDOWN-Messages! You could select the class (or was it the code-variable?) from the intuition-message (copy) here you could filter out the DOWN and UP-messages! >but if i click wildly on the window, I get a GURU... :-( This could be, because intuition need the messages to replyed as fast as possible (i recognize that this was in the RKRMs !?) >What is missing??? Show above! PS: Sorry for my bad english, i nativly speak german an only has learned school-english :-( - -- ________ ______ /__ __\ __________()_____ _\ / /\ turrican@starbase.inka.de \ //\/\\ _/\ _//\\ __//_\\ \/ \ THE DARK FRONTIER \//____\\/ \/ /__\\_//___\\/\_____\ Softwareentwicklung PD+Share ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- From: agraham@hal9000.net.au (Ali Graham) Date: Sun, 15 Feb 1998 17:52:24 +1030 Subject: Endian-ness I'm starting to write a Z80 routine for an emulator, and (what with the Z80 being little-endian, and my 030 being big-endian) wondered if anybody had: a) E routines for big->little / little->big endian conversions and/or b) C routines for the same thing and/or c) URLs or references discussing endianness and endian issues. Most of the material out there written about emulating the Z80 assumes it's being done on an 80x86, so this isn't really an issue for them... - -- . _________________________________________________. [ ] [ Ali Graham [mailto:agraham@hal9000.net.au] ] [__________________________________________________] ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- From: merlin@thule.no (Eric Sauvageau) Date: Sun, 15 Feb 1998 14:15:01 +0500 Subject: Re: Endian-ness On Sun, 15 Feb 1998, we received a letter from about 'Endian-ness': > I'm starting to write a Z80 routine for an emulator, > and (what with the Z80 being little-endian, and my > 030 being big-endian) wondered if anybody had: > > a) E routines for big->little / little->big > endian conversions If you're putting some ASM in there, 32 bits values could be converted through a SWAP. For 8/16 bits values, look at the ROL operand. (I do hope you intend to put some ASM in the low-level stuff, or you might end up with a crawling emulator ;) Ciao! ... Air conditioned environment; do not open Windows! - -- ===--- - - - Eric Sauvageau http://www.thule.no/~merlin/ merlin@thule.no Amiga wizard known as Merlin, casting with E runes, resulting in: DevsMan - MFormat - NewIcons4 - SysInspector - XPKatana - - - - ---=== ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- From: pamiga@user1.channel1.com (peter mysliwy) Date: Sun, 15 Feb 1998 14:48:32 -0400 Subject: Re: Endian-ness On 15-Feb-98, Eric Sauvageau wrote: >On Sun, 15 Feb 1998, we received a letter from about 'Endian-ness': >> I'm starting to write a Z80 routine for an emulator, >> and (what with the Z80 being little-endian, and my >> 030 being big-endian) wondered if anybody had: >> >> a) E routines for big->little / little->big >> endian conversions I've done some Endian here is a couple of proc PROC little_endian_word(value) MOVEA.L value,A0 MOVE.W (A0),D0 AND.L #$0000FFFF,D0 ROL.W #8,D0 ENDPROC D0 PROC little_endian_long(value) MOVEA.L value,A0 MOVE.L (A0),D0 ROL.W #8,D0 SWAP.L D0 ROL.W #8,D0 ENDPROC D0 Hope it helps - -- /// A1400 1.4GB HD /// Blizzard 1260/50MHZ 48MB \\\/// Pretty quick?? \\\/ ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- Date: Mon, 16 Feb 1998 09:58:21 +0100 From: gamboni@fastnet.ch (Jacques Gamboni) Subject: Mui Custom Class questions I created a subclass of the Group class (i.e. an Mui Custom Class), but I have some problems: This class has a custom layout hook, the coordinates of every object are saved in an array. The problem is that the class should accept new objects with Drag and Drop: there is a library of available objects, the user takes an item in this list and drops it into the class rectangle. They say in the Mui developper guide that members can be added in a group only when its window is closed. So I should close the window when something is dropped in it and open it again? It would be a nightmare for the user... Second question: How can I cause the layout to be recalulated from the program? I have programmed that the objects can be moved using Drag'n'Drop in that class, but I the change is not seen by Mui (Because I save the changes in my arrays), I need to resize the window to see it. Maxime ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- From: stv@minorisa.es ("Esteve Boix") Date: Mon, 16 Feb 1998 10:10:57 +0000 Subject: Re: Mui Custom Class questions Hi > I created a subclass of the Group class (i.e. an Mui Custom Class), > but I have some problems: This class has a custom layout hook, the > coordinates of every object are saved in an array. The problem is > that the class should accept new objects with Drag and Drop: there > is a library of available objects, the user takes an item in this > list and drops it into the class rectangle. They say in the Mui > developper guide that members can be added in a group only when its > window is closed. So I should close the window when something is > dropped in it and open it again? It would be a nightmare for the This is false. You can "AddMember" to anygroup and the window can be open. > user... Second question: How can I cause the layout to be > recalulated from the program? I have programmed that the objects can > be moved using Drag'n'Drop in that class, but I the change is not > seen by Mui (Because I save the changes in my arrays), I need to > resize the window to see it. I think that just sending a MUIM_Draw to the class should be enough... I don't have any experience in Layouts (yet :) Esteve - -- Esteve Boix - stv@minorisa.es ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- Date: Mon, 16 Feb 1998 18:26:50 +0100 (MET) From: rade@coli.uni-sb.de (Ralph Debusmann) Subject: 'Status' command Hi #?, I'd like to have a part of my program act a little like the 'Status' command from AmigaDOS, i.e. scan through all the cli-processes from 1-MaxCli() and output their names. My piece of code looks like this... DEF task:PTR TO process, shell:PTR TO commandlineinterface,i=0 REPEAT IF task:=FindCliProc(i) -> dunno exactly what the name of this OS call -> was, might be slighty different shell:=task.cli WriteF('\d CommandName \s\n',i,shell.commandname) ENDIF i++ UNTIL i>MaxCli() ... I do not understand why this piece of code doesn't work. Even the line shell:=task.cli seems to run wrong, since the address I get there differs from the address I get when I use a systemmonitor like 'Scout'. Any help? Ciao, Ralph - -- Fachschaft CL, Geb. 17.3, Raum 6.03 (Keller), Tel.: 0681-302-4178 HiWi im Projekt LISA, Geb. 17.3, Raum 1.11, Tel.: 0681-302-4496 Homepage, http://www.coli.uni-sb.de/~rade ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- From: merlin@thule.no (Eric Sauvageau) Date: Mon, 16 Feb 1998 13:06:51 +0500 Subject: Re: 'Status' command On Mon, 16 Feb 1998, we received a letter from about ''Status' command': > Hi #?, > > I'd like to have a part of my program act a little like the 'Status' > command from AmigaDOS, i.e. scan through all the cli-processes from > 1-MaxCli() and output their names. My piece of code looks like this... > > DEF task:PTR TO process, shell:PTR TO commandlineinterface,i=0 > > REPEAT > IF task:=FindCliProc(i) -> dunno exactly what the name of this OS call > -> was, might be slighty different > shell:=task.cli > WriteF('\d CommandName \s\n',i,shell.commandname) > ENDIF > i++ > UNTIL i>MaxCli() Something that won't show in an E module is that some pointers are in BCPL - they are BPTR, not just standard C pointers. cli := BADDR(task::process.cli) cliname := BADDR(cli.commandname) len := cliname[1] cliname := cliname + 1 This will make cliname a pointer to the real text, as task.cli is a BPTR, and cli.commandname is a BSTR. BCPL pointers must be divided by four before being accessed. The BADDR() macro handles that. BSTR are BCPL string pointers. You must divide them by four, and skip the first byte as this byte tells you how long the string is (so a BCPL string can never be longer than 255 chars) (I'm not sure if a BSTR is null-terminated, so I'd advise to use the len stored in the first byte when using them). Have a look at the C includes to know which pointers are in BCPL and which aren't when accessing anything related to DOS. ... "Do you smoke after sex?" "I don't know, I never looked." - -- ===--- - - - Eric Sauvageau http://www.thule.no/~merlin/ merlin@thule.no Amiga wizard known as Merlin, casting with E runes, resulting in: DevsMan - MFormat - NewIcons4 - SysInspector - XPKatana - - - - ---=== ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- From: turrican@starbase.inka.de (Grundler Mathias) Date: Mon, 16 Feb 1998 19:07:11 +0100 Subject: Re: 'Status' command Am 16-Feb-98 schrieb Ralph Debusmann: >DEF task:PTR TO process, shell:PTR TO commandlineinterface,i=0 >REPEAT > IF task:=FindCliProc(i) -> dunno exactly what the name of this OS call > -> was, might be slighty different > shell:=task.cli why do you not use the task-variable from the execbase? > WriteF('\d CommandName \s\n',i,shell.commandname) > ENDIF > i++ >UNTIL i>MaxCli() >... >I do not understand why this piece of code doesn't work. Even the line >shell:=task.cli Hmmm... i dont know why it doesn`t run...?! >seems to run wrong, since the address I get there differs from the address >I get when I use a systemmonitor like 'Scout'. I think such system-Monitors are using the execbase-cli-variable... >Any help? Hope i could help...!? - -- ________ ______ /__ __\ __________()_____ _\ / /\ turrican@starbase.inka.de \ //\/\\ _/\ _//\\ __//_\\ \/ \ THE DARK FRONTIER \//____\\/ \/ /__\\_//___\\/\_____\ Softwareentwicklung PD+Share ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- From: Jaco.Schoonen@topic.nl (Jaco Schoonen) Date: Mon, 16 Feb 1998 23:48:41 EST+01 Subject: MUI and compiler errors Hi, I just started on converting some C-code to E. It's about a MUI application and since the application definition is only 1 command, the E compiler isn't much help when telling me what's wrong. It just says error in line xx where my application definition is from line xx to line xx+200. Is there a way to find out what EC is complaining about (except for parsing those 200 lines of code my self)? If not, do all E/MUI programmers build their applications without errors? Thanks, Jaco - -- Jaco Schoonen jaco.schoonen@topic.nl ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- Date: Tue, 17 Feb 1998 00:24:37 -0700 From: midian@azstarnet.com (Charles Patterson) Subject: Greetings Hi, just a quick intruduction: My name is Charles Patterson. I host the Amiga C programming web page. I have been studying many different programming languages for a while now and added a few more when I started to work for a degree in computer science. I know ARexx and AMOS well enough to get by. I am teaching myself C and 68k Asm on the Amiga, Visual Basic and Delphi on the PC, and learning Pascal in school. I noticed a lot of information on E for the Amiga and thought one more language can't hurt, and have also noticed that studying other languages assists in learning in the others. For example I grokked pointerd better due to pascal, and 68k Asm helped me grok stacks. Any pointers on starting out in E would be more than welcome, thanks. - -- Chuck Patterson http://www.azstarnet.com/~midian A4000/A1200/A500 Team *Amiga* ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- From: agraham@hal9000.net.au (Ali Graham) Date: Tue, 17 Feb 1998 17:55:27 +1030 Subject: Re: Endian-ness On 15-Feb-98, someone (I think it was Eric Sauvageau) might have written:= ES> On Sun, 15 Feb 1998, we received a letter from about 'Endian-ness': ES> > a) E routines for big->little / little->big ES> > endian conversions ES> If you're putting some ASM in there, 32 bits values could be converte= d through ES> a SWAP. For 8/16 bits values, look at the ROL operand. I've worked out something using Shl(BYTE2, 8) + BYTE1 for 16 bit values..= =2E (probably all I'll need, I think...) ES> (I do hope you intend to put some ASM in the low-level stuff, or you = might end ES> up with a crawling emulator ;) I'm implementing in E, initially, until I can get it working, at which point I'll go through and optimize the hell out of all the time-consuming bits by using inline ASM :) I've got about 10 opcodes done so far, still many more left to go, but it's a laborious process... - -- = =2E _________________________________________________. [ ] [ Ali Graham [mailto:agraham@hal9000.net.au] ] [__________________________________________________] ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- From: stv@minorisa.es ("Esteve Boix") Date: Tue, 17 Feb 1998 09:01:25 +0000 Subject: Re: MUI and compiler errors > Hi, Hi > It just says error in line xx where my application definition is > from line xx to line xx+200. Is there a way to find out what EC is > complaining about (except for parsing those 200 lines of code my > self)? > > If not, do all E/MUI programmers build their applications without > errors? AFAIK this cannot be avoided. This is a "make-new-instance-and-compile-to-see-if-it-works" work. Esteve - -- Esteve Boix - stv@minorisa.es ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- Date: Tue, 17 Feb 1998 10:17:30 +0100 Subject: Re: Greetings From: MagerValp@Goth.Org (MagerValp) >>>>> "Charles" == Charles Patterson writes: Charles> Any pointers on starting out in E would be more than welcome, Download dev/e/amigae33a.lha from aminet and check out the beginner guide in the docs. Cheers, - -- ___ . + . . . Per Olofsson ._|___|_, . . . . . + . . o o-o + . + MagerValp@Goth.Org . . + + + . - . . . o + . . . " + + . http://www.cling.gu.se/~cl3polof/ ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- From: Jaco.Schoonen@topic.nl (Jaco Schoonen) Date: Tue, 17 Feb 1998 23:13:01 EST+01 Subject: Re: MUI and compiler errors At 17-feb-98 Esteve Boix wrote: > > It just says error in line xx where my application definition is > > from line xx to line xx+200. Is there a way to find out what EC is > > complaining about (except for parsing those 200 lines of code my > > self)? > > > > If not, do all E/MUI programmers build their applications without > > errors? > AFAIK this cannot be avoided. This is a > "make-new-instance-and-compile-to-see-if-it-works" work. Okay, I guess that's usually acceptable if you build the application incremental. It was just that I converted 200 lines from C -> E and was trying it all at once. Commenting parts of the application definition helped me to quickly locate the error. - -- Jaco Schoonen jaco.schoonen@topic.nl ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- From: glauschwuffel@amt.comlink.de (Gregor Goldbach) Subject: Re: Endian-ness Date: 16 Feb 1998 17:55:29 +0100 agraham@hal9000.net.au (Ali Graham) wrote: > and/or b) C routines for the same thing The AROS people had some ideas about it. They thought about building a class (in C++) that would do this on-the-fly. I think it had something to do with overloading. Try www.aros.org or their mailing lists. Or ask me and I'll search in the lists for you :) So: C++ yes, C no. grEgor ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- Date: Tue, 17 Feb 1998 16:40:00 -0700 From: midian@azstarnet.com (Charles Patterson) Subject: Re: MUI and compiler errors Jaco Schoonen wrote: > Okay, I guess that's usually acceptable if you build the application > incremental. It was just that I converted 200 lines from C -> E and was > trying it all at once. Is E -> C and C -> E conversion pretty simple? ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- From: agraham@hal9000.net.au (Ali Graham) Date: Wed, 18 Feb 1998 14:23:01 +1000 Subject: Re[2]: Endian-ness On 17-Feb-98, someone (I think it was Gregor Goldbach) might have written: GG> agraham@hal9000.net.au (Ali Graham) wrote: GG> GG> > and/or b) C routines for the same thing GG> GG> The AROS people had some ideas about it. They thought about GG> building a class (in C++) that would do this on-the-fly. I think GG> it had something to do with overloading. Try www.aros.org or GG> their mailing lists. Or ask me and I'll search in the lists for GG> you :) Something that would be difficult to do in E; I'm already coming up against this in this project, sometimes needing to treat 2 bytes of memory as an INT, sometimes as 2 CHARs. C's typecasting would make it easier for me... But I'd be interested in seeing this, as I'll probably end up doing something similar for this in E :) (I'm interested purely in getting the program working, not in its speed, as I've always wanted to write an emulator... and don't know if I'll be able to do it :) Ali. ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- Date: Wed, 18 Feb 1998 12:52:24 +0100 (MET) From: rade@coli.uni-sb.de (Ralph Debusmann) Subject: Re: 'Status' command Hi Eric, > > DEF task:PTR TO process, shell:PTR TO commandlineinterface,i=0 > > > > REPEAT > > IF task:=FindCliProc(i) -> dunno exactly what the name of this OS call > > -> was, might be slighty different > > shell:=task.cli > > WriteF('\d CommandName \s\n',i,shell.commandname) > > ENDIF > > i++ > > UNTIL i>MaxCli() > > Something that won't show in an E module is that some pointers are in BCPL - > they are BPTR, not just standard C pointers. > > cli := BADDR(task::process.cli) > cliname := BADDR(cli.commandname) > len := cliname[1] > cliname := cliname + 1 1st question - where can I find the BADDR-macro? AFAIK there is no BCPL-stuff mentioned in the E.guide. > This will make cliname a pointer to the real text, as task.cli is a BPTR, and > cli.commandname is a BSTR. Ok, that was it, thanks, you rescued me from a deep frustration :) > BCPL pointers must be divided by four before being accessed. The > BADDR() macro handles that. Since I didn't find the BADDR-macro anywhere I tried this myself and found out that you have to *multiply* BCPL-pointers times 4 to get the 'real' pointer. Divide by 4 is the other way round, to get a BCPL-pointer from a 'real' pointer. > BSTR are BCPL string pointers. You must divide them by four, and skip > the first byte as this byte tells you how long the string is (so a BCPL > string can never be longer than 255 chars) (I'm not sure if a BSTR is > null-terminated, so I'd advise to use the len stored in the first byte > when using them). I didn't use the len stored in the first byte so far - and it did seem to work. Maybe someone else knows it for sure whether we can expect those strings to be null-terminated? (to #?) > Have a look at the C includes to know which pointers are in BCPL and > which aren't when accessing anything related to DOS. Yep, I'll do this :) I actually use Assembler-includes for that thing, and I actually had wondered what BSTR or BPTRs would be, BCPL was plausible, but I didn't have any BCPL-documentation. And from what I knew I thought that they (Commo) had cleaned up dos.library from BCPL-anachronisms from v36 on... except that every parameter is still to be given in data registers. Now I know I was quite wrong, since they had to leave many BCPL-reminiscents in dos.library to gain backward-compatibility. Ciao, Ralph - -- Fachschaft CL, Geb. 17.3, Raum 6.03 (Keller), Tel.: 0681-302-4178 HiWi im Projekt LISA, Geb. 17.3, Raum 1.11, Tel.: 0681-302-4496 Homepage, http://www.coli.uni-sb.de/~rade ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- Date: Wed, 18 Feb 1998 12:06:25 +0000 (GMT) From: sac@csd.abdn.ac.uk ("Stuart Caie (kyz)") Subject: Re: 'Status' command On Wed, 18 Feb 1998, Ralph Debusmann wrote: =>1st question - where can I find the BADDR-macro? AFAIK there is no =>BCPL-stuff mentioned in the E.guide. It's in dos/dos.(h|i|m) MKBADDR() makes a BPTR from a pointer (thus, the pointer *must* be longword aligned), and BADDR() makes a pointer from a BPTR I have a really fine strdup() which can copy both C-strings and BSTRs into an E-String. =>out that you have to *multiply* BCPL-pointers times 4 to get the 'real' [..] Or, rather, shift left and shift right by 2. =>I didn't use the len stored in the first byte so far - and it did seem to =>work. Maybe someone else knows it for sure whether we can expect those =>strings to be null-terminated? (to #?) You can't guarantee they're null terminated, but some people are kind enough to do so, or perhaps it's just luck that the byte after the offical end of the string is null. Never *expect* the BSTR to be null terminated, it's under no obligation to be. =>I actually had wondered what BSTR or BPTRs would be, BCPL was plausible, =>but I didn't have any BCPL-documentation. BCPL is one of the most disgusting languages ever used. But TriDOS was implemented, and that's all that counts. You'll probably find it mentioned a lot in the AmigaDOS 1.3 manual (which I can't be bothered having imported by the library, and thus have never seen) =>registers. Now I know I was quite wrong, since they had to leave many =>BCPL-reminiscents in dos.library to gain backward-compatibility. The Amiga is stuck with it for the foreseeable future, just like the world is stuck with COBOL. kyz ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- Date: Wed, 18 Feb 1998 12:12:43 +0000 (GMT) From: sac@csd.abdn.ac.uk ("Stuart Caie (kyz)") Subject: Re: 'Status' command On Wed, 18 Feb 1998, Stuart Caie (kyz) wrote: =>I have a really fine strdup() which can copy both C-strings and BSTRs into an =>E-String. Which I will probably post tomorrow. kyz ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- Date: Wed, 18 Feb 1998 13:13:00 GMT From: jason@fsel.com (Jason Hulance) Subject: Re: 'Status' command Ralph Debusmann wrote: > 1st question - where can I find the BADDR-macro? Seeing as BADDR() is to do with manipulating a BCPL pointer into something sensible, and the only part of the OS that still deals with BCPL thing is DOS, I reckon a good place to start looking would be 'dos/dos.m'. Or even Src/Modules/dos/dos.e if you want to see the source. > AFAIK there is no BCPL-stuff mentioned in the E.guide. The E.guide is a guide to using E. The RKRMs are the guides to using the Amiga OS. Get yourself a copy and stay happy. > I didn't use the len stored in the first byte so far - and it did seem to > work. Maybe someone else knows it for sure whether we can expect those > strings to be null-terminated? (to #?) Some are, some aren't. Those that are guaranteed to be null terminated (and hence, compatible with C strings) are documented in the RKRMs. IMHO you should always treat them as BCPL strings and *use* the length. If you're desperate for more sane strings then copy them to E-strings. > > Have a look at the C includes to know which pointers are in BCPL and > > which aren't when accessing anything related to DOS. > > Yep, I'll do this :) I actually use Assembler-includes for that thing, and > I actually had wondered what BSTR or BPTRs would be, BCPL was plausible, > but I didn't have any BCPL-documentation. Try the RKRMs for documentation... > And from what I knew I thought that they (Commo) had cleaned up > dos.library from BCPL-anachronisms from v36 on... Yes, but backwards compatibility bit them in the neck and because of all the low-level uses of the OS (i.e., games and copy-protected software) they had to compromise a lot. Cheers! - -- The conundrum for today is "occiardew". Your numbers are 50, 75, 4, 1, 6 and 7. The target value is 884. ====================================================================== Jason R. Hulance Email: jason@fsel.com Formal Systems (Europe) Ltd Tel: [+44] (0)1865 728460 3 Alfred Street, Oxford OX1 4EH, UK Fax: [+44] (0)1865 201114 ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- Date: Wed, 18 Feb 1998 15:59:24 +0100 (MET) From: rade@coli.uni-sb.de (Ralph Debusmann) Subject: Re: 'Status' command On Wed, 18 Feb 1998, Jason Hulance wrote: > Ralph Debusmann wrote: > > > 1st question - where can I find the BADDR-macro? > > Seeing as BADDR() is to do with manipulating a BCPL pointer into > something sensible, and the only part of the OS that still deals with > BCPL thing is DOS, I reckon a good place to start looking would be > 'dos/dos.m'. Or even Src/Modules/dos/dos.e if you want to see the > source. I'll have a look there. Even if I don't find anything like BADDR it should be easy to multiply the pointer by 4 myself, may it be '*4' or an assembly subroutine doing 'lsl.l #2' or such. > > AFAIK there is no BCPL-stuff mentioned in the E.guide. > > The E.guide is a guide to using E. The RKRMs are the guides to using > the Amiga OS. Get yourself a copy and stay happy. Yep, sure, but I first thought BADDR() was a built-in function in E, so I first resorted to searching the E.guide :) > > I didn't use the len stored in the first byte so far - and it did seem to > > work. Maybe someone else knows it for sure whether we can expect those > > strings to be null-terminated? (to #?) > > Some are, some aren't. Those that are guaranteed to be null terminated > (and hence, compatible with C strings) are documented in the RKRMs. > IMHO you should always treat them as BCPL strings and *use* the length. > If you're desperate for more sane strings then copy them to E-strings. Ok, I am thoroughly persuaded to use the length information... doesn't look nice in the code but who cares. > Try the RKRMs for documentation... I only have access to the RKRM 'Libraries' (my neighbour has a copy of it), but I don't think I'll ever get the other ones anywhere. I must compile my information from Aminet, the Includes & Autodocs and the Developer CD 1.1. BTW: Funnily, the 'Libraries'-RKRM has no chapter on using dos.library :( ^^^^^^^ > > And from what I knew I thought that they (Commo) had cleaned up > > dos.library from BCPL-anachronisms from v36 on... > > Yes, but backwards compatibility bit them in the neck and because of all > the low-level uses of the OS (i.e., games and copy-protected software) > they had to compromise a lot. Well, I think in this situation (BPTRs, BSTRs) not only games and copy-protected software bit them in the neck - I guess many 'normal' programs use dos-structures in some way. Cheers, Ralph - -- Fachschaft CL, Geb. 17.3, Raum 6.03 (Keller), Tel.: 0681-302-4178 HiWi im Projekt LISA, Geb. 17.3, Raum 1.11, Tel.: 0681-302-4496 Homepage, http://www.coli.uni-sb.de/~rade ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- Date: Wed, 18 Feb 1998 16:05:20 +0100 (MET) From: rade@coli.uni-sb.de (Ralph Debusmann) Subject: Re: 'Status' command > On Wed, 18 Feb 1998, Stuart Caie (kyz) wrote: > > =>I have a really fine strdup() which can copy both C-strings and BSTRs into an > =>E-String. > > Which I will probably post tomorrow. Please - that would be quite nice to have :) Cheers, Ralph - -- Fachschaft CL, Geb. 17.3, Raum 6.03 (Keller), Tel.: 0681-302-4178 HiWi im Projekt LISA, Geb. 17.3, Raum 1.11, Tel.: 0681-302-4496 Homepage, http://www.coli.uni-sb.de/~rade ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- Date: Wed, 18 Feb 1998 15:51:24 GMT From: jason@fsel.com (Jason Hulance) Subject: Re: 'Status' command Ralph Debusmann wrote: > I only have access to the RKRM 'Libraries' (my neighbour has a copy of > it), but I don't think I'll ever get the other ones anywhere. I must > compile my information from Aminet, the Includes & Autodocs and the > Developer CD 1.1. BTW: Funnily, the 'Libraries'-RKRM has no chapter on > using dos.library :( > ^^^^^^^ The DOS Manual (by Bantam Books) is really considered to be part of the RKRMs, too. However, there isn't much useful stuff in it that isn't also in the Autodocs & Includes about the DOS library. > Well, I think in this situation (BPTRs, BSTRs) not only games and > copy-protected software bit them in the neck - I guess many 'normal' > programs use dos-structures in some way. It's pretty rare to come across these things unless you're doing quite low-level stuff or system snooping. Cheers! - -- The conundrum for today is "vnoirgrde". Your numbers are 100, 2, 10, 3, 1 and 7. The target value is 694. ====================================================================== Jason R. Hulance Email: jason@fsel.com Formal Systems (Europe) Ltd Tel: [+44] (0)1865 728460 3 Alfred Street, Oxford OX1 4EH, UK Fax: [+44] (0)1865 201114 ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- From: merlin@thule.no (Eric Sauvageau) Date: Wed, 18 Feb 1998 13:52:52 +0500 Subject: Re[2]: 'Status' command On Wed, 18 Feb 1998, we received a letter from about 'Re: 'Status' command': > 1st question - where can I find the BADDR-macro? AFAIK there is no > BCPL-stuff mentioned in the E.guide. It's in the dos/dos module, starting with the V3.1 or 3.2 modules if I recall. > > BCPL pointers must be divided by four before being accessed. The > > BADDR() macro handles that. > > Since I didn't find the BADDR-macro anywhere I tried this myself and found > out that you have to *multiply* BCPL-pointers times 4 to get the 'real' > pointer. Divide by 4 is the other way round, to get a BCPL-pointer from a > 'real' pointer. Oops, you're right. BCPL pointers are stored as a number of longwords, multiplying them by 4 will give you the required number of bytes. > Yep, I'll do this :) I actually use Assembler-includes for that thing, and > I actually had wondered what BSTR or BPTRs would be, BCPL was plausible, > but I didn't have any BCPL-documentation. And from what I knew I thought > that they (Commo) had cleaned up dos.library from BCPL-anachronisms from > v36 on... except that every parameter is still to be given in data > registers. Now I know I was quite wrong, since they had to leave many > BCPL-reminiscents in dos.library to gain backward-compatibility. CBM rewrote dos.library in C with V36 (it was written in BCPL before that), but for backward compatibility all BCPL elements had to be kept in the DOS structs, as well as some calling convention such as the way arguments are passed. Ciao! ... Worf: Screw the prime directive, Sir. I say give the Borg Windows95. - -- ===--- - - - Eric Sauvageau http://www.thule.no/~merlin/ merlin@thule.no Amiga wizard known as Merlin, casting with E runes, resulting in: DevsMan - MFormat - NewIcons4 - SysInspector - XPKatana - - - - ---=== ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- From: merlin@thule.no (Eric Sauvageau) Date: Wed, 18 Feb 1998 13:55:44 +0500 Subject: Re[2]: 'Status' command On Wed, 18 Feb 1998, we received a letter from about 'Re: 'Status' command': > I'll have a look there. Even if I don't find anything like BADDR it should > be easy to multiply the pointer by 4 myself, may it be '*4' or an assembly > subroutine doing 'lsl.l #2' or such. Don't use *4 - you're dealing with address pointers, so you need 32-bits maths. Use Shl() instead if you can't find the BADDR() macro. ... 2+2=5 (For very large values of 2) - -- ===--- - - - Eric Sauvageau http://www.thule.no/~merlin/ merlin@thule.no Amiga wizard known as Merlin, casting with E runes, resulting in: DevsMan - MFormat - NewIcons4 - SysInspector - XPKatana - - - - ---=== ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- From: Jaco.Schoonen@topic.nl (Jaco Schoonen) Date: Wed, 18 Feb 1998 20:57:16 EST+01 Subject: Re: MUI and compiler errors At 17-feb-98 Charles Patterson wrote: > Jaco Schoonen wrote: > > Okay, I guess that's usually acceptable if you build the application > > incremental. It was just that I converted 200 lines from C -> E and was > > trying it all at once. > Is E -> C and C -> E conversion pretty simple? Conversion of the MUI-stuff is quite simple (thanks to the excellent work of Jan Hendrik Schulz (?)). Only things to watch is differences between strings and characters ('' vs ""), which is the other way around and you should use MUI_TRUE instead of TRUE. Also amigalib has only doMethodA() no doMethod in E. Furthermore E has restrictions for lower/uppercase. That's pretty much it (as far as the application definitions goes that is). - -- Jaco Schoonen jaco.schoonen@topic.nl ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- Date: Thu, 19 Feb 1998 12:58:14 +0100 (MET) From: rade@coli.uni-sb.de (Ralph Debusmann) Subject: Re: Re[2]: 'Status' command On Wed, 18 Feb 1998, Eric Sauvageau wrote: > On Wed, 18 Feb 1998, we received a letter from about 'Re: 'Status' command': > > > 1st question - where can I find the BADDR-macro? AFAIK there is no > > BCPL-stuff mentioned in the E.guide. > > It's in the dos/dos module, starting with the V3.1 or 3.2 modules if I > recall. It really is, I have looked it up in dos.m and dos.e, but I can't call it... it says something about 'unknown call' or something. Do I have to PREPROCESS or something like that to get the macro to work? So far I only include the MODULE. Hey, I'd like to say that the amigae-list is a great place with *really* competent and nice people! Keep on doing so well :) Ciao, Ralph - -- Fachschaft CL, Geb. 17.3, Raum 6.03 (Keller), Tel.: 0681-302-4178 HiWi im Projekt LISA, Geb. 17.3, Raum 1.11, Tel.: 0681-302-4496 Homepage, http://www.coli.uni-sb.de/~rade ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- Date: Thu, 19 Feb 1998 12:55:12 +0000 (GMT) From: sac@csd.abdn.ac.uk ("Stuart Caie (kyz)") Subject: Re: Re[2]: 'Status' command On Thu, 19 Feb 1998, Ralph Debusmann wrote: =>It really is, I have looked it up in dos.m and dos.e, but I can't call =>it... it says something about 'unknown call' or something. Do I have to =>PREPROCESS or something like that to get the macro to work? So far I only =>include the MODULE. Yep, you need OPT PREPROCESS at the top of your program, it's a #define macro. =>Hey, I'd like to say that the amigae-list is a great place with *really* =>competent and nice people! Keep on doing so well :) [taken from http://www.abdn.ac.uk/~u13sac/pub/e/modules.lha/modules/string.e] CONST BSTR=TRUE PROC strdup(str,is_bstr=FALSE) DEF bptr,len,ret bptr:=Shl(str,2) len:=IF is_bstr THEN Char(bptr) ELSE StrLen(str) IF (ret:=String(len))=NIL THEN Raise("MEM") StrCopy(ret, IF is_bstr THEN bptr+1 ELSE str, len) ENDPROC ret Usage is as follows: Either: e_string := strdup(null_terminated_string) Or: e_string := strdup(bstr, BSTR) for example: DEF fssm:PTR TO filesystemstartupmsg fssm := BADDR(devnode.startup) devicename := strdup(fssm.device, BSTR) kyz ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- From: a9660319@wlv.ac.uk Subject: Assignment. Date: Thu, 19 Feb 1998 13:03:15 +0000 (GMT) Hi there list! Sorry about this, but I`m going to have to go right back to basics :) Pointers, eek! eg/ PROC main() DEF x:LONG, y:LONG x:=10 y:=20 ENDPROC Okay, I`ve set up two variables, x, and y, as I understand it, both point to seperate areas of memorey. But what happens if I do this: x:=y does x now equal the value of y? or does x just point to y, (in essence x and y now point to the same value in memorey.), if this is the case how *do* I set x to the same value of y? OBJECTS: I understand, that if: PROC main() DEF o:object, p:object o.blar:=10 p.blar:=20 ENDPROC if I do, o.blar:=p.blar then, do they both now point to the same piece of memorey. What happens if I do o:=p ? does o now point to the same area of memorey as p, and the o object memorey becomes lost (because there is no longer a pointer to it? Do I use the CopyMem() function to copy the memorey? Is this legal: OBJECT yum blar plum ENDOBJECT PROC main() DEF o[10]:ARRAY OF yum, x,y, p:yum o[1].blar:=10 o[1].plum:=20 p.blar:=o[1].blar /* does p.blar now point to o[1].blar now instad of it`s own chunk of mem? */ p:=o -> And now p just points to o[0], and the p object is lost? x:=o[1].blar -> does x assume the value of o[1].blar, or does x just -> point to o[1].blar? y:=o -> can y now be used as a PTR TO object?, or should I have -> defined it as a PTR TO LONG in the DEF above? ENDPROC Sorry this stuff is so basic, but I`m still not grasping the Pointers too well, (a product of Blitz Basic y`see..... never heard of pointers, and then I decide to learn E, which is nothing but pointers! Talk abot jump in at the deep end.) Thanks. Andrew :) ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- Date: Thu, 19 Feb 1998 14:31:52 +0100 (MET) From: rade@coli.uni-sb.de (Ralph Debusmann) Subject: Re: Re[2]: 'Status' command Hi kyz, > [taken from http://www.abdn.ac.uk/~u13sac/pub/e/modules.lha/modules/string.e] > > CONST BSTR=TRUE > > PROC strdup(str,is_bstr=FALSE) > DEF bptr,len,ret > bptr:=Shl(str,2) > len:=IF is_bstr THEN Char(bptr) ELSE StrLen(str) > IF (ret:=String(len))=NIL THEN Raise("MEM") > StrCopy(ret, IF is_bstr THEN bptr+1 ELSE str, len) > ENDPROC ret > > Usage is as follows: > Either: > e_string := strdup(null_terminated_string) > Or: > e_string := strdup(bstr, BSTR) > > for example: > > DEF fssm:PTR TO filesystemstartupmsg > fssm := BADDR(devnode.startup) > devicename := strdup(fssm.device, BSTR) Thx :) I'll try your piece of code at home as soon as I get there :) Cheers, Ralph - -- Fachschaft CL, Geb. 17.3, Raum 6.03 (Keller), Tel.: 0681-302-4178 HiWi im Projekt LISA, Geb. 17.3, Raum 1.11, Tel.: 0681-302-4496 Homepage, http://www.coli.uni-sb.de/~rade ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- Date: Thu, 19 Feb 1998 15:21:51 +0000 (GMT) From: sac@csd.abdn.ac.uk ("Stuart Caie (kyz)") Subject: Press CTRL-C or RETURN Can anyone describe how programs like diskcopy implement the 'Press Ctrl-C to abort or RETURN to begin' functionality without having an unread return after the program exits? I've tried: RAISE "^C" IF CtrlC()<>0 [..] IF IsInteractive(stdin) WriteF('Press RETURN to begin or CTRL-C to abort: ') REPEAT UNTIL Ctrl() OR WaitForChar(stdin, 1) Flush(stdin) ENDIF However, the RETURN I press is still in the input queue when the program exits, despite the Flush(), and my program doesn't automatically run when redirected <>NIL: DiskCopy itself only makes one call to WaitForChar() How am I supposed to do it? kyz ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- From: merlin@thule.no (Eric Sauvageau) Date: Thu, 19 Feb 1998 14:41:17 +0500 Subject: Re: Assignment. On Thu, 19 Feb 1998, we received a letter from about 'Assignment.': > Hi there list! > > Sorry about this, but I`m going to have to go right back to basics :) > > Pointers, eek! > > eg/ > > PROC main() > DEF x:LONG, y:LONG > > x:=10 > y:=20 > ENDPROC > > Okay, I`ve set up two variables, x, and y, as I understand it, both > point to seperate areas of memorey. > > But what happens if I do this: > > x:=y > > does x now equal the value of y? or does x just point to y, (in essence > x and y now point to the same value in memorey.), if this is the case > how *do* I set x to the same value of y? x and y here are not pointers, they are LONGs as you defined them yourself. DEF x:PTR TO LONG would define them as pointer, and x:=10 would mean that at address 10 there's a given value. So in your case, the content is indeed passed to y. > > OBJECTS: > > I understand, that if: > > PROC main() > DEF o:object, p:object > > o.blar:=10 > p.blar:=20 > ENDPROC > > if I do, o.blar:=p.blar then, do they both now point to the same piece Once again, you are dealing with a LONG, not with a PTR TO LONG. Do not confuse both. LONG: its value is its actual content. So, you change the content by changing its value. x := 10 x contains 10. PTR TO LONG: its value is its address. Changing its value will make it point elsewhere, but the previous content is still unchanged (if you're using that pointer to move over an array, as ane xample). x := 10 x points to the address 10 in memory. x[0] := 5 At address 10, you just wrote 5. x := 20 x points to the address 20 in memory, but at address 10 you still have '5'. ... To poldly bow air mobius gumby four: Trek on novocaine. - -- ===--- - - - Eric Sauvageau http://www.thule.no/~merlin/ merlin@thule.no Amiga wizard known as Merlin, casting with E runes, resulting in: DevsMan - MFormat - NewIcons4 - SysInspector - XPKatana - - - - ---=== ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- From: merlin@thule.no (Eric Sauvageau) Date: Thu, 19 Feb 1998 14:44:27 +0500 Subject: Re: Press CTRL-C or RETURN On Thu, 19 Feb 1998, we received a letter from about 'Press CTRL-C or RETURN': > Can anyone describe how programs like diskcopy implement > the 'Press Ctrl-C to abort or RETURN to begin' functionality without > having an unread return after the program exits? I've tried: > > RAISE "^C" IF CtrlC()<>0 > [..] > IF IsInteractive(stdin) > WriteF('Press RETURN to begin or CTRL-C to abort: ') > REPEAT > UNTIL Ctrl() OR WaitForChar(stdin, 1) > Flush(stdin) > ENDIF > > However, the RETURN I press is still in the input queue when the program > exits, despite the Flush(), and my program doesn't automatically run when > redirected <>NIL: > > DiskCopy itself only makes one call to WaitForChar() > > How am I supposed to do it? You must turn your console from cooked into raw mode, where any rawkey event will be available to your program without the need to press Return. Here's a code fragment taken from MFormat: WriteF('Press \e[1mRETURN\e[22m to Format Disk in Drive \e[1m\s\e[22m, or \e[1mCTRL-C\e[22m to Abort:',deviceinfo.name) IF SetMode(stdin,1) /* dos.librar function - Console is now raw */ REPEAT Read(stdin,data,20) IF CtrlC() result := 0 ELSEIF data[0] = 13 result := 1 ENDIF UNTIL (result <> -1) SetMode(stdin,0) ELSE result := 0 ENDIF Ciao! ... A bug: Feature unknown from its own programmer. - -- ===--- - - - Eric Sauvageau http://www.thule.no/~merlin/ merlin@thule.no Amiga wizard known as Merlin, casting with E runes, resulting in: DevsMan - MFormat - NewIcons4 - SysInspector - XPKatana - - - - ---=== ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- From: deniil@algonet.se (Daniel Westerberg) Date: Thu, 19 Feb 1998 21:39:08 +0100 Subject: Re: Assignment. On 19-Feb-98, a9660319@wlv.ac.uk wrote: >Hi there list! >Sorry about this, but I`m going to have to go right back to basics :) >Pointers, eek! >eg/ >PROC main() > DEF x:LONG, y:LONG > > x:=10 > y:=20 >ENDPROC >Okay, I`ve set up two variables, x, and y, as I understand it, both >point to seperate areas of memorey. >But what happens if I do this: >x:=y >does x now equal the value of y? Yes!! >..or does x just point to y, No!! >(in essence x and y now point to the same value in memorey.), if this is > >the case how *do* I set x to the same value of y? >OBJECTS: >I understand, that if: >PROC main() > DEF o:object, p:object > o.blar:=10 > p.blar:=20 >ENDPROC >if I do, o.blar:=p.blar then, do they both now point to the same piece >of memorey. No!! >What happens if I do o:=p ? does o now point to the same area of >memorey as p, and the o object memorey becomes lost (because there is >no longer a pointer to it? Yes!! >Do I use the CopyMem() function to copy the memorey? Could do that.. CopyMem(p,o,SIZEOF object) >Is this legal: >OBJECT yum >blar >plum >ENDOBJECT >PROC main() > DEF o[10]:ARRAY OF yum, x,y, p:yum > > o[1].blar:=10 > o[1].plum:=20 > p.blar:=o[1].blar > /* does p.blar now point to o[1].blar now instead of it`s own chunk of > mem? */ No!! The value of the two .blar is just copied. > p:=o -> And now p just points to o[0], and the p object is lost? Yes!! > x:=o[1].blar -> does x assume the value of o[1].blar, or does x just > -> point to o[1].blar? It assume the value of o[1].blar, it doesn't points at it! > y:=o -> can y now be used as a PTR TO object? No!! >or should I have defined it as a PTR TO LONG in the DEF above? If you want it a PTR TO object you define it as that and not as a PTR TO LONG cause then it will just points a LONG and not an object. The differenties between DEF a:myobject, b:PTR TO myobject is that a allready has some static memory allocated to it and b doesn't. Your p above should have been a PTR TO yum as you don't use the allready allocated memory you got with just p:yum! >ENDPROC >Sorry this stuff is so basic, but I`m still not grasping the Pointers >too well, (a product of Blitz Basic y`see..... never heard of pointers, >and then I decide to learn E, which is nothing but pointers! Talk abot >jump in at the deep end.) >Thanks. >Andrew :) - -- All greetings from: Deniil 715! - AmigaPower Rulez forever and ever.. . . . . ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- Date: Thu, 19 Feb 1998 15:42:10 GMT From: jason@fsel.com (Jason Hulance) Subject: Re: Press CTRL-C or RETURN "Stuart Caie \(kyz\)" wrote: > Can anyone describe how programs like diskcopy implement > the 'Press Ctrl-C to abort or RETURN to begin' functionality without > having an unread return after the program exits? I've tried: > > RAISE "^C" IF CtrlC()<>0 > [..] > IF IsInteractive(stdin) > WriteF('Press RETURN to begin or CTRL-C to abort: ') > REPEAT > UNTIL Ctrl() OR WaitForChar(stdin, 1) > Flush(stdin) > ENDIF > > However, the RETURN I press is still in the input queue when the program > exits, despite the Flush(), and my program doesn't automatically run when > redirected <>NIL: > > DiskCopy itself only makes one call to WaitForChar() > > How am I supposed to do it? Actually read the char/string from stdin if it wasn't CtrlC() that stopped the loop? If the console is in raw mode then you could just read the char that broke the loop, but if in the normal mode then you'll have a whole line waiting for you to read (due to the friendly line-editing/buffering that it does). Cheers! - -- The conundrum for today is "riptctiso". Your numbers are 25, 7, 9, 10, 7 and 8. The target value is 287. ====================================================================== Jason R. Hulance Email: jason@fsel.com Formal Systems (Europe) Ltd Tel: [+44] (0)1865 728460 3 Alfred Street, Oxford OX1 4EH, UK Fax: [+44] (0)1865 201114 ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- Date: Fri, 20 Feb 1998 15:09:48 +0000 (GMT) From: sac@csd.abdn.ac.uk ("Stuart Caie (kyz)") Subject: Re: Press CTRL-C or RETURN On Thu, 19 Feb 1998, Jason Hulance wrote: =>> How am I supposed to do it? => =>Actually read the char/string from stdin if it wasn't CtrlC() that =>stopped the loop? I was rather hoping Flush(stdin) would do that for me, but it's all gone horribly wrong. I've used the raw mode code posted earlier instead. Thanks, Eric! kyz ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- From: bhf@opf.de (Bastian Frank) Date: Fri, 20 Feb 1998 21:55:38 +0100 Subject: Patching system calls Hi! I never used this list before, but I hope anyone out there can help me with this anoying problem: I tried to patch the gfx-function Text(), and everything worked fine. But whenever I try to call the original function out of my own E-subroutine, the computer decides to do anything else, but not to execute the Text-subroutine. Several ways of executing the original function didn't work: ... oldf:=SetFunction(gfxbase,-60,newf) PutLong({oldf2},oldf) ... MOVE.L rp,A1 MOVE.L text,A0 MOVE.L len,D0 MOVE.L old2(PC),A2 JSR (A2) /* I also tried JSR oldf */ ... oldf2: LONG 0 ... - -- Bastian ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- Date: Sat, 21 Feb 1998 17:20:34 +0100 From: gamboni@fastnet.ch (Jacques Gamboni) Subject: Call a PROC with its address They say in the E.guide that we can get the address of a PROC using {}. E.g: PROC main() WriteF('\d\n',{fred}) ENDPROC PROC fred(name) WriteF('Hello \s',name) ENDPROC would display the address of fred. I use this to give the address of my dispatcher when I create an Mui Custom Class. But how can we call a procedure having its address? And how give arguments to it? Maxime Note: about a message 'Update the size of a string' that I posted some time ago, I found out that Mui seems to have its own array where it puts the addresses of all strings in the List. So when I did DisposeLink() followed by String(), I changed the address in my array, but not Mui's array. Even when we use MUIA_List_SourceArray, Mui do not read this array after object creation. (I tried to create a list, to put its address with this attribute and later change addresses of this list but it did not work). So the only way I found was to do an MUIM_List_Remove followed by an MUIM_List_InsertSingle. But it is a waste of time because Mui has to move all following items up when I do a Remove and down again when I do an InsertSingle.. ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- From: turrican@starbase.inka.de (Grundler Mathias) Date: Sat, 21 Feb 1998 18:28:01 +0100 Subject: Re: Call a PROC with its address Am 21-Feb-98 schrieb Jacques Gamboni: >They say in the E.guide that we can get the address of a PROC using {}. >E.g: >PROC main() > WriteF('\d\n',{fred}) >ENDPROC >PROC fred(name) > WriteF('Hello \s',name) >ENDPROC >would display the address of fred. >I use this to give the address of my dispatcher when I create an Mui Custom >Class. >But how can we call a procedure having its address? And how give arguments to >it? Easy... just Define a Variable and give the pointer from your PROC to it... now handle the variable as usual Procedure... For Example: DEF fred PROC main() DEF main ... fred:={fredproc} fred(name) ... ENDPROC PROC fred(name) WriteF('Hello \s\n',name) ENDPROC Easy, or not? But i think its useless for MUI, because MUI uses Hooks (if i`m right... i really don`t know it 100%!), your class would probably work, but it is not stable if you are using Definitions in it (Variable ect...) Read the E-Docs for example (show under Library-Contruction or so... i think its because E uses A4 to adress the global variables...?!) I hope i had helped you... PS: Sorry for my bad English... im nativly speak german :-) - -- ________ ______ /__ __\ __________()_____ _\ / /\ turrican@starbase.inka.de \ //\/\\ _/\ _//\\ __//_\\ \/ \ THE DARK FRONTIER \//____\\/ \/ /__\\_//___\\/\_____\ Softwareentwicklung PD+Share ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- From: agraham@hal9000.net.au (Ali Graham) Date: Sat, 21 Feb 1998 17:39:15 +1000 Subject: RawDoFmt() Could someone post a simple example of the use of exec.library/RawDoFmt() in E? TIA, Ali. ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- From: agraham@hal9000.net.au (Ali Graham) Date: Sat, 21 Feb 1998 20:53:31 +1000 Subject: unions in objects... Is there any way to get C-style unions in objects? The compiled (typed) modules in emodules: have them, but there seems to be no way for the programmer to produce similar effects in their own code. Ali. ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- From: r.zimmerling@link-dd.cl.sub.de (Rene Zimmerling) Subject: Re: Patching system calls Date: 21 Feb 1998 11:29:36 +0100 bhf@opf.de (Bastian Frank) *schrieb* *am* 20.02.1998 *zu* Patching system calls *folgende* *Worte* : > Hi! >=20 > I never used this list before, but I hope anyone out there can help me = with > this anoying problem: >=20 > I tried to patch the gfx-function Text(), and everything worked fine. B= ut > whenever I try to call the original function out of my own E-subroutine= , the > computer decides to do anything else, but not to execute the Text-subro= utine. >=20 > Several ways of executing the original function didn't work: > > oldf:=3DSetFunction(gfxbase,-60,newf) > PutLong({oldf2},oldf) > ... > MOVE.L rp,A1 > MOVE.L text,A0 > MOVE.L len,D0 > MOVE.L old2(PC),A2 > JSR (A2) > /* I also tried JSR oldf */ > ... > oldf2: LONG 0 > ... >=20 Okay, here is a source. - -- ____________ __ / / Good Byte sagt Ren=E9 Zimmerling und MicroDot \ \/ / Amiga Member of Deutsche Amiga Software Schmiede \_\/ Rulez =20 /* setf.e -- a SnoopDos-like program to monitor calls to OpenLibrary() */ OPT OSVERSION=3D37 MODULE 'dos/dos', 'exec/ports', 'exec/tasks', 'exec/nodes', 'exec/memory' CONST OFFSET=3D$fdd8 /* execbase offset of OpenLibrary() */ /* "mymsg" must begin with the standard message object "mn", followed by any kind of data (in this case, two pointers [to strings]). */ OBJECT mymsg msg:mn s, t ENDOBJECT /* "port" will be used from the patched routine, too, so it's global */ DEF port:PTR TO mp /* You can change the library function to be patched by changing OFFSET and the "execbase" in the *two* calls to SetFunction(). If you want t= o patch a library other than dos, exec, graphics and intuition you need to OpenLibrary() it first. (Note: some [old?] libraries cannot be patched in this way. Also, som= e functions in some libraries can't be patched like this either! Even t= he RKRM's aren't too clear about this...) */ PROC main() DEF ps, us, loop, sig, oldf IF port:=3DCreateMsgPort() Forbid() /* Don't let anyone mess things up... */ IF oldf:=3DSetFunction(execbase, OFFSET, {newf}) PutLong({patch}, oldf) Permit() /* Now we can let everyone else back in */ LEA store(PC), A0 MOVE.L A4, (A0) /* Store the A4 register... */ ps:=3DShl(1,port.sigbit) /* Set up port and user signal bits */ us:=3DSIGBREAKF_CTRL_C loop:=3DTRUE WHILE loop sig:=3DWait(ps OR us) IF sig AND ps printmsgs() ENDIF IF sig AND us loop:=3DFALSE ENDIF ENDWHILE Forbid() /* Paranoid... */ SetFunction(execbase, OFFSET, oldf) ENDIF Permit() printmsgs() /* Make sure the port is empty */ DeleteMsgPort(port) ENDIF ENDPROC /* Nicely (?) print the messages out... */ PROC printmsgs() DEF msg:PTR TO mymsg WHILE msg:=3DGetMsg(port) WriteF('Task \l\s[25] wants \r\s[20]\n', IF msg.t THEN msg.t ELSE '*unnamed*', IF msg.s THEN msg.s ELSE '*unnamed library*') ReplyMsg(msg) DisposeLink(msg.s) DisposeLink(msg.t) Dispose(msg) ENDWHILE ENDPROC /* Send a message to the patching process */ PROC sendmsg() DEF m:PTR TO mymsg, s, tsk:tc, l:ln MOVE.L A1, s /* Allocate a new message */ m:=3DNew(SIZEOF mymsg) IF s m.s:=3DString(StrLen(s)) StrCopy(m.s,s,ALL) ENDIF tsk:=3DFindTask(NIL) /* Find out who we are */ m.t:=3DNIL IF tsk l:=3Dtsk.ln IF l AND l.name m.t:=3DString(StrLen(l.name)) StrCopy(m.t, l.name, ALL) ENDIF ENDIF PutMsg(port, m) ENDPROC /* Place to store A4 register */ store: LONG 0 /* Place to store real call */ patch: LONG 0 /* The new routine which will replace the original library function */ newf: MOVEM.L D0-D7/A0-A6, -(A7) LEA store(PC), A0 MOVE.L (A0), A4 /* Reinstate the A4 register so we can use E code */ sendmsg() MOVEM.L (A7)+, D0-D7/A0-A6 MOVE.L patch(PC), -(A7) RTS ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- Date: 22 Feb 98 20:52:30 +0100 From: fsoft@intercom.it (Fabio Rotondo) Subject: Dinamic E-GUI Hi List, I *need* some good source code to create a "dynamic" list of gadgets for EasyGUI. I need to create a list of 3 or 4 or 5 buttons (and they may be more) depending by the contest... Please, gimme code! :) Ciao, Fabio - -- - ---------------------------+--------------------------------------------- // | Fabio Rotondo e-mail: fsoft@intercom.it \\X/ Amiga. Feel The Power.| URL: (Amiga!) http://www.intercom.it/~fsoft +---------------+-- PGP Key avaible on demand --------------------------+ |DOOPSI-GS V1.45| FinalDT V1.00 |Locator.library V1.10|FinalTyper V2.5 | |MIDIFilter V1.3|SafeLocks V1.00| GTBoxConvPro V1.00 |MIDIBridge V1.00 | | ReCatIt V2.50 | ARPrefs V1.70 | MouseFlasher V1.05 |WebFX V2.00 | +---------------+---- PIOS and pOS Developer ---------------------------+ | ** Amiga Web Ring ** : http://www.intercom.it/~fsoft/awr.html | |Amiga Blast (Web Mag.!!!): http://www.intercom.it/~fsoft/ablast.html | |Amiga Foundation Classes : http://www.intercom.it/~fsoft/afc.html | +------------------ Amiga Group Italia (Novara) ------------------------+ "Vell, Zaphod's just zis guy you know?" - Gag Halfrunt. ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- From: agraham@hal9000.net.au (Ali Graham) Date: Mon, 23 Feb 1998 08:20:10 +1000 Subject: Re: Dinamic E-GUI On 23-Feb-98, someone (I think it was Fabio Rotondo) might have written: FR> Hi List, FR> FR> I *need* some good source code to create a "dynamic" list of FR> gadgets for EasyGUI. FR> I need to create a list of 3 or 4 or 5 buttons (and they may be more) FR> depending by the contest... FR> FR> Please, gimme code! :) I can do this for you, but it'll take me a little while to abstract this from the context of the larger program that's using it (read: 24 to 36 hours, given the other things Ihave to do in the next couple of days). And, the price is that you have to beta-test the application that uses it for me :) Ali. ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- From: eq3nmf@eq.uc.pt (Nuno Maltez) Date: Sun, 22 Feb 1998 22:29:09 -0000 Subject: Re: Call a PROC with its address > Am 21-Feb-98 schrieb Jacques Gamboni: > Easy... just Define a Variable and give the pointer from your PROC to it... > now handle the variable as usual Procedure... > For Example: > DEF fred > PROC main() > DEF main > ... > fred:={fredproc} > fred(name) > ... > ENDPROC > PROC fred(name) This probably should read PROC fredproc(name) Nuno ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- From: stv@minorisa.es ("Esteve Boix") Date: Mon, 23 Feb 1998 09:39:01 +0000 Subject: Re: Call a PROC with its address Hi > would display the address of fred. > I use this to give the address of my dispatcher when I create an Mui > Custom Class. But how can we call a procedure having its address? > And how give arguments to it? You cannot call (you don't have to call) the Dispatcher directly. MUI calls it whenever a new method is called to your object. The arguments are passed to it via it's "msg" argument. Then, in the method's code, you can use it like you want. The most used form is to define a "muip_" object, containing an OBJECT like this: OBJECT muip_foo_inserttext methodID:LONG (always present, always the first) text:PTR TO CHAR (for example) ENDOBJECT Then, a call like doMethodA(myobj,[MUIM_Foo_InsertText,'Hello',TAG_DONE]) Would assign the following to the object: methodID := MUIM_Foo_InsertText text:='Hello' > Maxime > Note: about a message 'Update the size of a string' that I posted > some time ago, I found out that Mui seems to have its own array > where it puts the addresses of all strings in the List. So when I > did DisposeLink() followed by String(), I changed the address in my > array, but not Mui's array. Even when we use MUIA_List_SourceArray, > Mui do not read this array after object creation. (I tried to create > a list, to put its address with this attribute and later change > addresses of this list but it did not work). So the only way I found > was to do an MUIM_List_Remove followed by an MUIM_List_InsertSingle. > But it is a waste of time because Mui has to move all following > items up when I do a Remove and down again when I do an > InsertSingle.. Note that if you don't use a construct/destruct/hook, MUI does not keep a local copy of the array, so don't DisposeLink it. If you're just using strings in your listview, use the provided construct/destruct hooks (take a look at MUI's listview docs). Regards, Esteve - -- Esteve Boix - stv@minorisa.es ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- From: stv@minorisa.es ("Esteve Boix") Date: Mon, 23 Feb 1998 09:43:24 +0000 Subject: Re: RawDoFmt() > Could someone post a simple example of the use of > exec.library/RawDoFmt() in E? Another one asking the same. I haven't found a C source using this function, either. Regards, Esteve - -- Esteve Boix - stv@minorisa.es ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- Date: Mon, 23 Feb 1998 09:46:06 +0000 (GMT) From: sac@csd.abdn.ac.uk ("Stuart Caie (kyz)") Subject: Re: RawDoFmt() On Mon, 23 Feb 1998, Esteve Boix wrote: =>> Could someone post a simple example of the use of =>> exec.library/RawDoFmt() in E? => =>Another one asking the same. I haven't found a C source using this =>function, either. WriteF('Hello \d people!\n', 100) Well, you did ask.... ;) kyz ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- Date: Mon, 23 Feb 1998 09:47:22 +0000 (GMT) From: sac@csd.abdn.ac.uk ("Stuart Caie (kyz)") Subject: Re: unions in objects... On Sat, 21 Feb 1998, Ali Graham wrote: =>Is there any way to get C-style unions in objects? The compiled (typed) =>modules in emodules: have them, but there seems to be no way for the =>programmer to produce similar effects in their own code. OBJECT foo blah:INT slap ENDOBJECT #define grunt slap [...] In code: x.slap == x.grunt kyz ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- Date: Mon, 23 Feb 1998 09:49:52 +0000 (GMT) From: sac@csd.abdn.ac.uk ("Stuart Caie (kyz)") Subject: Re: Patching system calls On Fri, 20 Feb 1998, Bastian Frank wrote: =>I tried to patch the gfx-function Text(), and everything worked fine. But FWIW, http://www.abdn.ac.uk/~u13sac/kyzer/e_talk/01.html kyz ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- Date: Mon, 23 Feb 1998 09:40:41 GMT From: jason@fsel.com (Jason Hulance) Subject: Re: RawDoFmt() "Esteve Boix" quoted and wrote: > > Could someone post a simple example of the use of > > exec.library/RawDoFmt() in E? > > Another one asking the same. I haven't found a C source using this > function, either. OK, try something like this (untested, but it ought to work... famous last words...): PROC main() DEF str[50]:STRING RawDoFmt('%s World War %ld\n', ['Hello', 3], {copyChar}, str) WriteF('str="\s"\n',str) ENDPROC PROC copyChar() DEF s, d MOVE.B D0, d /* Get the data */ MOVEA.L A3, s /* Get our parameter "str" */ StrAdd(s,[d,0]:CHAR) /* Or you could do just: MOVE.B D0, (A3)+ */ /* because the value left in A3 at the end of the proc is */ /* preserved and will be the value of A3 on the next call */ /* by this use of RawDoFmt()) */ ENDPROC Cheers! - -- The conundrum for today is "eisgolocr". Your numbers are 75, 4, 7, 2, 8 and 6. The target value is 600. ====================================================================== Jason R. Hulance Email: jason@fsel.com Formal Systems (Europe) Ltd Tel: [+44] (0)1865 728460 3 Alfred Street, Oxford OX1 4EH, UK Fax: [+44] (0)1865 201114 ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- Date: Mon, 23 Feb 1998 09:27:18 GMT From: jason@fsel.com (Jason Hulance) Subject: Re: unions in objects... Ali Graham wrote: > Is there any way to get C-style unions in objects? E is basically typeless so you could write the elements in a way that makes them reusable, to a certain extent, but there's no direct support. > The compiled (typed) modules in emodules: have them, but there seems > to be no way for the programmer to produce similar effects in their > own code. Um... Wouter kindly let me make use of some features of the module format (as it existed at that time). The format permits unions (if you do things carefully), but the E language does not allow you to create them. The system modules *needed* to make use of this, but in general your programs do not. Another example is that you can often have lots of separate types and just cast your data to the correct one: OBJECT x1 id a:obj b[10]:ARRAY ENDOBJECT OBJECT x2 id s[5]:ARRAY t:INT ENDOBJECT DEF p:PTR TO x1, q:PTR TO x2 p:=something() IF p.id = ID_X2 q:=p /* Use q */ ELSE /* Use p */ ENDIF Cheers! - -- The conundrum for today is "wnsietlge". Your numbers are 4, 9, 6, 1, 4 and 3. The target value is 182. ====================================================================== Jason R. Hulance Email: jason@fsel.com Formal Systems (Europe) Ltd Tel: [+44] (0)1865 728460 3 Alfred Street, Oxford OX1 4EH, UK Fax: [+44] (0)1865 201114 ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- From: bhf@opf.de (Bastian Frank) Date: Mon, 23 Feb 1998 15:20:39 +0100 Subject: Re: Patching system calls Am 21-Feb-98 schrieb Rene Zimmerling : > bhf@opf.de (Bastian Frank) *schrieb* *am* 20.02.1998 *zu* > Patching system calls *folgende* *Worte* : >> I tried to patch the gfx-function Text(), and everything worked fine. But >> whenever I try to call the original function out of my own E-subroutine, the >> computer decides to do anything else, but not to execute the >Text-subroutine. >Okay, here is a source. I already knew this piece of code. But the program you distributed does not really call the original function. It just puts the function-pointer onto the stack. After the next RTS-call it is executed automatically . I want to call the function from the main program or from any other PROC. - -- Yours, Bastian ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- Date: Mon, 23 Feb 1998 14:51:25 GMT From: jason@fsel.com (Jason Hulance) Subject: Re: Patching system calls Bastian Frank quoted and wrote: > Am 21-Feb-98 schrieb Rene Zimmerling : > > > bhf@opf.de (Bastian Frank) *schrieb* *am* 20.02.1998 *zu* > > Patching system calls *folgende* *Worte* : > > >> I tried to patch the gfx-function Text(), and everything worked fine. But > >> whenever I try to call the original function out of my own E-subroutine, > the > >> computer decides to do anything else, but not to execute the > >Text-subroutine. > > >Okay, here is a source. > > I already knew this piece of code. But the program you distributed does not > really call the original function. It just puts the function-pointer onto the > stack. After the next RTS-call it is executed automatically . I want to call > the function from the main program or from any other PROC. Good, I'm glad you know about this program (it's one of the first E programs I wrote, many many years ago). The trick with stuffing the address on the stack and doing an RTS is to get around the 68000's lack of instructions to JMP to sub-routines that are dynamic, that's all. You can easily modify the code to JSR instead, but you need to worry about the state of the registers after this call and at the end of your replacement function. Cheers! - -- The conundrum for today is "atjipiles". Your numbers are 50, 1, 8, 3, 6 and 1. The target value is 902. ====================================================================== Jason R. Hulance Email: jason@fsel.com Formal Systems (Europe) Ltd Tel: [+44] (0)1865 728460 3 Alfred Street, Oxford OX1 4EH, UK Fax: [+44] (0)1865 201114 ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- From: merlin@thule.no (Eric Sauvageau) Date: Mon, 23 Feb 1998 14:22:32 +0500 Subject: Re[2]: Patching system calls On Mon, 23 Feb 1998, we received a letter from about 'Re: Patching system calls': > Am 21-Feb-98 schrieb Rene Zimmerling : > > > bhf@opf.de (Bastian Frank) *schrieb* *am* 20.02.1998 *zu* > > Patching system calls *folgende* *Worte* : > > >> I tried to patch the gfx-function Text(), and everything worked fine. But > >> whenever I try to call the original function out of my own E-subroutine, > the > >> computer decides to do anything else, but not to execute the > >Text-subroutine. > > >Okay, here is a source. > > I already knew this piece of code. But the program you distributed does not > really call the original function. It just puts the function-pointer onto the > stack. After the next RTS-call it is executed automatically . I want to call > the function from the main program or from any other PROC. You must shove all arguments back in their proper registers, and then JSR to it. Here's an example based on the NewIcons sources: PROC blah() /* Put this right at the begining of the PROC if this proc is being called from the patch, to preserve the args. I'm not 100% sure, but I think you must avoid using pre-initialized vars in your DEFs to avoid trashing registers. */ MOVE.L A0, name MOVE.L A1, icon MOVE.L A2, a_freelist /* Do whatever thing you need to do */ MOVE.L name, A0 MOVE.L icon, A1 MOVE.L a_freelist, A2 MOVE.L truegeticonstore(PC), A3 JSR (A3) MOVE.L D0, res res will contain the result (if the function returns one). truegeticonstore is a storage area defined like in the setf.e example that has been mentionned on this list. Ciao! ... What we have here is a failure to commun%#^$)_$% NO CARRIER - -- ===--- - - - Eric Sauvageau http://www.thule.no/~merlin/ merlin@thule.no Amiga wizard known as Merlin, casting with E runes, resulting in: DevsMan - MFormat - NewIcons4 - SysInspector - XPKatana - - - - ---=== ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- From: agraham@hal9000.net.au (Ali Graham) Date: Tue, 24 Feb 1998 09:08:35 +1000 Subject: Re[2]: RawDoFmt() On 23-Feb-98, someone (I think it was Stuart Caie \(kyz\)) might have wri= tten: SC\> On Mon, 23 Feb 1998, Esteve Boix wrote: SC\> = SC\> =3D>> Could someone post a simple example of the use of SC\> =3D>> exec.library/RawDoFmt() in E? SC\> =3D> SC\> =3D>Another one asking the same. I haven't found a C source using th= is = SC\> =3D>function, either. SC\> = SC\> WriteF('Hello \d people!\n', 100) SC\> = Yes, but I need one that doesn't go to an output handle... point taken th= ough :) Ali.= ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- Date: Mon, 23 Feb 1998 22:42:20 +0000 (GMT) From: sac@csd.abdn.ac.uk ("Stuart Caie (kyz)") Subject: Re: Re[2]: RawDoFmt() On Tue, 24 Feb 1998, Ali Graham wrote: =>Yes, but I need one that doesn't go to an output handle... point taken though :) StringF() ? kyz ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- From: agraham@hal9000.net.au (Ali Graham) Date: Tue, 24 Feb 1998 09:43:52 +1000 Subject: Re[4]: RawDoFmt() On 24-Feb-98, someone (I think it was Stuart Caie \(kyz\)) might have wri= tten: SC\> On Tue, 24 Feb 1998, Ali Graham wrote: SC\> = SC\> =3D>Yes, but I need one that doesn't go to an output handle... point= taken though :) SC\> = SC\> StringF() ? SC\> = What I actually want to do is filtering of % codes in strings that users input into my program, e.g. replace %s with a file-size, %n with a file-name, etc. I have a procedure that does this at the moment, but it's too wasteful of time and memory - I'd rather use the OS function that seems to be designed to do it. Ali.= ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- From: agraham@hal9000.net.au (Ali Graham) Date: Tue, 24 Feb 1998 09:49:06 +1000 Subject: Re[2]: unions in objects... On 23-Feb-98, someone (I think it was Jason Hulance) might have written: JH> Another example is that you can often have lots of separate types and JH> just cast your data to the correct one: JH> JH> OBJECT x1 JH> id JH> a:obj JH> b[10]:ARRAY JH> ENDOBJECT JH> JH> OBJECT x2 JH> id JH> s[5]:ARRAY JH> t:INT JH> ENDOBJECT JH> JH> DEF p:PTR TO x1, q:PTR TO x2 JH> p:=something() JH> IF p.id = ID_X2 JH> q:=p JH> /* Use q */ JH> ELSE JH> /* Use p */ JH> ENDIF Yes, that's probably best... I'll probably end up doing it like this OBJECT my_bytes a:CHAR b:CHAR ENDOBJECT OBJECT my_int i:INT ENDOBJECT and then have a PTR to one that I'll just map to the other when necessary. Adds an extra instruction at times, though... but I can understand why this isn't included in the language per se. Would be nice to have it all handled automagically by the compiler, though :) (I guess that would require more state information about E's OBJECTs than is present at runtime in the current model...) Ali. ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- Date: Tue, 24 Feb 1998 14:15:30 +0100 (MET) From: s879@brems.ii.uib.no (Jan Ove Aase) Subject: windows I just wondered how you can change a window's size and position (after it has been opened). In fact, what I want, is to redraw the entire window, updating position, size, (title) etc. ____________________________________________________ _ _ \___/ Jan Ove Aase, Fantoft Stud.by, E-921, 5036 Fantoft (o o)__ s879@ii.uib.no \_/\_ \ janove@GalaxyCorp.com ___/) \ http://www.GalaxyCorp.com/janove / ( _\ ____________________________________________________ \ _// \\_/ ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- Date: Tue, 24 Feb 1998 13:26:29 +0000 (GMT) From: sac@csd.abdn.ac.uk ("Stuart Caie (kyz)") Subject: Re: windows On Tue, 24 Feb 1998, Jan Ove Aase wrote: =>I just wondered how [...] updating position, size, (title) etc. ChangeWindowBox(window, newleftedge, newtopedge, newwidth, newheight) SetWindowTitles(window, windowtext, screentext) kyz ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- Date: Wed, 25 Feb 1998 18:35:42 +0100 From: gamboni@fastnet.ch (Jacques Gamboni) Subject: OM_ADDMEMBER problem Hello, I have an OBJECT oobj that contains a 'gad:LONG' item, and have an 'optr:PTR TO oobj' variable. Here is my problem: I created an Mui gadget with: optr.gad:=ImageObject /*...*/ End and then: (grp is a Group) doMethodA(grp,[OM_ADDMEMBER,optr.gad]) to add the ImageObject to the Group. I inclosed that command between MUIM_StartChange (something like that) and MUIM_ExitChange so that the layout is correctely recalulated. When I try the program, the new ImageObject correctely appears in the Group, but I saw strange problems after that in the program. (Enforcer did not detect any hit) and I remarked that the contents of optr changed just after the call to OM_ADDMEMBER (so optr doesn't anymore to the gadget). Why? Maxime ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- Date: Thu, 26 Feb 1998 14:32:35 +0100 (MET) From: rade@coli.uni-sb.de (Ralph Debusmann) Subject: whatis.library Hi #?! Has anyone here used whatis.library in E? I am looking for some emodules plus example sources (those can be in C also, I don't mind). The pity with this library is that it doesn't have proper autodocs and examples with it. Ciao, Ralph - -- Fachschaft CL, Geb. 17.3, Raum 6.03 (Keller), Tel.: 0681-302-4178 HiWi im Projekt LISA, Geb. 17.3, Raum 1.11, Tel.: 0681-302-4496 Homepage, http://www.coli.uni-sb.de/~rade ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- Date: Thu, 26 Feb 1998 15:16:18 GMT From: jason@fsel.com (Jason Hulance) Subject: Re: whatis.library Ralph Debusmann wrote: > Has anyone here used whatis.library in E? I am looking for some > emodules plus example sources (those can be in C also, I don't mind). The > pity with this library is that it doesn't have proper autodocs and > examples with it. Yes, many years ago. Look for FakeDefIcon on Aminet (I believe I included the source). Its function was rather unique compared to a lot of other similar programs, and strangely the DefIcons part of NewIcons does things in almost the same way... And no, there never was a credit for FakeDefIcon in NewIcons... Cheers! - -- The conundrum for today is "inpimakgg". Your numbers are 100, 6, 8, 1, 7 and 1. The target value is 432. ====================================================================== Jason R. Hulance Email: jason@fsel.com Formal Systems (Europe) Ltd Tel: [+44] (0)1865 728460 3 Alfred Street, Oxford OX1 4EH, UK Fax: [+44] (0)1865 201114 ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- Date: Thu, 26 Feb 1998 17:51:33 +0100 (MET) From: rade@coli.uni-sb.de (Ralph Debusmann) Subject: Re: whatis.library On Thu, 26 Feb 1998, Jason Hulance wrote: > Ralph Debusmann wrote: > > > Has anyone here used whatis.library in E? I am looking for some > > emodules plus example sources (those can be in C also, I don't mind). The > > pity with this library is that it doesn't have proper autodocs and > > examples with it. > > Yes, many years ago. Look for FakeDefIcon on Aminet (I believe I > included the source). Its function was rather unique compared to a lot > of other similar programs, and strangely the DefIcons part of NewIcons > does things in almost the same way... And no, there never was a credit > for FakeDefIcon in NewIcons... Did you write them a mail about this? ;) Well, thanks a lot, I'll try this out when I get home tonight. The reason why I want to use whatis.library is to determine the filetypes of music modules for my slowly evolving tiny music player :) I think it could be quite nice to not have to check filetypes by myself. I also use the quite ingenious but abandoned BrowserII (which in turn uses whatis.library) as my filemanager, so I already have proper filetypes for everything... Cheers, Ralph - -- Fachschaft CL, Geb. 17.3, Raum 6.03 (Keller), Tel.: 0681-302-4178 HiWi im Projekt LISA, Geb. 17.3, Raum 1.11, Tel.: 0681-302-4496 Homepage, http://www.coli.uni-sb.de/~rade ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- From: merlin@thule.no (Eric Sauvageau) Date: Thu, 26 Feb 1998 14:31:58 +0500 Subject: Re[2]: whatis.library On Thu, 26 Feb 1998, we received a letter from about 'Re: whatis.library': > Yes, many years ago. Look for FakeDefIcon on Aminet (I believe I > included the source). Its function was rather unique compared to a lot > of other similar programs, and strangely the DefIcons part of NewIcons > does things in almost the same way... And no, there never was a credit > for FakeDefIcon in NewIcons... Nicola wrote DefIcons in 1992, while I see that FakeDefIcon has a datestamp dating >from 994. I didn't know that Nicola did time traveling :) ... Damage control is easy. Reading Klingon -- that's hard. -- Scotty - -- ===--- - - - Eric Sauvageau http://www.thule.no/~merlin/ merlin@thule.no Amiga wizard known as Merlin, casting with E runes, resulting in: DevsMan - MFormat - NewIcons4 - SysInspector - XPKatana - - - - ---=== ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- Date: Thu, 26 Feb 1998 20:38:12 +0100 (MET) From: szczepan@cksr.ac.bialystok.pl ("Marcin Juszkiewicz (Szczepan/BlaBla)") Subject: Re: whatis.library On Thu, 26 Feb 1998, Ralph Debusmann wrote: - ->Has anyone here used whatis.library in E? I am looking for some - ->emodules plus example sources (those can be in C also, I don't mind). The - ->pity with this library is that it doesn't have proper autodocs and - ->examples with it. Hi ! I recomend you FileID.library : - it's much easier to use - have autodoc in guide format - E Modules are in dev/e on Aminet - version 7.10 recognize 633 filetypes - has groups of filetypes - it's fast and easy to use (whatis.lib takes too much time to open on plain A600) BTW. Check my MultiView -> util/sys/2b_mv_os2 - It uses FileID.library Bye.. - ------ Marcin Juszkiewicz (Szczepan/BlaBla) *Team Amiga* szczepan@cksr.ac.bialystok.pl http://cksr.ac.bialystok.pl/szczepan/ A1200 BlizzIv 2+8MB RAM 425MB HDD Author of MultiView for OS 2.0+ -> Aminet:util/sys/2b_mv_os2_x.lha ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- Date: Thu, 26 Feb 1998 20:42:52 +0100 From: gamboni@fastnet.ch (Jacques Gamboni) Subject: OM_ADDMEMBER problem (continued) I debugged my program and found out that the variable's value change just when I run MUIM_Group_ExitChange. And, strangely when I executed the PROC several time, I saw that (When the program starts, the Group contains already one ImageObject, so that when the PROC, there is always at least one element in the Group, and the addresses of the ImageObjects are in an ARRAY OF LONG (objs), and I use optr to access an oobj: optr:=objs[i]): optr's value changes to the previous value in the ARRAY objs, like this: optr:=objs[i] optr.gad:=io(path) -> This is a macro that create a new ImageObject. /*Then I do an MUIM_InitChange followed by OM_ADDMEMBER*/ /*Here I put WriteF('\d\n',optr), that contains the correct value*/ doMethodA(obj,[MUIM_Group_ExitChange]) /*When MUIM_ExitChange is executed, optr strangely becomes optr[i-1]...*/ Maxime ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- Date: Fri, 27 Feb 1998 11:12:02 GMT From: jason@fsel.com (Jason Hulance) Subject: Re: Re[2]: whatis.library Eric Sauvageau wrote: > Nicola wrote DefIcons in 1992, while I see that FakeDefIcon has a datestamp dating > >from 994. I didn't know that Nicola did time traveling :) And of course you're taking the date from a similar datestamp on Aminet. That's a good comparison... Of course, Eric, I must bow to your better knowledge of NewIcons, and assume it was all a big coincidence... Anyway, I thought Nicola didn't write DefIcons? Cheers! - -- The conundrum for today is "racmftsna". Your numbers are 75, 2, 5, 4, 10 and 8. The target value is 870. ====================================================================== Jason R. Hulance Email: jason@fsel.com Formal Systems (Europe) Ltd Tel: [+44] (0)1865 728460 3 Alfred Street, Oxford OX1 4EH, UK Fax: [+44] (0)1865 201114 ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- Date: Fri, 27 Feb 1998 15:23:04 +0100 From: gamboni@fastnet.ch (Jacques Gamboni) Subject: OM_ADDMEMBER problem (continued) Ok, I found my stupid mistake: My Custom Class also had a custom layout, that used optr to go through my array. This is why optr changed when MUIM_ExitChange was executed. I switched to local variables and now everything is ok. Maxime ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- From: oeolsson@tmisnet.com (Ola Olsson) Subject: Blitting Date: Fri, 27 Feb 1998 07:15:15 (-0800) I've got a window with a background bitmap upon which I'm moving around a smaller "brush" bitmap. Currently I'm using AFC's superpicture module to handle the rastport stuff. To move the brush requires me to move its outline with a mouse-down, then on mouse-up the background is redrawn and then the brush is redrawn in the new position. This is obviously very slow and awkward. I suspect I need to be dealing with layers or something, of which I have no experience. Can someone point me to some examples of efficient bitmap interaction to get me started? Thanks, Ola - -- /** /** Ola Olsson /** oeolsson@tmisnet.com /** www.tmisnet.com/~oeolsson/ /** --naive programmer-- /** ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- From: deniil@algonet.se (Daniel Westerberg) Date: Wed, 14 Jan 1998 05:54:34 +0100 Subject: Re: Three Things On 13-Jan-98, amigae-list@intercom.it wrote: >* List: amigae-list@email.intercom.it >* From: GIMBO@pulse-service.co.uk (Uncle Jack) >Hi there List! >OK, I have several little things I wanna ask, so I thought I'd bundle >them together and maybe at least one will get replied to... :-) >First off, can anyone point me at a good text/source editor on >Aminet? There's quite a few there and though I've tried several, none >of them quite seem to fit the bill. Apart from all the usual stuff we >expect from editors, there are a few things I particularly want: >* Multiple files open in multiple windows. >* Regular expression search and replace (still haven't seen anything > better at this than the language Perl, though). >* A shortcut key for removing a single line (Crtl-Y on some editors?) > I'm *amazed* this is missing from so many. Maybe I need to learn > Arexx... :-) >* General grooviness. >I'm not too hung up on integration into the development environment, >but it's always a bonus I guess. Have you tried Annotate? You can open files in multiple windows! You can remove single lines with "RAmiga d"! Alot of general grooviness if you ask me ;) As it is quite old it doesn't got the look of the year but I just love it!! You also have auto indent which means that if you type a few spaces and then a word like this: PROC main() hello() ..and then press enter after 'hello()' your cursor will automatically be under the 'h'! All editors don't got that indispensable feature. Another nice feature is that you can on the scrollbar see where in the code your cursor is and where you have marked an area which means it's very easy to find back! It can be found at Aminet:text/edit/Annotate.lha - -- Over and out from: Deniil 715! - AmigaPower Rulez forever and ever.. . . . . ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT ------- From: merlin@thule.no (Eric Sauvageau) Date: Fri, 27 Feb 1998 15:11:14 +0500 Subject: Re[3]: whatis.library On Fri, 27 Feb 1998, we received a letter from about 'Re: Re[2]: whatis.library': > Eric Sauvageau wrote: > > > Nicola wrote DefIcons in 1992, while I see that FakeDefIcon has a datestamp dating > > >from 994. I didn't know that Nicola did time traveling :) > > And of course you're taking the date from a similar datestamp on Aminet. > That's a good comparison... No, I'm taking the date from my own knowledge :) The NewIcons package was written around '91-'92, and was in betatesting for over 6 months before being finaly released in '92 or '93 (Phil who was a betatester back then couldn't remember for sure that night we were chatting about it, all he remembered was it took a long time between the completion and the actual release date, being heavily betatested for months). The FakeDefIcon on Aminet was labeled v0.1, so I assumed it was the first (and last) version you ever released. If you released 0.05 before that, then my apologies :) > Of course, Eric, I must bow to your better knowledge of NewIcons, and > assume it was all a big coincidence... Anyway, I thought Nicola didn't > write DefIcons? Nicola Salmoria wrote NewIcons and DefIcons V1 through V2, and released them (NI and DI) together. When I took over for V3 I updated NewIcons, but never really touched DefIcons, only changing one stricmp() call with the utility.library version to solve a problem a user was experiencing on his localized system. I must admit that when I grabbed FakeDefIcon yesterday to check, the basic scheme looked quite similar. I didn't checked at the actual code to see how far the similitude was. Ciao! ... Your PC is always crashing? Try setting BUGS=OFF in your CONFIG.SYS. - -- ===--- - - - Eric Sauvageau http://www.thule.no/~merlin/ merlin@thule.no Amiga wizard known as Merlin, casting with E runes, resulting in: DevsMan - MFormat - NewIcons4 - SysInspector - XPKatana - - - - ---=== ------- CUT --- CUT --- CUT --- CUT --- CUT --- CUT --- CUT -------