Opened 17 years ago

Last modified 4 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:
Blocked By: Blocking:
Platform: All

Description (last modified by pulkomandy)

Some headers were copied from BeOS, ignoring the license which doesn't allow that. We should rewrite them instead.

Here is a list:

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

Attachments (1)

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

Download all attachments as: .zip

Change History (53)

comment:1 by korli, 17 years ago

Description: modified (diff)

comment:2 by axeld, 17 years ago

Owner: axeld removed
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 by jackburton, 17 years ago

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

comment:4 by korli, 17 years ago

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 by jackburton, 17 years ago

Description: modified (diff)

comment:6 by jackburton, 17 years ago

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.

in reply to:  6 comment:7 by bonefish, 17 years ago

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 by jackburton, 17 years ago

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 by jackburton, 17 years ago

Description: modified (diff)

comment:10 by jackburton, 17 years ago

Description: modified (diff)

Input.h done.

comment:11 by jackburton, 17 years ago

Description: modified (diff)

TextView.h was rewritten in hrev22688 by Vasilis Kaoutsis.

comment:12 by stippi, 17 years ago

Description: modified (diff)

comment:13 by julun, 17 years ago

PrintJob.h done in hrev24684

comment:14 by korli, 15 years ago

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 by jackburton, 15 years ago

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 by stippi, 15 years ago

Description: modified (diff)

comment:17 by stippi, 15 years ago

Description: modified (diff)

comment:18 by stippi, 15 years ago

Description: modified (diff)

comment:19 by stippi, 15 years ago

Description: modified (diff)

comment:20 by stippi, 15 years ago

Description: modified (diff)

comment:21 by stippi, 15 years ago

Description: modified (diff)

comment:22 by axeld, 15 years ago

Description: modified (diff)

Translation Kit headers done.

comment:23 by stippi, 15 years ago

Description: modified (diff)

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

comment:24 by stippi, 15 years ago

Description: modified (diff)

comment:25 by stippi, 15 years ago

Description: modified (diff)

comment:26 by stippi, 15 years ago

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 by jackburton, 15 years ago

Description: modified (diff)

I'm taking care of the device headers.

comment:28 by jackburton, 15 years ago

Description: modified (diff)

comment:29 by jackburton, 15 years ago

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

comment:30 by jackburton, 15 years ago

Description: modified (diff)

comment:31 by axeld, 15 years ago

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 by axeld, 15 years ago

Description: modified (diff)

Did bus_manager.h, and USB_printer.h.

comment:33 by axeld, 15 years ago

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 by jackburton, 15 years ago

Description: modified (diff)

comment:35 by jarz, 15 years ago

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 by stippi, 15 years ago

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.

by jarz, 15 years ago

Attachment: 1576.patch added

Tested patch

comment:37 by jarz, 15 years ago

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 by mmadia, 15 years ago

patch: 01

comment:39 by Disreali, 14 years ago

Version: R1/pre-alpha1R1/Development

ping

comment:40 by stippi, 13 years ago

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 by stippi, 13 years ago

... 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 by stippi, 13 years ago

Description: modified (diff)

comment:43 by nielx, 12 years ago

patch: 10

comment:44 by nielx, 12 years ago

Obsoleted patch. See comment:41

comment:45 by nielx, 12 years ago

Owner: set to nobody
Status: newassigned

comment:46 by pulkomandy, 10 years ago

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...

in reply to:  46 comment:47 by korli, 8 years ago

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 by pulkomandy, 8 years ago

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".

in reply to:  48 comment:49 by korli, 8 years ago

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.

comment:50 by pulkomandy, 5 years ago

Cc: tim.jarzombek@… removed
Description: modified (diff)

Updated with the work done during GCI 2019 (hrev53701, hrev53754, hrev53766, hrev53767).

comment:51 by bipolar, 16 months ago

headers/os/drivers/ISA.h got rewritten on hrev56920.

Note: See TracTickets for help on using tickets.