Fetch Flex from Sourceforge.
[AROS-Contrib.git] / regina / epoc32 / epoc32.cpp
blob11a77bb247dd19c8ee25edaf73c006fccf41129f
1 #include <e32std.h>
2 #include <e32hal.h>
3 #include <d32snd.h>
4 #include <stdio.h>
5 #include <string.h>
7 #include "utsname.h"
9 extern "C"
11 int epoc32_uname(struct utsname *name)
13 TMachineInfoV1Buf machine;
14 UserHal::MachineInfo (machine);
16 memcpy( (char *)name->sysname, (char *)machine().iProcessorName.Ptr(), machine().iProcessorName.Length() );
17 name->sysname[machine().iProcessorName.Length()] = '\0';
18 sprintf( name->version,"%d.%d",machine ().iRomVersion.iMajor, machine ().iRomVersion.iMinor );
19 sprintf( name->release,"%d",machine ().iRomVersion.iBuild );
20 memcpy( (char *)name->nodename, (char *)machine().iPsuName.Ptr(), machine().iPsuName.Length() );
21 name->nodename[machine().iPsuName.Length()] = '\0';
22 memcpy( (char *)name->machine, (char *)machine().iMachineName.Ptr(), machine().iMachineName.Length() );
23 name->machine[machine().iMachineName.Length()] = '\0';
25 return 0;
27 void beep( int freq, int dur )
29 RDevSound snd;
30 TInt ret;
31 TRequestStatus status;
32 TSoundConfig config;
34 ret = snd.Open();
35 config().iVolume = EVolumeMedium;
36 snd.SetConfig( config );
37 snd.PlaySineWave( status, freq, EVolumeMedium, dur );
38 User::WaitForRequest( status );
39 snd.Close();