Subject: Re: HPCBoot "Can't Boot Kernel Image"
To: Matthew Orgass <darkstar@city-net.com>
From: Sabahattin Gucukoglu <mail@sabahattin-gucukoglu.com>
List: port-hpcmips
Date: 10/20/2004 08:14:35
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Matthew,

On 19 Oct 2004 at 21:07, Matthew Orgass <notelinux-devel@romuald.net.eu.org> spoke, thus:

> On 2004-10-19 mail@sabahattin-gucukoglu.com wrote:
> 
> > Here is the source of my short program:
> [...]
> > *pref.dir_user_path=L"\\Storage Card\\";
> [...]
> > *pref.kernel_user_file=L"freesoft.gz"; /*Sorry, just couldn't resist.*/
> 
>   Is this type of assignment supposed to work in C++?  It has been a while
> since I used it :).

Oh, ****!  No, this is my idea of forgetting my C fundamentals and trying 
to be smug in the reuse of code aspect when I noticed that the structure's 
definition in main was (obviously) of no help to the other routines and 
hence made it global.  At that time, of course, the strings were 
initialised as shown when first declared.  Whether or not it works in C++ 
I'm not sure (though I would not be surprised if it did, given the ability 
one has to declare anything one wants at will).  Regardless, it's been a 
long time since I'd even considered using C++  - it's just an awful hack.  
C's rules about assignment versus defining declarations (i.e. procedure's 
execution of an assignment versus actually initialising a variable during 
declaration), though strange, are nevertheless very sensible and well 
justified.  My compiler didn't return an error because what I actually 
wrote into the file was a single character (represented by two bytes), the 
one presumably first occupied by the short-lived string constant.  All 
hale C!

Well, I've made the appropriate modification using the unicode string 
copy, and - yes, friends - it now boots!  Thanks a lot, Matthew.  Now to 
the really important stuff... :-)

Cheers,
Sabahattin

- -- 
Thought for the day:
    Bagpipes (n): an octopus wearing a kilt.


Sabahattin Gucukoglu
Phone: +44 20 88008915
Mobile: +44 7986 053399
http://www.sabahattin-gucukoglu.com/
Email/MSN: <mail@Sabahattin-Gucukoglu.com>


-----BEGIN PGP SIGNATURE-----
Version: PGP 8.0 -- QDPGP 2.70 

iQA/AwUBQXYQWyNEOmEWtR2TEQI4DQCgvD+jaJaW+QCbU+lCU1V4qTVb2jYAnA/m
hdX2QZ3QJixxtTl/gESlJhwz
=EvoJ
-----END PGP SIGNATURE-----