Opened 11 years ago

Last modified 23 months ago

#1576 assigned bug

Some headers should be rewritten

Reported by: korli Owned by: nobody
Priority: high Milestone: R1
Component: - General Version: R1/Development
Keywords: Cc: tim.jarzombek@…
Blocked By: Blocking:
Has a Patch: no Platform: All

Description (last modified by korli)

Here is a list in headers/os. They should be reported in headers/build/.

headers/os/drivers/ISA.h
headers/os/drivers/PCI.h

headers/os/game/DirectWindow.h
headers/os/game/FileGameSound.h
headers/os/game/GameSound.h
headers/os/game/GameSoundDefs.h
headers/os/game/PushGameSound.h
headers/os/game/SimpleGameSound.h
headers/os/game/StreamingGameSound.h
headers/os/game/WindowScreen.h

Attachments (1)

1576.patch (49.6 KB) - added by jarz 9 years ago.
Tested patch

Download all attachments as: .zip

Change History (50)

comment:1 Changed 11 years ago by korli

Description: modified (diff)

comment:2 Changed 11 years ago by axeld

Owner: axeld deleted
Priority: normalhigh

I just rewrote TrackerAddOn.h and kernel/image.h. net_settings.h can probably be removed, as we don't support that API anymore. When we want to distribute headers as well (ie. a developer environment for Haiku) we should have replaced all Be headers with our own.

comment:3 Changed 11 years ago by jackburton

I rewrote DirectWindow.h. Should we keep track of the headers which are already rewritten in some way ?

comment:4 Changed 11 years ago by korli

Yeah, just add a "Done" section in the description and move the header from the current list to this section. It should be good enough :) Thanks for looking into this.

comment:5 Changed 11 years ago by jackburton

Description: modified (diff)

comment:6 Changed 11 years ago by jackburton

By the way, do we really need all the headers reported in headers/build ? At least, I guess we don't need the whole interface kit.

comment:7 in reply to:  6 Changed 11 years ago by bonefish

Replying to jackburton:

By the way, do we really need all the headers reported in headers/build ? At least, I guess we don't need the whole interface kit.

Nope, feel free to remove whatever is not needed.

comment:8 Changed 11 years ago by jackburton

Description: modified (diff)

Is BMultiChannelControl used anywhere ? To me it looks like an older version of BChannelControl/BChannelSlider interface. We might decide to just drop it and stick with the latter.

comment:9 Changed 11 years ago by jackburton

Description: modified (diff)

comment:10 Changed 11 years ago by jackburton

Description: modified (diff)

Input.h done.

comment:11 Changed 11 years ago by jackburton

Description: modified (diff)

TextView.h was rewritten in hrev22688 by Vasilis Kaoutsis.

comment:12 Changed 11 years ago by stippi

Description: modified (diff)

comment:13 Changed 11 years ago by julun

PrintJob.h done in hrev24684

comment:14 Changed 9 years ago by korli

Description: modified (diff)

These headers have been rewritten: headers/os/add-ons/input_server/InputServerDevice.h headers/os/interface/ChannelControl.h headers/os/media/BufferGroup.h headers/os/media/MediaFormats.h headers/os/media/Sound.h

comment:15 Changed 9 years ago by jackburton

Description: modified (diff)

More headers done: headers/os/interface/MultiChannelControl.h, headers/os/interface/ChannelSlider.h, headers/os/app/PropertyInfo.h, headers/os/media/Buffer.h, headers/os/media/BufferConsumer.h, headers/os/media/TimeSource.h

comment:16 Changed 9 years ago by stippi

Description: modified (diff)

comment:17 Changed 9 years ago by stippi

Description: modified (diff)

comment:18 Changed 9 years ago by stippi

Description: modified (diff)

comment:19 Changed 9 years ago by stippi

Description: modified (diff)

comment:20 Changed 9 years ago by stippi

Description: modified (diff)

comment:21 Changed 9 years ago by stippi

Description: modified (diff)

comment:22 Changed 9 years ago by axeld

Description: modified (diff)

Translation Kit headers done.

comment:23 Changed 9 years ago by stippi

Description: modified (diff)

Going after more of the MediaKit headers from top to bottom...

comment:24 Changed 9 years ago by stippi

Description: modified (diff)

comment:25 Changed 9 years ago by stippi

Description: modified (diff)

comment:26 Changed 9 years ago by stippi

Description: modified (diff)

Last of the MediaKit headers rewritten. I am going to let it rest for a while. Help greatly appreciated, it's not rocket since.

comment:27 Changed 9 years ago by jackburton

Description: modified (diff)

I'm taking care of the device headers.

comment:28 Changed 9 years ago by jackburton

Description: modified (diff)

comment:29 Changed 9 years ago by jackburton

Do we really need to keep NetPositive.h ? I don't think we implement this functionality anywhere.

comment:30 Changed 9 years ago by jackburton

