Closed Bug 404368 Opened 17 years ago Closed 17 years ago

xulrunner application.ini --version outputs: "(null)" if copyright field is not defined

Categories

(Toolkit Graveyard :: XULRunner, defect)

x86
Linux
defect
Not set
trivial

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.9beta2

People

(Reporter: arno, Assigned: arno)

Details

Attachments

(2 files, 1 obsolete file)

when running xulrunner application.ini --version for an application whose copyright field is not defined outputs (for example):

arno myapp 0.1, (null)

As copyright field is not required (according mozilla/xulrunner/examples/simple/application.ini), it would more aesthetic to simply output:

arno myapp 0.1

if copyright field is not defined.
Attachment #289354 - Attachment mime type: application/octet-stream → text/plain
Attachment #289357 - Flags: review?(benjamin)
Seems like much ado about nothing. If anything, why not just send out an empty (or static) string?

gAppData->vendor ? gAppData->vendor : "", gAppData->name, gAppData->version, gAppData->copyright ? gAppData->copyright : "(no copyright)");

Is it worth any extra code to add this?
while I agree with mark in theory, and with the disclaimer that I am not a lawyer, and if someone who is (or is simply more versed in law wants to correct me in this case, where I may be wrong; please do so).

But omitting a copyright message (as it could be included in application.ini) and stating "(no copyright)" are two _entirely_ different things.

Copyright is intrinsic in most jurisdictions; if you write a line of a program; and don't grant your copyright out under some license (which can include full forfeiture of your copyright) then you inherently are the copyright owner; though it might not be attributed everywhere possible (or practical).

Basically stating "(no copyright)" by default when an optional tag is omitted, imho entails a false sense of "you can do anything you want, under the sun, with this code" which may not be true.

p.s. do see again my disclaimer above
(In reply to comment #3)
> 
> But omitting a copyright message (as it could be included in application.ini)
> and stating "(no copyright)" are two _entirely_ different things.
> 

I am ok with a blank string too.

gAppData->vendor ? gAppData->vendor : "", gAppData->name, gAppData->version,
gAppData->copyright ? gAppData->copyright : "");
Comment on attachment 289357 [details] [diff] [review]
don't write nsnull if copyright is not defined

>Index: nsAppRunner.cpp

I'd prefer either separate statements like so:

printf("%s %s %s", vendor, name, version);

if (gAppData->copyright)
  printf(", %s", copyright);

printf("\n");

or use trigraphs:

printf("%s %s %s%s%s\n", vendor, name, version,
                         copyright ? ", " : "",
                         copyright ? copyright : "");
Attachment #289357 - Flags: review?(benjamin) → review-
Attachment #289357 - Attachment is obsolete: true
Attachment #290282 - Flags: review?(benjamin)
Attachment #290282 - Flags: review?(benjamin) → review+
Attachment #290282 - Flags: approval1.9? → approval1.9+
Keywords: checkin-needed
Version: unspecified → Trunk
Checking in toolkit/xre/nsAppRunner.cpp;
/cvsroot/mozilla/toolkit/xre/nsAppRunner.cpp,v  <--  nsAppRunner.cpp
new revision: 1.199; previous revision: 1.198
done
Status: NEW → RESOLVED
Closed: 17 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9 M10
Product: Toolkit → Toolkit Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: