HDTenEightyP/NetNews huggingface dataset:
Newsgroups: comp.sys.acorn.tech
Subject: C query.
From: banksie@khantazi.welly.gen.nz (Philip R. Banks)
Date: Thu, 15 Oct 1992 23:10:41 +1300
Reply-To: banks_p@kosmos.wcc.govt.nz
Organization: My Arc.

   Okay here is a little wee problem I am hoping some C type can answer for
me. Quickly please, before I take to this compiler with a blunt
instrument... :)

The problems is thus I have defined a structure like so :-

typedef struct {
   char *name;
   char *comment;
   struct filenode *next;
   struct filenode *prev;
   struct filenode *parent;
   struct filenode *sublist;
   int load;
   int exec;
   int length;
   char flag;
} filenode;

In the same file inside a procedure called AddNode I do the following :-

filenode *AddNode(char *name, filenode *parent, int type, char *comment) {
/* Adds a node to the sub list of the node passed as the parent. */
    filenode *newnode, *sublist;
    int namelength,commentlength;
    char *charblock1,*charblock2;
...
    if (sublist != NULL) {
       filenode *scratch;
       int flag;
...
             if ((*scratch).next != NULL) scratch->next->prev = (struct filenode *) newnode;

With the last line being the problem one. The compiler gives me the serious
error number 140 " 'struct filenode' not yet defined - cannot be selected
from ". Now given that the structure is defined in the *same* file I find
this a little hard to believe. Also the if statement is in the same scope as
the declaration of the variable scratch.

   So can anyone answer what I am doing wrong that the Norcroft compiler is
soooo helpfully not telling me? 

   I knew there was a good reason for sticking to Assembler. <mumble)
<mumble).

    Philip

--
Philip R. Banks  Syntax: mail < banks_p@kosmos.wcc.govt.nz >            @@@@@/|
                                                                        @@@@/#|
                                                                        @@@/##|
And who are we to criticize or scorn the the things that they do?       @@/---|
For we shall seek and we shall find Ammonia Avenue. ---A.P.P.           @/    |
Newsgroups: comp.sys.acorn.tech
Subject: Re: RISC OS 3.1 3-D Icons
From: jwil1@cs.aukuni.ac.nz (TMOTA)
Date: Mon, 12 Oct 1992 22:42:10 GMT
Organization: Computer Science Dept. University of Auckland

pmoore@cix.compulink.co.uk (Paul Moore) writes:

>Some time back, someone (I think it was TMOTA) posted a list of the
>validation strings for 3-D borders in RISC OS 3.1 (R0 - R7, although I am
>not sure I understand R7 "writeable icon" - how is this a border type???).

R7 is the type of border used in Impression/Interface around a writable.
That is, a black border with an indentation around the outside of it.

>He goes on to comment "As with RISC OS 3.0, version 3.00, it is possible to
>define alternative slabbing down colours". My question is - "how?".

I wish I knew...

>Maybe someone in the know could post the details of all the new validation
>string commands? (Or tell us when the RO3 PRMs will be available... :-)

New validation strings that I know of are:
 K - for writable icons: tells the WIMP of extra keys to automatically handle
 for you:
 Ka  Allow up/down arrow keys to move to next/previous writable icons
     automatically (it moves to the next-numbered writable, wrapping back
     around when it gets to the 'last' and 'first' ones.
 Kr  Move to the next writable if return is pressed
 Kt  Move to the next on if tab is pressed

The latter two (Krt) don't have any effect on the last writable icon.
Of course, they can be mixed: Kart (or Krat or Ktar ;-)

 R - for bordered icons. The normal icon flagword 'BORDER' bit must be set.
    0 = no border
    1,2 = plinth up & down
    3,4 = raised/lowered grouping border
    5 = plinth up which indents when clicked
    6 = 'ok' button (plinth with beige channel) which indents when clicked
    7 = writable icon border

 P<spritename>
 Changes the pointer shape when it is over this icon to the shape in the
 given sprite, e.g, "Pptr_default" "Pptr_menu", etc.


-- 
_________________  "I'd like to answer this question in two ways:
  /____ _ _/_ __       First in my normal voice, and then
 // / //_//_ /_/       in a silly, high-pitched whine." (Monty Python)
From: duplain@rtf.bt.co.uk (Andy Duplain)
Newsgroups: comp.sys.acorn.tech
Subject: Re: C query.
Keywords: C, typedef, struct, self
Date: 16 Oct 92 13:50:09 GMT
Organization: BT Customer Systems, Brighton, UK

In article <1992Oct16.094939.11437@waikato.ac.nz> banksie@khantazi.welly.gen.nz writes:
>Philip R. Banks writes:
>>    Okay here is a little wee problem I am hoping some C type can answer for
>> me. Quickly please, before I take to this compiler with a blunt
>> instrument... :)
>> 
>> The problems is thus I have defined a structure like so :-
>> 
>> typedef struct {
>>    char *name;
>>    char *comment;
>>    struct filenode *next;
>>    struct filenode *prev;
>>    struct filenode *parent;
>>    struct filenode *sublist;
>>    int load;
>>    int exec;
>>    int length;
>>    char flag;
>> } filenode;
>
>Hmm.  Well, I can see problems already!  The type name 'filenode' isn't defined
>within the structure definition!  It's not defined until the end of the typedef
>has been reached.

	Well he isn't referencing "type name filenode" from within the
	structure definition.  The compiler will not complain at this
	stage because it knows how big the pointer to structure is, which
	is the same as pointer to anything, i.e. 1 word.  Philip is getting
	confused between structs and typedef names and this can be made
	more obvious by doing:
	
		struct filenode {
		
			blah... blah... blah
		
		};
		
		typedef struct filenode *FileNode;
	

-- 
Andy Duplain, BT Customer Systems, Brighton, UK.            duplain@rtf.bt.co.uk
#define	DISCLAIMER      My views and opinions are my own, and not my company's
From: J.Herbert1@lut.ac.uk (John O'Malley)
Newsgroups: comp.sys.acorn.tech
Subject: Deskjet 500C Problem
Date: 8 Oct 92 09:47:04 GMT
Reply-To: J.Herbert1@lut.ac.uk (John O'Malley)
Distribution: uk
Organization: Loughborough University, UK.

In reply to Roger Knight, I don't know of the bug fix or how to adjust the 
pinouts of the 8Mb upgrade but, If all else fails why not print out your 
file to a postscript file using PrintersPS on to a DOS disc and take it in to
your local computer centre (or mail it) so that you can have colour laser
output which would be far better than the 500C. It may be expensive but,
if your desperate then it may be all that's left.

		Hope it helps.

				

				Jim.

-- 
==================================================================
|  James Herbert	|				         |
| J.Herbert1@lut.ac.uk 	|	You see that PC compatible....   |
|	        	|	That's you that is.	         |
Newsgroups: comp.sys.acorn.tech
Subject: Re: iconizing, modems, ro3 etc
From: jwil1@cs.aukuni.ac.nz (TMOTA)
Date: Mon, 12 Oct 1992 22:33:21 GMT
Organization: Computer Science Dept. University of Auckland

plebeau@cix.compulink.co.uk (Paul Lebeau) writes:
[...]

>               case 0x400cc:   /* 'wimp_MWINDINFO'
>                                  (for iconizing windows) */

[...]

>                  strncpy(&e->data.msg.data.chars[8],
>                          WIMP_ICONIZE_SPRITE, 8);
>...
>WIMP_ICONIZE_SPRITE is "ic_minehunt" but you should be able to

Don't you mean "minehunt"? Pinboard is supposed to place the "ic_"
on the front itself. Note also that "minehunt" is 8 characters, so
the "e" should be replaced by a '\0' terminator. (which you are
doing below). As you have called your application 'mineuhunt' (I
presume) when you gave the taskname to the WIMP (Wimp_Initialise)
it will fail when it tries to use "ic_ic_mine" and resort to
"ic_<taskname>", or "ic_minehunt". (Try a different spritename,
and I'm certain you'll end up with an "ic_?"...)
It just happens to work for you because it defaults to the sprite that
you really wanted anyway.

i.e. I think you're supposed to use strcpy(...,"minehun")
to use an icon called "ic_minehun"

>Hope that helps.
Thanks, but no.. it's essentially what I've already got... ;-(

The trouble comes when you want to use an icon with a *different* name
from the application's taskname (e.g. "ic_minehi" and "ic_minewin" for
example). The icon *does* appear, but is instantly *replaced* by the
default icon again (So I see my icon flash before my eyes...)

I can make my icon appear and stay by putting a Wimp_Poll in just before
I send the reply message, but although I thought this works, I know find
that it *doesn't* work if I start up my machine without booting!
In other words, it doesn't work on a bog-standard RO3.10 machine, but
for some reason it works after my !boot has been run! (?????!!!?!?!)

---
[...]
>Unfortunately, there is no Arc software to drive fax modems, that
>I know of.  A colleague has written some simple code to drive our
>modem.  Is there any demand out there for us to develop this
>commercially?  How many of you have fax modems?

David Pilling has just released a program to drive Fax modems...
(Not an advert... just info for those who are interested!)
-- 
_________________  "I'd like to answer this question in two ways:
  /____ _ _/_ __       First in my normal voice, and then
 // / //_//_ /_/       in a silly, high-pitched whine." (Monty Python)
From: pcolmer@acorn.co.uk (Philip Colmer)
Newsgroups: comp.sys.acorn.tech
Subject: Re: RISC-OS 3.10 Features
Date: 8 Oct 92 11:26:52 GMT
Organization: Acorn Computers Ltd, Cambridge, England

In article <1992Oct7.104226.12095@cs.nott.ac.uk> psyhsmb@unicorn.nott.ac.uk (S.Burrows) writes:

>Incidentally, anyone using "Interface" should use version 2.xx, as this
>is more RISC OS 3 friendly.

Is this available from an easily accessible place, eg Newcastle?

--Fil.

---------------------------------------------------------------------
        Practise random kindness and senseless acts of beauty
From: wgt-a@minster.york.ac.uk
Newsgroups: comp.sys.acorn.tech
Subject: Help!!!!!!
Date: 15 Oct 92 19:38:42 GMT
Organization: Department of Computer Science, University of York, England

This is just a quick query for the new tech newsgroup!

How can you call OS_Cli from assembler, and have errors passed back?

The obvious way is to use XOS_Cli, but this appears to still report errors that
occur in the execution of the CLI command string. What I want is for the V flag
to be set as per a normal X... SWI call, without any output from the execution
of the OS_Cli command.

However, it appears not to be possible. What am I doing wrong?

Ta for the help in advance,

William

+-----------------------------------------------------------------------------+
| +-----+           +---------------------------------+  +=======+ +++++   /| |
| +-----+           | JANET: wgt-a@minster.york.ac.uk |  | 1380K | +++++  /-| |
|   :0              +---------------------------------+  +=======+ +++++ /  | |
+-----------------------------------------------------------------------------+
Newsgroups: comp.sys.acorn.tech
From: goodwin@edieng.enet.dec.com (Pete Goodwin)
Subject: Templates, RO3.1 and the dreaded Address Exception in the WindowManager
Organization: Digital Equipment Corporation
Date: Tue, 13 Oct 1992 07:46:55 GMT


After reading about the problem with 3d icons in templates, mainly when a 3d
icon is clicked to quit the application, I had a look at writing some code in C
to fix the problem:

/* The alarm handler to do the exit */
static void delayed_shutdown(int at, void *handle)
{
    wimp_mousestr mouse;

    /* Get the state of the mouse */
    wimpt_complain(wimp_get_point_info(&mouse));

    /* Check SELECT, MENU and ADJUST buttons */
    if (mouse.bbits & (wimp_BLEFT | wimp_BMID | wimp_BRIGHT))

	/* A button is still pressed, reschedule this handler */
	alarm_set(alarm_timenow() + 10, delayed_shutdown, NULL);
    else

	/* All buttons released, safely exit */
	exit(EXIT_SUCCESS);
}

/* Call this routine when you want to exit */
static void delayed_exit(void)
{
    /* Install handler */
    alarm_set(alarm_timenow() + 10, delayed_shutdown, NULL);
}

This appears to solve the problem (i.e you don't get the address exception at
address 0x03nnnnnn somewhere in the WindowManager module), though there may be
more elegant ways of doing it.

Pete Goodwin
goodwin@system.enet.dec.com
From: mybg@doc.ic.ac.uk (M Y Ben Gershon)
Newsgroups: comp.sys.acorn.tech
Subject: More than 4 expansion cards ??
Date: 9 Oct 1992 06:23:18 +0100
Organization: Department of Computing, Imperial College, University of London, UK.
Distribution: world
NNTP-Posting-Host: swan.doc.ic.ac.uk


Does anyone know of any way to have more than 4 expansion cards on an Acorn
RISC computer (540 in my case)?  I recall reading that it cannot be done
directly (ie some form of internal expansion which would allow more than 4
cards to be USED simultaneously), due to OS limitations, and assumptions made
by various card manufacturers about the address mappings used by the 4 'basic'
cards.

What would interest me would be an expansion which allowed, say, 2 additional
cards to be added, with some form of physical switch to toggle between them
and two of the 'resident' cards.

Has anyone got any ideas?  I am not an electronics buff, so I wouldn't be able
to build anything, but maybe someone out there is developing something... I
am getting absolutely desparate, as I have 4 cards installed, but two newly
released cards also seem very interesting!

Michael Ben-Gershon
From: ijp@doc.ic.ac.uk (Ian Palmer)
Newsgroups: comp.sys.acorn.tech
Subject: Re: Palette utility obscurity
Date: 7 Oct 1992 10:39:11 +0100
Organization: Department of Computing, Imperial College, University of London, UK.
NNTP-Posting-Host: oak4.doc.ic.ac.uk

In article <1992Oct6.163937.9771@cs.kuleuven.ac.be> ericl@cs.kuleuven.ac.be (Eric Lafortune) writes:
(on bahalf of tytgat@esat.kuleuven.ac.be)
>
>A WIMP problem this time :
>
>On page 1257 in the PRM we can read about the Message_PaletteChange :
>
>I am particulary interested in the sentence : "Note though that the
>palette utility automatically forces a redraw of the whole screen if
>any of the Wimp's standard colours change their logical mapping, so
>applications don't have to take further action."
>
>Does this mean that when a Wimp program changes a colour in a 16 colour
>mode using "VDU 19, <colour number>, 16, <red>, <green>, <blue>", the
>palette utility automatically issues a redraw of the screen ???
>

I would guess not.

My understanding of this sentence, and from noticong what happans, I
would guess that this only applies to non-16 colour modes.

I have noticed, in 256 colour modes - but I would guess that the same
is true for 4 and 2 colour modes as well - that when changing colours
with !Palette the screen does get redrawn. I would guess that the
sentence means, precicly what it says, that when a logical mapping for
a wimp colour changes the screen is redrawn. This will never happen in
16 colour modes as there is only direct mapping os colours in this
mode (16 wimp colours, 16 totally definable colours available). Only
in 256 colours modes (256 colours from a very restricted palette), and
4 and 2 colours modes is there any logical mapping of colours.

For example, in the standard 256 mode palette and standard wimp
palette, wimp colour 0 (white) will be mapped to screen colour 255 (I
think), but if you make wimp colour 0, say, black - then it will be
mapped to screen colour 0 - needing a total redraw rather than a
simply change to the rgb values the VIDC outputs to the monitor.

This does rather suggest that the palette file, which someone has
already mentioned in a different thread, being simply a series of VDU
19 calls is a little messy. O.K. fine, in a 16 colour mode all you
need to do is treat is as such, but in all other screen types more
complex things need to go on, which will totally ignore half of the
file (ie. the 19,c,16 part) - a bit wasteful.

Ian

Of course this is totally based on my simple understanding, built up
without the help of PRMs - due to a lack of said item for RO3. Ho
Hum.


-- 
                            E-mail : ijp@doc.ic.ac.uk
 ___           __       Snail mail : Department of Computing, Huxley Building,
  /  _   _    /_/ _   / _ _   _  _   Imperial College, 180 Queens Gate,
_/_ (_|_| )  /   (_|_(_| ) )_|/_)    London. SW7 2BZ. England.
Newsgroups: comp.sys.acorn.tech
From: julian@bridge.welly.gen.nz (Julian Wright)
Newsgroups: comp.sys.acorn.tech
Subject: Re: RISC OS 3.1 3-D Icons
Date: Wed, 14 Oct 1992 14:52:48 +1200
Reply-To: wright_j@kosmos.wcc.govt.nz
Organization: USS Enterprise, NCC 1701a

jwil1@cs.aukuni.ac.nz (TMOTA) writes:

> pmoore@cix.compulink.co.uk (Paul Moore) writes:
> 
> >He goes on to comment "As with RISC OS 3.0, version 3.00, it is possible to
> >define alternative slabbing down colours". My question is - "how?".
> 
> I wish I knew...

Try a validation string of "r6,13" to make a button that slabs down
dark-green instead of orange.

> The latter two (Krt) don't have any effect on the last writable icon.
> Of course, they can be mixed: Kart (or Krat or Ktar ;-)

Kt has plenty of effect on the last icon... the caret wraps around to the
first writable icon. Also Shift-TAB makes the caret move backwards through
the writable icons, wrapping at the first...

>  R - for bordered icons. The normal icon flagword 'BORDER' bit must be set.
>     0 = no border
>     1,2 = plinth up & down
>     3,4 = raised/lowered grouping border
>     5 = plinth up which indents when clicked
>     6 = 'ok' button (plinth with beige channel) which indents when clicked
>     7 = writable icon border

I like the new colours chosen for the borders in 3.10 over 3.00 - they look
more like the colours used in Interface - lighter greys.

>  P<spritename>
>  Changes the pointer shape when it is over this icon to the shape in the
>  given sprite, e.g, "Pptr_default" "Pptr_menu", etc.

Also you can specify the co-ordinates of the hotspot: eg. Pptr_write,4,4
All of this is very Interface-like...

    Cheers, Julian.

--
I'm sig of sicknatures.
From: esutt@csv.warwick.ac.uk (Mr A E Hersee)
Newsgroups: comp.sys.acorn.tech
Subject: Acorn's pinboard does not follow their own rules (Bug)
Date: 9 Oct 1992 12:03:10 +0100
Organization: Computing Services, University of Warwick, UK
Distribution: world
NNTP-Posting-Host: lily.csv.warwick.ac.uk

I have just started writing a sensible Iconizer application for RO3. Now what 
do Acorn say in their docs? They say that when an iconizer starts up it should
broadcast the message Message_WindowInfo with 0 as the window handle. Ok so I
do that. They then say that any present iconizer that receives such a message
should open all it's iconized windows and quit. Ok so mine does that as well.
The problem is that Acorn's PINBOARD does NOT!!!! So sometimes my application
gets the iconize messages and sometimes Pinboard nabs them :-(. Now although
their docs state that an iconizer that receives Message_WindowInfo with a
window handle of zero should quit a better soloution would be for it to
open all it's windows and stop catching messages this would then mean in 
pinboard's case that it could continue to act as a backdrop. Hmm looks as
though I will have to install a filter to filter out the relevant messages
so that Pinboard does not get them.

Any comments or help? Is there a bug fixed version of pinboard that I can
load? Come on Acorn surley you need to follow your own guidelines. Perhaps
this bug has not been spotted since not many people will have written iconizers
so now that I have spotted it can you release a new version?? Or do I have to
hack the module myself???

Andrew Hersee
From: pmoore@cix.compulink.co.uk (Paul Moore)
Newsgroups: comp.sys.acorn.tech
Subject: RISC OS 3.1 3-D Icons
Date: 12 Oct 92 19:11:00 GMT
Reply-To: pmoore@cix.compulink.co.uk

Some time back, someone (I think it was TMOTA) posted a list of the
validation strings for 3-D borders in RISC OS 3.1 (R0 - R7, although I am
not sure I understand R7 "writeable icon" - how is this a border type???).
He goes on to comment "As with RISC OS 3.0, version 3.00, it is possible to
define alternative slabbing down colours". My question is - "how?".
 
More specifically, what are the validation string commands for this? Also,
with type R3 (ridge grouping icon) is there a way of specifying the ridge
colour? It always seems to come out colour 1 (light grey). I'd like
something darker...
 
Maybe someone in the know could post the details of all the new validation
string commands? (Or tell us when the RO3 PRMs will be available... :-)
 
Thanks in advance for any help.
 
Gustav.
From: mjw19@cl.cam.ac.uk (M.J. Williams)
Newsgroups: comp.sys.acorn.tech
Subject: Re: C query.
Date: 15 Oct 92 14:43:10 GMT
Reply-To: mjw19@cl.cam.ac.uk (M.J. Williams)
Organization: The National Society for the Inversion of Cudddly Tigers

In article <2qdtw7j025n@khantazi.welly.gen.nz> banks_p@kosmos.wcc.govt.nz writes:
>The problems is thus I have defined a structure like so :-
>
>typedef struct {
>   char *name;
>   char *comment;
>   struct filenode *next;
>   struct filenode *prev;
>   struct filenode *parent;
>   struct filenode *sublist;
>   int load;
>   int exec;
>   int length;
>   char flag;
>} filenode;

This defines an anonymous structure, and assigns it to the typedef filenode.
You want something like:

typedef struct filenode {
   char *name;
   char *comment;
   struct filenode *next;
   struct filenode *prev;
   struct filenode *parent;
   struct filenode *sublist;
   [...]
} filenode;

Hope this helps,
Mike
--
_______________________________________________________________________________
 \   ^   / Michael Williams                     Part II Computer Science Tripos
  |\/|\/\  MJW19@phx.cam.ac.uk                          University of Cambridge
  |  |(__) Cymdeithas Genedlaethol Traddodiad Troi Teigrod Mwythus Ben I Waered
Newsgroups: comp.sys.acorn.tech
Subject: !Printers and an HP LaserJet driver...
From: jwil1@cs.aukuni.ac.nz (TMOTA)
Date: Fri, 9 Oct 1992 00:47:41 GMT
Organization: Computer Science Dept. University of Auckland

I'm very impressed by !Printers and it's halftones: far superior quality
for things like screenshots of windows - excellent, Acorn!

But I have a minor grumble: I use a HP LaserJet II emulating printer, which
used to work perfectly with the old drivers.

However, with the default LasJet II driver in !Printers, the whole page is
shifted down by about 3 centimeters, to the point where the bottom cm of
the text on an Impression document is actually lost off the bottom!

I adjusted the top/bottom page margins by subtracting 12.5 mm (which was the
top margin), which gets everything on the page, but it's still all about a
centimeter too far down on the page...

Does anybody know a good solution?
If not, can I put negative numbers in for the top margin?

Thanks for any help!
-- 
_________________  "I'd like to answer this question in two ways:
  /____ _ _/_ __       First in my normal voice, and then
 // / //_//_ /_/       in a silly, high-pitched whine." (Monty Python)
Newsgroups: comp.sys.acorn.tech
From: dahe@cl.cam.ac.uk (David Elworthy)
Subject: Re: More than 4 expansion cards ??
Reply-To: dahe@cl.cam.ac.uk (David Elworthy)
Organization: U of Cambridge, England
Date: Fri, 9 Oct 1992 14:09:29 GMT

In article <1b3506INNjc4@swan.doc.ic.ac.uk>, mybg@doc.ic.ac.uk (M Y Ben
Gershon) writes:
|> 
|> Does anyone know of any way to have more than 4 expansion cards on an Acorn
|> RISC computer (540 in my case)?

No, you can only get 4 in the case! The other 536 will have to go
somewhere else!

-- david

(Sorry - thesis writing makes your brain go all funny.)