Description: modified (diff)

comment:31 Changed 9 years ago by axeld

I guess mmu_man wouldn't like if he couldn't build BeHappy anymore. But I wouldn't mind to remove it, and have this (rewritten) header as part of NetSurf instead (since it seems to adhere to this interface, AFAIK).

Embedding HTML in applications won't work via replicants in the future, but a BHTMLView, anyway.

comment:32 Changed 9 years ago by axeld

Description: modified (diff)

Did bus_manager.h, and USB_printer.h.

comment:33 Changed 9 years ago by axeld

Description: modified (diff)

Rewrote USB_rle.h, USB_spec.h, and midi_driver.h in hrev32901. I won't have the time to rewrite any other headers before the alpha release.

comment:34 Changed 9 years ago by jackburton

Description: modified (diff)

comment:35 Changed 9 years ago by jarz

Cc: tim.jarzombek@… added

I've attached a patch for this ticket. I'm still in the process of getting Haiku built so I haven't been able to test it yet. I doubt my changes were substantial enough to cause problems.

comment:36 Changed 9 years ago by stippi

Hi jarz, thanks for the patch. I've skimmed over it and spotted you changed some "ulong" defines to "uint64". But ulong is equivalent to uint32, so these changes definitely break things.

Changed 9 years ago by jarz

Attachment: 1576.patch added

Tested patch

comment:37 Changed 9 years ago by jarz

Thanks for the feedback stippi. I've been working on a project where ulong == uint64; I suppose I was on autopilot when I made those changes. I also used checkstyle this time and corrected the style errors it noted.

This patch successfully built against hrev35971.

comment:38 Changed 8 years ago by mmadia

Has a Patch: set

comment:39 Changed 8 years ago by Disreali

Version: R1/pre-alpha1R1/Development

ping

comment:40 Changed 7 years ago by stippi

Applied in hrev42958, sorry for the long delay! I've put the "#idfef cplusplus"s back in. The PCI.h patch needed to be applied back on top, which I've done by creating a patch from the current version of PCI.h to the revision that the patch was based on (ahm, the other way around) and applying the resulting patch on top of the file after applying the patch from this ticket to the old version. Hopyfully no screw ups.

comment:41 Changed 7 years ago by stippi

... and reverted again for PCI.h and ISA.h which can't have been tested. The change of the types causes compiler errors in other Haiku modules, because signaturs of functions don't match anymore.

comment:42 Changed 7 years ago by stippi

Description: modified (diff)

comment:43 Changed 6 years ago by nielx

Has a Patch: unset

comment:44 Changed 6 years ago by nielx

Obsoleted patch. See comment:41

comment:45 Changed 6 years ago by nielx

Owner: set to nobody
Status: newassigned

comment:46 Changed 4 years ago by pulkomandy

I was comparing our Game Kit headers with BeOS last week and I found that some have MIT License and Haiku copyright, yet they are identical to the BeOS one down to the comments and TODOs. So it looks like there was some "cheating" in this rewriting effort. We may want to review them all one last time before we close this ticket...

comment:47 in reply to:  46 Changed 23 months ago by korli

Replying to pulkomandy:

I was comparing our Game Kit headers with BeOS last week and I found that some have MIT License and Haiku copyright, yet they are identical to the BeOS one down to the comments and TODOs. So it looks like there was some "cheating" in this rewriting effort. We may want to review them all one last time before we close this ticket...

Is it only headers/os/game/WindowScreen.h? Couldn't find any other.

comment:48 Changed 23 months ago by pulkomandy

You can trace it easily from the commit logs:

Headers introduced in http://cgit.haiku-os.org/haiku/commit/headers/os/game?id=52a380120846174213ccce9c4aab0dda17c72083 (initial svn import) and http://cgit.haiku-os.org/haiku/commit/headers/os/game?id=4c2bc7e83c660cbc266d50f3d924115268912656 are copied from BeOS.

In http://cgit.haiku-os.org/haiku/commit/headers/os/game?id=4703fb5d8562169f672b3efe5203f1eb4d9ceb4a, you can see the licence changing for some of them, without any changes to the file contents.

Most of them were then edited over the years, I don't know at which point we can consider them a "rewrite".

comment:49 in reply to:  48 Changed 23 months ago by korli

Description: modified (diff)

Replying to pulkomandy:

Most of them were then edited over the years, I don't know at which point we can consider them a "rewrite".

Well here is the list then: headers/os/game/DirectWindow.h headers/os/game/FileGameSound.h headers/os/game/GameSound.h headers/os/game/GameSoundDefs.h headers/os/game/PushGameSound.h headers/os/game/SimpleGameSound.h headers/os/game/StreamingGameSound.h headers/os/game/WindowScreen.h

headers/os/game/*Sound* were indeed derived from BeOS R5 headers.

Note: See TracTickets for help on using tickets.