* [9fans] quick stupid question
@ 2006-06-06 1:10 Roman Shaposhnick
2006-06-06 1:24 ` geoff
0 siblings, 1 reply; 6+ messages in thread
From: Roman Shaposhnick @ 2006-06-06 1:10 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
Guys,
its a bit embarrassing, but I can't really find a place in
the sources where vgascreen (the one defined in 9/pc/screen.h)
gets initialized :-( I've grepped and grepped, but I only
see its usage everywhere...
Help, please...
Thanks,
Roman.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [9fans] quick stupid question
2006-06-06 1:10 [9fans] quick stupid question Roman Shaposhnick
@ 2006-06-06 1:24 ` geoff
2006-06-06 1:34 ` Roman Shaposhnick
2006-06-06 2:32 ` Russ Cox
0 siblings, 2 replies; 6+ messages in thread
From: geoff @ 2006-06-06 1:24 UTC (permalink / raw)
To: 9fans
It looks like it's initialised in 9/pc/screen.c, for example in
screensize(), and 9/pc/devvga.c, for example in vgaopen() and the
routines it calls. Look for
scr = &vgascreen[0];
which is a pedantic way of writing
scr = vgascreen;
and see how scr is used.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [9fans] quick stupid question
2006-06-06 1:24 ` geoff
@ 2006-06-06 1:34 ` Roman Shaposhnick
2006-06-06 2:41 ` Russ Cox
2006-06-06 2:32 ` Russ Cox
1 sibling, 1 reply; 6+ messages in thread
From: Roman Shaposhnick @ 2006-06-06 1:34 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
On Mon, Jun 05, 2006 at 06:24:31PM -0700, geoff@collyer.net wrote:
> It looks like it's initialised in 9/pc/screen.c, for example in
> screensize(), and 9/pc/devvga.c, for example in vgaopen() and the
> routines it calls. Look for
>
> scr = &vgascreen[0];
>
> which is a pedantic way of writing
>
> scr = vgascreen;
>
> and see how scr is used.
Here's the thing -- it looks like everything assumes that the place
'scr' ends up pointing to has been already initialized somehow. Every
sourceline that I've been able to identify using
"grep vgascreen /sys/src/9/*/*"
does exactly what you've mentioned: 'scr = &vgascreen[0];' but the problem
is -- scr never gets written to, which means there's not way vgascreen could
be initialized.
Or am I missing something really obvious here ?
Thanks,
Roman.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [9fans] quick stupid question
2006-06-06 2:41 ` Russ Cox
@ 2006-06-06 1:53 ` Roman Shaposhnick
0 siblings, 0 replies; 6+ messages in thread
From: Roman Shaposhnick @ 2006-06-06 1:53 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
On Mon, Jun 05, 2006 at 07:41:53PM -0700, Russ Cox wrote:
> > does exactly what you've mentioned: 'scr = &vgascreen[0];' but the problem
> > is -- scr never gets written to, which means there's not way vgascreen could
> > be initialized.
>
> grep 'scr->[a-z]+ =' /sys/src/9/pc/*.c
> screen.c, devvga.c, also various vga*.c.
Oh my! Thanks -- hopefully my current onset of stupidity will
pass with a good night's sleep...
Thanks,
Roman.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [9fans] quick stupid question
2006-06-06 1:24 ` geoff
2006-06-06 1:34 ` Roman Shaposhnick
@ 2006-06-06 2:32 ` Russ Cox
1 sibling, 0 replies; 6+ messages in thread
From: Russ Cox @ 2006-06-06 2:32 UTC (permalink / raw)
To: 9fans
> scr = &vgascreen[0];
>
> which is a pedantic way of writing
>
> scr = vgascreen;
Except that the former conveys the fact that
there might be more than one screen (at some point...).
Russ
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [9fans] quick stupid question
2006-06-06 1:34 ` Roman Shaposhnick
@ 2006-06-06 2:41 ` Russ Cox
2006-06-06 1:53 ` Roman Shaposhnick
0 siblings, 1 reply; 6+ messages in thread
From: Russ Cox @ 2006-06-06 2:41 UTC (permalink / raw)
To: 9fans
> does exactly what you've mentioned: 'scr = &vgascreen[0];' but the problem
> is -- scr never gets written to, which means there's not way vgascreen could
> be initialized.
grep 'scr->[a-z]+ =' /sys/src/9/pc/*.c
screen.c, devvga.c, also various vga*.c.
russ
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2006-06-06 2:41 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-06 1:10 [9fans] quick stupid question Roman Shaposhnick
2006-06-06 1:24 ` geoff
2006-06-06 1:34 ` Roman Shaposhnick
2006-06-06 2:41 ` Russ Cox
2006-06-06 1:53 ` Roman Shaposhnick
2006-06-06 2:32 ` Russ Cox
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).