Compare commits

..

1644 Commits

Author SHA1 Message Date
gagan%netscape.com
92a6946fd0 Fix for 3731. Thanks peterl and bruce@cybersight
git-svn-id: svn://10.0.0.236/branches/N3@24979 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-24 06:56:41 +00:00
gagan%netscape.com
415adf0c07 Move to N3
git-svn-id: svn://10.0.0.236/branches/N3@24772 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-23 01:56:43 +00:00
gagan%netscape.com
8b5c749a4f to N3
git-svn-id: svn://10.0.0.236/branches/N3@24771 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-23 01:54:03 +00:00
gagan%netscape.com
a9c4bd2999 N3
git-svn-id: svn://10.0.0.236/branches/N3@24768 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-23 01:51:34 +00:00
gagan%netscape.com
f48dde1d23 All changes in N3
git-svn-id: svn://10.0.0.236/branches/N3@24764 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-23 01:37:12 +00:00
(no author)
28e0fd2310 This commit was manufactured by cvs2svn to create branch 'N3'.
git-svn-id: svn://10.0.0.236/branches/N3@24735 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-22 23:46:38 +00:00
briano%netscape.com
2c87e9db78 Automated update
git-svn-id: svn://10.0.0.236/trunk@24277 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-17 21:32:40 +00:00
leaf%mozilla.org
8fadf11677 Landing nspr library name change, and plevent function call change.
git-svn-id: svn://10.0.0.236/trunk@24276 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-17 21:32:03 +00:00
wtc%netscape.com
cdec214c4c NSPR library name change (libnspr21 ==> libnspr3) and
plevent.c.


git-svn-id: svn://10.0.0.236/trunk@24273 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-17 21:25:08 +00:00
buster%netscape.com
3ee55b4626 split and join now properly remember which content gets deleted, and which content remains in the tree
split and join now properly set selection to the remaining node, at the proper offset.
fixes bugs 3910 3881, with approval from chofmann


git-svn-id: svn://10.0.0.236/trunk@24272 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-17 20:56:10 +00:00
hshaw%netscape.com
9748f5857f Backout M3 Bug #1542 changes (to go on branch) mkgeturl.h mkgeturl.c nsNetService.cpp
git-svn-id: svn://10.0.0.236/trunk@24269 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-17 20:21:31 +00:00
terry%netscape.com
23d378e5e4 NSCP is no more.
Horrible hack to have it look at Grendel tinderbox if the bot's name
contains "grend".


git-svn-id: svn://10.0.0.236/trunk@24268 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-17 19:36:11 +00:00
hshaw%netscape.com
e0b10672b7 Timebomb workaround for static initialization of netlib, M3 Bug #1542
git-svn-id: svn://10.0.0.236/trunk@24267 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-17 19:25:22 +00:00
kipp%netscape.com
f81ad77137 Fixed bug #3905 - frame construction code wasn't dealing with tables properly when they were floated; reviewed by vidur for M3 checkin
git-svn-id: svn://10.0.0.236/trunk@24263 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-17 18:17:24 +00:00
pinkerton%netscape.com
7bc3b61b2a Fix bug #3792 by checking for null parent (for rods).
git-svn-id: svn://10.0.0.236/trunk@24262 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-17 17:46:14 +00:00
pierre%netscape.com
f622d92db0 Fixed a crash on "File | Print Setup" (or any other dialog without specific menubar) #3769. Approved: chofmann.
git-svn-id: svn://10.0.0.236/trunk@24260 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-17 07:17:19 +00:00
morse%netscape.com
23de1187d2 added work-around for a blocking wallet bug
git-svn-id: svn://10.0.0.236/trunk@24258 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-17 06:27:54 +00:00
morse%netscape.com
fdcafd63cf add prefs for wallet
git-svn-id: svn://10.0.0.236/trunk@24257 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-17 06:24:58 +00:00
morse%netscape.com
31a0360290 obscure saved data, skip doing prompts by default
git-svn-id: svn://10.0.0.236/trunk@24256 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-17 06:23:16 +00:00
morse%netscape.com
cdff63a1d7 fix crash, obscure saved data, skip doing prompts by default
git-svn-id: svn://10.0.0.236/trunk@24255 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-17 06:22:18 +00:00
buster%netscape.com
041f73c845 I fixed the content twiddling part of bug 3778. Mike has a fix for the display part of it in his tree, but determined the risk didn't
justify the benefit.  This is partly true because he and I would have had to integrate tonight before checking in, which we thought
presented some additional risk.  In any event, this bug is fixed for all cases except when the user hits enter at the end of the
document.  That is the only case in text editing when the selection will not render correctly.

Some related problems got fixed as a side benefit of my code changes.  I filed bug 3896.


git-svn-id: svn://10.0.0.236/trunk@24254 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-17 06:13:46 +00:00
evaughan%netscape.com
33068a82b2 Checkin is for bug #3853
Approved by don, hyatt


git-svn-id: svn://10.0.0.236/trunk@24253 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-17 06:07:07 +00:00
law%netscape.com
c10d5ccabc (partial) fix for bug #3853; reviewed by hyatt; approved by don/sar;
git-svn-id: svn://10.0.0.236/trunk@24252 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-17 05:57:10 +00:00
davidm%netscape.com
c53b7fb0fc Wll eventually provide support for NetLib dialogs. Currently is not being built on any platforms but Don wants me to check in tonight.
git-svn-id: svn://10.0.0.236/trunk@24250 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-17 03:25:53 +00:00
davidm%netscape.com
09d9b03dd2 First Checked In.
git-svn-id: svn://10.0.0.236/trunk@24249 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-17 03:24:35 +00:00
sfraser%netscape.com
4f17752b01 Turn on traceback tables in the optimized build, so that MacsBug logs from dogfood are useful. Bug 3888, approved chofmann.
git-svn-id: svn://10.0.0.236/trunk@24248 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-17 03:18:24 +00:00
saari%netscape.com
47f05203de Fixing Bug #3808 - Bookmark menu doesn't work on MacOS
git-svn-id: svn://10.0.0.236/trunk@24247 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-17 03:03:58 +00:00
akkana%netscape.com
69ccd59466 3855: Back out hyatt's change of the toolbar width -- it made the stop button wrap to the next line on linux. Approved by chofmann
git-svn-id: svn://10.0.0.236/trunk@24246 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-17 01:57:33 +00:00
cata%netscape.com
9b7cdbfe7d Fix bug 3862. Reviewed by ftang. Fallback character bellow 0x20.
git-svn-id: svn://10.0.0.236/trunk@24245 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-17 01:47:39 +00:00
pollmann%netscape.com
ef622fe89e Opps, typo - bug #3619 A: chofmann R: harishd
git-svn-id: svn://10.0.0.236/trunk@24244 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-17 01:41:52 +00:00
gagan%netscape.com
3593ed3580 Calling parse on SetSpec to correctly reflect the changes. Partial fix for #3413.
git-svn-id: svn://10.0.0.236/trunk@24243 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-17 01:39:20 +00:00
ftang%netscape.com
416657c6bd move the ucvja2 into componment directory so autoreg will work. we should move other intl dll there after dogfood. reviwed by dp. fix bug 3866
git-svn-id: svn://10.0.0.236/trunk@24240 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-17 01:22:06 +00:00
kmcclusk%netscape.com
92e6b22228 Approved by Chris Hofmann.
Patch for #bug #2226. This patch modifies the nsBrowserWindow to call SetDisplayDirectory
to set the default directory when using the viewer's file open dialog.


git-svn-id: svn://10.0.0.236/trunk@24239 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-17 00:45:33 +00:00
kmcclusk%netscape.com
6d6336fbd0 Approved by Chris Hofmann.
Patch for M3 bug #2226. [PATCH] File->Open dialog does not 'remember' browsing directory.
The patch fixes WIN32. It also defines member variables and functions for Mac and Unix to keep tinderbox building.
Mac and Unix need implementations which honor the SetDisplayDirectory method so that the browsing directory is actually set.


git-svn-id: svn://10.0.0.236/trunk@24238 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-17 00:35:37 +00:00
law%netscape.com
947ef0572f Fix for M3 bug #3803; approved by chofmann/don
git-svn-id: svn://10.0.0.236/trunk@24237 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-17 00:33:25 +00:00
pnunn%netscape.com
df399ccfeb Fix for bugz#3858. View-images were decoding twice. M3, pnunn@netscape.com
Reviewed by kipp@netscape.com.


git-svn-id: svn://10.0.0.236/trunk@24236 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-17 00:13:31 +00:00
karnaze%netscape.com
03d63f15c6 bug 1725
git-svn-id: svn://10.0.0.236/trunk@24235 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-16 23:42:38 +00:00
mscott%netscape.com
252952f232 Temporary work around for Bug #3790. Layout is having trouble with scrolling when the iframe has a height expressed in terms of a percent. So we are going to hard code the height of the message pane. This allows folks to scroll through their messages instead of seeing only the first few lines. I just tweaked the xul file to replace the 100% height with a fixed value.
a=chofmann


git-svn-id: svn://10.0.0.236/trunk@24234 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-16 23:30:57 +00:00
slamm%netscape.com
23baadeb99 Fix for http://bugzilla.mozilla.org/show_bug.cgi?id=3699. Renamed tree array to trees. Added 'var' for local variables.
git-svn-id: svn://10.0.0.236/trunk@24233 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-16 23:30:16 +00:00
kin%netscape.com
f156b21405 Fix for bug #3758: Drag selecting entire content, then deleting, causes crash.
Added check for mContentLength <= 0 to TextFrame::GetPointFromOffset().
Reviewed by jfrancis@netscape.com and sfraser@netscape.com.
Approved by chofmann@netscape.com.


git-svn-id: svn://10.0.0.236/trunk@24232 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-16 22:55:49 +00:00
peterl%netscape.com
05c92ee1ad Fixed table background inheritance, bug #1355
Checkin approved by chofmann


git-svn-id: svn://10.0.0.236/trunk@24231 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-16 22:33:29 +00:00
hshaw%netscape.com
80ecb45eff Let libpref decide which file to load by default, M3 bug #2343 #3598
git-svn-id: svn://10.0.0.236/trunk@24230 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-16 22:07:50 +00:00
hshaw%netscape.com
4c5667fdce Changes to call Startup() from main() so we don't have thread problems in javascript
git-svn-id: svn://10.0.0.236/trunk@24228 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-16 22:03:03 +00:00
matt%netscape.com
e1b46e5eb8 disabling the print button in the menu bar
git-svn-id: svn://10.0.0.236/trunk@24227 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-16 21:40:10 +00:00
matt%netscape.com
489dbd7ad7 changing www.bugsplat.org to bugsplat.mozilla.org in the toolbar
git-svn-id: svn://10.0.0.236/trunk@24226 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-16 21:39:06 +00:00
akkana%netscape.com
3dc262cd31 Bug 3829: don't generate key events for modifier keys. Fix courtesy of Pavlov, Approved chofmann and kostello
git-svn-id: svn://10.0.0.236/trunk@24225 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-16 20:45:17 +00:00
chuckb%netscape.com
6507681cbc Fix for http://bugzilla.mozilla.org/show_bug.cgi?id=3231 Thanks to lentz@process.com
git-svn-id: svn://10.0.0.236/trunk@24221 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-16 20:14:19 +00:00
chuckb%netscape.com
eba3cc88f9 Merge from NSCP repository (prior to rsync)
git-svn-id: svn://10.0.0.236/trunk@24219 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-16 19:57:34 +00:00
kipp%netscape.com
035bc47fe1 Don't dereference a null pointer when print previewing
git-svn-id: svn://10.0.0.236/trunk@24218 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-16 19:37:12 +00:00
kipp%netscape.com
b3b4b4cbe6 Only set ends-in-newline flag for pre text (bug #3262)
git-svn-id: svn://10.0.0.236/trunk@24217 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-16 19:36:49 +00:00
kipp%netscape.com
15f605def7 Handle removable of continued frames better (not 100% done) (bug #3262)
git-svn-id: svn://10.0.0.236/trunk@24216 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-16 19:36:24 +00:00
kipp%netscape.com
99c54cef53 Fixed numerous frame removed bugs (bug #3262)
git-svn-id: svn://10.0.0.236/trunk@24215 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-16 19:36:00 +00:00
mcmullen%netscape.com
0e8563520b Fixes for bugs #3779,#2784. Member initialization of nsFileURL for windows compiler, escaping of url when made from path or spec, add file:// on macintosh when making a url from a spec. [bugs introduced when, for dp, I changed nsFilePath not to escape]. a=chofmann.
git-svn-id: svn://10.0.0.236/trunk@24214 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-16 19:12:51 +00:00
hshaw%netscape.com
7236a2582a To reduce confusion, read 'Netscape Preferences' for Mac, M3 bug #2343, approved dp
git-svn-id: svn://10.0.0.236/trunk@24213 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-16 18:31:40 +00:00
terry%netscape.com
afbf0febc8 Fixed typo in comment.
git-svn-id: svn://10.0.0.236/trunk@24212 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-16 18:29:45 +00:00
kin%netscape.com
e10b10c490 Fix for bug #3786: Undo/Redo icons broken in Editor test bed. Approved by chofmann.
git-svn-id: svn://10.0.0.236/trunk@24211 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-16 18:24:37 +00:00
hshaw%netscape.com
c6b6bb0e47 To reduce confusion, read preferences.js for UNIX, prefs.js for Win/Mac, M3 bug #2343, approved dp
git-svn-id: svn://10.0.0.236/trunk@24210 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-16 17:59:11 +00:00
buster%netscape.com
8851e742d6 fixed join.
made a special case for typing with BR as the selection (as after an InsertBreak.)
made DEL and BACKSPACE at the beginning and end of a text node
fixes bugs 3742 and 3756 (with permission from choff and gkostello)


git-svn-id: svn://10.0.0.236/trunk@24209 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-16 16:38:09 +00:00
gagan%netscape.com
540707af8e Fix for 3776.
git-svn-id: svn://10.0.0.236/trunk@24208 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-16 07:46:57 +00:00
gagan%netscape.com
a7bed3561d Fix for 1742. There is a bigger bug hiding behind this one... its about file:// urls. It needs to be revisited later.
git-svn-id: svn://10.0.0.236/trunk@24207 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-16 07:45:16 +00:00
rpotts%netscape.com
7bbc87b3d0 fix for bug #2343 - Preferences are not initialized in the apprunner...
git-svn-id: svn://10.0.0.236/trunk@24206 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-16 07:25:43 +00:00
rpotts%netscape.com
5dcafd7b80 fix for bug #2343 - Preferences are not initialized in the apprunner...
git-svn-id: svn://10.0.0.236/trunk@24205 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-16 07:15:37 +00:00
rickg%netscape.com
6aa4a20063 removed warnings and partially fixed M3
git-svn-id: svn://10.0.0.236/trunk@24204 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-16 07:06:48 +00:00
rpotts%netscape.com
36e5062afc Fixed build bustage... nsIWalletService.h was not being found because dist\public\walletlib was missing from the LINCS...
git-svn-id: svn://10.0.0.236/trunk@24202 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-16 06:08:18 +00:00
bienvenu%netscape.com
63ee355daa fix 3765 r=mscott,scottip a=chofmann problem updating thread pane after get new mail
git-svn-id: svn://10.0.0.236/trunk@24201 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-16 03:16:31 +00:00
despotdaemon%netscape.com
e0fe0f92a2 Pseudo-automatic update of changes made by dmose@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@24200 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-16 02:55:44 +00:00
pavlov%pavlov.net
38641f5c48 fix for #2513. r=mcafee@netscape.com, a=don@netscape.com
git-svn-id: svn://10.0.0.236/trunk@24199 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-16 02:19:52 +00:00
dp%netscape.com
71be445c74 Moving appcores.dll from bin/components/ to bin/ since mailnews links with it
git-svn-id: svn://10.0.0.236/trunk@24197 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-16 01:41:33 +00:00
dp%netscape.com
b57de82436 Moving appcores.dll from bin/components/ to bin/ since mailnews links with it
git-svn-id: svn://10.0.0.236/trunk@24196 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-16 01:34:22 +00:00
dp%netscape.com
33606ad65b Forcing xpcom registry recreation after moving appcores.dll from bin/components to bin/ since mailnew links with it
git-svn-id: svn://10.0.0.236/trunk@24195 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-16 01:33:46 +00:00
hyatt%netscape.com
6dda978028 As per German's request, moving the Wallet menu underneath the
Edit menu.


git-svn-id: svn://10.0.0.236/trunk@24194 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-16 01:17:30 +00:00
nhotta%netscape.com
2f28121e41 Change to generate a meta-tag for i18n mail testing, for the dogfood only (and windows only), reviwed by rhp, approved by chofmann.
git-svn-id: svn://10.0.0.236/trunk@24193 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-16 00:52:37 +00:00
hyatt%netscape.com
84a6776999 Changing some errors in the XUL file and moving the URL bar to be vertically
centered.

Also making a change requested by German... moving the new task bar underneath
the status area.


git-svn-id: svn://10.0.0.236/trunk@24192 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-16 00:40:49 +00:00
mjudge%netscape.com
598cd8d192 I am "unfixing" something. This was something I introduced to prevent an M3 bug with a hack, it is not necessary anymore. reviewd by sfrasier. several people have verified this.
git-svn-id: svn://10.0.0.236/trunk@24191 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-16 00:08:38 +00:00
saari%netscape.com
d329e297fb Fixing bug #3743 - Hierarchical menus display wrong info on MacOS
git-svn-id: svn://10.0.0.236/trunk@24188 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-16 00:00:39 +00:00
joki%netscape.com
4aff2a13e3 Fix for bug 3553, links on Linux
git-svn-id: svn://10.0.0.236/trunk@24187 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-15 23:44:15 +00:00
danm%netscape.com
780878cdde Moving release of nsWindow object up from its Destroy method to its caller, nsMacEventHandler. This is a better remainder of a fix for bug 3676. r:saari a:chofmann.
git-svn-id: svn://10.0.0.236/trunk@24186 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-15 23:40:42 +00:00
alecf%netscape.com
e580b04cc9 fix for #3755 - bring up messenger from Tools->Messenger by opening a new
window with the messenger XUL file.


git-svn-id: svn://10.0.0.236/trunk@24185 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-15 23:31:09 +00:00
mjudge%netscape.com
d86bbf4046 M3 bug reviewed by joe francis. simply adding 0 initiializers to variables
git-svn-id: svn://10.0.0.236/trunk@24184 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-15 23:08:27 +00:00
jfrancis%netscape.com
da1fc8ea13 fixed 3632 - selection turds after delete.
fixed 3751 - resizing page with selected image crashes.

reviewed mjudge and kin.  checkin approval chofmann.


git-svn-id: svn://10.0.0.236/trunk@24183 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-15 22:52:06 +00:00
cyeh%netscape.com
a303b2a42b added loop command line option to control the number of times it cycles
on a url.txt file. default is 100 times.


git-svn-id: svn://10.0.0.236/trunk@24182 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-15 22:46:46 +00:00
putterman%netscape.com
b61167ad7b can now change folder root. Reviewed by waterson and approved by chofmann
git-svn-id: svn://10.0.0.236/trunk@24181 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-15 22:33:09 +00:00
bienvenu%netscape.com
70142237f5 fix 3754 assert deleting a mail message r=davidmc, a=chofmann
git-svn-id: svn://10.0.0.236/trunk@24180 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-15 21:46:11 +00:00
hshaw%netscape.com
6c9b13a66e use default prefs.js if someone cause PREF_ API before initializing it
git-svn-id: svn://10.0.0.236/trunk@24179 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-15 21:38:06 +00:00
ramiro%netscape.com
f4cf6c562b Fix bugs 3653, 3652 and 3566. Leaking timers.
Thanks to Tomi Leppikangas <Tomi.Leppikangas@oulu.fi> for providing the
fix and Bruce Mitchener <bruce@cybersight.com> for purifying it.


git-svn-id: svn://10.0.0.236/trunk@24178 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-15 21:23:49 +00:00
evaughan%netscape.com
c332730afc Fixed align bug.
git-svn-id: svn://10.0.0.236/trunk@24177 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-15 21:22:49 +00:00
hyatt%netscape.com
814f8171fa Fixing the personal toolbar. Someone had a duplicate ID in there.
git-svn-id: svn://10.0.0.236/trunk@24176 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-15 21:06:24 +00:00
law%netscape.com
5908a31379 Corrected 'typo' in text for Home button; approved by chofmann/don
git-svn-id: svn://10.0.0.236/trunk@24175 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-15 20:53:24 +00:00
cyeh%netscape.com
9bf229dc0d fix -f command line option so that it actually works.
git-svn-id: svn://10.0.0.236/trunk@24174 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-15 19:33:13 +00:00
kostello%netscape.com
e0259c902d Fix build bustage. Move entity code to nsHTMLContentSinkStream until
this can be correctly addressed.


git-svn-id: svn://10.0.0.236/trunk@24173 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-15 19:19:01 +00:00
hyatt%netscape.com
0fc62f3ccf Removing the "About" menu and placing the link to Release Notes under
the "Help" menu instead.  Approved by chofmann.


git-svn-id: svn://10.0.0.236/trunk@24171 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-15 19:01:22 +00:00
slamm%netscape.com
313e26b262 Use one name for .mozconfig
git-svn-id: svn://10.0.0.236/trunk@24170 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-15 17:49:25 +00:00
rickg%netscape.com
a78f2703db two tiny fixes that have been sitting around awhile
git-svn-id: svn://10.0.0.236/trunk@24169 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-15 08:38:41 +00:00
bienvenu%netscape.com
de8a697e56 fix problem in reply all
git-svn-id: svn://10.0.0.236/trunk@24168 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-15 07:43:14 +00:00
hshaw%netscape.com
a8d2897d6f load up default pref file, more detailed version requires mac project file changes
git-svn-id: svn://10.0.0.236/trunk@24167 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-15 06:12:17 +00:00
mccabe%netscape.com
9062024e28 Another reworking of the loader -
- added a forward declaration of nsIInterfaceInfoManager to xptinfo.h

- reworked and cleaned up most aspects of the loader; typelib files now get associated typelib records, which have arrays of pointers to shared interface records; no hashtable lookup is necessary to resolve index pointers from params, etc to nsInterfaceInfo objects.

- moved to two hashtables in nsInterfaceInfoManager, mapping from name->interface record and iid->interface record.  Still unclear if I handle the different-iid, same-name case correctly.


git-svn-id: svn://10.0.0.236/trunk@24166 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-15 05:50:11 +00:00
hyatt%netscape.com
f41ac2bd41 Changes to fix the bookmarks menu crashing problem.
git-svn-id: svn://10.0.0.236/trunk@24165 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-15 05:39:04 +00:00
hyatt%netscape.com
e9895b0fef Changes to fix the Bookmarks menu crashing problem.
git-svn-id: svn://10.0.0.236/trunk@24164 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-15 05:36:13 +00:00
kostello%netscape.com
a1d937336a Added implementation for nsIHTMLContentSink::DoFragment()
git-svn-id: svn://10.0.0.236/trunk@24163 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-15 05:11:43 +00:00
kostello%netscape.com
b795dfd74a Add support to encode selection informaton
git-svn-id: svn://10.0.0.236/trunk@24162 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-15 05:10:03 +00:00
kostello%netscape.com
212c5568d0 Added nsIHTMLContentSink::DoFragment() method.
Added support for conversion of HTML entities in output


git-svn-id: svn://10.0.0.236/trunk@24161 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-15 05:08:36 +00:00
buster%netscape.com
506d9a9565 added WillUndo, DidUndo, WillRedo, DidRedo and some supporting code so
the text edit rule object can maintain it's own state more efficiently and correctly.


git-svn-id: svn://10.0.0.236/trunk@24160 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-15 05:08:30 +00:00
kostello%netscape.com
8ed917b8c2 Add support to get a SelectiomManager if non exists.
Waiting for Repository work


git-svn-id: svn://10.0.0.236/trunk@24159 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-15 05:06:52 +00:00
buster%netscape.com
099c42d8d3 small bug fix in Collapse. If the range array has 0 children, the selection should be considered collapsed.
git-svn-id: svn://10.0.0.236/trunk@24158 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-15 05:04:34 +00:00
sdagley%netscape.com
b25a5bd57a Had to temporarily back out danm's Release() hack from v1.95 as it causes a crash trying to load a new URL. While the hack did fix the problem with not being able to close the bookmark window my feeling is the crash is the less desirable behavior.
git-svn-id: svn://10.0.0.236/trunk@24157 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-15 03:18:05 +00:00
pavlov%pavlov.net
ca80f65092 fix another memory leak.
git-svn-id: svn://10.0.0.236/trunk@24156 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-15 03:03:49 +00:00
edwin%woudt.nl
1e9c573bb0 More addressbook patches from Mauro Botelho.
1. Now we are saving new entries to a file named aBook.nab
2. Sort ascending and descending are working now.


git-svn-id: svn://10.0.0.236/trunk@24155 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-15 01:59:26 +00:00
bienvenu%netscape.com
0d98b2a9fd latest mork drop, fix commit code
git-svn-id: svn://10.0.0.236/trunk@24154 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-15 01:32:31 +00:00
briano%netscape.com
5090bfc5fc Automated update
git-svn-id: svn://10.0.0.236/trunk@24153 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-15 01:00:41 +00:00
buster%netscape.com
518e2bdc59 added files: mozilla/editor/base/PlaceholderTxn.cpp
git-svn-id: svn://10.0.0.236/trunk@24152 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-15 00:58:15 +00:00
buster%netscape.com
ef5f3265cc added PlaceholderTxn. This is an aggregate transaction that sits on the undo stack
and merges in subsequent transactions indiscriminately until it's told to stop.
It also gives the last transaction in its child list a chance to merge the
next transaction.
All this is in support of complex transactions that result in text insertion
being able to collapse into a single undoable event.
Also improved tracking of bogus content node used when document is empty.


git-svn-id: svn://10.0.0.236/trunk@24151 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-15 00:57:32 +00:00
pavlov%pavlov.net
a5b07e4bf2 attempt to see what tinderbox machines don't have gtk 1.2 on them... will
revert this in a minute.


git-svn-id: svn://10.0.0.236/trunk@24150 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-15 00:47:55 +00:00
morse%netscape.com
12c434488f add wallet samples
git-svn-id: svn://10.0.0.236/trunk@24149 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-15 00:46:22 +00:00
morse%netscape.com
29a296322d get tables from server
git-svn-id: svn://10.0.0.236/trunk@24148 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-15 00:42:33 +00:00
pavlov%pavlov.net
ee9477a22a fix another mem leak.
git-svn-id: svn://10.0.0.236/trunk@24147 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-14 23:57:26 +00:00
pavlov%pavlov.net
5bad3fe9c7 fix mem leak for real this time.
git-svn-id: svn://10.0.0.236/trunk@24146 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-14 23:15:35 +00:00
pavlov%pavlov.net
78bde97ca5 fix mem leaks.
git-svn-id: svn://10.0.0.236/trunk@24145 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-14 23:14:35 +00:00
pavlov%pavlov.net
093fc1914e minor cleanups.
git-svn-id: svn://10.0.0.236/trunk@24144 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-14 23:03:34 +00:00
bienvenu%netscape.com
403c89404d add comma separator between addresses, remove null byte in msg hdr yarn
git-svn-id: svn://10.0.0.236/trunk@24143 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-14 23:00:31 +00:00
beard%netscape.com
72b38afe7f added extensions
git-svn-id: svn://10.0.0.236/trunk@24142 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-14 22:52:39 +00:00
beard%netscape.com
4da1e46179 always create console in a new window
git-svn-id: svn://10.0.0.236/trunk@24141 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-14 22:52:18 +00:00
beard%netscape.com
d4708408bc fixed crashing bug when frames are destroyed
git-svn-id: svn://10.0.0.236/trunk@24140 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-14 22:51:41 +00:00
jefft%netscape.com
8be650186c more reply/forward message support
git-svn-id: svn://10.0.0.236/trunk@24139 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-14 21:01:36 +00:00
jefft%netscape.com
4a7fcc684f more reply/forward message implementation
git-svn-id: svn://10.0.0.236/trunk@24138 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-14 21:00:30 +00:00
saari%netscape.com
08874e6586 Fixing bug #3674 and #3679
git-svn-id: svn://10.0.0.236/trunk@24137 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-14 20:59:10 +00:00
jefft%netscape.com
f00cddec76 rename GetMessageHeader to GetRDFResourceForMessage
git-svn-id: svn://10.0.0.236/trunk@24136 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-14 20:58:58 +00:00
beard%netscape.com
f3f0f9e4c5 added CreatePluginInstance.
git-svn-id: svn://10.0.0.236/trunk@24135 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-14 20:26:29 +00:00
beard%netscape.com
f2113a9ff2 calling CreatePluginInstance instead of CreateInstance, so MIME type is available early.
git-svn-id: svn://10.0.0.236/trunk@24134 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-14 20:09:57 +00:00
beard%netscape.com
ec20be3608 added CreatePluginInstance, to create a plugin instance with a specified MIME type.
git-svn-id: svn://10.0.0.236/trunk@24133 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-14 20:09:12 +00:00
beard%netscape.com
bacd108673 First Checked In.
git-svn-id: svn://10.0.0.236/trunk@24132 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-14 20:07:46 +00:00
beard%netscape.com
0421e358e6 EmbeddedFrame
git-svn-id: svn://10.0.0.236/trunk@24131 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-14 20:06:59 +00:00
beard%netscape.com
b795a5140e added CreatePluginInstance
git-svn-id: svn://10.0.0.236/trunk@24130 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-14 20:06:41 +00:00
beard%netscape.com
0c9fa70221 Added CreatePluginInstance method.
git-svn-id: svn://10.0.0.236/trunk@24129 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-14 20:06:22 +00:00
beard%netscape.com
fdb6b83f16 added additional MIME type, "application/x-java-frame"
git-svn-id: svn://10.0.0.236/trunk@24128 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-14 20:05:51 +00:00
beard%netscape.com
151dfaca36 private SupportsMixin
git-svn-id: svn://10.0.0.236/trunk@24127 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-14 20:05:14 +00:00
beard%netscape.com
5c47386cb3 Added JSEvaluator.cpp, EmbeddedFrame.cpp, EmbeddedFramePluginInstance.cpp.
git-svn-id: svn://10.0.0.236/trunk@24126 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-14 20:04:48 +00:00
morse%netscape.com
9b065263e5 make wallet editor accessible outside of firewall
git-svn-id: svn://10.0.0.236/trunk@24125 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-14 19:50:49 +00:00
morse%netscape.com
55720e3d53 cleanup use of url-specific field-to-schema mapping
git-svn-id: svn://10.0.0.236/trunk@24124 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-14 19:02:38 +00:00
pavlov%pavlov.net
3b8b73438e fix bug #3721
git-svn-id: svn://10.0.0.236/trunk@24123 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-14 18:50:04 +00:00
locka%iol.ie
56919abb99 Made changes for IE DOM support
git-svn-id: svn://10.0.0.236/trunk@24122 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-14 18:29:21 +00:00
locka%iol.ie
f8a294feaf Added basic IE element implementations
git-svn-id: svn://10.0.0.236/trunk@24121 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-14 18:26:58 +00:00
pavlov%pavlov.net
1b8af08f0f fix another memory leak.
git-svn-id: svn://10.0.0.236/trunk@24120 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-14 18:12:23 +00:00
pavlov%pavlov.net
1d5e39fcc9 fix bug #3564
git-svn-id: svn://10.0.0.236/trunk@24119 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-14 18:06:18 +00:00
bienvenu%netscape.com
4f9d8961d4 add accessors for recipients and cc list
git-svn-id: svn://10.0.0.236/trunk@24118 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-14 17:46:14 +00:00
locka%iol.ie
6d98f4b590 New icons
git-svn-id: svn://10.0.0.236/trunk@24117 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-14 17:44:40 +00:00
locka%iol.ie
e65e3b7805 Updated CBrowse into a mini-test app
git-svn-id: svn://10.0.0.236/trunk@24116 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-14 17:44:01 +00:00
karnaze%netscape.com
fe3b92e60b removed code to set margins on radio buttons and checkboxes. It is now done using attribute selectors in ua.css.
git-svn-id: svn://10.0.0.236/trunk@24115 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-14 17:39:58 +00:00
karnaze%netscape.com
0a1d6741dd table cell uses its own border (instead of table's) when sizing its area frame
git-svn-id: svn://10.0.0.236/trunk@24114 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-14 17:36:10 +00:00
ramiro%netscape.com
5cbb09f9bf Fix typo.
git-svn-id: svn://10.0.0.236/trunk@24113 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-14 17:33:43 +00:00
edwin%woudt.nl
d614531026 Changed the smtphost preference to be identity based instead of global.
git-svn-id: svn://10.0.0.236/trunk@24112 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-14 13:30:45 +00:00
edwin%woudt.nl
cabbfb0c46 Default identities can be set now in the preferences file for each store.
git-svn-id: svn://10.0.0.236/trunk@24111 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-14 11:16:50 +00:00
mcafee%netscape.com
688621eb3f getenv() needs a prototype for Solaris.
git-svn-id: svn://10.0.0.236/trunk@24110 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-14 09:00:38 +00:00
danm%netscape.com
aecf46f198 disabling ability to specify a parent for a top-level window (until all platforms agree on what this means). fix refcount when registering windows with the window list.
git-svn-id: svn://10.0.0.236/trunk@24109 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-14 08:24:21 +00:00
danm%netscape.com
2366297b1b adjusting refcount for menubars and deletion. deletion adjustment is a HACK for the impending milestone.
git-svn-id: svn://10.0.0.236/trunk@24108 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-14 08:22:43 +00:00
danm%netscape.com
4293674b32 fixing goofy reversal of normal window and dialog window creation
git-svn-id: svn://10.0.0.236/trunk@24107 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-14 08:21:09 +00:00
danm%netscape.com
9b22c9c322 Added SetParent method
git-svn-id: svn://10.0.0.236/trunk@24106 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-14 08:19:34 +00:00
jband%netscape.com
859b96d66e use of typelibs via xptinfo working with test program on win32. Untested on Linux. typelib generation not yet integrated into the make system
git-svn-id: svn://10.0.0.236/trunk@24105 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-14 06:07:21 +00:00
beard%netscape.com
406c19300d Added NPL
git-svn-id: svn://10.0.0.236/trunk@24104 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-14 05:22:50 +00:00
pavlov%pavlov.net
872dc8de37 removed some unused code
git-svn-id: svn://10.0.0.236/trunk@24103 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-14 05:01:55 +00:00
rods%netscape.com
59be444747 Added DragListener for Drag & Drop (it's not turned on)
git-svn-id: svn://10.0.0.236/trunk@24102 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-14 04:45:00 +00:00
beard%netscape.com
6c2fa78c9d added nsILiveconnect service.
git-svn-id: svn://10.0.0.236/trunk@24101 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-14 04:41:51 +00:00
beard%netscape.com
4ee6f2956f added IID accessors
git-svn-id: svn://10.0.0.236/trunk@24100 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-14 04:40:54 +00:00
beard%netscape.com
98648c5313 First Checked In.
git-svn-id: svn://10.0.0.236/trunk@24099 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-14 04:39:04 +00:00
buster%netscape.com
7cc6cda1c5 added checks for DOM Key event returning 0x0 key code. If we get 0, we bail.
git-svn-id: svn://10.0.0.236/trunk@24098 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-14 04:12:21 +00:00
buster%netscape.com
6119addb3c added a debug-only printf warning if the char code returned is 0
git-svn-id: svn://10.0.0.236/trunk@24097 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-14 04:10:55 +00:00
beard%netscape.com
23f8cca44d First Checked In.
git-svn-id: svn://10.0.0.236/trunk@24096 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-14 03:06:42 +00:00
beard%netscape.com
d86a17c17e JSObject tests.
git-svn-id: svn://10.0.0.236/trunk@24095 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-14 03:06:08 +00:00
beard%netscape.com
47e7c1394c Added nsLiveconnect to backward adapter target.
git-svn-id: svn://10.0.0.236/trunk@24094 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-14 03:05:18 +00:00
beard%netscape.com
0884e8f2d7 MRJPLUGIN_4X support.
git-svn-id: svn://10.0.0.236/trunk@24093 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-14 03:04:44 +00:00
jband%netscape.com
a01f741d90 added octet for unsigned 8bit, made float and double work, added a Win32 batfile to build against the right MS runtime dll, added hacked temporary support for nsID expresed as nsIIDRef, added GOTO support for iid_is being native rather than an interface type; i.e. for QueryInterface style sig where a void* is used as the out type
git-svn-id: svn://10.0.0.236/trunk@24092 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-14 02:59:43 +00:00
mjudge%netscape.com
0615e6fe73 fix hack for getting selection to "Really" update the frame
git-svn-id: svn://10.0.0.236/trunk@24091 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-14 01:18:47 +00:00
kostello%netscape.com
7ba2fb1536 Added HACKForceRedraw() when deleting a range or inserting text
git-svn-id: svn://10.0.0.236/trunk@24090 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-14 01:02:53 +00:00
sfraser%netscape.com
0ed96a5600 Remove an extra ", and remove the align tag on the throbber, because it
currently shows up as a label. sdagley helped.


git-svn-id: svn://10.0.0.236/trunk@24089 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-14 00:46:02 +00:00
kostello%netscape.com
200ff1e40c Add HACKForceRedraw() to force a redraw until the drawing
problems are solved in Gecko


git-svn-id: svn://10.0.0.236/trunk@24088 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-14 00:31:35 +00:00
pavlov%pavlov.net
d44739f283 make the Enumerator destructor virtual to remove build warning.
git-svn-id: svn://10.0.0.236/trunk@24087 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-14 00:21:56 +00:00
gordon%netscape.com
36fad31c19 Fix for Mac OT bugs #2133, #2405, #2451, #2623, #3580 among others. Steve Dagley served as buddy for my changes. This is basically the first half of the redesign for Mac NSPR Sockets. Blocking mode or Server sockets remain to be implemented.
git-svn-id: svn://10.0.0.236/trunk@24086 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-14 00:15:39 +00:00
mcmullen%netscape.com
f636dbb228 Added nsFileLocations.cpp/.h to the build.
git-svn-id: svn://10.0.0.236/trunk@24085 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-14 00:03:21 +00:00
mcmullen%netscape.com
ce1795ba6d First Checked In.
git-svn-id: svn://10.0.0.236/trunk@24084 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-14 00:02:40 +00:00
mcmullen%netscape.com
8a41bf3664 Added "About" menu with release notes item (bug #3648).
git-svn-id: svn://10.0.0.236/trunk@24083 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-13 23:27:45 +00:00
mcmullen%netscape.com
70f0026961 Adjusted the use of nsFileSpec in GetVolumeList(), thereby avoiding a crash.
git-svn-id: svn://10.0.0.236/trunk@24082 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-13 22:52:24 +00:00
edwin%woudt.nl
d328bbec32 Implemented signature replacement code. When changing identities now, the sig will change. Also the sig will be automatically added when composing a message.
git-svn-id: svn://10.0.0.236/trunk@24081 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-13 22:31:58 +00:00
mjudge%netscape.com
2ebf5f3b4b needed to get caret to draw at end of line and on an empty text element
git-svn-id: svn://10.0.0.236/trunk@24080 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-13 21:33:34 +00:00
mjudge%netscape.com
e60f9b40c5 hack to get caret to draw on empty line.
git-svn-id: svn://10.0.0.236/trunk@24079 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-13 21:33:01 +00:00
morse%netscape.com
2e91a789f7 added wallet
git-svn-id: svn://10.0.0.236/trunk@24078 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-13 21:29:49 +00:00
morse%netscape.com
5619966aab fix for bug 2414 -- cookie file not being created
git-svn-id: svn://10.0.0.236/trunk@24077 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-13 21:26:35 +00:00
jefft%netscape.com
e544c62a1f call nsJSUtils::nsConvertObjectToJSVal to convert returning object into jsval
git-svn-id: svn://10.0.0.236/trunk@24076 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-13 20:15:08 +00:00
jefft%netscape.com
a5ccc1fc81 partially enable reply and forward message
git-svn-id: svn://10.0.0.236/trunk@24075 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-13 20:10:10 +00:00
ducarroz%netscape.com
ef85a14469 Remove default text, now the default body is blank
git-svn-id: svn://10.0.0.236/trunk@24074 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-13 18:02:33 +00:00
morse%netscape.com
03293e7efc removed some dead code
git-svn-id: svn://10.0.0.236/trunk@24073 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-13 16:00:40 +00:00
morse%netscape.com
164b45f147 fix bugzilla bug 909
git-svn-id: svn://10.0.0.236/trunk@24072 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-13 15:59:05 +00:00
karnaze%netscape.com
3828070fad set max element size for hidden element
git-svn-id: svn://10.0.0.236/trunk@24071 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-13 12:50:43 +00:00
karnaze%netscape.com
320437ece4 bug 2220; changed wording of some warnings.
git-svn-id: svn://10.0.0.236/trunk@24070 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-13 12:49:37 +00:00
karnaze%netscape.com
fe22718487 removed some table frame construction warnings.
git-svn-id: svn://10.0.0.236/trunk@24069 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-13 12:47:56 +00:00
rjc%netscape.com
4285a9887c Reduce amount of string allocation, and delete []basename when done with it.
git-svn-id: svn://10.0.0.236/trunk@24068 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-13 09:32:13 +00:00
rjc%netscape.com
75a939310a Use nsFileURL instead of nsFilePath to get file URL.
git-svn-id: svn://10.0.0.236/trunk@24067 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-13 09:25:46 +00:00
rjc%netscape.com
d5a22ad969 Add column sorting support to bookmarks.xul
git-svn-id: svn://10.0.0.236/trunk@24066 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-13 09:10:40 +00:00
jband%netscape.com
5eaf37bbb1 more to fix assumption that interfaces don't have the pointer bit set
git-svn-id: svn://10.0.0.236/trunk@24065 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-13 09:09:26 +00:00
dp%netscape.com
6ddfe4b9de Removing unix hack of translation ./libabc.so to libabc.so to prevent multiple loads. This wont be required as we load all dlls absolutely
git-svn-id: svn://10.0.0.236/trunk@24064 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-13 08:09:54 +00:00
ducarroz%netscape.com
6417ada219 Part of implementation of Reply and Forward
git-svn-id: svn://10.0.0.236/trunk@24063 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-13 07:51:54 +00:00
ducarroz%netscape.com
972c7474f5 Part of implementation of Reply and Forward. Use new SendMessage command
git-svn-id: svn://10.0.0.236/trunk@24062 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-13 07:51:15 +00:00
ducarroz%netscape.com
29fb5a6f25 add pref for reply_to
git-svn-id: svn://10.0.0.236/trunk@24061 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-13 07:49:23 +00:00
mcmullen%netscape.com
3b2fd6b905 Fix a parameter type.
git-svn-id: svn://10.0.0.236/trunk@24060 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-13 07:07:33 +00:00
mcmullen%netscape.com
56cf21a8da Adapt to an API change.
git-svn-id: svn://10.0.0.236/trunk@24059 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-13 06:39:17 +00:00
mcmullen%netscape.com
de8fc99c4f Upgrades, bugfixes (including nsFilePath no longer hex escaped). Features (including DiskSpaceAvailable)
git-svn-id: svn://10.0.0.236/trunk@24058 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-13 06:38:57 +00:00
buster%netscape.com
c40ea0b1ef InsertBreak now works at the beginning of a line. Plus a trivial bug fix.
git-svn-id: svn://10.0.0.236/trunk@24057 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-13 05:31:22 +00:00
syd%netscape.com
e2edc000af gtk_toggle_button_get_active() is an API newer than Gtk+ 1.1.13. Replaced it
with legacy code that just looks at active field of widget directly (I could
use the GtkObject interfaces, but those are kludgy and the reason that the
newer API was introduced). Eventually (hopefully soon) we'll migrate to Gtk+
1.2 (which will fix some rendering bugs as well...)


git-svn-id: svn://10.0.0.236/trunk@24056 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-13 05:25:31 +00:00
buster%netscape.com
3900dace67 added delegate code for InsertText (WillInsertText, DidInsertText)
which calls generic WillInsert, DidInsert to test for magic bogus
content and does the right thing.
You now can't delete magic content with user gestures, and when you
insert anything the magic kludgy &nbsp; is deleted first.


git-svn-id: svn://10.0.0.236/trunk@24055 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-13 04:53:21 +00:00
buster%netscape.com
1adc16e177 Table cells need to call DidSetStyleContext whenever their style changes, or
whenever the table's style changes.
This is a partial fix for bug 3513


git-svn-id: svn://10.0.0.236/trunk@24054 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-13 04:38:02 +00:00
buster%netscape.com
fdd92cdedf added some debugging code. uncomment the #define DELETE_SELECTION
to see some output about what node is selected.


git-svn-id: svn://10.0.0.236/trunk@24053 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-13 04:36:03 +00:00
law%netscape.com
6aee465560 Throbberized
git-svn-id: svn://10.0.0.236/trunk@24052 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-13 04:24:13 +00:00
law%netscape.com
e898ea3970 Throb, baby, throb
git-svn-id: svn://10.0.0.236/trunk@24051 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-13 03:51:22 +00:00
law%netscape.com
6f483dbf4e Added throbbingN.gif and fixed clobber dirs
git-svn-id: svn://10.0.0.236/trunk@24050 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-13 03:40:27 +00:00
syd%netscape.com
2e269a53c6 Declare mPrData
git-svn-id: svn://10.0.0.236/trunk@24049 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-13 03:39:38 +00:00
law%netscape.com
a8a4d3d226 Adding url listener support
git-svn-id: svn://10.0.0.236/trunk@24048 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-13 03:31:55 +00:00
slamm%netscape.com
8988adee79 Disable PrintPreview 'cause it's crashing.
git-svn-id: svn://10.0.0.236/trunk@24047 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-13 03:26:54 +00:00
syd%netscape.com
3a9c39025c Call GTK print dialog. Currently, Init routine returns FAILURE, effectively
stubbing out this functionality. Done Cone will turn it on at a later time.

Gtk+ print menu crashes will temporarily disappear because of this change.


git-svn-id: svn://10.0.0.236/trunk@24046 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-13 03:21:16 +00:00
syd%netscape.com
c86a5bb085 Add nsPrintdGTK.c to build.
git-svn-id: svn://10.0.0.236/trunk@24045 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-13 03:19:58 +00:00
syd%netscape.com
57ff622ee2 Print dialog for Gtk. Needs to be wired by Done Cone, currently stubbed out
in caller.


git-svn-id: svn://10.0.0.236/trunk@24044 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-13 03:19:28 +00:00
slamm%netscape.com
d2355bf850 Add click handler for personal toolbar.
git-svn-id: svn://10.0.0.236/trunk@24043 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-13 03:15:39 +00:00
beard%netscape.com
284c311805 added IID_ACCESSOR
git-svn-id: svn://10.0.0.236/trunk@24042 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-13 03:12:16 +00:00
beard%netscape.com
8230ab5364 fixed IID accessor
git-svn-id: svn://10.0.0.236/trunk@24041 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-13 03:11:05 +00:00
beard%netscape.com
82d7689071 Added some println's to test console.
git-svn-id: svn://10.0.0.236/trunk@24040 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-13 03:08:02 +00:00
law%netscape.com
ed145eabba Export nsIURLListener.h
git-svn-id: svn://10.0.0.236/trunk@24039 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-13 03:01:15 +00:00
slamm%netscape.com
cda10a48e6 -mAdd FAQ link.
git-svn-id: svn://10.0.0.236/trunk@24038 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-13 02:59:30 +00:00
sdagley%netscape.com
ff49c74457 Make an alias of mozilla:xpfe:AppCores:xul:resources:throbbingN.gif in the throbber res directory so that law's upcoming toolbar xul change can find it.
git-svn-id: svn://10.0.0.236/trunk@24037 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-13 02:51:00 +00:00
law%netscape.com
da9fcb2b49 New URL listener interface to get throbber working
git-svn-id: svn://10.0.0.236/trunk@24036 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-13 02:28:31 +00:00
law%netscape.com
7d73848f1b New styles for throbber
git-svn-id: svn://10.0.0.236/trunk@24035 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-13 02:21:51 +00:00
beard%netscape.com
ab9d076b20 reverted back to kISupportsIID. It seems not all compilers can handle ::nsISupports::GetIID() from inside an XPCOM interface. Yech.
git-svn-id: svn://10.0.0.236/trunk@24034 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-13 02:20:57 +00:00
slamm%netscape.com
a0d92131e4 Add throbbingN.gif.
git-svn-id: svn://10.0.0.236/trunk@24033 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-13 02:15:34 +00:00
evaughan%netscape.com
5caad912d3 Fixed Titled button bugs.
git-svn-id: svn://10.0.0.236/trunk@24032 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-13 01:51:49 +00:00
slamm%netscape.com
b06c9cece3 Update script name
git-svn-id: svn://10.0.0.236/trunk@24031 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-13 01:43:25 +00:00
jband%netscape.com
8bb15255e9 support float and double in headers and typelibs
git-svn-id: svn://10.0.0.236/trunk@24030 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-13 01:43:19 +00:00
jband%netscape.com
9ed30011df made in params const, added some comments
git-svn-id: svn://10.0.0.236/trunk@24029 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-13 01:34:37 +00:00
jband%netscape.com
d96fb8c360 fix assumption that interfaces don't have the poointer bit set
git-svn-id: svn://10.0.0.236/trunk@24028 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-13 01:31:48 +00:00
hyatt%netscape.com
950c46393d Bookmarks menu coming online.
git-svn-id: svn://10.0.0.236/trunk@24027 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-13 01:12:53 +00:00
alecf%netscape.com
0be2671888 #if 0 out calls to functions we haven't defined yet.
git-svn-id: svn://10.0.0.236/trunk@24026 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-13 01:07:11 +00:00
alecf%netscape.com
2e006cf6f7 remove more undefined symbols by linking against more libraries
git-svn-id: svn://10.0.0.236/trunk@24025 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-13 01:06:27 +00:00
chuang%netscape.com
68726183a2 Change 3 pane layout using frame instead of iframe
git-svn-id: svn://10.0.0.236/trunk@24022 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-13 01:03:50 +00:00
hyatt%netscape.com
c888f11e4f Menus now handle click events properly (by sending them into the DOM).
git-svn-id: svn://10.0.0.236/trunk@24021 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-13 01:03:33 +00:00
law%netscape.com
96232ea83d Animated gif for apprunner throbber
git-svn-id: svn://10.0.0.236/trunk@24020 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-13 01:02:28 +00:00
mccabe%netscape.com
b8deb21290 Fixed a place where I was missing an NS_RELEASE, thanks jband.
git-svn-id: svn://10.0.0.236/trunk@24019 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-13 00:56:47 +00:00
slamm%netscape.com
2df99b84b6 Trim NSPR options down to two. Add mozilla banner.
git-svn-id: svn://10.0.0.236/trunk@24018 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-13 00:51:40 +00:00
alecf%netscape.com
28d6dad50c putterman's patches to re-root thread pane
git-svn-id: svn://10.0.0.236/trunk@24017 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-13 00:50:51 +00:00
morse%netscape.com
8aade4c7bb fix potential build bustage
git-svn-id: svn://10.0.0.236/trunk@24016 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-13 00:44:13 +00:00
hyatt%netscape.com
79251a162a Menus are much closer now.
git-svn-id: svn://10.0.0.236/trunk@24015 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-13 00:31:05 +00:00
nhotta%netscape.com
390059663f Added a MIME decoder interface which takes arguments in nsString.
git-svn-id: svn://10.0.0.236/trunk@24014 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-13 00:28:18 +00:00
beard%netscape.com
03cc80e739 forcing nsISupports to global scope to resovle ambiguity (VC is very weak)
git-svn-id: svn://10.0.0.236/trunk@24013 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-13 00:12:13 +00:00
hyatt%netscape.com
9d57739e0b On the road to making the bookmarks menu work properly.
git-svn-id: svn://10.0.0.236/trunk@24012 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-13 00:08:25 +00:00
rjc%netscape.com
2262fccde4 Autoregistration now works on all platforms, and RDF self-registers, so removing code that statically registers RDF here.
git-svn-id: svn://10.0.0.236/trunk@24011 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-13 00:06:29 +00:00
pinkerton%netscape.com
fa2dd9188c onClick -> onclick conversion.
git-svn-id: svn://10.0.0.236/trunk@24010 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 23:56:13 +00:00
evaughan%netscape.com
28720251d6 Fixed disabled bug on buttons.
git-svn-id: svn://10.0.0.236/trunk@24009 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 23:47:52 +00:00
rjc%netscape.com
6e88ce0a1b Export nsComponentManager::AutoRegister
git-svn-id: svn://10.0.0.236/trunk@24008 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 23:47:17 +00:00
pierre%netscape.com
7c6c8ca488 fixed uninitialized variable in XULContentSinkImpl::Init()
git-svn-id: svn://10.0.0.236/trunk@24007 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 23:36:33 +00:00
morse%netscape.com
c708eb1603 move wallet editor to a server
git-svn-id: svn://10.0.0.236/trunk@24006 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 23:32:11 +00:00
morse%netscape.com
be75a1a597 fix for wallet
git-svn-id: svn://10.0.0.236/trunk@24005 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 23:30:48 +00:00
morse%netscape.com
f0e79dc53c turn on client wallet for win32
git-svn-id: svn://10.0.0.236/trunk@24004 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 23:29:12 +00:00
rhp%netscape.com
9080b52939 Changes for content type handler plugins on unix
git-svn-id: svn://10.0.0.236/trunk@24003 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 23:28:39 +00:00
pierre%netscape.com
b73810df3b fixed uninitialized variable in ProxyEvent::Fire()
git-svn-id: svn://10.0.0.236/trunk@24002 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 23:27:46 +00:00
cyeh%netscape.com
50f0663eee use plain text for the automated report, and don't uuencode
git-svn-id: svn://10.0.0.236/trunk@24001 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 23:24:53 +00:00
pierre%netscape.com
d84171a598 fixed uninitialized variable in map_java_object_to_js_object_impl()
git-svn-id: svn://10.0.0.236/trunk@24000 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 23:18:13 +00:00
rhp%netscape.com
2afbdebea2 Change for different names on non PC platforms
git-svn-id: svn://10.0.0.236/trunk@23999 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 23:17:59 +00:00
rhp%netscape.com
4f3fc78aaa Change for temporary stat() call.
git-svn-id: svn://10.0.0.236/trunk@23998 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 23:16:52 +00:00
pinkerton%netscape.com
62c22bea64 fix for the mac part of bug #3675. We were dispatching all menu events twice.
git-svn-id: svn://10.0.0.236/trunk@23997 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 23:02:33 +00:00
pinkerton%netscape.com
9191075bb8 First Checked In.
git-svn-id: svn://10.0.0.236/trunk@23996 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 22:57:55 +00:00
beard%netscape.com
f070c0d794 now passing events to plugins, generating idle events with an nsITimer, all XP_MAC changes for the most part.
git-svn-id: svn://10.0.0.236/trunk@23994 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 22:46:14 +00:00
beard%netscape.com
b4dc5c36ea Added NS_NATIVE_PLUGIN_PORT selector to GetNativeData.
git-svn-id: svn://10.0.0.236/trunk@23993 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 22:45:02 +00:00
michaelp%netscape.com
dcfeafc885 added memory cleanup tripwire.
git-svn-id: svn://10.0.0.236/trunk@23992 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 22:24:30 +00:00
hyatt%netscape.com
108afeab5c Checking in German's new UI!
git-svn-id: svn://10.0.0.236/trunk@23991 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 22:21:58 +00:00
waterson%netscape.com
fbdbf7403d Bug 3529: re-rooting the tree. Added code in the generic content builder that notices changes to the 'id=' attribute and reconstructs the tree from a new resource when the object's identity is changed. Also, renamed the nsRDFGenericBuilder::IsWidgetElement() to IsFolderOrItem(), because that's what it's doing.
git-svn-id: svn://10.0.0.236/trunk@23990 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 22:20:34 +00:00
hyatt%netscape.com
e6b40dddbb Checking in German's new UI.
git-svn-id: svn://10.0.0.236/trunk@23989 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 22:16:05 +00:00
mcmullen%netscape.com
1acae3d8a9 Fixed crashing bug on solaris. Added support for mac documents directory.
git-svn-id: svn://10.0.0.236/trunk@23988 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 22:15:02 +00:00
mcmullen%netscape.com
0f5a09ef47 Added mac documents directory.
git-svn-id: svn://10.0.0.236/trunk@23987 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 22:14:08 +00:00
mscott%netscape.com
a03a0d6ba4 Add line return after "Mailbox Done" to make it easier for QA to smoketest this string.
git-svn-id: svn://10.0.0.236/trunk@23986 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 22:05:32 +00:00
beard%netscape.com
606af1d257 First Checked In.
git-svn-id: svn://10.0.0.236/trunk@23985 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 22:04:13 +00:00
ftang%netscape.com
63130c7028 change the macroman converter to a better shape.... reviewed by pierre
git-svn-id: svn://10.0.0.236/trunk@23984 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 21:58:28 +00:00
beard%netscape.com
e749a03cef Took out <SCRIPT> tag, <APPLET> tag. Only used with <EMBED> tag.
git-svn-id: svn://10.0.0.236/trunk@23983 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 21:51:56 +00:00
beard%netscape.com
b4d0db73a0 Added clear button, moved buttons into a panel.
git-svn-id: svn://10.0.0.236/trunk@23982 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 21:51:05 +00:00
slamm%netscape.com
bccc688d11 Add animated gif, anim.gif.
git-svn-id: svn://10.0.0.236/trunk@23981 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 21:40:39 +00:00
warren%netscape.com
fa9ffdfa65 Fixed comment.
git-svn-id: svn://10.0.0.236/trunk@23980 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 21:39:25 +00:00
mjudge%netscape.com
c77899adc4 fixed GetWidth to "do the right thing" and take smallcaps and spaced words/chars into account.
git-svn-id: svn://10.0.0.236/trunk@23979 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 21:38:16 +00:00
matt%netscape.com
5b84a7c059 Adding refresh function to refresh urlbar
for bug3548


git-svn-id: svn://10.0.0.236/trunk@23978 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 21:37:08 +00:00
beard%netscape.com
3d7d70e2c1 First Checked In.
git-svn-id: svn://10.0.0.236/trunk@23977 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 21:35:17 +00:00
warren%netscape.com
5da91ed33c Changed background colors to be standard messenger.
git-svn-id: svn://10.0.0.236/trunk@23976 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 21:29:44 +00:00
warren%netscape.com
cc89d8e394 Changed GetEnabledCommands to GetAllCommands/IsCommandEnabled.
git-svn-id: svn://10.0.0.236/trunk@23975 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 21:28:34 +00:00
endico%mozilla.org
e88bd6b01c Removing the mailnews tree. The mail code is in seamonkey already so the tree is redundant.
git-svn-id: svn://10.0.0.236/trunk@23974 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 21:10:39 +00:00
slamm%netscape.com
22b62bde01 Add animated gif version of throbber.
git-svn-id: svn://10.0.0.236/trunk@23973 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 21:03:26 +00:00
morse%netscape.com
77bd512e6f fix bug 1729
git-svn-id: svn://10.0.0.236/trunk@23972 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 20:53:01 +00:00
ducarroz%netscape.com
b0facc5ae6 Add GetMessageHeader Interface (written by jefft)
git-svn-id: svn://10.0.0.236/trunk@23971 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 20:41:43 +00:00
ducarroz%netscape.com
008becef89 Add ReplyMessage, ForwardMessage and SendMessage2 interface
git-svn-id: svn://10.0.0.236/trunk@23970 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 20:39:16 +00:00
ducarroz%netscape.com
3901089d0a implement Message Forward and Reply
git-svn-id: svn://10.0.0.236/trunk@23969 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 20:36:53 +00:00
bienvenu%netscape.com
310430bb3c add mork to makefiles
git-svn-id: svn://10.0.0.236/trunk@23968 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 20:31:57 +00:00
bienvenu%netscape.com
3f91b7a6cb turn on file stuff for Unix
git-svn-id: svn://10.0.0.236/trunk@23967 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 20:20:54 +00:00
bienvenu%netscape.com
26d5ef10a8 mork landing
git-svn-id: svn://10.0.0.236/trunk@23966 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 20:16:40 +00:00
bienvenu%netscape.com
781f4a7ec1 add error check that we can actually get the hdr from the db
git-svn-id: svn://10.0.0.236/trunk@23965 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 20:16:23 +00:00
bienvenu%netscape.com
b3213aed32 mork landing, fix delete of local mail messages
git-svn-id: svn://10.0.0.236/trunk@23964 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 20:12:41 +00:00
alecf%netscape.com
92b909c348 now link libnntp directly into base, so we can do dogfood
git-svn-id: svn://10.0.0.236/trunk@23963 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 20:05:16 +00:00
bienvenu%netscape.com
17e06b0b25 initialize offset before asking for it
git-svn-id: svn://10.0.0.236/trunk@23962 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 19:57:56 +00:00
bienvenu%netscape.com
d5a9fd297a fix buffer size overstatement, add assertions for various failures
git-svn-id: svn://10.0.0.236/trunk@23961 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 19:54:26 +00:00
dp%netscape.com
963e08ef2a Descriptor Leak fixed. Thanks to bruce@cybersight.com
git-svn-id: svn://10.0.0.236/trunk@23960 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 19:49:31 +00:00
briano%netscape.com
1062c18c50 Automated update
git-svn-id: svn://10.0.0.236/trunk@23959 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 19:45:45 +00:00
ebina%netscape.com
653d886923 Fix bug #773
Apply patch to not infinite loop if Chunking in STRIP_CRLF
state, and no LF is provided.


git-svn-id: svn://10.0.0.236/trunk@23958 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 19:45:24 +00:00
alecf%netscape.com
79baed5053 only use these rules if the libIDL is available (and thus XPIDL is available)
git-svn-id: svn://10.0.0.236/trunk@23957 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 19:35:40 +00:00
alecf%netscape.com
0081c7c702 ignore generated files
git-svn-id: svn://10.0.0.236/trunk@23956 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 19:34:47 +00:00
alecf%netscape.com
4978342613 use BUILD_IDLC to refer to the DOM idl compiler
git-svn-id: svn://10.0.0.236/trunk@23955 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 19:34:25 +00:00
alecf%netscape.com
e139fc1c63 start using BUILD_XPIDL to build XPIDL
git-svn-id: svn://10.0.0.236/trunk@23954 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 19:28:09 +00:00
ebina%netscape.com
121de6f1db Fix bug #2808
Add explicit text/html and text/xml to the accepts header.  Move PNG
to the from of the list of accepted image formats.


git-svn-id: svn://10.0.0.236/trunk@23953 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 19:16:01 +00:00
bienvenu%netscape.com
7f77b5715c fix character after line continuation character problem
git-svn-id: svn://10.0.0.236/trunk@23952 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 19:12:37 +00:00
alecf%netscape.com
1089cc78f7 uppercase filename for Unix
git-svn-id: svn://10.0.0.236/trunk@23951 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 18:50:31 +00:00
bienvenu%netscape.com
554ebeecf3 start adding mork to linux build
git-svn-id: svn://10.0.0.236/trunk@23950 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 18:16:34 +00:00
ducarroz%netscape.com
5493a75b12 change root path preference name
git-svn-id: svn://10.0.0.236/trunk@23948 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 17:17:10 +00:00
ducarroz%netscape.com
c48085c109 change prefs properties name to be compatible with Nova's prefs as much as possible. Add pref for reply to.
git-svn-id: svn://10.0.0.236/trunk@23947 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 17:16:06 +00:00
kostello%netscape.com
5d9eb5bd73 Force Redraw on Enter: this is a workaround for bug#3356 & bug#3639
git-svn-id: svn://10.0.0.236/trunk@23946 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 15:40:29 +00:00
ftang%netscape.com
a7e0437a49 add meta tag reload hack. reviewed by rickg
git-svn-id: svn://10.0.0.236/trunk@23945 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 14:31:20 +00:00
edwin%woudt.nl
bd55b34cd0 Patches from Mauro Botelho
git-svn-id: svn://10.0.0.236/trunk@23944 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 14:22:59 +00:00
putterman%netscape.com
f7a08a5c4b Load Message
git-svn-id: svn://10.0.0.236/trunk@23943 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 13:18:14 +00:00
putterman%netscape.com
f08fa8d0a9 removed release of nsmsghdr until we decouple from rdf.
git-svn-id: svn://10.0.0.236/trunk@23942 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 13:17:45 +00:00
putterman%netscape.com
de4b563b52 Moved parse url utility
git-svn-id: svn://10.0.0.236/trunk@23941 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 13:17:21 +00:00
putterman%netscape.com
3a9a14da2b Can either load a demo message or a real message.
git-svn-id: svn://10.0.0.236/trunk@23940 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 13:16:51 +00:00
putterman%netscape.com
62f84045eb link with msgdb and rdfutil.
git-svn-id: svn://10.0.0.236/trunk@23939 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 13:14:57 +00:00
putterman%netscape.com
1be401d4ec Date displays correctly.
git-svn-id: svn://10.0.0.236/trunk@23938 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 13:14:33 +00:00
putterman%netscape.com
04c9f37ca6 comment out NS_ERROR in remove
git-svn-id: svn://10.0.0.236/trunk@23937 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 13:13:58 +00:00
ramiro%netscape.com
db0ca36e35 Make it possible to prefix mozilla dlls that conflict with system dlls.
git-svn-id: svn://10.0.0.236/trunk@23935 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 12:43:04 +00:00
briano%netscape.com
402809f631 Automated update
git-svn-id: svn://10.0.0.236/trunk@23934 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 11:45:42 +00:00
ramiro%netscape.com
6814bf46c6 Take out exception tests, it breaks --enable-tests.
git-svn-id: svn://10.0.0.236/trunk@23933 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 11:42:10 +00:00
ramiro%netscape.com
e5da645884 unbreak it on linux.
git-svn-id: svn://10.0.0.236/trunk@23932 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 11:29:43 +00:00
ramiro%netscape.com
d51ceea808 Dont build broken rdfsink tests, breaks --enable-tests.
git-svn-id: svn://10.0.0.236/trunk@23931 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 11:27:57 +00:00
dp%netscape.com
9356d42ebe Using nsHashtable and nsProgIDKey for dll hashing
git-svn-id: svn://10.0.0.236/trunk@23930 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 11:25:17 +00:00
dp%netscape.com
2d294e429d using nsHashtable for dllStore.
git-svn-id: svn://10.0.0.236/trunk@23929 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 11:23:49 +00:00
waterson%netscape.com
1947b09302 More nsCOMPtr bustage. !@$!%!@ Mac.
git-svn-id: svn://10.0.0.236/trunk@23928 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 10:29:11 +00:00
waterson%netscape.com
f59164d74d Fixed nsCOMPtr bustage on Mac.
git-svn-id: svn://10.0.0.236/trunk@23927 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 10:24:42 +00:00
waterson%netscape.com
0481c9b28f Added note on making fns virtual.
git-svn-id: svn://10.0.0.236/trunk@23926 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 10:09:51 +00:00
waterson%netscape.com
e98eb1a012 Added precondition checks to DOM observer APIs.
git-svn-id: svn://10.0.0.236/trunk@23925 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 10:09:26 +00:00
waterson%netscape.com
e2f8b6b96e Fixed bug with ambiguity that may occur in calls to RDFTreeBuilderImpl::RemoveWidgetItem(); implemented OnRemoveChild() DOM observer.
git-svn-id: svn://10.0.0.236/trunk@23924 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 10:09:07 +00:00
rjc%netscape.com
bf2745b51c Damn tabs/spaces.
git-svn-id: svn://10.0.0.236/trunk@23923 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 09:21:04 +00:00
mcafee%netscape.com
72ea9e5ee5 Removing a printf()
git-svn-id: svn://10.0.0.236/trunk@23922 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 09:19:28 +00:00
rjc%netscape.com
9f76dfecf8 Move folder-open.gif and folder-closed.gif into dist area.
git-svn-id: svn://10.0.0.236/trunk@23921 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 09:00:58 +00:00
dp%netscape.com
943c88fd8d Forcing XPCOM registry recreation
git-svn-id: svn://10.0.0.236/trunk@23920 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 08:53:45 +00:00
dp%netscape.com
189340f83f PC: Disabling autoregistration at initialization. It will be done by the app.
git-svn-id: svn://10.0.0.236/trunk@23919 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 08:52:56 +00:00
dp%netscape.com
a926c59c99 PC: Enabling autoregistration from the app
git-svn-id: svn://10.0.0.236/trunk@23918 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 08:51:37 +00:00
rjc%netscape.com
d57c9702e3 The file system datasource now sets a type='FileSystemObject' attribute on file system nodes.
git-svn-id: svn://10.0.0.236/trunk@23917 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 08:50:36 +00:00
rjc%netscape.com
981dc68d02 Only set container='true' when something is really a container.
git-svn-id: svn://10.0.0.236/trunk@23916 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 08:49:26 +00:00
rjc%netscape.com
d6d3579139 Add icons for type=FileSystemObject
git-svn-id: svn://10.0.0.236/trunk@23915 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 08:48:21 +00:00
rjc%netscape.com
839c3ab6f5 First Checked In.
git-svn-id: svn://10.0.0.236/trunk@23914 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 08:38:21 +00:00
waterson%netscape.com
e1aa99a9a8 Renamed IsWidgetProperty() to IsContainmentProperty(), added RemoveWidgetItem() call and hooked it up in the generic builder.
git-svn-id: svn://10.0.0.236/trunk@23913 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 08:13:14 +00:00
waterson%netscape.com
5728cb2dcf Fixed bug where button created without 'src=' would crash when 'src=' was set.
git-svn-id: svn://10.0.0.236/trunk@23912 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 08:11:54 +00:00
rpotts%netscape.com
80e70e30ec Removed the Change Icons menu item... Removed the call to BrowserPrintPreview() from the Print Preview menu item. Currently, the BrowserPrintPreview() function does not do what you expect - it tries to change the toolbar icons and crashes
git-svn-id: svn://10.0.0.236/trunk@23911 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 08:03:02 +00:00
putterman%netscape.com
45203890af Fix some idl changes.
git-svn-id: svn://10.0.0.236/trunk@23910 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 08:02:35 +00:00
putterman%netscape.com
af42b15942 Specify folder with two '/'.
git-svn-id: svn://10.0.0.236/trunk@23909 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 07:59:03 +00:00
putterman%netscape.com
1d8fc9a6e8 Remove another release because of RDF nsMsgHdr problems. Will fix after we
decouple nsMsghdr and nsIMessage.


git-svn-id: svn://10.0.0.236/trunk@23908 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 07:58:20 +00:00
putterman%netscape.com
25069479e9 Add and Remove folderListeners, and hook up DeleteMessage between datasource
and database.


git-svn-id: svn://10.0.0.236/trunk@23907 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 07:57:26 +00:00
putterman%netscape.com
1a7ee5eddc Added a parameter to CreateMsgHdr to determine if we use GetMessageKey while
creating URI.


git-svn-id: svn://10.0.0.236/trunk@23906 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 07:56:24 +00:00
putterman%netscape.com
f76992bc38 Add and Remove FolderListeners.
git-svn-id: svn://10.0.0.236/trunk@23905 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 07:55:26 +00:00
putterman%netscape.com
ce0a8ed2f8 Add and Remove Folder Listeners.
git-svn-id: svn://10.0.0.236/trunk@23904 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 07:54:48 +00:00
waterson%netscape.com
0d344fe048 Ripped out the 'toy' parser and installed an updated version of the parser from 4.5.
git-svn-id: svn://10.0.0.236/trunk@23903 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 07:46:42 +00:00
bienvenu%netscape.com
aba5cf4b18 initial mork landing - not part of build yet
git-svn-id: svn://10.0.0.236/trunk@23902 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 07:39:27 +00:00
kostello%netscape.com
b53c0edb3c Fixed bug 3651: for OutputText, we were not outputting
linebreaks whenever we encounter <BR> in the content
model.


git-svn-id: svn://10.0.0.236/trunk@23901 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 06:51:34 +00:00
kostello%netscape.com
32ae1e3029 Fixed bug 3664: not checking for null condition
git-svn-id: svn://10.0.0.236/trunk@23900 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 06:50:41 +00:00
mccabe%netscape.com
d7ffc955ca Not part of seamonkey.
Removed awkward nsXPTParamInfo::GetInterface and friend, and als removed supporting nsXPTParamInfo.cpp file.  Replace by nsIInterfaceInfo::GetInfoForParam and friend.

Made the constructor for nsInterfaceInfo private, with nsInterfaceInfoManager as a friend class.


git-svn-id: svn://10.0.0.236/trunk@23899 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 06:49:01 +00:00
mcafee%netscape.com
50d6478a9c Solaris needs prototypes for PR_Free, PR_smprintf.
git-svn-id: svn://10.0.0.236/trunk@23898 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 06:42:37 +00:00
mscott%netscape.com
c550297965 add printf statement for "Mailbox Done" to allow QA to script a smoketest for the mail client.
git-svn-id: svn://10.0.0.236/trunk@23897 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 06:24:34 +00:00
karnaze%netscape.com
df217ace86 hopefully a fix for the mac build
git-svn-id: svn://10.0.0.236/trunk@23896 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 06:12:03 +00:00
karnaze%netscape.com
1a9cdab67c bug 3628, scrolling=yes on <frame>, <iframe>
git-svn-id: svn://10.0.0.236/trunk@23895 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 05:36:35 +00:00
mscott%netscape.com
b6eb6d4598 Add a return value at the end of GetSmtpName to fix build breakage on windows. I don't know why VC6.0 let it go....
git-svn-id: svn://10.0.0.236/trunk@23894 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 05:33:00 +00:00
sfraser%netscape.com
1c80fd42e0 Throw the switch so we now pay attention to the charCode in the key event.
git-svn-id: svn://10.0.0.236/trunk@23893 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 05:28:22 +00:00
hyatt%netscape.com
a8ddba3660 Changing the name of the include tag.
git-svn-id: svn://10.0.0.236/trunk@23892 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 05:22:19 +00:00
hyatt%netscape.com
c62b139bf2 XUL fragments live!
git-svn-id: svn://10.0.0.236/trunk@23891 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 05:21:25 +00:00
hyatt%netscape.com
d132d95a8f Tweaked the content sink to remove an unused argument from the Init method.
git-svn-id: svn://10.0.0.236/trunk@23890 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 05:21:01 +00:00
hyatt%netscape.com
2e291cefc4 Enhanced the document loader to handle subdocuments.
git-svn-id: svn://10.0.0.236/trunk@23889 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 05:20:29 +00:00
hyatt%netscape.com
2a48f5090b Enhanced the document loader so that it can now handle subdocuments, thus
enabling it to load multiple documents at once and to support the integration
of a subdocument into the parent document.


git-svn-id: svn://10.0.0.236/trunk@23888 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 05:20:14 +00:00
rjc%netscape.com
226685e45f Use appropriate icon for actual bookmark URLs.
git-svn-id: svn://10.0.0.236/trunk@23887 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 05:01:41 +00:00
waterson%netscape.com
a1e15dd39c Fix more tab-spaces makefile bustage.
git-svn-id: svn://10.0.0.236/trunk@23886 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 05:00:13 +00:00
beard%netscape.com
dd2226b969 using nsITimer::GetIID() instead of kITimerIID
git-svn-id: svn://10.0.0.236/trunk@23885 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 04:48:48 +00:00
beard%netscape.com
598d135826 took out initialization check in InitLiveConnectClasses
git-svn-id: svn://10.0.0.236/trunk@23884 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 04:48:28 +00:00
beard%netscape.com
e4c35278ba massive overhaul for new stream APIs.
git-svn-id: svn://10.0.0.236/trunk@23883 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 04:48:04 +00:00
beard%netscape.com
04acba3cf8 added NS_DEFINE_STATIC_IID_ACCESSOR.
git-svn-id: svn://10.0.0.236/trunk@23882 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 04:46:43 +00:00
waterson%netscape.com
c0fd696b5d Added an #ifdef XP_UNIX implementation of _strrev() to fix the
build. No clue if it works.


git-svn-id: svn://10.0.0.236/trunk@23881 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 04:41:50 +00:00
beard%netscape.com
5176ae5079 NS_NATIVE_PLUGIN_PORT
git-svn-id: svn://10.0.0.236/trunk@23880 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 04:33:29 +00:00
pinkerton%netscape.com
63b1cd1062 Fixes bug #3532 where incremental reflow was not being correctly handled. Also no longer re-resolves the style context at each reflow, but only once on inital reflow.
git-svn-id: svn://10.0.0.236/trunk@23879 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 04:33:24 +00:00
rjc%netscape.com
105565a73e Removing old personal toolbar folder icons which are too long (>31 characters) due to Mac. They've been replaced by icon files with shorter names.
git-svn-id: svn://10.0.0.236/trunk@23878 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 04:31:21 +00:00
beard%netscape.com
c77610eb5c Fixed some unitialized variables
git-svn-id: svn://10.0.0.236/trunk@23877 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 04:31:13 +00:00
beard%netscape.com
d170b2f876 added AddEventListener
git-svn-id: svn://10.0.0.236/trunk@23876 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 04:30:30 +00:00
beard%netscape.com
5c6e5f4422 now reference counts all listeners
git-svn-id: svn://10.0.0.236/trunk@23875 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 04:29:48 +00:00
rjc%netscape.com
d1979f0a6c Reducing length of personal toolbar folder icons to be no more than 31 characters as its a Mac limit.
git-svn-id: svn://10.0.0.236/trunk@23874 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 04:29:41 +00:00
beard%netscape.com
50a74966ea now subclasses nsISupports
git-svn-id: svn://10.0.0.236/trunk@23873 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 04:29:19 +00:00
rjc%netscape.com
881f75b58e Icon filenames can't be longer than 31 characters (its a Mac limit) so shortening references to the personal toolbar folder icons. Also, adding in icon references to sidebar.xul
git-svn-id: svn://10.0.0.236/trunk@23872 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 04:19:43 +00:00
mscott%netscape.com
663e68d936 Build nsPop3Service.cpp
git-svn-id: svn://10.0.0.236/trunk@23871 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 04:19:12 +00:00
mscott%netscape.com
ea98214b55 Export nsIPop3Service.h
git-svn-id: svn://10.0.0.236/trunk@23870 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 04:18:34 +00:00
mscott%netscape.com
50aa8f26b5 Implement get new mail.
git-svn-id: svn://10.0.0.236/trunk@23869 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 04:15:13 +00:00
mscott%netscape.com
78e9bb7fab MsgGetNewMsg should call the get new mail function.
git-svn-id: svn://10.0.0.236/trunk@23868 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 04:14:28 +00:00
mscott%netscape.com
0c84ca104b Changes for naoki to implement set character set function.
git-svn-id: svn://10.0.0.236/trunk@23867 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 04:13:53 +00:00
mscott%netscape.com
36488fe0ba Changes for naoki to fill in the character set encoding menu.
git-svn-id: svn://10.0.0.236/trunk@23866 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 04:13:11 +00:00
mscott%netscape.com
197aa0528d Changes for Naoki to implement set character set menu stuff.
Implement GetNewMsgs function which runs a get new mail url through the pop3 service.


git-svn-id: svn://10.0.0.236/trunk@23865 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 04:12:36 +00:00
mscott%netscape.com
e2f3bd930e oops don't build pop3test until I'm ready for it to work again...
git-svn-id: svn://10.0.0.236/trunk@23864 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 04:10:59 +00:00
mscott%netscape.com
3c4779614a pop3 test no longer needs to create a transport. Go through the pop3 service for running a get new mail url....
git-svn-id: svn://10.0.0.236/trunk@23863 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 04:09:39 +00:00
mscott%netscape.com
9bdec6edc6 factory can now create a pop3 service...
git-svn-id: svn://10.0.0.236/trunk@23862 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 04:07:52 +00:00
mscott%netscape.com
7d5546829d Build nsPop3Service.
git-svn-id: svn://10.0.0.236/trunk@23861 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 04:06:09 +00:00
mscott%netscape.com
af6a3f985d Creating a pop3 protocol should not require a transport. We should do it ourselves. LoadUrL should take a consumer.
git-svn-id: svn://10.0.0.236/trunk@23860 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 04:05:40 +00:00
rjc%netscape.com
e8b44fc4ee Need to shorten image filenames to 31 or less characters. Its a Mac file limit.
git-svn-id: svn://10.0.0.236/trunk@23859 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 04:05:23 +00:00
mscott%netscape.com
79b39b0714 updates to use nsIMsgMailNewsUrl to pick up url listener stuff. define a default Pop3 port...
git-svn-id: svn://10.0.0.236/trunk@23858 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 04:04:40 +00:00
mscott%netscape.com
5f517473b7 Update the interface so it supports the nsIMsgMailNews interface...
git-svn-id: svn://10.0.0.236/trunk@23857 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 04:02:53 +00:00
mscott%netscape.com
4565c68f77 We no longer need to create the transport for the smtp protocol. Use smtpName as sender's name.
git-svn-id: svn://10.0.0.236/trunk@23856 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 03:57:59 +00:00
waterson%netscape.com
28605e89fb Fix Unix build bustage.
git-svn-id: svn://10.0.0.236/trunk@23855 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 03:57:16 +00:00
mscott%netscape.com
6f42922563 Updates to smtp protocol. We should not require the caller to create the transport at construction time. the protocol should do this itself.
git-svn-id: svn://10.0.0.236/trunk@23854 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 03:57:13 +00:00
beard%netscape.com
7eba319f1f commented out NEW_PLUGIN_STREAM_API
git-svn-id: svn://10.0.0.236/trunk@23853 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 03:56:02 +00:00
mscott%netscape.com
41b91ea697 use default smtp port to initialize m_port.
git-svn-id: svn://10.0.0.236/trunk@23852 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 03:55:46 +00:00
beard%netscape.com
ed188a97ca removed NEW_PLUGIN_STREAM_API #ifdefs, conformed to latest nsIPluginStreamListener interface.
git-svn-id: svn://10.0.0.236/trunk@23851 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 03:55:42 +00:00
beard%netscape.com
4e4dbfcd3c Added a 4.x target.
git-svn-id: svn://10.0.0.236/trunk@23850 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 03:55:26 +00:00
mscott%netscape.com
bc3a57ba68 define default SMTP port...
git-svn-id: svn://10.0.0.236/trunk@23849 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 03:54:59 +00:00
beard%netscape.com
9912c80b57 changed how visibility is computed with nsPluginPort.
git-svn-id: svn://10.0.0.236/trunk@23848 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 03:54:23 +00:00
mscott%netscape.com
47b36d89c8 Distinguish between pop and smtp user name. Remove old user_name field which has these new, more specific fields instead.
git-svn-id: svn://10.0.0.236/trunk@23847 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 03:54:13 +00:00
mscott%netscape.com
8ea5ffa415 a service to make running pop3 urls easier for the mail client.
git-svn-id: svn://10.0.0.236/trunk@23846 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 03:51:35 +00:00
mscott%netscape.com
a43c810e98 Export nsIPop3Service.h
git-svn-id: svn://10.0.0.236/trunk@23845 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 03:50:48 +00:00
mscott%netscape.com
bb94c546c7 Pop3 service for dealing with pop3 urls...
git-svn-id: svn://10.0.0.236/trunk@23844 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 03:50:20 +00:00
rjc%netscape.com
8713a65eb3 Make history datasource work on Mac and Unix, not just Windows. Now using nsFileSpec and removed all Std C FILE code in favor of streams.
git-svn-id: svn://10.0.0.236/trunk@23843 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 03:42:43 +00:00
rhp%netscape.com
5160205498 Finding content type handler plugins on UNIX
git-svn-id: svn://10.0.0.236/trunk@23842 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 03:40:28 +00:00
rhp%netscape.com
4d25652ec3 More makefile changes for components
git-svn-id: svn://10.0.0.236/trunk@23841 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 03:35:09 +00:00
rhp%netscape.com
dd67e1fe64 Change to make it a component
git-svn-id: svn://10.0.0.236/trunk@23840 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 03:24:00 +00:00
rhp%netscape.com
c6bc7aa463 Added the installation of CSS and JS files.
git-svn-id: svn://10.0.0.236/trunk@23839 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 03:17:45 +00:00
ducarroz%netscape.com
414f9038e7 export composeBody.html
git-svn-id: svn://10.0.0.236/trunk@23838 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 03:03:23 +00:00
briano%netscape.com
c12e8e5eb1 Made it acceptable to QNX's shell.
git-svn-id: svn://10.0.0.236/trunk@23837 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 02:55:24 +00:00
buster%netscape.com
b6be8ea31d deleting the last editable object in a document now causes a bogus placeholder <P>&nbsp;</P> to be added to the document. This node has the
attribute MOZ_EDITOR_BOGUS_NODE set to TRUE.  this solves the problem of when you do a SelectAll then a DEL, you don't have a cursor
or any way to set selection in the document. You do still have the problem that the nbsp is pretty narrow and the frame containing it is hard to hit
with the mouse.  We really need the "set selection to frame nearest the mouse down point" operation.

the intent is for all inserts to look for this node, and if found delete it before the insert.  likewise, all deletes will be no-ops if this node is found.


git-svn-id: svn://10.0.0.236/trunk@23836 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 02:28:24 +00:00
buster%netscape.com
3475d199f3 fixed a small bug. mRefNode may be nsnull.
git-svn-id: svn://10.0.0.236/trunk@23835 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 02:27:48 +00:00
sar%netscape.com
7b417ab826 make it possible to turn mailnews off by setting DISABLE_MAILNEWS
git-svn-id: svn://10.0.0.236/trunk@23834 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 02:27:29 +00:00
mcafee%netscape.com
eefc28a949 Removing printf
git-svn-id: svn://10.0.0.236/trunk@23833 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 02:25:00 +00:00
mcafee%netscape.com
18e50b9e0b Adding triple-click support; map double-click events to NS_MOUSE_LEFT_DOUBLECLICK, etc. (3595)
git-svn-id: svn://10.0.0.236/trunk@23832 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 02:23:44 +00:00
warren%netscape.com
5bbb6913cd Put back in call to NS_NewUnionEnumerator -- resolved link problem.
git-svn-id: svn://10.0.0.236/trunk@23831 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 02:10:03 +00:00
mjudge%netscape.com
e4c09191d6 reverting fix :(
git-svn-id: svn://10.0.0.236/trunk@23830 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 01:49:12 +00:00
alecf%netscape.com
2e1d72fa5a nsNetFile wasn't building on unix...
git-svn-id: svn://10.0.0.236/trunk@23829 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 01:44:02 +00:00
alecf%netscape.com
df9d34d3cd don't build old-sk00l mail/news protocols
git-svn-id: svn://10.0.0.236/trunk@23828 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 01:42:52 +00:00
mjudge%netscape.com
f49ed08720 backing out fix
git-svn-id: svn://10.0.0.236/trunk@23827 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 01:35:13 +00:00
mjudge%netscape.com
c9c3a38a91 backing out fix. i hate this
git-svn-id: svn://10.0.0.236/trunk@23826 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 01:34:44 +00:00
mjudge%netscape.com
56ac18a720 fixing libs phase to make the windows lib to be used by \widget
git-svn-id: svn://10.0.0.236/trunk@23825 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 01:29:31 +00:00
mjudge%netscape.com
f73de66a02 changing the build system to export the "lib" on the libs phase not wait for install
git-svn-id: svn://10.0.0.236/trunk@23824 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 01:28:52 +00:00
ducarroz%netscape.com
1f8a8ccb14 Fix transparency color problem
git-svn-id: svn://10.0.0.236/trunk@23823 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 01:27:54 +00:00
waterson%netscape.com
b2a49aab76 s/rdfb/rdf
git-svn-id: svn://10.0.0.236/trunk@23822 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 01:25:30 +00:00
waterson%netscape.com
6c48f04c6d Added rules for personal toolbar GIFs.
git-svn-id: svn://10.0.0.236/trunk@23821 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 01:23:00 +00:00
rhp%netscape.com
07fa937efc Changes for linux build.
git-svn-id: svn://10.0.0.236/trunk@23820 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 01:22:30 +00:00
waterson%netscape.com
a7fe911af7 Added rules for personal toolbar folder GIFs.
git-svn-id: svn://10.0.0.236/trunk@23819 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 01:21:40 +00:00
waterson%netscape.com
7017b2656c Added icons and style rules for the personal toolbar folder.
git-svn-id: svn://10.0.0.236/trunk@23818 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 01:21:20 +00:00
sdagley%netscape.com
f1888f3f4e Fixing the Mac build bustage by calling the get() accessor for comparison
git-svn-id: svn://10.0.0.236/trunk@23817 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 01:16:08 +00:00
ftang%netscape.com
8a18f3ae43 Add atsui work for non ASCII text. Reviewed and approved by pierre. Need more work to convert more text into MacRoman.
git-svn-id: svn://10.0.0.236/trunk@23816 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 01:15:52 +00:00
ducarroz%netscape.com
56b6d9487a Part of integration of preference into compose
git-svn-id: svn://10.0.0.236/trunk@23815 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 01:10:43 +00:00
ducarroz%netscape.com
8a51948c91 Add pref for user real name, organization and user email address
git-svn-id: svn://10.0.0.236/trunk@23814 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 01:09:48 +00:00
warren%netscape.com
c557e9d038 Added menu item to bring up messenger.
git-svn-id: svn://10.0.0.236/trunk@23813 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 01:08:17 +00:00
ducarroz%netscape.com
af0e1f977b Part of the intregration of preferences into compose
git-svn-id: svn://10.0.0.236/trunk@23812 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 01:07:30 +00:00
despotdaemon%netscape.com
64a0e1d8a7 Pseudo-automatic update of changes made by brendan@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@23811 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 01:04:08 +00:00
mjudge%netscape.com
2531ba7a64 need to swap positions for mac. need to put COMPtr on right side of ==
git-svn-id: svn://10.0.0.236/trunk@23810 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 01:02:34 +00:00
despotdaemon%netscape.com
7dc69c50e5 Pseudo-automatic update of changes made by brendan@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@23809 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 00:49:00 +00:00
ducarroz%netscape.com
c4c91237ac Initial checkin, part of integration of preference into compose
git-svn-id: svn://10.0.0.236/trunk@23808 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 00:47:09 +00:00
waterson%netscape.com
0881f4d92b Fixed spaces in Makefile.in.
git-svn-id: svn://10.0.0.236/trunk@23807 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 00:31:40 +00:00
briano%netscape.com
a8c4a6f357 Now static builds can find the static libraries they need.
git-svn-id: svn://10.0.0.236/trunk@23806 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 00:30:52 +00:00
rods%netscape.com
17a3db4b61 removed D&D define
git-svn-id: svn://10.0.0.236/trunk@23805 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 00:24:36 +00:00
akkana%netscape.com
5fccac2f05 nsConvertKey should only set the key code to zero if the key is one
of the special keys.
Also, handle_key_press/release_event shouldn't pass events for shift,
control, and alt keys -- other platforms don't treat those as key events,
so the XP code isn't prepared to handle them.
This fixes typing of punctuation marks in the editor.


git-svn-id: svn://10.0.0.236/trunk@23804 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 00:23:11 +00:00
rods%netscape.com
28fc42d142 Fixed up some of the drag & drop codce
Added the filling in of the charCode  field in nsKeyEvent


git-svn-id: svn://10.0.0.236/trunk@23803 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 00:21:11 +00:00
mjudge%netscape.com
5876940d2e fixed memory leaks in nsRangelist.cpp. uninitialized memory in nsTextframe, simplified APIs in nsIFrame and the underlying implementations. see layout.checkins
git-svn-id: svn://10.0.0.236/trunk@23802 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 00:17:14 +00:00
dp%netscape.com
5915fbf7df Unix: Autoregistration disabled at initialization. This should be done by app.
git-svn-id: svn://10.0.0.236/trunk@23801 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 00:05:54 +00:00
dp%netscape.com
dd245a35ba Autoregistration at startup on unix from the app
git-svn-id: svn://10.0.0.236/trunk@23800 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 00:04:39 +00:00
cyeh%netscape.com
5f2bfbd29b re-enabling this directory. if the tree breaks again, i'll yank it again, but i have built and clobber_alled and i still can't reproduce the problem.
git-svn-id: svn://10.0.0.236/trunk@23799 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 00:04:23 +00:00
bienvenu%netscape.com
e8b07e2650 fix off by 1 error in buffer growing code
git-svn-id: svn://10.0.0.236/trunk@23798 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 00:01:37 +00:00
mjudge%netscape.com
a1cd7388b4 fixed copy paste issue on windows, linking wrong.lib file
git-svn-id: svn://10.0.0.236/trunk@23797 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 00:01:24 +00:00
waterson%netscape.com
3bf2c5323c Added rules to export bookmark images.
git-svn-id: svn://10.0.0.236/trunk@23796 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 00:01:22 +00:00
waterson%netscape.com
25b9b109d0 Use xul:titledbutton instead of xul:treeicon for now.
git-svn-id: svn://10.0.0.236/trunk@23795 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 23:59:26 +00:00
waterson%netscape.com
6b3c9f5d2c Added bookmark images and style rules to apply them.
git-svn-id: svn://10.0.0.236/trunk@23794 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 23:58:51 +00:00
sfraser%netscape.com
98f3ad251b Added EditorInitPagePlain.html, for plain text testing.
Changed editor XUL file to load this.


git-svn-id: svn://10.0.0.236/trunk@23793 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 23:31:58 +00:00
morse%netscape.com
706d1518bf added include for wallet
git-svn-id: svn://10.0.0.236/trunk@23792 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 23:30:49 +00:00
sfraser%netscape.com
095d0e1915 First Checked In.
git-svn-id: svn://10.0.0.236/trunk@23791 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 23:30:44 +00:00
briano%netscape.com
c6519177cb Automated update
git-svn-id: svn://10.0.0.236/trunk@23790 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 23:30:41 +00:00
michaelp%netscape.com
0264b208cc added Sample 13
git-svn-id: svn://10.0.0.236/trunk@23789 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 23:22:46 +00:00
sfraser%netscape.com
5eece8ae5d Fix a crash if a xul file specifies a non-existent start page (NS_ADDREF changed to NS_IF_ADDREF).
git-svn-id: svn://10.0.0.236/trunk@23788 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 23:17:29 +00:00
briano%netscape.com
bc9f831df4 Fix for the NetBSD build breakage (hopefully).
git-svn-id: svn://10.0.0.236/trunk@23787 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 23:16:49 +00:00
alecf%netscape.com
d5ce998bd6 purify fixes from bruce@cybersight.com
git-svn-id: svn://10.0.0.236/trunk@23786 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 22:58:25 +00:00
cyeh%netscape.com
0aa49cad32 i have no idea why clobber_all isn't working in this directory. instead
of letting the tree burn forever, i am removing from mainline build until
i can reproduce this problem on my machine


git-svn-id: svn://10.0.0.236/trunk@23785 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 22:55:08 +00:00
alecf%netscape.com
9207ac4292 purify fix from bruce@cybersight.com
git-svn-id: svn://10.0.0.236/trunk@23784 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 22:53:02 +00:00
amusil%netscape.com
d2ecbb2bef Minor API change. Added support for tags that don't specify SRC or DATA params.
git-svn-id: svn://10.0.0.236/trunk@23783 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 22:50:58 +00:00
amusil%netscape.com
f6cd375f7c Added some mimetypes. Fixed bugs.
git-svn-id: svn://10.0.0.236/trunk@23782 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 22:49:51 +00:00
amusil%netscape.com
417ae85db0 Redesigned plugin cache code for StreamAsFile operations. Removed NEW_PLUGIN_STREAM_API ifdefs.
git-svn-id: svn://10.0.0.236/trunk@23781 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 22:48:58 +00:00
terry%netscape.com
afe8ed25d5 Added new pages to edit existing components.
git-svn-id: svn://10.0.0.236/trunk@23780 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 22:48:42 +00:00
alecf%netscape.com
fce2803e63 update this interface, rename CreateAndInit->CreateAndInitialize
git-svn-id: svn://10.0.0.236/trunk@23779 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 22:46:56 +00:00
hyatt%netscape.com
918a6347c9 Adding GetIID methods to the content viewer and document loader.
git-svn-id: svn://10.0.0.236/trunk@23778 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 22:38:38 +00:00
cata%netscape.com
cae09c94bf EUCJP encoder test
git-svn-id: svn://10.0.0.236/trunk@23777 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 22:37:53 +00:00
cata%netscape.com
f48fb5e6f6 EUCJP encoder
git-svn-id: svn://10.0.0.236/trunk@23776 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 22:37:27 +00:00
cata%netscape.com
75944f01ac Multi table support added.
git-svn-id: svn://10.0.0.236/trunk@23775 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 22:36:40 +00:00
hyatt%netscape.com
22d212af2a Adding the GetIID methods to webshell.
git-svn-id: svn://10.0.0.236/trunk@23774 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 22:34:13 +00:00
waterson%netscape.com
3558cb747a Fixed build: capitalization error.
git-svn-id: svn://10.0.0.236/trunk@23773 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 22:32:44 +00:00
michaelp%netscape.com
637d37eb64 fixes for demo #13.
git-svn-id: svn://10.0.0.236/trunk@23772 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 22:27:00 +00:00
waterson%netscape.com
0159a35dfc Bug 3213. Removed obsolete files to keep the tree clean.
git-svn-id: svn://10.0.0.236/trunk@23771 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 22:26:08 +00:00
alecf%netscape.com
0908df47c4 remove bogus call for now
git-svn-id: svn://10.0.0.236/trunk@23770 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 22:23:43 +00:00
sfraser%netscape.com
d02e8ad864 Ignore the offset parameter returned from GetScrap.
git-svn-id: svn://10.0.0.236/trunk@23769 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 22:14:25 +00:00
sfraser%netscape.com
5d32eefd0f Fix the Paste code in various ways.
git-svn-id: svn://10.0.0.236/trunk@23768 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 22:03:22 +00:00
dp%netscape.com
6a616ea35a Unix: Adding MOZILLA_FIVE_HOME
git-svn-id: svn://10.0.0.236/trunk@23767 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 21:31:16 +00:00
sfraser%netscape.com
6a3d01cd40 Fix for 3630 -- terminate text and HTML strings returned from the editor.
git-svn-id: svn://10.0.0.236/trunk@23766 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 21:31:03 +00:00
michaelp%netscape.com
92d0f77a8c made compositor state an enum and macro to trace state transitions
for easier debugging. made offscreen to onscreen blit restricted to the
damage rect. added temporary hack so that new compositor works on linux.


git-svn-id: svn://10.0.0.236/trunk@23765 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 21:25:25 +00:00
michaelp%netscape.com
83c8853043 added sample #13: dhtml and compositor.
git-svn-id: svn://10.0.0.236/trunk@23764 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 21:23:28 +00:00
ducarroz%netscape.com
8d008d263b Remove all the delete this that was generating a crash when the send failed for any reason
git-svn-id: svn://10.0.0.236/trunk@23763 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 21:22:25 +00:00
ducarroz%netscape.com
18f45eb469 Use ender instance of an input field for the body of the message
git-svn-id: svn://10.0.0.236/trunk@23762 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 21:16:08 +00:00
ducarroz%netscape.com
5bcb1e7229 Initial check in, ender integration
git-svn-id: svn://10.0.0.236/trunk@23761 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 21:15:23 +00:00
cyeh%netscape.com
e604db3381 bizarre. i don't know how an empty makefile.win got checked into the tree.
git-svn-id: svn://10.0.0.236/trunk@23760 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 21:13:22 +00:00
alecf%netscape.com
08514ac409 rev this interface - remove unnecessary functions
git-svn-id: svn://10.0.0.236/trunk@23759 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 21:06:31 +00:00
cata%netscape.com
9adc779545 Fix for GetMaxLength()
git-svn-id: svn://10.0.0.236/trunk@23758 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 21:05:31 +00:00
alecf%netscape.com
f199bf9a87 rev this interface
git-svn-id: svn://10.0.0.236/trunk@23757 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 21:05:26 +00:00
alecf%netscape.com
a076346f86 rev this interface: char* -> const char*
git-svn-id: svn://10.0.0.236/trunk@23756 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 21:04:57 +00:00
cata%netscape.com
7ccb120a1d SJIS encoder added.
git-svn-id: svn://10.0.0.236/trunk@23755 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 21:04:54 +00:00
cata%netscape.com
3de23b0fb3 SJIS encoder test added.
git-svn-id: svn://10.0.0.236/trunk@23754 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 21:04:30 +00:00
alecf%netscape.com
b94994dc5d rev this interface - char*->const char*
git-svn-id: svn://10.0.0.236/trunk@23753 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 21:02:50 +00:00
sar%netscape.com
2336908bf5 add mozilla/extensions to SeaMonkeyBrowser
git-svn-id: svn://10.0.0.236/trunk@23752 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 21:02:04 +00:00
alecf%netscape.com
1aad69b823 fix up libraries a bit more
git-svn-id: svn://10.0.0.236/trunk@23751 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 21:01:39 +00:00
alecf%netscape.com
1b37c66667 remove unnecessary libraries
git-svn-id: svn://10.0.0.236/trunk@23750 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 20:56:17 +00:00
cata%netscape.com
f05d1b51f9 Test EUCJP encoder added.
git-svn-id: svn://10.0.0.236/trunk@23749 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 20:39:50 +00:00
ebina%netscape.com
2ddc35bca2 Bruce Mitchener's memory leak fixes.
git-svn-id: svn://10.0.0.236/trunk@23748 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 20:39:39 +00:00
cata%netscape.com
5d993fef81 Fix for correct converting.
git-svn-id: svn://10.0.0.236/trunk@23747 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 20:39:19 +00:00
alecf%netscape.com
5781f583a8 constructors not public confuses unix
git-svn-id: svn://10.0.0.236/trunk@23746 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 20:38:47 +00:00
cata%netscape.com
e20331ac02 Decoder helper param fixed.
git-svn-id: svn://10.0.0.236/trunk@23745 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 20:38:39 +00:00
troy%netscape.com
7a6ab354fa Fixed a few places where memory allocated using ToNewCString() was free'd using
PR_Free() instead of delete[]


git-svn-id: svn://10.0.0.236/trunk@23744 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 20:38:28 +00:00
alecf%netscape.com
a55bfa8f8c use MIN not min - unix doesn't have min()
git-svn-id: svn://10.0.0.236/trunk@23743 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 20:38:19 +00:00
cata%netscape.com
46a552681d Method param fixed.
git-svn-id: svn://10.0.0.236/trunk@23742 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 20:37:57 +00:00
alecf%netscape.com
a066758d59 install of these files doesn't quite work yet
git-svn-id: svn://10.0.0.236/trunk@23741 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 20:36:47 +00:00
alecf%netscape.com
fb4d800a68 remove files that don't exist anymore (though this directory isn't even entered any more)
git-svn-id: svn://10.0.0.236/trunk@23740 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 20:36:18 +00:00
alecf%netscape.com
010d146d47 ignore generated files
git-svn-id: svn://10.0.0.236/trunk@23739 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 20:35:29 +00:00
troy%netscape.com
710622602d Patch from Bruce Mitchener that fixes incorrect use of delete
operator


git-svn-id: svn://10.0.0.236/trunk@23738 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 20:32:59 +00:00
alecf%netscape.com
5641548120 this is a component now
git-svn-id: svn://10.0.0.236/trunk@23737 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 20:29:18 +00:00
troy%netscape.com
efa6744bfd Fixed MapDeclarationInto() so it correctly handles 'min-width', 'max-width',
'min-height', and 'max-height'


git-svn-id: svn://10.0.0.236/trunk@23736 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 20:29:02 +00:00
troy%netscape.com
25220f507f Patch from Bruce Mitchener that fixes an incorrect use of delete
git-svn-id: svn://10.0.0.236/trunk@23735 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 20:27:54 +00:00
alecf%netscape.com
b9b10f3081 add libraries to link this library against
git-svn-id: svn://10.0.0.236/trunk@23734 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 20:27:14 +00:00
ducarroz%netscape.com
1c1027b70f Extend messenger patch to composer
git-svn-id: svn://10.0.0.236/trunk@23733 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 20:27:13 +00:00
alecf%netscape.com
710ff324a6 update unix makefile list for mailnews - add new mime stuff, remove old compose makefiles
git-svn-id: svn://10.0.0.236/trunk@23732 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 20:25:58 +00:00
mscott%netscape.com
28f45695ea Change m0id_scope to m_0id_id in order to fix the problem where the list of msg headers was always empty...
git-svn-id: svn://10.0.0.236/trunk@23731 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 20:22:41 +00:00
putterman%netscape.com
6b09cec24d removed call to release
git-svn-id: svn://10.0.0.236/trunk@23730 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 20:19:53 +00:00
hyatt%netscape.com
33cc556694 Added nsXULDocumentInfo.cpp
git-svn-id: svn://10.0.0.236/trunk@23729 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 20:10:31 +00:00
ramiro%netscape.com
9407081b70 Change MOZILLA_HOME to MOZILLA_FIVE_HOME so that we dont fight Communicator
4.x installations.


git-svn-id: svn://10.0.0.236/trunk@23728 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 20:00:57 +00:00
briano%netscape.com
a25b2f9d53 Automated update
git-svn-id: svn://10.0.0.236/trunk@23727 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 20:00:43 +00:00
jfrancis%netscape.com
aa9e3374d2 implemented paste
git-svn-id: svn://10.0.0.236/trunk@23726 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 19:56:12 +00:00
danm%netscape.com
7e985dfa2f fix large leak loading XUL page. bug 3561 reported by bruce@cybersight.com. r:hyatt.
git-svn-id: svn://10.0.0.236/trunk@23725 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 19:54:17 +00:00
putterman%netscape.com
ca9ee9973a Added delete button code
git-svn-id: svn://10.0.0.236/trunk@23724 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 19:52:02 +00:00
putterman%netscape.com
8df736e3ad Add delete message
git-svn-id: svn://10.0.0.236/trunk@23723 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 19:50:54 +00:00
putterman%netscape.com
28d9c7407d Add delete button
git-svn-id: svn://10.0.0.236/trunk@23722 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 19:50:27 +00:00
putterman%netscape.com
539b85f7b4 Gets dependencies correct
git-svn-id: svn://10.0.0.236/trunk@23721 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 19:50:01 +00:00
cyeh%netscape.com
b88162a61f *** empty log message ***
git-svn-id: svn://10.0.0.236/trunk@23720 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 19:49:40 +00:00
hyatt%netscape.com
1b0823980c Adding in the new document info class and tweaking the builder so that
it knows how to use it.


git-svn-id: svn://10.0.0.236/trunk@23719 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 19:49:32 +00:00
hyatt%netscape.com
1a5441a132 Code to enable instantiation of the new document info class.
git-svn-id: svn://10.0.0.236/trunk@23718 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 19:49:05 +00:00
cyeh%netscape.com
fbfda029ed moving code from mozilla/wallet to mozilla/extensions/wallet per brendan/shaver.
code owner is morse@netscape.com.

modified source and makefiles to be connected to toplevel build and fix optimized
builds. mozilla/wallet is obsolete.


git-svn-id: svn://10.0.0.236/trunk@23717 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 19:48:51 +00:00
hyatt%netscape.com
793f50ca3c Helper class for handling of XUL fragments.
git-svn-id: svn://10.0.0.236/trunk@23716 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 19:48:43 +00:00
slamm%netscape.com
d2df84f62d Fix for -MD flags. Filter-out the rule if the rule if it is bogus. A better way around the problem would be to take CFLAGS off the link line, but I am not sure if we can do this.
git-svn-id: svn://10.0.0.236/trunk@23715 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 19:46:00 +00:00
sfraser%netscape.com
36dae6fed3 Add SelectAll() to the EditorAppCore
git-svn-id: svn://10.0.0.236/trunk@23713 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 19:35:26 +00:00
sfraser%netscape.com
ab21987cd6 Fix the key handling, and fix my macro for the charCode stuff
git-svn-id: svn://10.0.0.236/trunk@23712 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 19:34:28 +00:00
sfraser%netscape.com
2af73d37f9 Add SelectAll()
git-svn-id: svn://10.0.0.236/trunk@23711 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 19:33:37 +00:00
cyeh%netscape.com
b404d5302c make clobber_all remove the dist so we can catch depedency problems. if you don't
blow away the dist, you can hide module dependencies and build order that need
to be correct in makefile.win DIRS


git-svn-id: svn://10.0.0.236/trunk@23710 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 18:14:57 +00:00
kostello%netscape.com
be6a84bd6d Fix build bustage: editor is near the end of the make order AND
gfx comes before widget


git-svn-id: svn://10.0.0.236/trunk@23709 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 18:12:12 +00:00
terry%netscape.com
6bb632aa4f Allow importing of groupset.
git-svn-id: svn://10.0.0.236/trunk@23708 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 16:54:12 +00:00
terry%netscape.com
ca10a7208c Added 'groups' stuff, where we have different group bits that we can
put on a person or on a bug.  Some of the group bits control access to bugzilla
features.  And a person can't access a bug unless he has every group bit set
that is also set on the bug.


git-svn-id: svn://10.0.0.236/trunk@23707 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 16:30:54 +00:00
troy%netscape.com
4dc985bb1a Patch from Bruce Mitchener (bruce@sybersight.com) that fixes incorrect
use of delete operator


git-svn-id: svn://10.0.0.236/trunk@23706 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 15:21:46 +00:00
troy%netscape.com
bc0d788a43 Work-in-progress for min/max properties
git-svn-id: svn://10.0.0.236/trunk@23705 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 15:13:17 +00:00
dcone%netscape.com
808ec32e38 added the nsdrawingsurfacemac to project
git-svn-id: svn://10.0.0.236/trunk@23704 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 15:02:42 +00:00
dcone%netscape.com
1e8690a6ef update to use the nsDrawingSurfaceMac object for its onscreen on offscreen drawing.
git-svn-id: svn://10.0.0.236/trunk@23703 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 14:42:11 +00:00
rjc%netscape.com
30a3d46852 Comment out NS_PRECONDITION on mDocument.
git-svn-id: svn://10.0.0.236/trunk@23702 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 12:07:49 +00:00
rjc%netscape.com
b62f8f98d6 Better, smarter sorting implementation.
git-svn-id: svn://10.0.0.236/trunk@23701 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 12:01:47 +00:00
rjc%netscape.com
d1d11b6ca0 Only answer GetTarget() queries if its a file URL (ignore file root node)
git-svn-id: svn://10.0.0.236/trunk@23700 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 12:00:57 +00:00
rpotts%netscape.com
ec0377d74b in the process of adding support for a protocol helper component which is responsible for dealing with modal requests from the network protocol handlers (which may be on different threads...)
git-svn-id: svn://10.0.0.236/trunk@23699 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 11:39:34 +00:00
rpotts%netscape.com
1cbd1aad68 Temporarily added a CID for the default protocol helper component...
git-svn-id: svn://10.0.0.236/trunk@23698 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 11:35:23 +00:00
warren%netscape.com
fe85bdf68a Commented out line causing link error on mac (fix later).
git-svn-id: svn://10.0.0.236/trunk@23697 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 11:03:43 +00:00
warren%netscape.com
c0d9f68452 tweak
git-svn-id: svn://10.0.0.236/trunk@23696 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 11:01:16 +00:00
warren%netscape.com
e82363f5b8 Exporting symbols for the mac.
git-svn-id: svn://10.0.0.236/trunk@23695 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 10:47:54 +00:00
rpotts%netscape.com
c53692a87b added an #ifdef USE_NGPREF around the definition of the nsIPref interface and ClassID... This should fix the build bustage...
git-svn-id: svn://10.0.0.236/trunk@23694 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 10:23:37 +00:00
warren%netscape.com
6a01692cd7 attempt to fix mac build
git-svn-id: svn://10.0.0.236/trunk@23693 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 10:18:46 +00:00
warren%netscape.com
bdd2b4c0ad First cut at new command architecture.
git-svn-id: svn://10.0.0.236/trunk@23692 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 10:14:35 +00:00
warren%netscape.com
720e68dd8f First cut at new command architecture.
git-svn-id: svn://10.0.0.236/trunk@23691 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 10:01:25 +00:00
warren%netscape.com
14b5004bf2 Added union and intersection enumerators.
git-svn-id: svn://10.0.0.236/trunk@23690 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 09:56:59 +00:00
briano%netscape.com
d34fbbe08a Automated update
git-svn-id: svn://10.0.0.236/trunk@23689 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 09:30:43 +00:00
mcafee%netscape.com
ca9a6edb76 Adding -xildoff linker flag to Solaris/CC build; removing -z defaultextract MKSHLIB_UNFORCE_ALL option, this works with ld but not CC. CC just picks the last -z option and uses that for the whole line, ld behaves as advertized in the ld man page.
git-svn-id: svn://10.0.0.236/trunk@23688 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 09:16:56 +00:00
vidur%netscape.com
52fcbb54d3 Put back in changes blown away by evaughn
git-svn-id: svn://10.0.0.236/trunk@23687 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 08:59:37 +00:00
rpotts%netscape.com
34a70160b5 Added an mRequestingThread member to nsConnectionInfo... This is a PRThread pointer to the thread which made the network request (ie. the UI thread, etc)... This information is necessary when marshelling information back to the requesting thread...
git-svn-id: svn://10.0.0.236/trunk@23686 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 08:19:54 +00:00
jband%netscape.com
bd370dabc0 strings are TD_PSTRING | XPT_TDP_POINTER
git-svn-id: svn://10.0.0.236/trunk@23685 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 08:01:02 +00:00
dp%netscape.com
0f3e789976 Changing default registry name:
Unix: ~/.mozilla/registry
Win: <winnt dir>\mozregistry.dat

BTW, mac is already MozRegistry


git-svn-id: svn://10.0.0.236/trunk@23684 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 07:56:03 +00:00
vidur%netscape.com
38fd4465f1 Added parsererror and sourcetext to element table
git-svn-id: svn://10.0.0.236/trunk@23683 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 07:52:24 +00:00
dp%netscape.com
50fc6ba44a creating ~/.mozilla under unix if not already there.
git-svn-id: svn://10.0.0.236/trunk@23682 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 07:44:23 +00:00
sfraser%netscape.com
00dff352b1 Added Cut, Copy and Paste, and did general cleanup
git-svn-id: svn://10.0.0.236/trunk@23681 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 07:40:55 +00:00
jband%netscape.com
498733635b interfaces are pointers and getters return retvals
git-svn-id: svn://10.0.0.236/trunk@23680 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 07:12:18 +00:00
kostello%netscape.com
846e8c7d06 Changed To using Ender: approved by legal
git-svn-id: svn://10.0.0.236/trunk@23679 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 06:48:30 +00:00
bienvenu%netscape.com
c26b882d4b add morkWriter and morkCell, morkRowCellCursor.cpp
git-svn-id: svn://10.0.0.236/trunk@23678 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 06:42:59 +00:00
bienvenu%netscape.com
2662ed7e15 use Close instead of Release
git-svn-id: svn://10.0.0.236/trunk@23677 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 06:42:18 +00:00
sfraser%netscape.com
3e711b3574 Adapted key listener to get char code directly from event, rather than trying to do a key code conversion (#ifdeffed out until char code is there on all platforms).
git-svn-id: svn://10.0.0.236/trunk@23676 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 06:42:09 +00:00
bienvenu%netscape.com
aa91144cd8 patches not to use persistent databases
git-svn-id: svn://10.0.0.236/trunk@23675 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 06:41:29 +00:00
bienvenu%netscape.com
ae80565560 fix bogus cast to nsMsgHdr
git-svn-id: svn://10.0.0.236/trunk@23674 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 06:40:22 +00:00
bienvenu%netscape.com
a3b794e060 add explicit include of nsCOMPtr.h
git-svn-id: svn://10.0.0.236/trunk@23673 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 06:39:35 +00:00
bienvenu%netscape.com
349b24308b check for missing db when deciding to reparse
git-svn-id: svn://10.0.0.236/trunk@23672 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 06:38:56 +00:00
ftang%netscape.com
ad19d90ea2 add shift_jis to the list. Solve PRBool problem on mac
git-svn-id: svn://10.0.0.236/trunk@23671 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 05:56:29 +00:00
troy%netscape.com
dac998d679 Patch from Bruce Mitchener (bruce@cybersight.com) that fixes unitialized
memort error


git-svn-id: svn://10.0.0.236/trunk@23670 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 05:56:11 +00:00
michaelp%netscape.com
52cba6f996 fixed memory leak.
git-svn-id: svn://10.0.0.236/trunk@23669 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 05:45:52 +00:00
nisheeth%netscape.com
6d7dd79951 - Send out the source line where the error occurred from inside PushXMLErrorToken().
- Add the 'parsererror' and 'sourcetext' tags to the HTML tag enum.


git-svn-id: svn://10.0.0.236/trunk@23668 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 05:36:50 +00:00
bienvenu%netscape.com
462294a411 fix syntax error in widgetglue js
git-svn-id: svn://10.0.0.236/trunk@23667 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 05:32:51 +00:00
nisheeth%netscape.com
d6582f1383 Added two new HTML tags used internally for error reporting of expat errors: "parsererror" and "sourcetext".
git-svn-id: svn://10.0.0.236/trunk@23666 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 05:30:28 +00:00
nisheeth%netscape.com
1f80f4903a - Beautified error reporting of expat errors. We now don't just dump the error text out as nodes. We create the parsererror and sourcetext HTML nodes that can be styled via ua.css.
git-svn-id: svn://10.0.0.236/trunk@23665 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 05:29:36 +00:00
nisheeth%netscape.com
840ff7b218 - changing ua.css to add style rules for the 'parsererror' and 'sourcetext' elements.
- added eHTMLTag_parsererror, eHTMLTag_sourcetext to the set of HTML tags.
- These tags are used within XML documents to show errors from expat.


git-svn-id: svn://10.0.0.236/trunk@23664 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 05:26:53 +00:00
kostello%netscape.com
34b6d10e6e Changed comment on -editor and -mail command line code
git-svn-id: svn://10.0.0.236/trunk@23663 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 05:25:57 +00:00
kostello%netscape.com
18a85b2199 Added -editor and -mail as command line extensions. When
passed into apprunner they load the corresponding editor and
mail url


git-svn-id: svn://10.0.0.236/trunk@23662 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 05:24:29 +00:00
bienvenu%netscape.com
4cdd706865 add GetAuthor and GetSubject intefraces
git-svn-id: svn://10.0.0.236/trunk@23661 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 05:15:33 +00:00
kostello%netscape.com
ca7237d1a1 Cleaned up PasteTextBlocking to return better
error information if NO TEXT data exists
on the clipboard


git-svn-id: svn://10.0.0.236/trunk@23660 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 04:41:43 +00:00
kostello%netscape.com
0c821c1e9b Added windows specific paste code
git-svn-id: svn://10.0.0.236/trunk@23659 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 04:27:39 +00:00
mscott%netscape.com
3aa074e975 somehow the pointer passed into getting the netlib queue service got changed...change it back....
git-svn-id: svn://10.0.0.236/trunk@23658 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 03:34:27 +00:00
ftang%netscape.com
dbe9e3f74a fix mHasMultibyte hint problem when the first character of the *word* is not ASCII
git-svn-id: svn://10.0.0.236/trunk@23657 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 03:00:33 +00:00
alecf%netscape.com
b55da7fc0d more linux fixes - link against the right libraries, include xp_time.c, etc.
git-svn-id: svn://10.0.0.236/trunk@23656 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 02:50:08 +00:00
briano%netscape.com
a07f46d649 Automated update
git-svn-id: svn://10.0.0.236/trunk@23655 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 02:45:41 +00:00
sdagley%netscape.com
e4e0984d7d Fill in the keyEvent.charCode field so that we can figure out what character code corresponds to the key pressed.
git-svn-id: svn://10.0.0.236/trunk@23654 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 02:37:24 +00:00
briano%netscape.com
96a96a8041 Cleaned up some of the platform-specific ifdef's. Using HAVE_INT16_T, HAVE_INT32_T, and HAVE_UINT16_T now.
git-svn-id: svn://10.0.0.236/trunk@23653 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 02:37:23 +00:00
briano%netscape.com
7d557e36ad Added tests for int16_t, int32_t, and uint16_t for AIX and BSDI.
git-svn-id: svn://10.0.0.236/trunk@23652 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 02:32:53 +00:00
jband%netscape.com
2e6dec8b20 get xptinfo building on Win32 again
git-svn-id: svn://10.0.0.236/trunk@23651 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 02:21:23 +00:00
coop%netscape.com
989ad5fb47 NOT YET PART OF SEAMONKEY:
* added improved error message for IID collision.


git-svn-id: svn://10.0.0.236/trunk@23650 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 02:15:53 +00:00
alecf%netscape.com
e0e0f4428e fix constness casting problem
git-svn-id: svn://10.0.0.236/trunk@23649 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 02:08:41 +00:00
ducarroz%netscape.com
9a882563b4 add new entries
git-svn-id: svn://10.0.0.236/trunk@23647 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 01:44:44 +00:00
ducarroz%netscape.com
0443449c45 did some cleanup
git-svn-id: svn://10.0.0.236/trunk@23646 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 01:43:19 +00:00
ducarroz%netscape.com
5f3dc5c96f The compose.dll has been merged into msgcompose.dll in order to have the auto appcore registration working.
git-svn-id: svn://10.0.0.236/trunk@23645 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 01:41:25 +00:00
ducarroz%netscape.com
0f2fac7795 The compose.dll has been merged into msgcompose.dll in order to have the auto appcore registration working.
Initial check in


git-svn-id: svn://10.0.0.236/trunk@23644 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 01:38:11 +00:00
mjudge%netscape.com
b06caff664 fix win32 breakage by changing build order of widget and editor
git-svn-id: svn://10.0.0.236/trunk@23643 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 01:37:45 +00:00
ducarroz%netscape.com
095251d5fd The compose.dll has been merged into msgcompose.dll in order to have the auto appcore registration working.
this file was originally located into mailnews/ui/compose/src


git-svn-id: svn://10.0.0.236/trunk@23642 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 01:36:37 +00:00
slamm%netscape.com
4b0a86f81a Only use mddepend.pl when PERL is set.
git-svn-id: svn://10.0.0.236/trunk@23641 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 01:35:33 +00:00
ducarroz%netscape.com
38429fdb48 Add new interface to nsMsgCompose, cleanup the code
git-svn-id: svn://10.0.0.236/trunk@23640 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 01:34:59 +00:00
alecf%netscape.com
945b46a56f rev these interfaces
git-svn-id: svn://10.0.0.236/trunk@23639 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 01:33:33 +00:00
jj%netscape.com
a608360198 changed $CLOBBER_LIBS from 0 to 1 [existing libs must be deleted before new one gets built]
git-svn-id: svn://10.0.0.236/trunk@23638 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 01:33:18 +00:00
ducarroz%netscape.com
a36ca94f86 The compose.dll has been merged into msgcompose.dll in order to have the auto appcore registration working.
git-svn-id: svn://10.0.0.236/trunk@23637 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 01:32:48 +00:00
alecf%netscape.com
63c65a3694 eliminate duplicate IID
git-svn-id: svn://10.0.0.236/trunk@23636 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 01:32:08 +00:00
ducarroz%netscape.com
d4e5b0aa05 add new interface to nsIMsgCompose
git-svn-id: svn://10.0.0.236/trunk@23635 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 01:30:18 +00:00
slamm%netscape.com
17e4604888 Change name of save script
git-svn-id: svn://10.0.0.236/trunk@23634 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 01:30:16 +00:00
alecf%netscape.com
1e814f213b we don't need to link against these libraries any more on unix
git-svn-id: svn://10.0.0.236/trunk@23633 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 01:30:07 +00:00
alecf%netscape.com
47f482ea66 link against our libraries to resolve as many differences as possible
git-svn-id: svn://10.0.0.236/trunk@23632 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 01:28:48 +00:00
ducarroz%netscape.com
66c622b188 The compose.dll has been merged into msgcompose.dll in order to have the auto appcore registration working.
this file was originally located into mailnews/ui/compose/public


git-svn-id: svn://10.0.0.236/trunk@23631 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 01:28:46 +00:00
sfraser%netscape.com
a95ee16903 Add widget.shlb to fix link bustage
git-svn-id: svn://10.0.0.236/trunk@23630 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 01:26:19 +00:00
troy%netscape.com
6866976cb9 Work-in-progress for 'min' and 'max' properties
git-svn-id: svn://10.0.0.236/trunk@23629 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 01:23:10 +00:00
slamm%netscape.com
43ac5089cb Summarize checkout conflicts before dying.
git-svn-id: svn://10.0.0.236/trunk@23628 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 01:21:25 +00:00
alecf%netscape.com
b0914f756b rev nsINNTPHost and nsINewsgroupList interfaces
git-svn-id: svn://10.0.0.236/trunk@23627 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 01:18:04 +00:00
ducarroz%netscape.com
b6fdfe569c add new icons to the build process
git-svn-id: svn://10.0.0.236/trunk@23626 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 01:17:36 +00:00
ducarroz%netscape.com
f69e944958 initial check in, Icons used by mail composer
git-svn-id: svn://10.0.0.236/trunk@23625 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 01:15:40 +00:00
kostello%netscape.com
8214fef4e5 Move editor to build last because of the dependency on widget
git-svn-id: svn://10.0.0.236/trunk@23624 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 01:13:48 +00:00
ducarroz%netscape.com
e4f75dce4b don't need anymore this file, use xul file instance
git-svn-id: svn://10.0.0.236/trunk@23623 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 01:12:06 +00:00
ducarroz%netscape.com
adc62ac4a1 did a lot of cleanup, now compatible with new compose appcore
git-svn-id: svn://10.0.0.236/trunk@23622 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 01:11:04 +00:00
ducarroz%netscape.com
ff7e7e5958 The compose.dll has been merged into msgcompose.dll in order to have the auto appcore registration working.
This file isn't needed anymore


git-svn-id: svn://10.0.0.236/trunk@23621 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 01:07:23 +00:00
ducarroz%netscape.com
9f358744b8 The compose.dll has been merged into msgcompose.dll in order to have the auto appcore registration working
this file has been moved to mailnews/compose/src


git-svn-id: svn://10.0.0.236/trunk@23620 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 01:06:09 +00:00
ducarroz%netscape.com
0366fa8b46 The compose.dll has been merged into msgcompose.dll in order to have the auto appcore registration working
don't need anymore this file


git-svn-id: svn://10.0.0.236/trunk@23619 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 01:04:24 +00:00
ducarroz%netscape.com
9e31970053 The compose.dll has been merged into msgcompose.dll in order to have the auto appcore registration working
don't need anymore those files


git-svn-id: svn://10.0.0.236/trunk@23618 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 01:03:12 +00:00
ducarroz%netscape.com
514844786a folder ui/compose/public removed
git-svn-id: svn://10.0.0.236/trunk@23617 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 00:56:54 +00:00
ducarroz%netscape.com
8f056dc1ab as compose.dll has been merged with msgcompose.dll, those files has been moved to mailnewscompose/public
git-svn-id: svn://10.0.0.236/trunk@23616 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 00:55:06 +00:00
ducarroz%netscape.com
349b1a82a5 As compose.dll has been merged into msgcompose.dll, we don't need those makefile anymore
git-svn-id: svn://10.0.0.236/trunk@23615 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 00:52:31 +00:00
ducarroz%netscape.com
42a18f68c1 The compose.dll has been merged into msgcompose.dll in order to have the auto appcore registration working
git-svn-id: svn://10.0.0.236/trunk@23614 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 00:48:35 +00:00
mjudge%netscape.com
85664fd476 fixing windows build bustage by temporarily loading the raptorwidget_s.dll when ender.dll is loaded. temporary until repository code working
git-svn-id: svn://10.0.0.236/trunk@23613 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 00:20:27 +00:00
slamm%netscape.com
0832fa39cd Take out NSPR rpm option. let the user type it in.
git-svn-id: svn://10.0.0.236/trunk@23612 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 00:18:57 +00:00
av%netscape.com
d645e88da3 *** empty log message ***
git-svn-id: svn://10.0.0.236/trunk@23611 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 00:17:38 +00:00
cmanske%netscape.com
8c0b6cc73e Removed unnecessary factory interface registration
git-svn-id: svn://10.0.0.236/trunk@23610 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 00:16:19 +00:00
slamm%netscape.com
fda4e234b3 Combine NSPR and pthreads options. Update overall look.
git-svn-id: svn://10.0.0.236/trunk@23609 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 00:10:46 +00:00
akkana%netscape.com
5aedc09286 Change the reference to the global selection mgr to fix windows build
git-svn-id: svn://10.0.0.236/trunk@23608 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 00:08:10 +00:00
joki%netscape.com
d710a79e1d Adding DOM access to new character information
git-svn-id: svn://10.0.0.236/trunk@23607 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 00:07:59 +00:00
joki%netscape.com
19bae035e4 Adding new charCode variable to nsGUIEvent
git-svn-id: svn://10.0.0.236/trunk@23606 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 00:01:50 +00:00
coop%netscape.com
80dfa8d3e2 NOT YET PART OF SEAMONKEY:
* one character fix (D'oh!) to make InterfaceTypeDescriptor indices update properly.


git-svn-id: svn://10.0.0.236/trunk@23605 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 23:41:04 +00:00
hyatt%netscape.com
742df4c179 Tweaks related to XUL fragments.
git-svn-id: svn://10.0.0.236/trunk@23604 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 23:31:26 +00:00
dp%netscape.com
7898673a73 Removing unused variable.
git-svn-id: svn://10.0.0.236/trunk@23603 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 23:30:25 +00:00
tague%netscape.com
6ad4a14379 Checked in patch from bruce@cybersight.com. Fixed purify memory error.
git-svn-id: svn://10.0.0.236/trunk@23602 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 23:19:44 +00:00
endico%mozilla.org
7b0ee15a8e Add support for indexing multiple trees from the same lxr directory.
git-svn-id: svn://10.0.0.236/trunk@23600 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 22:58:57 +00:00
nhotta%netscape.com
81a05263f7 Added Support class and encoders
git-svn-id: svn://10.0.0.236/trunk@23599 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 22:57:54 +00:00
rjc%netscape.com
1bf77ce0f4 const this, baby!
git-svn-id: svn://10.0.0.236/trunk@23598 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 22:54:49 +00:00
warren%netscape.com
e5d24a2696 Added progID version of GetService. Fixed up nsService to not be a template.
git-svn-id: svn://10.0.0.236/trunk@23597 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 22:53:17 +00:00
pollmann%netscape.com
c060190502 Checking in GetSelectedItem, GetSelectedIndices, and SetSelectedIndices methods. This enables submission of a listbox's value for Linux. (wahoo!)
git-svn-id: svn://10.0.0.236/trunk@23596 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 22:52:55 +00:00
akkana%netscape.com
f28253683c Comment out debug prints
git-svn-id: svn://10.0.0.236/trunk@23595 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 22:50:51 +00:00
cata%netscape.com
58053aee71 Support class, EUCJP and ISO2022JP encoders added.
git-svn-id: svn://10.0.0.236/trunk@23594 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 22:46:38 +00:00
akkana%netscape.com
a6feb40744 Implement editor cut/copy/paste
git-svn-id: svn://10.0.0.236/trunk@23593 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 22:46:15 +00:00
rpotts%netscape.com
ad4a570981 New interface to allow protocol handlers to request and process modal dialogs...
git-svn-id: svn://10.0.0.236/trunk@23592 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 22:43:23 +00:00
akkana%netscape.com
109aad3dea Fix Solaris build problems -- thanks to braddr & bruce @ puremagic.com
git-svn-id: svn://10.0.0.236/trunk@23591 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 22:41:18 +00:00
alecf%netscape.com
59c04072de rev the interface, update char* to const char*
git-svn-id: svn://10.0.0.236/trunk@23590 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 22:32:46 +00:00
akkana%netscape.com
f198ef7ae3 Fix purify UMR error -- thanks to braddr & bruce @ puremagic.com
git-svn-id: svn://10.0.0.236/trunk@23589 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 22:30:23 +00:00
slamm%netscape.com
2589f5be88 Added Javascript to change focus and radio selection for radio/text groups. Simplified the instructions.
git-svn-id: svn://10.0.0.236/trunk@23588 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 22:20:55 +00:00
alecf%netscape.com
b5aabe5013 rev this interface and remove NS_DOM binding from IDL
git-svn-id: svn://10.0.0.236/trunk@23587 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 22:19:54 +00:00
cata%netscape.com
edc8cfeb62 added files: mozilla/intl/uconv/ucvja/nsUCvJaSupport.cpp, mozilla/intl/uconv/ucvja/nsUnicodeToSJIS.cpp
git-svn-id: svn://10.0.0.236/trunk@23586 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 22:09:06 +00:00
alecf%netscape.com
fbc0ce4691 comment out these two functions, they are already defined on Unix
git-svn-id: svn://10.0.0.236/trunk@23585 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 22:08:07 +00:00
cata%netscape.com
c4558e181f SJIS encoder, Support class added.
git-svn-id: svn://10.0.0.236/trunk@23584 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 22:08:00 +00:00
alecf%netscape.com
80ac2d23f4 revert to old types for now to match definition in include/
git-svn-id: svn://10.0.0.236/trunk@23583 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 22:07:45 +00:00
dp%netscape.com
c81e64e889 Adding error messages when loading fails.
git-svn-id: svn://10.0.0.236/trunk@23582 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 22:07:34 +00:00
alecf%netscape.com
6121b82e15 various tweaks to make this build on Linux
git-svn-id: svn://10.0.0.236/trunk@23581 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 22:06:52 +00:00
alecf%netscape.com
598584c05b gotta export all these header files so that we can see them from other mime directories
git-svn-id: svn://10.0.0.236/trunk@23580 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 22:06:15 +00:00
rjc%netscape.com
fda66fcfc1 Small sort fix.
git-svn-id: svn://10.0.0.236/trunk@23579 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 22:02:25 +00:00
rjc%netscape.com
d90524979e When asking for a bookmark's URL via GetTarget(), synthesize it.
git-svn-id: svn://10.0.0.236/trunk@23578 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 21:58:40 +00:00
morse%netscape.com
926dd7bbd4 changes for wallet
git-svn-id: svn://10.0.0.236/trunk@23577 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 21:42:45 +00:00
mcmullen%netscape.com
6a5c89fa74 Fixed bustage with typo.
git-svn-id: svn://10.0.0.236/trunk@23576 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 21:41:43 +00:00
morse%netscape.com
e74e92add5 bug fix for single signon
git-svn-id: svn://10.0.0.236/trunk@23575 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 21:38:34 +00:00
morse%netscape.com
85bb026c3f New files for wallet
git-svn-id: svn://10.0.0.236/trunk@23574 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 21:35:41 +00:00
slamm%netscape.com
50ff7e73b4 Use an even simpler name, mozconfig (no .sh).
git-svn-id: svn://10.0.0.236/trunk@23573 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 21:34:17 +00:00
sfraser%netscape.com
fffcc0cbc4 Add Cut, Copy and Paste to editor interfaces and classes, with a stub implemenatioon in nsEditor. Changed .idl file and regenerated nsIDOMEditorAppCore and nsJSEditorAPpCore.
git-svn-id: svn://10.0.0.236/trunk@23572 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 21:31:50 +00:00
sfraser%netscape.com
0a1636794b Add Cut, Copy and Paste to editor interfaces and classes, with a stub implemenatioon in nsEditor.
git-svn-id: svn://10.0.0.236/trunk@23571 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 21:29:41 +00:00
kin%netscape.com
dd9bfaeb94 Changed all occurences of NS_TRANSACTION_MANAGER_FACTORY_CID
and kCTransactionManagerFactoryCID to NS_TRANSACTIONMANAGER_CID
and kCTransactionManagerCID.


git-svn-id: svn://10.0.0.236/trunk@23570 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 21:27:02 +00:00
sfraser%netscape.com
bbdc2c5a6b Add static to remove warning
git-svn-id: svn://10.0.0.236/trunk@23569 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 21:26:33 +00:00
kin%netscape.com
8b4d03a7fb Modified the clobber target so that it removes the dll from the bin/components directory.
git-svn-id: svn://10.0.0.236/trunk@23568 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 21:25:03 +00:00
shaver%netscape.com
378256875c generate meaningful annotation
git-svn-id: svn://10.0.0.236/trunk@23567 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 21:09:01 +00:00
mcmullen%netscape.com
681a46c1c0 Added tests for size and mod date.
git-svn-id: svn://10.0.0.236/trunk@23566 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 21:03:53 +00:00
slamm%netscape.com
8bc62cedd3 Make sure .mozconfig.mk can be read. Even for first checkout. Pre-fill web configurator with existing options.
git-svn-id: svn://10.0.0.236/trunk@23565 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 21:03:33 +00:00
mcmullen%netscape.com
bdbf667fac Added GetModDate and GetFileSize. Fixed a crash with a strcmp of null.
git-svn-id: svn://10.0.0.236/trunk@23564 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 21:02:58 +00:00
mcmullen%netscape.com
19c53c8fda Added output streamers for int and unsigned int.
git-svn-id: svn://10.0.0.236/trunk@23563 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 20:56:38 +00:00
av%netscape.com
d91791f1ef Rendering alt context in object tag
git-svn-id: svn://10.0.0.236/trunk@23562 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 20:43:07 +00:00
coop%netscape.com
4e2ef3ec92 NOT YET PART OF SEAMONKEY:
* first annotation indicates that resulting typelib was created by the linker.
* annotations from files being linked in are now preserved.


git-svn-id: svn://10.0.0.236/trunk@23561 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 20:40:17 +00:00
hshaw%netscape.com
7791b67a3a Replace NS_DECLARE_CID with NS_DEFINE_IID for kIPrefIID and KPrefCID
git-svn-id: svn://10.0.0.236/trunk@23560 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 20:33:18 +00:00
hshaw%netscape.com
d1254ab87c Replace NS_DECLARE_CID with NS_DEFINE_IID for KPrefCID
git-svn-id: svn://10.0.0.236/trunk@23559 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 20:33:14 +00:00
waterson%netscape.com
e64fdedc82 Added GetResource() to XULElement.
git-svn-id: svn://10.0.0.236/trunk@23558 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 20:20:52 +00:00
slamm%netscape.com
aabcc7fbbf sar want more 'checkins since' links. Don't refresh pagepage if it isn't the most recent time.
git-svn-id: svn://10.0.0.236/trunk@23557 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 20:18:49 +00:00
waterson%netscape.com
997a39d173 Remove invalid reference to nsIRDFContent.h
git-svn-id: svn://10.0.0.236/trunk@23556 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 20:18:21 +00:00
dougt%netscape.com
fdb6e0f2a5 Unix makefiles. Gotta love xpcode!
git-svn-id: svn://10.0.0.236/trunk@23555 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 20:17:14 +00:00
waterson%netscape.com
a0c57020f4 Must've missed this file in my merge: support for xpidl keyword.
git-svn-id: svn://10.0.0.236/trunk@23554 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 20:15:23 +00:00
putterman%netscape.com
e3eb9dceb3 Initialize mPath to "" instead of nsnull.
git-svn-id: svn://10.0.0.236/trunk@23553 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 20:07:44 +00:00
dougt%netscape.com
d643c0b6d4 No longer shifting windows nsFileSpec's mPath to uppercase.
Now comparing without regard to case instead on windows.
Windows nsSpecialSystemDirectory will have all uppercase mPaths.


git-svn-id: svn://10.0.0.236/trunk@23552 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 20:07:10 +00:00
hyatt%netscape.com
f7eb900fae Working on XUL fragments.
git-svn-id: svn://10.0.0.236/trunk@23551 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 20:05:12 +00:00
hshaw%netscape.com
3a95a0679c Fix for bug #3130 , thanks mcafee
git-svn-id: svn://10.0.0.236/trunk@23550 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 20:02:22 +00:00
waterson%netscape.com
d3d993d327 Support for xpidl keyword.
git-svn-id: svn://10.0.0.236/trunk@23549 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 19:55:00 +00:00
waterson%netscape.com
bd625fd0d0 Added SetDataBase() implementation that'll set the database on the DOMXULNode.
git-svn-id: svn://10.0.0.236/trunk@23548 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 19:54:36 +00:00
buster%netscape.com
9bcc7a19c2 first cut at rules delegate for text editor, will change drastically in the next week or two
git-svn-id: svn://10.0.0.236/trunk@23547 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 19:53:26 +00:00
buster%netscape.com
f076cbe10e creation of text nodes now supported
git-svn-id: svn://10.0.0.236/trunk@23546 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 19:51:55 +00:00
buster%netscape.com
4ddf2b48c1 mNewNode is a DOM Node, not a DOM Element
git-svn-id: svn://10.0.0.236/trunk@23545 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 19:51:07 +00:00
buster%netscape.com
cc359d1068 small fix of an off-by-one error in an assertion
git-svn-id: svn://10.0.0.236/trunk@23544 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 19:50:17 +00:00
buster%netscape.com
9dd1f7d958 SelectAll wired to Ctrl-A.
git-svn-id: svn://10.0.0.236/trunk@23543 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 19:49:43 +00:00
buster%netscape.com
4a106cee02 small interface change to InsertBreak
git-svn-id: svn://10.0.0.236/trunk@23542 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 19:49:18 +00:00
buster%netscape.com
0b0989c61c improvements to InsertBreak, and first crack at adding support for rules delegate
git-svn-id: svn://10.0.0.236/trunk@23541 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 19:48:46 +00:00
buster%netscape.com
d859f3e58c Implemented SelectAll.
Added nsEditor::DoInitialInsert() for doing first insert into an empty document.  Try typing into <html><body></body></html>
Added some smarts to DeleteSelectionAndCreateNode() so it only splits the selected node when appropriate (when the selection is not at offset 0 or max)

CreateElementTxn now creates text nodes as well as DOM elements


git-svn-id: svn://10.0.0.236/trunk@23540 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 19:48:13 +00:00
buster%netscape.com
0e7f65788f added nsTextEditRules
git-svn-id: svn://10.0.0.236/trunk@23539 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 19:47:34 +00:00
despotdaemon%netscape.com
9871322f1a Pseudo-automatic update of changes made by bruce@cybersight.com.
git-svn-id: svn://10.0.0.236/trunk@23538 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 19:46:32 +00:00
buster%netscape.com
9bf72e290c added nsIEditRules.h. Experimental, don't count on this.
git-svn-id: svn://10.0.0.236/trunk@23537 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 19:46:24 +00:00
jfrancis%netscape.com
bf6551cfed adding nsTextEditRules.cpp
git-svn-id: svn://10.0.0.236/trunk@23536 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 19:45:23 +00:00
coop%netscape.com
6db7aab3c3 NOT YET PART OF SEAMONKEY:
* xpt_dump now checks num_methods and num_constants before trying to walk the arrays.
* xpt_link now actually links. It even updates interfaces indices. Tested using all the idl files in mozilla/xpcom/idl.


git-svn-id: svn://10.0.0.236/trunk@23535 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 19:44:36 +00:00
pinkerton%netscape.com
1f508b19fb correct my pitiful spelling of bonsai.
git-svn-id: svn://10.0.0.236/trunk@23534 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 19:39:04 +00:00
terry%netscape.com
afebdc6fff Redistributed some QA folks.
git-svn-id: svn://10.0.0.236/trunk@23533 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 19:23:46 +00:00
dougt%netscape.com
bffbf478f9 Fixing casting problem on windows
NOT PART OF TINDERBOX


git-svn-id: svn://10.0.0.236/trunk@23532 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 18:51:15 +00:00
dougt%netscape.com
4b6e1122ce Make it work on the mac.
Passing unix paths to ZIP routines.  

THIS IS NOT PART OF THE BUILD SYSTEM YET


git-svn-id: svn://10.0.0.236/trunk@23530 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 18:39:01 +00:00
dougt%netscape.com
4d7174a311 Removing extra ; to get rid of warning.
THIS IS NOT PART OF TREE IS NOT PART OF THE BUILD SYSTEM YET


git-svn-id: svn://10.0.0.236/trunk@23529 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 18:36:40 +00:00
pinkerton%netscape.com
e9af4fe3ff fix 95/98 bustage
git-svn-id: svn://10.0.0.236/trunk@23528 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 18:11:35 +00:00
mcafee%netscape.com
c89a455a05 Solaris needs newline at EOF.
git-svn-id: svn://10.0.0.236/trunk@23527 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 10:57:05 +00:00
mcafee%netscape.com
39c88a0585 Solaris doesn't like the dangling semi-colon after NS_DECL_ISUPPORTS_INHERITED macro.
git-svn-id: svn://10.0.0.236/trunk@23526 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 10:52:50 +00:00
mccabe%netscape.com
ea7137976d Added tests of getting info assoc'd with params to TestInterfaceInfo.cpp, which uncovered an off-by-one problem due to magic typelib offsets for nsXPTParamInfo. Which makes me wonder if we shouldn't have just said #define XPT_INDEX_NO_PARENT 0xFFFF.
git-svn-id: svn://10.0.0.236/trunk@23525 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 10:36:13 +00:00
mcafee%netscape.com
6c5b72830c newline at end of file for Solaris, whitespace.
git-svn-id: svn://10.0.0.236/trunk@23524 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 09:56:25 +00:00
dp%netscape.com
4bcb926c07 changing to correct indent style and tabs. Beautify...
git-svn-id: svn://10.0.0.236/trunk@23523 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 09:53:25 +00:00
rjc%netscape.com
aa7eab3051 Cast away! and changed a few .Equals() to now be .EqualsIgnoreCase()
git-svn-id: svn://10.0.0.236/trunk@23522 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 09:41:07 +00:00
mccabe%netscape.com
1c4dd83cdc Not yet part of the Monkey.
- Added magic comments to make the LXR browsing experience more pleasant.

- introduced the nsInterfaceRecord class (formerly less formally interface_record).

- changed the XPTInterfaceDirectoryEntry pointer in InterfaceInfoes into nsInterfaceRecord pointers, removing the need for a hash just to go from entries to records to support nsXPTParamInfo::GetInterface.

- made the destructor for InterfaceInfo objects remove null the pointer in the corresponding reference.


git-svn-id: svn://10.0.0.236/trunk@23521 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 09:30:48 +00:00
dp%netscape.com
0f679ff5e4 Recheckin because of loss during ComponentManager Merge
- Using Reg*Raw() interface to support component urls storage in registry.
 - Implemented recursive version of DeleteKey() so that Reg*Raw() interface could be used

 - Fixing memory corruption; access of deleted dll object


git-svn-id: svn://10.0.0.236/trunk@23520 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 09:16:28 +00:00
waterson%netscape.com
4a8136b8ec Aggregate nsIDOMXULTreeElement interface onto nsRDFElement. Scriptability #ifdef-ed out.
git-svn-id: svn://10.0.0.236/trunk@23519 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 08:50:27 +00:00
waterson%netscape.com
ca6e4614ef Added nsXULTreeBuilder to build.
git-svn-id: svn://10.0.0.236/trunk@23518 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 08:49:35 +00:00
waterson%netscape.com
bb4ae3367f Added nsXULTreeElement to build.
git-svn-id: svn://10.0.0.236/trunk@23517 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 08:49:12 +00:00
braddr%puremagic.com
948141df40 Add new target for quantify
git-svn-id: svn://10.0.0.236/trunk@23516 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 08:32:42 +00:00
mccabe%netscape.com
9e433b6fbe Not part of seamonkey.
Added a comment saying preconditions the tests actually needs to
succeed.  (also simplified these some.)


git-svn-id: svn://10.0.0.236/trunk@23515 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 08:22:17 +00:00
waterson%netscape.com
67073aee6a Bug 3510. Fixed to use nsFileSpec, so now bookmarks should load on Mac (even through an alias).
git-svn-id: svn://10.0.0.236/trunk@23514 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 08:15:17 +00:00
waterson%netscape.com
997e72149b Fix build bustage, not really sure what this is supposed to be doing.
git-svn-id: svn://10.0.0.236/trunk@23513 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 08:11:28 +00:00
jband%netscape.com
9eb814c93e was using the same iid for 2 interfaces - synced nsIShutdownListener iid with the iid from the .h file
git-svn-id: svn://10.0.0.236/trunk@23512 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 08:02:23 +00:00
waterson%netscape.com
f933a42a97 Change PATH_MAX to MAXPATHLEN to compile on Solaris.
git-svn-id: svn://10.0.0.236/trunk@23511 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 07:21:09 +00:00
waterson%netscape.com
22026e5bb5 Fixed header files to work outside the XPIDL world for now.
git-svn-id: svn://10.0.0.236/trunk@23510 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 07:12:42 +00:00
rjc%netscape.com
cf3d2ba32b Small changes to sorting code to prepare for sorting on id attribute.
git-svn-id: svn://10.0.0.236/trunk@23509 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 07:07:10 +00:00
mccabe%netscape.com
c4fef7da6b Not part of seamonkey.
Fixed bustage due to improper use of DEBUG_somehacker.


git-svn-id: svn://10.0.0.236/trunk@23508 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 06:59:53 +00:00
rjc%netscape.com
df76041bf6 Quick&dirty fix for natural position attribute hack.
git-svn-id: svn://10.0.0.236/trunk@23507 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 06:37:04 +00:00
jband%netscape.com
c118498478 making it compile on Win32
git-svn-id: svn://10.0.0.236/trunk@23506 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 06:36:03 +00:00
mscott%netscape.com
238e5948be Add code to allow user's to display mailbox messages from the first 4 messages in their inbox....
also add code to retrieve the current user's root mail folder path...


git-svn-id: svn://10.0.0.236/trunk@23505 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 06:35:48 +00:00
waterson%netscape.com
46d6048104 Fixed my bad back-out.
git-svn-id: svn://10.0.0.236/trunk@23504 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 06:17:29 +00:00
karnaze%netscape.com
67d36f76f2 bug 3407
git-svn-id: svn://10.0.0.236/trunk@23503 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 06:13:35 +00:00
waterson%netscape.com
195f0c9dd4 Added OS_CurrentProcessDirectory test.
git-svn-id: svn://10.0.0.236/trunk@23502 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 06:08:06 +00:00
waterson%netscape.com
0f472a8518 Added OS_CurrentProcessDirectory implementation. Thanks to RJC for Mac. Unix is still bogus: uses getcwd().
git-svn-id: svn://10.0.0.236/trunk@23501 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 06:07:21 +00:00
alecf%netscape.com
5e01ee7094 fix nsFileSpec casting
git-svn-id: svn://10.0.0.236/trunk@23500 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 06:06:40 +00:00
mccabe%netscape.com
0b0b45888d Not part of seamonkey.
API change - changed nsXPTParamInfo from taking an InterfaceDirectoryEntry* (which really isn't part of the API I want to expose) to taking an nsIInterfaceInfo*, which is.


git-svn-id: svn://10.0.0.236/trunk@23499 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 06:06:19 +00:00
ducarroz%netscape.com
3aec1baafe don't crash anymore when the pane is null
git-svn-id: svn://10.0.0.236/trunk@23498 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 06:05:49 +00:00
alecf%netscape.com
a8ff15bf7a don't build tests by default
git-svn-id: svn://10.0.0.236/trunk@23497 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 06:01:40 +00:00
alecf%netscape.com
0380d26a03 don't link against base libmailnews
git-svn-id: svn://10.0.0.236/trunk@23496 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 06:00:59 +00:00
alecf%netscape.com
9262c5bd62 remove old call to NS_NewRFC822Parser
git-svn-id: svn://10.0.0.236/trunk@23495 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 06:00:11 +00:00
waterson%netscape.com
57265d0550 Landed on tip.
git-svn-id: svn://10.0.0.236/trunk@23494 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 05:37:31 +00:00
michaelp%netscape.com
0dfa53b698 fixed bug in underflow of state push count in new compositor.
git-svn-id: svn://10.0.0.236/trunk@23493 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 05:31:27 +00:00
briano%netscape.com
2069289d3b Automated update
git-svn-id: svn://10.0.0.236/trunk@23492 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 05:15:41 +00:00
waterson%netscape.com
93038788a2 Backed out addition of nsIDOMXULTreeElement: repository is horked.
git-svn-id: svn://10.0.0.236/trunk@23491 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 05:11:54 +00:00
ramiro%netscape.com
7933edd03e Reverted donm's solaris linker flag changes. You need to detect that gcc
is built to use the gnu linker.  You cant assume that here.


git-svn-id: svn://10.0.0.236/trunk@23490 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 05:09:54 +00:00
waterson%netscape.com
4f8cf8634e Added nsIDOMXULTreeElement.g to exports. This is currently generated by a very special version of idlc.
git-svn-id: svn://10.0.0.236/trunk@23489 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 05:08:26 +00:00
waterson%netscape.com
d745eb82a4 Added XULTreeElement to makefile, under !if.
git-svn-id: svn://10.0.0.236/trunk@23488 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 05:06:52 +00:00
waterson%netscape.com
0d826a1c01 Added nsIStreamListener to #includes to try to fix gcc 2.7 bustage.
git-svn-id: svn://10.0.0.236/trunk@23487 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 05:05:27 +00:00
waterson%netscape.com
0f8f4468a3 Initial revision.
git-svn-id: svn://10.0.0.236/trunk@23486 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 04:49:54 +00:00
mccabe%netscape.com
2c5a38de3e Not yet part of Seamonkey.
Progress on the nsInterfaceInfoManager typelib loader for xpconnect.
Now has complete (I think) functionality, though the implementation is
still probably rusty.

I punted on defining a directory for .xpt files at this point; the
implementation looks at the value of the XPTDIR environment variable
for this value.

Note that the nsXPTParaminfo interface (public/xpt_cpp) has changed
(possibly temporarily) to take an 'entry' parameter.


git-svn-id: svn://10.0.0.236/trunk@23485 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 04:26:15 +00:00
alecf%netscape.com
6879c5461b use CreateInstance to create a parser rather than linking directly with libmailnews.so
git-svn-id: svn://10.0.0.236/trunk@23484 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 04:22:52 +00:00
bienvenu%netscape.com
584b25602a fix nsFileSpec bustage
git-svn-id: svn://10.0.0.236/trunk@23482 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 03:55:10 +00:00
alecf%netscape.com
49cb5dada8 oops, don't build nsIMessenger.cpp twice
git-svn-id: svn://10.0.0.236/trunk@23481 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 03:53:48 +00:00
alecf%netscape.com
2cd4454623 export new files from ui directory
git-svn-id: svn://10.0.0.236/trunk@23480 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 03:52:29 +00:00
mscott%netscape.com
4e72d42e2a Warren's changes broke component creation for nsIMsgMailSession and nsIUrlListenerManager. Restore these so our code runs correctly.
git-svn-id: svn://10.0.0.236/trunk@23479 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 03:49:39 +00:00
mscott%netscape.com
c68803898a restore code from the breakage that occurred last night by fixing up nsFileSpec/nsFilePath problems. use CLOSE on the db because it isn't an interface yet so we should not be calling release.
git-svn-id: svn://10.0.0.236/trunk@23478 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 03:48:32 +00:00
mscott%netscape.com
9f173d6446 creating a url listener manager should go through the componenet manager and not the service manager.
git-svn-id: svn://10.0.0.236/trunk@23477 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 03:47:14 +00:00
briano%netscape.com
f80ea81018 Lame tweak in order to do a test build on non-glibc Linux systems.
git-svn-id: svn://10.0.0.236/trunk@23476 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 03:30:42 +00:00
mscott%netscape.com
5450b79a19 More Linux makefile changes for libmime
git-svn-id: svn://10.0.0.236/trunk@23475 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 03:27:12 +00:00
despotdaemon%netscape.com
fc53bb7f38 Pseudo-automatic update of changes made by pschwan@cmu.edu.
git-svn-id: svn://10.0.0.236/trunk@23474 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 03:26:04 +00:00
mscott%netscape.com
b0b1083af2 Adding files for linux build
git-svn-id: svn://10.0.0.236/trunk@23473 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 03:25:33 +00:00
mscott%netscape.com
7e66b91f85 Adding for Linux build.
git-svn-id: svn://10.0.0.236/trunk@23472 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 03:23:18 +00:00
mscott%netscape.com
1a5cd582ca Further changes for linux makefile
git-svn-id: svn://10.0.0.236/trunk@23471 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 03:21:02 +00:00
mscott%netscape.com
ab0c00e783 New files for Linux build
git-svn-id: svn://10.0.0.236/trunk@23470 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 03:20:16 +00:00
despotdaemon%netscape.com
92192bacf8 Pseudo-automatic update of changes made by leaf@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@23469 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 03:15:31 +00:00
terry%netscape.com
e4f999a632 Only show checkboxes for trees that have had activity in the last two days.
git-svn-id: svn://10.0.0.236/trunk@23468 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 03:03:27 +00:00
law%netscape.com
03e8d64f2a New and improved status bar
git-svn-id: svn://10.0.0.236/trunk@23467 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 02:52:02 +00:00
mcmullen%netscape.com
5d582ac9c0 Change assignment operator not to create dirs.
git-svn-id: svn://10.0.0.236/trunk@23466 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 02:50:16 +00:00
terry%netscape.com
47ecdbd80b Cope if no mindate/maxdate is provided.
git-svn-id: svn://10.0.0.236/trunk@23465 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 02:48:31 +00:00
law%netscape.com
870160dbf4 Adding support for various statusbar broadcasters
git-svn-id: svn://10.0.0.236/trunk@23464 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 02:42:29 +00:00
cmanske%netscape.com
9832b2e459 removed files: mozilla/xpfe/AppCores/src/nsEditorMode.cpp
git-svn-id: svn://10.0.0.236/trunk@23463 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 02:41:02 +00:00
cmanske%netscape.com
22f502cd7f Cleaned up editor inialization in EditoAppCore
git-svn-id: svn://10.0.0.236/trunk@23462 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 02:35:58 +00:00
mscott%netscape.com
21415a3793 make the folder pane black =)....
git-svn-id: svn://10.0.0.236/trunk@23461 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 02:17:16 +00:00
hyatt%netscape.com
2db15f8900 Oops. Fixing build bustage.
git-svn-id: svn://10.0.0.236/trunk@23460 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 02:10:44 +00:00
despotdaemon%netscape.com
491fdefc01 Pseudo-automatic update of changes made by endico@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@23459 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 01:57:58 +00:00
terry%netscape.com
ef17928062 Was displaying junk for the branch name if a checkin wasn't allowed.
git-svn-id: svn://10.0.0.236/trunk@23458 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 01:52:32 +00:00
hyatt%netscape.com
9a6837ddd1 Fixing a bug.
git-svn-id: svn://10.0.0.236/trunk@23457 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 01:47:35 +00:00
hyatt%netscape.com
3762b96095 Adding support for XUL fragments to the content sink. (Work in
progress)


git-svn-id: svn://10.0.0.236/trunk@23456 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 01:45:53 +00:00
briano%netscape.com
ca209af80c Automated update
git-svn-id: svn://10.0.0.236/trunk@23455 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 01:45:41 +00:00
mscott%netscape.com
7fcb7c9321 Add more tests to the demo menu to allow folks to display messages from their Inbox.
git-svn-id: svn://10.0.0.236/trunk@23454 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 01:42:54 +00:00
alecf%netscape.com
c84fa01c70 don't #define MOZ_MAIL_NEWS, only set it in the make system
git-svn-id: svn://10.0.0.236/trunk@23453 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 01:41:09 +00:00
hyatt%netscape.com
4dd006de26 Landing the initial changes to support XUL fragments.
git-svn-id: svn://10.0.0.236/trunk@23452 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 01:37:31 +00:00
alecf%netscape.com
dff5073858 remove old cruft from ui (most moved into base)
git-svn-id: svn://10.0.0.236/trunk@23451 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 01:32:29 +00:00
alecf%netscape.com
9d23fe000f stop exporting stuff in this directory
git-svn-id: svn://10.0.0.236/trunk@23450 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 01:31:00 +00:00
jband%netscape.com
a825f73d7d adding Components object. Got rid of jsapi based nsID object and replaced it with reflected xpcom objects for IID and CID. adapted to xpt_struct changes. added allocator static helpers to the module. starting to use nsIComponentManager. fixed scriptable stuff. and on and on
git-svn-id: svn://10.0.0.236/trunk@23449 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 01:28:49 +00:00
alecf%netscape.com
2338455673 rev XPIDL-generated header files - now native #include's are no longer re-included!
git-svn-id: svn://10.0.0.236/trunk@23448 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 01:25:34 +00:00
rhp%netscape.com
1d1948a4e0 This change is needed to register libmime with netlib for parsing RFC822 messages.
git-svn-id: svn://10.0.0.236/trunk@23447 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 01:24:07 +00:00
alecf%netscape.com
7ed8242d7d add new source files that weren't being build on linux
git-svn-id: svn://10.0.0.236/trunk@23446 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 01:22:53 +00:00
alecf%netscape.com
51f3d54af3 #include the right file
git-svn-id: svn://10.0.0.236/trunk@23445 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 01:22:19 +00:00
alecf%netscape.com
39aed77c25 end in newline
git-svn-id: svn://10.0.0.236/trunk@23444 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 01:21:52 +00:00
vidur%netscape.com
7944b75ced Removed bogus addition of text for newlines
git-svn-id: svn://10.0.0.236/trunk@23443 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 01:19:35 +00:00
mscott%netscape.com
d77f43ff5b Changes for Linux builds.
git-svn-id: svn://10.0.0.236/trunk@23442 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 01:18:57 +00:00
vidur%netscape.com
2cf6b40bda Added CreateElementWithNameSpace to proprietary document interface. Fixed GetTagName for HTML to uppercase tag names. Hooked up style rule addition and deletion to reconstruct frames. Fixed DOM generation problem
git-svn-id: svn://10.0.0.236/trunk@23441 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 01:17:49 +00:00
mscott%netscape.com
089050a64d Fixes for makefiles on Linux
git-svn-id: svn://10.0.0.236/trunk@23440 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 01:17:48 +00:00
alecf%netscape.com
2cf4c284bc fix casting problems
git-svn-id: svn://10.0.0.236/trunk@23439 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 01:17:47 +00:00
alecf%netscape.com
cc1b5f77d9 uint -> PRUint32
git-svn-id: svn://10.0.0.236/trunk@23438 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 01:13:52 +00:00
alecf%netscape.com
2c0e5ce8fc export nsID.idl to get native types
git-svn-id: svn://10.0.0.236/trunk@23437 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 01:13:27 +00:00
michaelp%netscape.com
a699b49e4b factored code.
git-svn-id: svn://10.0.0.236/trunk@23435 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 01:03:03 +00:00
mscott%netscape.com
738e0cf71c Getting new mime change to run on Linux
git-svn-id: svn://10.0.0.236/trunk@23434 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 00:57:50 +00:00
sfraser%netscape.com
f867547c36 Put editor shared libs in the Components folder, and call the folder "Components", not "components".
git-svn-id: svn://10.0.0.236/trunk@23433 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 00:55:34 +00:00
mcafee%netscape.com
7ac72a2140 PRBool means use PR_FALSE/PR_TRUE. This breaks Solaris.
git-svn-id: svn://10.0.0.236/trunk@23432 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 00:53:29 +00:00
mscott%netscape.com
d58b486813 Updates to fix breakage caused by the big check in last night. In particular, update to use nsFilespec instead of nsFilePath. Use correct variable name for requesting the netlib queue service...
git-svn-id: svn://10.0.0.236/trunk@23431 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 00:43:58 +00:00
rhp%netscape.com
b3645fb2c7 Reworked an issue with includes to prevent compile problems with C & C++ code.
git-svn-id: svn://10.0.0.236/trunk@23430 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 00:36:39 +00:00
alecf%netscape.com
8021fac986 purify fix from bruce@cybersight.com - use delete[] rather than delete
git-svn-id: svn://10.0.0.236/trunk@23429 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 00:36:18 +00:00
alecf%netscape.com
9bb701d390 purify fixes from bruce@cybersight.com - use delete[] rather than delete
git-svn-id: svn://10.0.0.236/trunk@23428 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 00:35:16 +00:00
alecf%netscape.com
1bab895f15 purify fixes from bruce@cybersight.com - free memory the right way
git-svn-id: svn://10.0.0.236/trunk@23427 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 00:32:44 +00:00
alecf%netscape.com
c7c621d431 purify fixes from bruce@cybersight.com
use delete[] rather than delete


git-svn-id: svn://10.0.0.236/trunk@23426 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 00:31:59 +00:00
briano%netscape.com
15591a6649 Automated update
git-svn-id: svn://10.0.0.236/trunk@23425 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 00:30:41 +00:00
mcafee%netscape.com
63d1ddca8c Fixing Solaris/CC bustage.
git-svn-id: svn://10.0.0.236/trunk@23424 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 00:29:34 +00:00
akkana%netscape.com
c6464d3004 Fix UMR, caught with purify by bruce@portland.puremagic.com
git-svn-id: svn://10.0.0.236/trunk@23423 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 00:28:47 +00:00
donm%netscape.com
758efdc59e solaris gcc needs different command line options to link a
set of static libs into a shared lib.


git-svn-id: svn://10.0.0.236/trunk@23422 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 00:27:20 +00:00
waterson%netscape.com
89b60f7c29 Change class to clazz to get to compile in C++.
git-svn-id: svn://10.0.0.236/trunk@23421 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 00:22:22 +00:00
nhotta%netscape.com
56b9bce46c Added charset menu items in view menu.
git-svn-id: svn://10.0.0.236/trunk@23420 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 00:21:26 +00:00
slamm%netscape.com
11f1f88355 Give warning for 'make depend' with --enable-md.
git-svn-id: svn://10.0.0.236/trunk@23419 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 00:03:12 +00:00
pinkerton%netscape.com
7d7d82c1c1 new styles for expanding and collapsing folders
git-svn-id: svn://10.0.0.236/trunk@23418 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 00:01:55 +00:00
sfraser%netscape.com
b82cb437b9 onConstruction -> onload
git-svn-id: svn://10.0.0.236/trunk@23417 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 00:00:06 +00:00
dougt%netscape.com
39d464c13c First Checked In.
git-svn-id: svn://10.0.0.236/trunk@23416 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 23:59:16 +00:00
slamm%netscape.com
b9cb51bca5 Change 'name' array to 'build'. Looks like name is reserved or something.
git-svn-id: svn://10.0.0.236/trunk@23415 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 23:59:15 +00:00
mscott%netscape.com
6afb85812c Build nsMsgIdentity and nsMsgMailSession.
git-svn-id: svn://10.0.0.236/trunk@23414 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 23:52:24 +00:00
mscott%netscape.com
85638846b7 Export nsIMsgIdentity.h and nsIMsgMailSession.h.
git-svn-id: svn://10.0.0.236/trunk@23413 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 23:51:40 +00:00
waterson%netscape.com
c758ab8571 Made sure to initialize rv to NS_OK.
git-svn-id: svn://10.0.0.236/trunk@23412 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 23:51:34 +00:00
rods%netscape.com
81e01450a9 Added the handling for nsDragDropEvents for files
git-svn-id: svn://10.0.0.236/trunk@23411 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 23:51:29 +00:00
rods%netscape.com
22f6a4adb0 Added EnableDileDrop method
git-svn-id: svn://10.0.0.236/trunk@23410 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 23:50:40 +00:00
rods%netscape.com
0d03271f02 Added nsDragDropEvent
git-svn-id: svn://10.0.0.236/trunk@23409 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 23:50:18 +00:00
rods%netscape.com
bf53653ab4 Added File Drop
Now handling the WM_DROPFILE event


git-svn-id: svn://10.0.0.236/trunk@23408 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 23:48:58 +00:00
cata%netscape.com
9d06235a51 "extern" declaration for global vars fixed.
git-svn-id: svn://10.0.0.236/trunk@23407 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 23:48:10 +00:00
rods%netscape.com
d6db2acd54 Added method EnableFileDrop (temporary for D&D work)
git-svn-id: svn://10.0.0.236/trunk@23406 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 23:47:47 +00:00
rods%netscape.com
26dce0d4a2 Added Uuid.lib and OLE32.lib for drag & drop
git-svn-id: svn://10.0.0.236/trunk@23405 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 23:46:24 +00:00
rods%netscape.com
f7a274adef Added shell32.lib
git-svn-id: svn://10.0.0.236/trunk@23404 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 23:44:21 +00:00
rods%netscape.com
3f32fab8a0 Added nsDropTarget
git-svn-id: svn://10.0.0.236/trunk@23403 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 23:39:15 +00:00
rods%netscape.com
2d3986d90c initial checkin
git-svn-id: svn://10.0.0.236/trunk@23402 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 23:38:37 +00:00
mscott%netscape.com
adb3cd8520 Fix runtime breakage caused by changing nsFilePath to nsFileSpec.
git-svn-id: svn://10.0.0.236/trunk@23401 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 23:17:44 +00:00
cmanske%netscape.com
fc43b4f0d4 2nd try to get it right in get editor factory method
git-svn-id: svn://10.0.0.236/trunk@23400 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 23:06:16 +00:00
dougt%netscape.com
209f30f426 ack.
git-svn-id: svn://10.0.0.236/trunk@23399 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 23:06:11 +00:00
cmanske%netscape.com
70947d83ca Fixed editor registration and startup problems
git-svn-id: svn://10.0.0.236/trunk@23398 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 22:52:24 +00:00
cata%netscape.com
05e4d00784 Docs added.
git-svn-id: svn://10.0.0.236/trunk@23397 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 22:41:09 +00:00
dougt%netscape.com
eb1175b875 Added VR_ calls to the export list.
git-svn-id: svn://10.0.0.236/trunk@23396 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 22:39:09 +00:00
pinkerton%netscape.com
be80881964 fix minor goof in xptoolkit sample menu
git-svn-id: svn://10.0.0.236/trunk@23395 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 22:39:02 +00:00
putterman%netscape.com
7be07c5b29 use correct mailbox path.
git-svn-id: svn://10.0.0.236/trunk@23394 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 22:38:40 +00:00
putterman%netscape.com
921e359dbe use nsCRT string functions.
git-svn-id: svn://10.0.0.236/trunk@23393 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 22:38:22 +00:00
putterman%netscape.com
a8beb67c48 Added folder listener so we can run the mailbox parsing url.
git-svn-id: svn://10.0.0.236/trunk@23392 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 22:37:55 +00:00
putterman%netscape.com
623a8f0bf2 Added xplib.lib and added folderListener
git-svn-id: svn://10.0.0.236/trunk@23391 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 22:37:06 +00:00
rhp%netscape.com
d2857b91de Changes for autoregistration as well as the new stream converter
interface.


git-svn-id: svn://10.0.0.236/trunk@23390 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 22:37:03 +00:00
putterman%netscape.com
5c24751987 implement SetMessageKey
git-svn-id: svn://10.0.0.236/trunk@23389 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 22:36:24 +00:00
putterman%netscape.com
abae3a3095 OnAnnouncerGoingAway is abstract.
git-svn-id: svn://10.0.0.236/trunk@23388 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 22:35:57 +00:00
troy%netscape.com
aa06c3716c Some more table pagination improvements
git-svn-id: svn://10.0.0.236/trunk@23387 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 22:34:51 +00:00
putterman%netscape.com
2a470cbde5 Added folder listener.
git-svn-id: svn://10.0.0.236/trunk@23386 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 22:34:29 +00:00
mcmullen%netscape.com
2b21b06cb7 Turning on dougt's special system directory stuff, and adding it to the Macintosh build. Fixed spurious leading slash on getting leaf name (win and unix). Adding dougt's equality test operator, too. Adding dougt's test code for all the above.
git-svn-id: svn://10.0.0.236/trunk@23385 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 22:33:36 +00:00
akkana%netscape.com
d966254b07 fixing merge problem of windows not looking for components in components directory - dp & akkana
git-svn-id: svn://10.0.0.236/trunk@23384 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 22:18:32 +00:00
pinkerton%netscape.com
c4117f80e5 make the personal toolbar buttons more mozilla centric, even if everything else is blatant NSCP drug money.
git-svn-id: svn://10.0.0.236/trunk@23383 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 22:13:36 +00:00
michaelp%netscape.com
9a8800e96b added background image.
made one table relatively positioned.
added opacity to transparent scrolled table.


git-svn-id: svn://10.0.0.236/trunk@23382 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 22:12:20 +00:00
michaelp%netscape.com
81f9258975 added nsIClipView.h
added support for getting/setting scroll properties in scrollable view so
that the app can control whether scrolling should be accomplished via
blitting or painting.
more work in progress for the new compositor.


git-svn-id: svn://10.0.0.236/trunk@23381 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 22:10:31 +00:00
michaelp%netscape.com
cd37a865bf added blender method that takes rendering contexts.
added LockDrawingSurface() and UnlockDrawingSurface() to rendering
context.
fixed state maintenance errors in rendering context win.
added IsReleaseDCDestructive() to drawingsurfacewin.


git-svn-id: svn://10.0.0.236/trunk@23380 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 22:07:06 +00:00
pinkerton%netscape.com
66fec9010c added xptoolkit tree test 1 to menus
git-svn-id: svn://10.0.0.236/trunk@23379 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 22:06:38 +00:00
rjc%netscape.com
35eea039ba Comment out PR_ASSERT() due to assert/unassert now actually being called.
git-svn-id: svn://10.0.0.236/trunk@23378 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 22:06:29 +00:00
pinkerton%netscape.com
cd2e93001b add spiffy header
git-svn-id: svn://10.0.0.236/trunk@23377 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 22:03:38 +00:00
pinkerton%netscape.com
fbb00b246c Add case for xptoolkit tree demo and fix missing break statement at end of toolbar demo case that would always cause JS window to appear. doh!
git-svn-id: svn://10.0.0.236/trunk@23376 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 22:03:18 +00:00
pinkerton%netscape.com
67297e8d73 add define for xptoolkit tree demo
git-svn-id: svn://10.0.0.236/trunk@23375 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 22:02:25 +00:00
pinkerton%netscape.com
d475b76dfa add new tree sample
git-svn-id: svn://10.0.0.236/trunk@23374 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 22:01:28 +00:00
hyatt%netscape.com
47a81994c3 Fixing a bug with selection in the tree view.
git-svn-id: svn://10.0.0.236/trunk@23373 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 21:58:06 +00:00
slamm%netscape.com
e6258c5d6d -MD depend: Putting objects on PHONY target didn't work. Use 'FORCE' dependency instead.
git-svn-id: svn://10.0.0.236/trunk@23372 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 21:56:44 +00:00
pinkerton%netscape.com
7dcd005c44 export the first tree test xul/css files
git-svn-id: svn://10.0.0.236/trunk@23371 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 21:55:22 +00:00
pinkerton%netscape.com
54b3b30385 First Checked In.
git-svn-id: svn://10.0.0.236/trunk@23370 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 21:53:01 +00:00
shaver%netscape.com
79e4108e56 #include "nsID.idl" to get the nsID/nsIID/nsCID defines in other IDL, not just C++
git-svn-id: svn://10.0.0.236/trunk@23369 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 21:50:55 +00:00
putterman%netscape.com
e6ceda4543 Added selection color. Removed Local Mail from thread pane.
git-svn-id: svn://10.0.0.236/trunk@23368 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 21:49:35 +00:00
dp%netscape.com
4cfc093823 registry version to 0.40 for component manager change
git-svn-id: svn://10.0.0.236/trunk@23366 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 21:31:33 +00:00
slamm%netscape.com
419c65d22c Clean-up some output. Add link for 'Show next X hours' instead of 'Show more checkin history'. Skip dates that are in the future.
git-svn-id: svn://10.0.0.236/trunk@23365 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 21:30:02 +00:00
mscott%netscape.com
4024e89953 Fix crash when displaying thread pane. This fix is really scottip's.
git-svn-id: svn://10.0.0.236/trunk@23364 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 21:28:48 +00:00
ramiro%netscape.com
2c2e1e8b02 Fix windows bustage. Why doesnt this file build on other platforms ?
git-svn-id: svn://10.0.0.236/trunk@23363 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 21:22:03 +00:00
dougt%netscape.com
d22687b856 Stripping additional access paths.
git-svn-id: svn://10.0.0.236/trunk@23362 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 21:03:39 +00:00
despotdaemon%netscape.com
4d5cb73c21 Pseudo-automatic update of changes made by dmose@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@23361 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 20:59:53 +00:00
dougt%netscape.com
da242762c8 remove libutil references.
git-svn-id: svn://10.0.0.236/trunk@23360 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 20:58:29 +00:00
terry%netscape.com
4796c85fe7 Use new lxr links.
git-svn-id: svn://10.0.0.236/trunk@23359 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 20:57:24 +00:00
dougt%netscape.com
06cbe39c3f First Checked In.
git-svn-id: svn://10.0.0.236/trunk@23358 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 20:57:17 +00:00
jfrancis%netscape.com
8e01fb29f9 catching up with nsComponentManager and getting rid of cout usage
git-svn-id: svn://10.0.0.236/trunk@23357 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 20:11:27 +00:00
slamm%netscape.com
0cf3821a9e Fix typo. s/AC_DEFINES/ACDEFINES/
git-svn-id: svn://10.0.0.236/trunk@23356 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 20:11:05 +00:00
dougt%netscape.com
3d7a22afdc Fixes compare from int to ptr. ANSI C++ does not like that.
git-svn-id: svn://10.0.0.236/trunk@23355 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 20:10:20 +00:00
jfrancis%netscape.com
fc33b92b99 including header
git-svn-id: svn://10.0.0.236/trunk@23354 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 20:04:59 +00:00
shaver%netscape.com
5ea64cbf54 Handle nsID, nsIID and nsCID via a custom string-compare hack. (Ugly, but we
need 0.6.3 for a better fix, and this'll do for now.)
When sorting IDEs, sort entries with identical IIDs by namespace::name.


git-svn-id: svn://10.0.0.236/trunk@23353 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 19:59:42 +00:00
alecf%netscape.com
f9e44dfc1b - move messenger appcore into the base mailnews directory
- do appcore initialization during Initialize() in messenger bootstrap


git-svn-id: svn://10.0.0.236/trunk@23352 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 19:58:17 +00:00
slamm%netscape.com
80490954a5 I broke it. ...again. back out, back out.
git-svn-id: svn://10.0.0.236/trunk@23351 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 19:57:13 +00:00
alecf%netscape.com
a41ca7385c stop building the seperate messenger appcore
git-svn-id: svn://10.0.0.236/trunk@23350 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 19:56:53 +00:00
slamm%netscape.com
864abe3c76 Shorten the output a bit more.
git-svn-id: svn://10.0.0.236/trunk@23349 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 19:53:31 +00:00
alecf%netscape.com
3243351c34 export NS_InitBaseAppCoreClass so that appcores outside this DLL can initialize themselves
(Yes, I know this is a generated file, but this is how it needs to work right now, otherwise
appcores can't live outside appcores.dll)


git-svn-id: svn://10.0.0.236/trunk@23348 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 19:53:19 +00:00
terry%netscape.com
ce3b1dddbf Patch by Ry4an Brase <ry4an@ry4an.org> -- fix typo.
git-svn-id: svn://10.0.0.236/trunk@23347 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 19:52:18 +00:00
dougt%netscape.com
b22394cd3e First checkin of unix makefile.
git-svn-id: svn://10.0.0.236/trunk@23346 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 19:31:55 +00:00
hyatt%netscape.com
8588377965 Fixes to the broadcasters and observers. I made HTML elements work with
observes nodes, and I changed some SetAttribute calls to use the DOM
instead of the nsIContent APIs.


git-svn-id: svn://10.0.0.236/trunk@23345 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 19:30:41 +00:00
nhotta%netscape.com
db418a9816 Implementation of SetDocumentCharset.
git-svn-id: svn://10.0.0.236/trunk@23344 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 19:24:28 +00:00
jfrancis%netscape.com
772f3287c8 integrated with content iterator
git-svn-id: svn://10.0.0.236/trunk@23343 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 19:22:48 +00:00
jfrancis%netscape.com
fb0583ffb5 reordered link order so that cout would work
git-svn-id: svn://10.0.0.236/trunk@23342 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 19:22:00 +00:00
jfrancis%netscape.com
a3a451200f fixed refcounting bugs
git-svn-id: svn://10.0.0.236/trunk@23341 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 19:21:30 +00:00
jfrancis%netscape.com
928892f905 fixed refcounting bugs plus a little cleanup
git-svn-id: svn://10.0.0.236/trunk@23340 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 19:21:04 +00:00
ramiro%netscape.com
f05974cb48 Use the macro on all platforms. Thanks to pierre for helping me make sure
it doesnt break the mac.  I verified that it works on unix and windows.


git-svn-id: svn://10.0.0.236/trunk@23339 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 19:19:02 +00:00
troy%netscape.com
c954953e18 Better handles the case where the first row is complete when splitting
the row group


git-svn-id: svn://10.0.0.236/trunk@23338 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 15:35:43 +00:00
troy%netscape.com
5f577fe103 Changed it so we get the computed width from the first-in-flow
git-svn-id: svn://10.0.0.236/trunk@23337 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 15:35:08 +00:00
terry%netscape.com
3bb49a53cf Added a disgusting hack to deal with the fact that we can occasionally get builds with wildly wrong times.
git-svn-id: svn://10.0.0.236/trunk@23336 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 15:22:09 +00:00
warren%netscape.com
2d6102e5e6 Fixed prefs code.
git-svn-id: svn://10.0.0.236/trunk@23335 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 15:06:52 +00:00
warren%netscape.com
5d0cd73d0a Include problem.
git-svn-id: svn://10.0.0.236/trunk@23334 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 14:44:24 +00:00
warren%netscape.com
68843d63a2 Re-enabled the prefs.js stuff.
git-svn-id: svn://10.0.0.236/trunk@23333 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 14:20:30 +00:00
warren%netscape.com
6769b3f0ef Implemented virtuals in cpp file to try to avoid linux pedantic error.
git-svn-id: svn://10.0.0.236/trunk@23332 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 14:09:11 +00:00
warren%netscape.com
5e1f310167 PR_ASSERT wasn't defined for the mac.
git-svn-id: svn://10.0.0.236/trunk@23331 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 14:03:56 +00:00
warren%netscape.com
015051d6b3 Fixed registration methods.
git-svn-id: svn://10.0.0.236/trunk@23330 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 13:23:36 +00:00
warren%netscape.com
8519161b55 fixed include problem
git-svn-id: svn://10.0.0.236/trunk@23329 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 13:07:15 +00:00
warren%netscape.com
b40f054bad Fixed include
git-svn-id: svn://10.0.0.236/trunk@23328 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 12:53:21 +00:00
warren%netscape.com
0f71af4fee Fixed nsService problems.
git-svn-id: svn://10.0.0.236/trunk@23327 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 12:49:38 +00:00
warren%netscape.com
6d47974e30 Fixed nsRepository -> nsComponentManager
git-svn-id: svn://10.0.0.236/trunk@23326 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 12:43:27 +00:00
warren%netscape.com
72d0dbfbc8 Fixed return.
git-svn-id: svn://10.0.0.236/trunk@23325 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 12:36:13 +00:00
warren%netscape.com
9309a7b8fb Fixed include problem.
git-svn-id: svn://10.0.0.236/trunk@23324 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 12:34:01 +00:00
warren%netscape.com
d62d4a9f0b Removed nsService stuff.
git-svn-id: svn://10.0.0.236/trunk@23323 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 12:29:08 +00:00
warren%netscape.com
0a5af143e2 Fixed include problem.
git-svn-id: svn://10.0.0.236/trunk@23322 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 12:16:34 +00:00
warren%netscape.com
b36740faf3 Backed out nsService changes.
git-svn-id: svn://10.0.0.236/trunk@23321 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 11:53:02 +00:00
warren%netscape.com
e082c74dc0 Backed out the nsService template stuff.
git-svn-id: svn://10.0.0.236/trunk@23320 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 11:49:41 +00:00
warren%netscape.com
345056e941 Fixed variable name problem.
git-svn-id: svn://10.0.0.236/trunk@23319 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 11:42:48 +00:00
warren%netscape.com
f8ef3e9349 Removed nsService template.
git-svn-id: svn://10.0.0.236/trunk@23318 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 11:12:52 +00:00
warren%netscape.com
3a95261810 Commented out template because linux isn't happy with it.
git-svn-id: svn://10.0.0.236/trunk@23317 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 11:12:23 +00:00
warren%netscape.com
7392983e7b Fixed exports for nsRepository -> nsComponentManager
git-svn-id: svn://10.0.0.236/trunk@23316 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 10:51:12 +00:00
warren%netscape.com
c6559126d6 Fixed path separator.
git-svn-id: svn://10.0.0.236/trunk@23315 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 10:20:01 +00:00
warren%netscape.com
47efd8d451 Trying a hack to see if I can make linux happy.
git-svn-id: svn://10.0.0.236/trunk@23314 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 10:15:54 +00:00
warren%netscape.com
291c802a13 Workaround for sun386i breakage.
git-svn-id: svn://10.0.0.236/trunk@23313 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 10:07:02 +00:00
warren%netscape.com
de7b75d07f nsRepository -> nsIComponentManager changes. nsIMsgDatabase interface. Message enumerators. Misc.
git-svn-id: svn://10.0.0.236/trunk@23303 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 09:52:30 +00:00
mcafee%netscape.com
529189e540 Protect against a copy of zero characters (zero-length buffer)
git-svn-id: svn://10.0.0.236/trunk@23302 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 09:49:32 +00:00
warren%netscape.com
055216c4b1 Added nsComponentManager.cpp
git-svn-id: svn://10.0.0.236/trunk@23301 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 09:47:12 +00:00
warren%netscape.com
0b33372d99 nsRepository -> nsIComponentManager changes.
git-svn-id: svn://10.0.0.236/trunk@23300 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 09:44:27 +00:00
shaver%netscape.com
e294264814 turn off more debugging noise and prepare for 0.6.2's forward handling
git-svn-id: svn://10.0.0.236/trunk@23298 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 08:23:00 +00:00
waterson%netscape.com
95a9f4d99f Fixed GetElementsByAttribute(): use the DOM APIs to be consistent with namespaces.
git-svn-id: svn://10.0.0.236/trunk@23297 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 08:10:50 +00:00
waterson%netscape.com
52da7b7d32 Made widget observer observe the composite data source.
git-svn-id: svn://10.0.0.236/trunk@23296 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 08:05:26 +00:00
nisheeth%netscape.com
a9b7621b74 - Quoted all attributes.
- Fixed casing on the end BookSet tag.  (The expat parser enforces case-sensitivity in XML)


git-svn-id: svn://10.0.0.236/trunk@23295 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 07:44:47 +00:00
nisheeth%netscape.com
bbb4dffad0 - We weren't adding the tag text to the token created for the end tag. Fixed.
- Tokens for CDATA sections were not being created.  Fixed.
- The length of the parse buffer is passed into ParseXMLBuffer() because it is available from the scanner.  We were doing a strlen() to determine the length which was inefficient.


git-svn-id: svn://10.0.0.236/trunk@23294 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 07:39:04 +00:00
pierre%netscape.com
1c05e162b4 added menu command VIEWER_PRINT_SETUP
git-svn-id: svn://10.0.0.236/trunk@23293 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 06:39:50 +00:00
mcafee%netscape.com
ebf32a0f5d Adding Edit|{Cut,Copy,Paste} to menubar.
git-svn-id: svn://10.0.0.236/trunk@23292 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 06:04:38 +00:00
pierre%netscape.com
7be0666585 don't dispatch mouseMoved events when Raptor is in the background
git-svn-id: svn://10.0.0.236/trunk@23291 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 05:46:01 +00:00
pierre%netscape.com
dd5b567297 dispatch suspend/resume events to Raptor
git-svn-id: svn://10.0.0.236/trunk@23290 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 05:44:47 +00:00
troy%netscape.com
39e58ce72d Overflow code and pushing code now take header/footer frames into
account


git-svn-id: svn://10.0.0.236/trunk@23289 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 05:29:37 +00:00
troy%netscape.com
d3a15268a2 Better handling of NS_FRAME_NOT_COMPLETE for incremental reflow
git-svn-id: svn://10.0.0.236/trunk@23288 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 05:28:44 +00:00
wtc%netscape.com
35f5c7deeb Another update from the internal CVS repository /m/src.
git-svn-id: svn://10.0.0.236/trunk@23284 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 05:12:06 +00:00
troy%netscape.com
144854728c Made sure NS_FRAME_COMPLETE is always returned. This fixes an incremental
reflow problem


git-svn-id: svn://10.0.0.236/trunk@23283 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 05:11:14 +00:00
terry%netscape.com
3367b1fec2 Added a disgusting hack to deal with the fact that we can occasionally get builds with wildly wrong times.
git-svn-id: svn://10.0.0.236/trunk@23282 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 05:07:50 +00:00
troy%netscape.com
d6693ebf08 Fixed it so that for incremental reflow commands the correct value is
passed for the available height


git-svn-id: svn://10.0.0.236/trunk@23281 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 05:01:59 +00:00
pierre%netscape.com
ea645514fc fixed crash on delete (the OS deleted the menu a second time)
git-svn-id: svn://10.0.0.236/trunk@23280 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 05:01:45 +00:00
despotdaemon%netscape.com
2ca1ed560a Pseudo-automatic update of changes made by nisheeth@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@23279 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 04:47:32 +00:00
pierre%netscape.com
c8d2b0a41d added menu commands VIEWER_GFX_WIDGET_MODE and VIEWER_NATIVE_WIDGET_MODE
git-svn-id: svn://10.0.0.236/trunk@23278 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 04:39:50 +00:00
mcafee%netscape.com
afe16f3c08 Adding install target for purify binaries
git-svn-id: svn://10.0.0.236/trunk@23277 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 04:21:51 +00:00
pierre%netscape.com
1fde015542 fixed display in SetSelectedIndices()
git-svn-id: svn://10.0.0.236/trunk@23276 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 04:11:25 +00:00
pierre%netscape.com
92ee6edde8 fixed index off by 1 in GetSelectedIndex()
git-svn-id: svn://10.0.0.236/trunk@23275 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 04:10:33 +00:00
mccabe%netscape.com
783ac85782 Chop xptinfo from the list of sub-Makes built by libxpt during coding
thrash.


git-svn-id: svn://10.0.0.236/trunk@23274 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 04:10:30 +00:00
waterson%netscape.com
f856b93c1d Land Guha's history stuff, including some fixes for references in the file system data source, and modifications for literals: there's now nsIntLiteral and nsDateLiteral.
git-svn-id: svn://10.0.0.236/trunk@23273 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 04:01:56 +00:00
mscott%netscape.com
cfbb447bcb Sending a message no longer requires a host and from field because we can now extract that information from the current identity.
git-svn-id: svn://10.0.0.236/trunk@23269 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 03:06:59 +00:00
pierre%netscape.com
f2f9218b22 Fixed #2253 "Copy and Paste in text widget"
Fixed double-click


git-svn-id: svn://10.0.0.236/trunk@23268 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 02:58:14 +00:00
alecf%netscape.com
49198778c3 use Messenger's CID rather than ProgID because I can't seem to create objects
by ProgID (looks like ProgID->CID mapping is broken)


git-svn-id: svn://10.0.0.236/trunk@23267 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 02:51:25 +00:00
coop%netscape.com
093d2cdff1 NOT YET PART OF SEAMONKEY:
* initial pass at handling the update of interface indices.


git-svn-id: svn://10.0.0.236/trunk@23266 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 02:51:22 +00:00
brendan%netscape.com
c3911df063 Must use defined XP_UNIX, not XP_UNIX, as #elif condition.
git-svn-id: svn://10.0.0.236/trunk@23265 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 02:46:23 +00:00
terry%netscape.com
a5535f79dd Added params to control how priorities are set in a new bug. You can
now choose whether to let submitters of new bugs choose a priority, or whether
they should just accept the default priority (which is now no longer hardcoded
to "P2", but is instead a param.)  The default value of the params will cause
the same behavior as before.


git-svn-id: svn://10.0.0.236/trunk@23264 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 02:33:58 +00:00
dveditz%netscape.com
7680dbd368 initial libjar files, NOT PART OF BUILD
git-svn-id: svn://10.0.0.236/trunk@23259 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 02:13:56 +00:00
ducarroz%netscape.com
280626b090 make the file conform to the new norm
git-svn-id: svn://10.0.0.236/trunk@23258 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 02:05:29 +00:00
ducarroz%netscape.com
a756229510 add definition for MSG_CommandType
git-svn-id: svn://10.0.0.236/trunk@23257 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 02:01:16 +00:00
ftang%netscape.com
0fed7fd34e add katakana, hiragana, katakana-iroha, hiragana-iroha, lower-greek
git-svn-id: svn://10.0.0.236/trunk@23256 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 01:56:02 +00:00
rjc%netscape.com
bf378b4e8e Add selection and column sortActive/sortDirection observation support. (Thanks, David!)
git-svn-id: svn://10.0.0.236/trunk@23255 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 01:54:46 +00:00
pierre%netscape.com
60b773385b Register CharsetAlias. Fixed by ftang on my machine.
git-svn-id: svn://10.0.0.236/trunk@23254 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 01:50:03 +00:00
briano%netscape.com
8bb9a84b60 Automated update
git-svn-id: svn://10.0.0.236/trunk@23253 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 01:45:41 +00:00
mscott%netscape.com
c57452593c Add ability to generate a mail session to this factory.
git-svn-id: svn://10.0.0.236/trunk@23252 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 01:39:05 +00:00
mscott%netscape.com
3a4bc49ec9 Build nsMsgMailSession and nsMsgIdentity.
git-svn-id: svn://10.0.0.236/trunk@23251 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 01:37:41 +00:00
mscott%netscape.com
2221feaddb Shell for a msg mail session. Folks will add to this as they need to.
git-svn-id: svn://10.0.0.236/trunk@23250 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 01:36:17 +00:00
pinkerton%netscape.com
f5f59adcee Add debug code to point out a bug #3505 with display:none and frames. Fix bug #3451 with grippies not working when toolbars not at top of window. Not creating atoms every time we expand/collapse toolbars.
git-svn-id: svn://10.0.0.236/trunk@23249 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 01:36:11 +00:00
mscott%netscape.com
e4bfe1fdb5 First pass implementation of a mail identity. Right now we just read out these values from prefs.js in the current working directory. This is a dogfood implementation and will change drastically when we really do implement multiple identities.
git-svn-id: svn://10.0.0.236/trunk@23248 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 01:35:44 +00:00
mscott%netscape.com
73a0e8c5f4 Export nsIMsgIdentity.h and nsIMsgMailSession.h
git-svn-id: svn://10.0.0.236/trunk@23247 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 01:33:36 +00:00
mscott%netscape.com
9ebeb941ee A mail session interface. Right now it is empty except for the current identity. As people need to add thinks to the mail session, I expect this to grow. Oh it is a singleton object and you should go through the service manager to obtain it.
git-svn-id: svn://10.0.0.236/trunk@23246 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 01:33:08 +00:00
mscott%netscape.com
ca27daab72 A first pass at a generic mail identity interface. Right now, I'm using this to organize a lot of mail server & password preferences for dogfood.
git-svn-id: svn://10.0.0.236/trunk@23245 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 01:32:16 +00:00
slamm%netscape.com
6c6f03f34b Have -MD dependencies cope will missing headerfiles.
git-svn-id: svn://10.0.0.236/trunk@23244 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 01:31:26 +00:00
slamm%netscape.com
cf94a899f1 Give error if building in objdir and have previously built in srcdir. Move '-Wall' and '-include' to GNU-only section (silly to test for GNU-only features). Change '-MMD' to '-MD' to include standard headers. Clean '-O' from CFLAGS/CXXFLAGS if MOZ_DEBUG is set.
git-svn-id: svn://10.0.0.236/trunk@23243 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 01:30:26 +00:00
slamm%netscape.com
fe1818cd07 Move AC_INCLUDE_OR_DEFINES into OS_CFLAGS/OS_CXXFLAGS.
git-svn-id: svn://10.0.0.236/trunk@23242 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 01:30:00 +00:00
slamm%netscape.com
f9468ca12f Move '-O' stripping into configure. Move compile-line defines into configure.
git-svn-id: svn://10.0.0.236/trunk@23241 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 01:29:57 +00:00
slamm%netscape.com
6012bdaf3a Script converts .mozconfig.sh into a url to prefill configurator web form. Will be used by client.mk
git-svn-id: svn://10.0.0.236/trunk@23240 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 01:29:53 +00:00
slamm%netscape.com
824d688eb0 Script to clean out all 'configure' generated files.
git-svn-id: svn://10.0.0.236/trunk@23239 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 01:29:50 +00:00
briano%netscape.com
c8edb6c46b Fixed the permission problem with nsinstall'd binary files, and added rules to make
sure shared libraries also get copied into $(DIST)/lib (where they're *supposed* to go).


git-svn-id: svn://10.0.0.236/trunk@23238 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 01:20:03 +00:00
cmanske%netscape.com
27e7a5fcf3 Added registration of editor factory classes to NS_SetupRegistry
git-svn-id: svn://10.0.0.236/trunk@23237 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 01:17:21 +00:00
chuang%netscape.com
a912bbcc6a Move throbber to the right, add MsgHome() function.
git-svn-id: svn://10.0.0.236/trunk@23236 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 01:15:00 +00:00
slamm%netscape.com
839d83ac54 Quiet mac warnings.
git-svn-id: svn://10.0.0.236/trunk@23235 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 01:10:59 +00:00
slamm%netscape.com
d3ff196119 Add source tree navigation tool.
git-svn-id: svn://10.0.0.236/trunk@23234 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 01:07:00 +00:00
despotdaemon%netscape.com
03cb24e8aa Pseudo-automatic update of changes made by leaf@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@23233 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 01:06:41 +00:00
rpotts%netscape.com
7936c5d6dc fix for bug #3507. Also replaced raw comparse of nsresult == NS_OK with NS_FAILED(...) or NS_SUCCEEDED(...) macros...
git-svn-id: svn://10.0.0.236/trunk@23232 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 00:54:07 +00:00
dougt%netscape.com
2eb050c4c0 Removed InstallFolder Object - just using nsStrings now.
Now creating tempfiles for ZIP calls
hooked up to nsSpecialSystemDirectory
cleaned up Install() api


git-svn-id: svn://10.0.0.236/trunk@23231 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 00:50:23 +00:00
briano%netscape.com
aa7c81207d Fixed my stupid mistake (theoretically) and increased the test timeout to 45 seconds.
git-svn-id: svn://10.0.0.236/trunk@23230 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 00:44:04 +00:00
vidur%netscape.com
feb7c9a586 Table of contents example
git-svn-id: svn://10.0.0.236/trunk@23229 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 00:36:54 +00:00
briano%netscape.com
35cdf04fde Automated update
git-svn-id: svn://10.0.0.236/trunk@23228 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 00:30:47 +00:00
akkana%netscape.com
905d55aca8 Changes to fix the Irix N32/egcs build; thanks to Jason Heirtzler <jasonh@cthulhu.engr.sgi.com>
git-svn-id: svn://10.0.0.236/trunk@23227 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 00:24:17 +00:00
briano%netscape.com
9f121d0ce7 More fixes, and I added a silly hack to show what compiler is being used.
git-svn-id: svn://10.0.0.236/trunk@23226 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 00:15:46 +00:00
cmanske%netscape.com
e5c4ce24e9 Removed unused code in editor appcore and cleaned up factory registration
git-svn-id: svn://10.0.0.236/trunk@23225 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 00:05:27 +00:00
ebina%netscape.com
4ee08fa4f8 Changes to make the Mac not complain so much.
git-svn-id: svn://10.0.0.236/trunk@23224 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 00:04:34 +00:00
mscott%netscape.com
3087e391db Fix build breakage caused by ebina when he changed nsINetPluginInstance. Looks like nsINetPluginInstance::Initialize() now takes two arguments.
git-svn-id: svn://10.0.0.236/trunk@23221 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-08 23:44:22 +00:00
cmanske%netscape.com
a5258195f0 Removed registration code now done by NSRegisterSelf for editor classes
git-svn-id: svn://10.0.0.236/trunk@23218 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-08 22:52:03 +00:00
cmanske%netscape.com
c89001dcbb Removed registration code no done by NSRegisterSelf for editor classes
git-svn-id: svn://10.0.0.236/trunk@23217 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-08 22:51:58 +00:00
cmanske%netscape.com
dea2088bcb Fixed editor classes to do autoregistration correctly and moved target directory to bin/components
git-svn-id: svn://10.0.0.236/trunk@23216 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-08 22:46:33 +00:00
akkana%netscape.com
1bc5a98e62 Hook up a debug implementation of paste
git-svn-id: svn://10.0.0.236/trunk@23215 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-08 22:45:56 +00:00
pinkerton%netscape.com
ff75f4321a adding debug printf to see when toolbar frames are being deleted. I don't think they are when display is set to none.
git-svn-id: svn://10.0.0.236/trunk@23214 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-08 22:44:44 +00:00
pinkerton%netscape.com
5941299154 fix attribute selector for grippies to actually trigger when grippies clicked on.
git-svn-id: svn://10.0.0.236/trunk@23213 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-08 22:44:06 +00:00
pinkerton%netscape.com
c543412c2d fix bug where if I didn't check if the first child frame was null during reflow.
git-svn-id: svn://10.0.0.236/trunk@23212 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-08 22:43:48 +00:00
val4%cornell.edu
65f58bdd75 Some changes here and there. Added noted about PerlConnect.pm. Added update history.
git-svn-id: svn://10.0.0.236/trunk@23211 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-08 22:43:17 +00:00
cyeh%netscape.com
c746e96df5 pdbfiles have a ".pdb" at the end.
git-svn-id: svn://10.0.0.236/trunk@23210 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-08 22:40:17 +00:00
cyeh%netscape.com
5907555ee7 change MOZ_DEBUGOPT config to not generate PDB files.
git-svn-id: svn://10.0.0.236/trunk@23209 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-08 22:38:33 +00:00
dp%netscape.com
722542857b adding new exported NR_*Raw() symbols
git-svn-id: svn://10.0.0.236/trunk@23208 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-08 22:10:18 +00:00
hyatt%netscape.com
909350643f Putting the extra items into the bookmarks menu.
git-svn-id: svn://10.0.0.236/trunk@23207 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-08 22:09:34 +00:00
ebina%netscape.com
40e1602a4b Add the stream name (URL string) to the nsINetPluginInstance
interface in the Initialize method.


git-svn-id: svn://10.0.0.236/trunk@23206 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-08 21:57:35 +00:00
alecf%netscape.com
abafe271de patches from cmanske@netscape.com - use NS_IMETHODIMP* macros instead of declaring nsrefcnt/etc directly
git-svn-id: svn://10.0.0.236/trunk@23205 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-08 21:34:16 +00:00
shaver%netscape.com
4881717cd5 ignore generated files
git-svn-id: svn://10.0.0.236/trunk@23204 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-08 21:27:03 +00:00
shaver%netscape.com
30f497ae66 Turn off debugging noise for myself.
Parse IIDs, and handle the unspecified case (= 0).
Sort IDE block like a good boy (all hail qsort).
Follow typedefs to make the right thing happen.
Hide [notxpcom] methods, and don't munge their signatures with _retval, etc.


git-svn-id: svn://10.0.0.236/trunk@23203 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-08 21:22:29 +00:00
coop%netscape.com
3371ff5105 NOT YET PART OF SEAMONKEY:
* linker now sorts based on IIDs
* xpt_dump no longer complains about md->result if it is of the correct retval type


git-svn-id: svn://10.0.0.236/trunk@23202 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-08 21:13:58 +00:00
shaver%netscape.com
26b1439250 display method flags, handle bogus indices
git-svn-id: svn://10.0.0.236/trunk@23201 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-08 21:11:08 +00:00
tague%netscape.com
b53730d1aa Fixed build bustage (lost const)
git-svn-id: svn://10.0.0.236/trunk@23198 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-08 21:02:35 +00:00
terry%netscape.com
6d26142980 Changed some QA contacts.
git-svn-id: svn://10.0.0.236/trunk@23197 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-08 20:47:51 +00:00
dp%netscape.com
b73886f588 Using Raw registry interface so that component urls and filename can be stored without transformation of / and =
git-svn-id: svn://10.0.0.236/trunk@23196 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-08 20:40:32 +00:00
dp%netscape.com
52090316db Adding Raw interface that wont interpret / in keynames. Plus removed = being a invalid char for keys.
git-svn-id: svn://10.0.0.236/trunk@23195 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-08 20:35:54 +00:00
shaver%netscape.com
b03b382f3e Make params include the name of the interface referenced.
git-svn-id: svn://10.0.0.236/trunk@23194 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-08 20:33:35 +00:00
alecf%netscape.com
6083b1d43d fix g++ -pedantic bustage
git-svn-id: svn://10.0.0.236/trunk@23193 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-08 20:18:53 +00:00
mscott%netscape.com
18ee545010 Call close on the mail database instead of release.
git-svn-id: svn://10.0.0.236/trunk@23192 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-08 20:10:14 +00:00
mscott%netscape.com
d3b260a630 Call close on the mail database instead of release....
git-svn-id: svn://10.0.0.236/trunk@23191 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-08 20:09:42 +00:00
ftang%netscape.com
768862e631 reviewed by rickg. Pick up meta tag and change converter
git-svn-id: svn://10.0.0.236/trunk@23190 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-08 20:00:23 +00:00
mscott%netscape.com
566f776df0 When setting the byte range based on the message size subtract one byte (this gives it the proper byte range in the file...).
git-svn-id: svn://10.0.0.236/trunk@23189 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-08 19:53:10 +00:00
bienvenu%netscape.com
7172f6d57d fix db cache lookup bug
git-svn-id: svn://10.0.0.236/trunk@23188 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-08 19:50:24 +00:00
coop%netscape.com
60b95e8294 NOT YET PART OF SEAMONKEY:
* changing references to interfaces (within structs) to be indices rather than pointers
* updated xpt_dump and xpt_link code to reflect above change


git-svn-id: svn://10.0.0.236/trunk@23187 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-08 19:47:09 +00:00
kipp%netscape.com
641a7a7202 Implement GetFrameName
git-svn-id: svn://10.0.0.236/trunk@23186 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-08 19:26:45 +00:00
kipp%netscape.com
0750860714 setup more skid marks (disabled)
git-svn-id: svn://10.0.0.236/trunk@23185 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-08 19:26:30 +00:00
kipp%netscape.com
b37f5e28cc Added a skid mark (disabled)
git-svn-id: svn://10.0.0.236/trunk@23184 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-08 19:26:09 +00:00
kipp%netscape.com
00cb1a62f1 added some nasty logging messages for frames that don't set max-element-size; added more vertical alignment noise
git-svn-id: svn://10.0.0.236/trunk@23183 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-08 19:25:55 +00:00
kipp%netscape.com
0ed15663ec added some nasty logging messages for frames that don't set max-element-size
git-svn-id: svn://10.0.0.236/trunk@23182 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-08 19:25:18 +00:00
kipp%netscape.com
f8ee65e4d3 Copy out computed combined area even when dealing with an zero height block; added some nasty logging messages for frames that don't set max-element-size
git-svn-id: svn://10.0.0.236/trunk@23181 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-08 19:25:03 +00:00
kipp%netscape.com
566d18356c Compute combined-area more sanely; handle another nasty top margin bug (1910)
git-svn-id: svn://10.0.0.236/trunk@23180 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-08 19:24:07 +00:00
kipp%netscape.com
c60c176227 Removed a duplicated method; moved by debug asserts into a central spot
git-svn-id: svn://10.0.0.236/trunk@23179 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-08 19:22:55 +00:00
kipp%netscape.com
0547776b90 Fixed bug #2052 - don't adjust the height when its computed
git-svn-id: svn://10.0.0.236/trunk@23178 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-08 19:22:16 +00:00
kipp%netscape.com
3aaf74d39a Fixed a build issue
git-svn-id: svn://10.0.0.236/trunk@23177 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-08 19:21:44 +00:00
ramiro%netscape.com
ea36063fa0 Cannot forward declare a class used with an nsCOMPtr.
see: http://www.mozilla.org/projects/xpcom/nsCOMPtr.html


git-svn-id: svn://10.0.0.236/trunk@23176 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-08 18:57:21 +00:00
nisheeth%netscape.com
a81177003d Checking in the first stab at error propagation from the expat parser to the content sink. The flow of control is as follows. The tokenizer creates an error token (CErrorToken) when an error occurs in expat and pushes it onto the token dequeue. The DTD forwards the contents of the token to the content sink, which creates content objects to show the error.
git-svn-id: svn://10.0.0.236/trunk@23175 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-08 17:42:54 +00:00
briano%netscape.com
4b4a663c7f Automated update
git-svn-id: svn://10.0.0.236/trunk@23174 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-08 16:00:39 +00:00
ramiro%netscape.com
71f4219ea9 Fix unix builds.
git-svn-id: svn://10.0.0.236/trunk@23173 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-08 15:50:50 +00:00
briano%netscape.com
397f7f3521 Automated update
git-svn-id: svn://10.0.0.236/trunk@23172 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-08 15:15:41 +00:00
ramiro%netscape.com
2dd0c5cdf9 Latest AIX fixes. (waqar@netscape.com).
When doing the multiple inheritance thing, explicitly give the publicness
for each superclass.


git-svn-id: svn://10.0.0.236/trunk@23171 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-08 15:13:54 +00:00
ramiro%netscape.com
970dc7c4fc Allow for lock_SunOS.s to build properly. Fix the build system to
properly set all the ac magic needed to properly asm files.
Currently this is only an issue on Solaris, when building with the native
sun compiler.


git-svn-id: svn://10.0.0.236/trunk@23170 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-08 15:01:13 +00:00
edwin%woudt.nl
bc8fd40d25 A new throbber
git-svn-id: svn://10.0.0.236/trunk@23169 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-08 14:45:52 +00:00
ramiro%netscape.com
01f08478fc Add Templates.DB dir to GARBAGE so that the output of the Solaris CC template
code generator can be clobber.  Otherwise, dependancies and clobbering dont
work.


git-svn-id: svn://10.0.0.236/trunk@23168 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-08 11:44:25 +00:00
ramiro%netscape.com
bdfb92b7b9 Memory leak.
delete[] memory returned by nsString::ToNewCString.


git-svn-id: svn://10.0.0.236/trunk@23167 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-08 11:38:59 +00:00
ramiro%netscape.com
e1c07957a0 Fix win32, mac breakage.
git-svn-id: svn://10.0.0.236/trunk@23166 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-08 11:04:49 +00:00
ramiro%netscape.com
240e66fab6 Templates in nsXPComFactory exorcism. Part I.
Replaced the template code with a NS_DEF_FACTORY.
This is temporary.  As soon as I can verify this works on windows and
mac, ill remove the old code.


git-svn-id: svn://10.0.0.236/trunk@23165 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-08 09:44:16 +00:00
waterson%netscape.com
c276775547 Bug #3465. Atomize literals as well as resources.
git-svn-id: svn://10.0.0.236/trunk@23164 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-08 08:28:46 +00:00
waterson%netscape.com
324b35b91b Added some debugging code while tracking down bug #3465.
git-svn-id: svn://10.0.0.236/trunk@23163 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-08 08:27:53 +00:00
pierre%netscape.com
24f2df4eea implemented nsListbox
git-svn-id: svn://10.0.0.236/trunk@23158 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-08 04:50:20 +00:00
pierre%netscape.com
0118215e13 Fixed several things. The popup now actually displays and works.
git-svn-id: svn://10.0.0.236/trunk@23157 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-08 04:48:55 +00:00
pierre%netscape.com
089d8feb9e small change to make Move and Resize more efficient
git-svn-id: svn://10.0.0.236/trunk@23156 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-08 04:47:17 +00:00
pierre%netscape.com
ef19f8a40b small change to make it behave like nsCheckboxControlFrame when the WidgetRenderingMode is not initialized.
git-svn-id: svn://10.0.0.236/trunk@23155 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-08 04:46:12 +00:00
shaver%netscape.com
8fe29cabbc fix remnant of 32-bit interface references
git-svn-id: svn://10.0.0.236/trunk@23154 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-08 03:56:14 +00:00
danm%netscape.com
739872bb0b adding ShowDialog()
git-svn-id: svn://10.0.0.236/trunk@23153 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-08 03:01:17 +00:00
mscott%netscape.com
b7422fa464 Add ability to display a message given just a message number. We take this number (which is not a key or ID) and get the array of message keys from the db. We then extract the key corresponding to the number passed in. This interface function is used primarily to make debuggin easier where we don't have a message key or message ID lying around...
git-svn-id: svn://10.0.0.236/trunk@23152 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-08 02:12:50 +00:00
bienvenu%netscape.com
dc5a62dacf make sure db name is strdupped before caching
git-svn-id: svn://10.0.0.236/trunk@23151 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-08 02:11:39 +00:00
jfrancis%netscape.com
ec84311a00 adding mAnchorFrame to the ClearFrameRefs call
git-svn-id: svn://10.0.0.236/trunk@23150 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-08 01:22:37 +00:00
jfrancis%netscape.com
87c745f970 bug fixes + changing broken "dont_QueryInterface" additions to "do_QueryInterface"
git-svn-id: svn://10.0.0.236/trunk@23149 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-08 01:20:02 +00:00
mscott%netscape.com
2e5cace5e3 requires js for the prefs stuff. Link with rdf_utils.lib instead of rdf.lib.
git-svn-id: svn://10.0.0.236/trunk@23148 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-08 01:05:21 +00:00
mscott%netscape.com
0fb9344d6c Many many changes. (1) get rid of hard coded mailbox folder paths and rely on the the mail root folder preference being set. (2) when displaying a message, open the db, extract the array of msgKeys and ask the user which message they want to display. This number is based on the number of items in the msgKey array. Then use the user provided number as an offset into the msg key array to extract the correct message key to use. This provides us with a lot more testing flexibility instead of forcing the test to know the message key of each message he/she wanted to display. (3) remove call to NS_NewMsgParser and go through the repository instead....
git-svn-id: svn://10.0.0.236/trunk@23147 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-08 01:04:53 +00:00
mscott%netscape.com
e78bb00181 Remove NS_NewMsgParser. You should be going through the repository to create an instance of mailbox parser. I've already updated the nsLocalMsgFactory to be able to create instances of this object.
git-svn-id: svn://10.0.0.236/trunk@23146 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-08 01:00:52 +00:00
beard%netscape.com
ff96b264a9 fixed call to nsIInputStream::Read(), no longer passing 0 offset.
git-svn-id: svn://10.0.0.236/trunk@23145 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-08 00:15:40 +00:00
beard%netscape.com
0f0c2a1c13 Added InitializeLiveConnectClasses() method.
git-svn-id: svn://10.0.0.236/trunk@23144 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-08 00:14:40 +00:00
beard%netscape.com
93ebb9e8aa Added InitializeLiveConnectClasses() method. This makes the standard java packages visible to a given JSContext. Guarding against multiple initialization otherwise LiveConnect gives a warning.
git-svn-id: svn://10.0.0.236/trunk@23143 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-08 00:14:38 +00:00
beard%netscape.com
8334bbbe58 Added accessor for NS_JVMMANAGER_CID.
git-svn-id: svn://10.0.0.236/trunk@23142 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-08 00:12:00 +00:00
beard%netscape.com
83fc142853 Added InitLiveConnectClasses for DOM's use.
git-svn-id: svn://10.0.0.236/trunk@23141 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-08 00:09:05 +00:00
beard%netscape.com
9e471da20d Fixed Read/Write methods to conform to latest nsIInputStream and nsIOutputStream interfaces.
git-svn-id: svn://10.0.0.236/trunk@23140 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-08 00:07:24 +00:00
mscott%netscape.com
e743625bfb include xplib.h....
git-svn-id: svn://10.0.0.236/trunk@23139 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-08 00:01:04 +00:00
beard%netscape.com
7be9526f8f Using the service manager to access the plugin manager, because it needs to be a singleton.
git-svn-id: svn://10.0.0.236/trunk@23138 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-08 00:01:02 +00:00
mscott%netscape.com
02c61ddd40 Add mailbox parser to list of components the local msg factory can create.
git-svn-id: svn://10.0.0.236/trunk@23137 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-08 00:00:44 +00:00
beard%netscape.com
5ceecb3479 Added NS_DEFINE_STATIC_CID_ACCESSOR.
git-svn-id: svn://10.0.0.236/trunk@23136 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-07 23:56:59 +00:00
beard%netscape.com
97403304e5 fixed a crash caused by unitialized variable focusedWidget.
git-svn-id: svn://10.0.0.236/trunk@23135 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-07 23:56:22 +00:00
mscott%netscape.com
875780bfa0 Assign a CID to the mailbox parser so we can create it through the local msg factory...
git-svn-id: svn://10.0.0.236/trunk@23134 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-07 23:53:14 +00:00
beard%netscape.com
5d42f82ea4 First Checked In.
git-svn-id: svn://10.0.0.236/trunk@23133 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-07 23:32:35 +00:00
hyatt%netscape.com
1113d37be5 added files: mozilla/rdf/content/src/nsRDFToolbarBuilder.cpp
git-svn-id: svn://10.0.0.236/trunk@23132 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-07 23:24:51 +00:00
hyatt%netscape.com
40ff968768 Added the NS_NewRDFToolbarBuilder call to the header.
git-svn-id: svn://10.0.0.236/trunk@23131 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-07 23:21:18 +00:00
hyatt%netscape.com
8accebad8a Changes to enable the instantiation of a toolbar builder.
git-svn-id: svn://10.0.0.236/trunk@23130 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-07 23:18:58 +00:00
hyatt%netscape.com
0f937ddd5b Changes to the builder APIs to distinguish folder items from leaf
items (although we're not quite there yet).


git-svn-id: svn://10.0.0.236/trunk@23129 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-07 23:18:26 +00:00
hyatt%netscape.com
963375d55e Adding the toolbar builder to Windows and Linux makefiles.
git-svn-id: svn://10.0.0.236/trunk@23128 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-07 23:17:01 +00:00
hyatt%netscape.com
4d29994251 The RDF toolbar builder (for constructing RDF toolbars like the Personal Toolbar).
git-svn-id: svn://10.0.0.236/trunk@23127 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-07 23:16:37 +00:00
hyatt%netscape.com
5de09bf263 Added the Personal Toolbar to the XUL file.
git-svn-id: svn://10.0.0.236/trunk@23126 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-07 23:14:41 +00:00
mscott%netscape.com
4936ba4a0d Change onClick to onclick to enable menu item commands.
git-svn-id: svn://10.0.0.236/trunk@23125 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-07 21:58:36 +00:00
mscott%netscape.com
9b0caae748 Change rdf:id to id. (Although the thread pane doesn't seem to be working for me as of sunday's current tip....)
git-svn-id: svn://10.0.0.236/trunk@23124 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-07 21:58:15 +00:00
mscott%netscape.com
c0b892b4fa Install DLL in components directory as part of dp's changes...
git-svn-id: svn://10.0.0.236/trunk@23123 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-07 21:54:46 +00:00
pavlov%pavlov.net
2c561f6d59 fix bug 3079
git-svn-id: svn://10.0.0.236/trunk@23122 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-07 21:22:53 +00:00
mscott%netscape.com
9d4ea29f98 Move read/write file io stream changes....Read and write no longer take offsets...
git-svn-id: svn://10.0.0.236/trunk@23121 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-07 21:21:25 +00:00
jband%netscape.com
073ee50abb fix fopen mode for binary files - I'm starting to think that shaver, coop, and mccabe are doing this to me on purpose :)
git-svn-id: svn://10.0.0.236/trunk@23120 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-07 20:48:37 +00:00
edwin%woudt.nl
262e661621 Oh boy, I broke this with my license compliance checkin :-(
git-svn-id: svn://10.0.0.236/trunk@23119 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-07 20:04:41 +00:00
edwin%woudt.nl
e80d95f4b2 Fixing to comply with MPL requirements: every contributor should be mentioned!
git-svn-id: svn://10.0.0.236/trunk@23118 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-07 19:58:40 +00:00
rickg%netscape.com
0608af3478 fixed recently introduced i18n bugs
git-svn-id: svn://10.0.0.236/trunk@23117 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-07 19:23:28 +00:00
hyatt%netscape.com
a76538f256 Changing the natural order pos name to match the function conventions.
git-svn-id: svn://10.0.0.236/trunk@23116 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-07 10:52:42 +00:00
hyatt%netscape.com
e097700974 Again.
git-svn-id: svn://10.0.0.236/trunk@23115 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-07 10:49:26 +00:00
hyatt%netscape.com
a8ab7e3102 Fixing build bustage.
git-svn-id: svn://10.0.0.236/trunk@23114 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-07 10:48:58 +00:00
hyatt%netscape.com
973b2a044e Declaring some classes so that the compilers are happy again.
git-svn-id: svn://10.0.0.236/trunk@23113 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-07 10:41:00 +00:00
hyatt%netscape.com
8d0b3864cd added files: mozilla/rdf/content/src/nsRDFGenericBuilder.cpp, mozilla/rdf/content/src/nsRDFMenuBuilder.cpp
git-svn-id: svn://10.0.0.236/trunk@23112 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-07 10:35:17 +00:00
hyatt%netscape.com
57020bc795 Changing the display type of menubars, menus, and menuitems to be "none" so that
frames don't get built for them.  Added a bookmarks menu that uses real
RDF data.  (WOO HOO!)


git-svn-id: svn://10.0.0.236/trunk@23111 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-07 10:33:21 +00:00
hyatt%netscape.com
0a8f08e165 The modified tree builder.
git-svn-id: svn://10.0.0.236/trunk@23110 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-07 10:30:42 +00:00
hyatt%netscape.com
59dd328258 Landing the menu builder for real. The bookmarks menu lives (well, sort of).
git-svn-id: svn://10.0.0.236/trunk@23109 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-07 10:28:42 +00:00
hyatt%netscape.com
7c89bc9b07 First stab at the menu builder. It doesn't know how to build popup menus
yet. We'll need to work on that one.


git-svn-id: svn://10.0.0.236/trunk@23108 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-07 10:00:13 +00:00
hyatt%netscape.com
ae118c5d22 Checking in a patch for a XUL bug in ContentInserted (inside an #ifdef INCLUDE_XUL).
git-svn-id: svn://10.0.0.236/trunk@23107 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-07 09:55:39 +00:00
rjc%netscape.com
7c9fffcbb0 More support for column sorting.
git-svn-id: svn://10.0.0.236/trunk@23106 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-07 09:44:38 +00:00
hyatt%netscape.com
ba91bb4cbf A base class for factoring out the common functionality that exists
among builders.  (To be used by the tree, toolbar, and menu builders
at the very least.)


git-svn-id: svn://10.0.0.236/trunk@23105 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-07 08:12:48 +00:00
bienvenu%netscape.com
fa3a9d1061 hook up a little more to mdb, add some error checking
git-svn-id: svn://10.0.0.236/trunk@23104 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-07 05:39:35 +00:00
bienvenu%netscape.com
bff63bf92f add ClearErrors stub
git-svn-id: svn://10.0.0.236/trunk@23103 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-07 05:38:54 +00:00
bienvenu%netscape.com
4db58490e6 check for error creating msghdr in test prepulate method
git-svn-id: svn://10.0.0.236/trunk@23102 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-07 05:34:01 +00:00
briano%netscape.com
f4b02ce313 Automated update
git-svn-id: svn://10.0.0.236/trunk@23101 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-07 05:30:39 +00:00
cls%seawood.org
528012e0b5 Introduced separate CXXFLAGS for use with C++ code in the same style as the existing CFLAGS. Prepended _ to some configure.in private variables.
git-svn-id: svn://10.0.0.236/trunk@23100 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-07 05:18:45 +00:00
cls%seawood.org
38280e9eac Build db subdir before build so that libmailnewsmsgdb is available for libmailnews' final link.
git-svn-id: svn://10.0.0.236/trunk@23099 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-07 04:36:09 +00:00
edwin%woudt.nl
dbc0ed9954 Fixing to comply with MPL requirements: every contributor should be mentioned!
git-svn-id: svn://10.0.0.236/trunk@23098 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-07 02:46:50 +00:00
edwin%woudt.nl
c2f903d8c0 Fixing to comply with MPL requirements: every contributor should be mentioned!
git-svn-id: svn://10.0.0.236/trunk@23097 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-07 02:39:04 +00:00
shaver%netscape.com
44e5f9594a we do windows, but still wait on Mac
git-svn-id: svn://10.0.0.236/trunk@23096 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-07 02:37:17 +00:00
edwin%woudt.nl
ad689b27b1 Fixing to comply with MPL requirements: every contributor should be mentioned!
git-svn-id: svn://10.0.0.236/trunk@23095 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-07 02:30:35 +00:00
edwin%woudt.nl
ebf38833f6 Fixing to comply with MPL requirements: every contributor should be mentioned!
git-svn-id: svn://10.0.0.236/trunk@23094 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-07 02:19:44 +00:00
edwin%woudt.nl
e7a7211830 Fixing to comply with MPL requirements: every contributor should be mentioned!
git-svn-id: svn://10.0.0.236/trunk@23093 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-07 01:40:44 +00:00
edwin%woudt.nl
ec35849638 Fixing to comply with MPL requirements: every contributor should be mentioned!
git-svn-id: svn://10.0.0.236/trunk@23092 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-07 01:30:52 +00:00
pavlov%pavlov.net
d154e0982b more work
git-svn-id: svn://10.0.0.236/trunk@23091 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-07 00:58:11 +00:00
pavlov%pavlov.net
066e49e7e7 add a few comments in here on how a few things should be done.
git-svn-id: svn://10.0.0.236/trunk@23090 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-07 00:40:08 +00:00
beard%netscape.com
c3ed0d6f79 passing service manager, using NS_CALLBACK macro.
git-svn-id: svn://10.0.0.236/trunk@23089 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 22:32:49 +00:00
beard%netscape.com
68267d0bfb passing service manager, using nsIAllocator instead of nsIMalloc for memory allocation.
git-svn-id: svn://10.0.0.236/trunk@23088 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 22:32:47 +00:00
beard%netscape.com
54ea4168ab passing service manager instead of plugin host.
git-svn-id: svn://10.0.0.236/trunk@23087 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 22:31:28 +00:00
beard%netscape.com
423d0533ef took out singleton management, and registering with the repository. That's what the service manager/component manager is for.
git-svn-id: svn://10.0.0.236/trunk@23086 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 22:25:55 +00:00
beard%netscape.com
216bfff8b9 File Removed.
git-svn-id: svn://10.0.0.236/trunk@23085 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 22:23:41 +00:00
beard%netscape.com
1cc31e4675 First Checked In.
git-svn-id: svn://10.0.0.236/trunk@23084 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 22:23:26 +00:00
jband%netscape.com
d2e367d9f5 getting shaver's changes compiling on Win32 - (and linking - dependency on nspr was added)
git-svn-id: svn://10.0.0.236/trunk@23083 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 21:39:45 +00:00
jband%netscape.com
d64ba60bfa getting shaver's changes compiling on Win32
git-svn-id: svn://10.0.0.236/trunk@23082 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 21:35:01 +00:00
shaver%netscape.com
809bab74f6 updated README and fixed 3484 (make in strings const)
git-svn-id: svn://10.0.0.236/trunk@23081 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 20:59:41 +00:00
sfraser%netscape.com
ea69d4597d Added debug output text and HTML menu items
git-svn-id: svn://10.0.0.236/trunk@23080 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 20:54:03 +00:00
sfraser%netscape.com
d268bb036d Fix the text & HTML output routines
git-svn-id: svn://10.0.0.236/trunk@23079 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 20:49:34 +00:00
briano%netscape.com
0adeb6c4f1 Automated update
git-svn-id: svn://10.0.0.236/trunk@23078 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 20:45:39 +00:00
cls%seawood.org
58aea2a7f4 Modified allmakefiles.sh setup to use autoconf's default $srcdir. Also fixes mailnews not building in separate obj tree.
git-svn-id: svn://10.0.0.236/trunk@23077 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 20:38:24 +00:00
sfraser%netscape.com
3b08f1c684 Changed file grouping.
git-svn-id: svn://10.0.0.236/trunk@23076 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 20:33:07 +00:00
sfraser%netscape.com
c5cf61dbdb Modified OutputText and OutputHTML methods to pass out nsStrings instead of nsIOutputStreams. Also fixed return values, and commented out line termination conversion in Mac outoutput.
git-svn-id: svn://10.0.0.236/trunk@23075 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 20:32:48 +00:00
cls%seawood.org
c181a3c141 Add $(topsrcdir)/network/protocol/imap4 to LOCAL_INCLUDES.
git-svn-id: svn://10.0.0.236/trunk@23074 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 20:29:01 +00:00
sfraser%netscape.com
52af2d264e Add support for getting text or HTML through a readonly properly on the EditorAppCore. Added attributes to .idl file, regenerated .h and .cpp with idlc. Simplified toolbar in the .xul file.
git-svn-id: svn://10.0.0.236/trunk@23073 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 20:28:47 +00:00
sfraser%netscape.com
163c837469 Arrange the various AppCores into groups
git-svn-id: svn://10.0.0.236/trunk@23072 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 20:27:33 +00:00
sfraser%netscape.com
740e25376c Fix warning reported by warren (bracket was in wrong place).
git-svn-id: svn://10.0.0.236/trunk@23071 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 20:19:52 +00:00
evaughan%netscape.com
0615e95ff7 1) Implemented regular button and html4 button with a button renderer.
2) Fixed ProgressMeter to update correctly when attributes change
3) Fixed sample8.html so that it does not over ride the borders of the HTML4 button this
   messed up the active, hover, and disabled states.


git-svn-id: svn://10.0.0.236/trunk@23070 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 19:43:13 +00:00
shaver%netscape.com
d67b62db13 Add XPT_InterfaceDescriptorAddConsts to API.
git-svn-id: svn://10.0.0.236/trunk@23069 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 19:40:34 +00:00
shaver%netscape.com
ade285390e Compatibility with libIDL 0.6.x. (now required -- 0.5.x won't work any more)
Open absolutely-named files without include-path checking.
Always report errors (duh).
typelib generation: [iid_is()], consts, parse [uuid()], string type change
(will someone please explain our string types to me?), add float support,
handle [retval], IDL return as trailing argument (duh), attributes generate
accessor entries.
Use IDL_tree_error instead of burping at stderr.


git-svn-id: svn://10.0.0.236/trunk@23068 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 19:26:40 +00:00
troy%netscape.com
279360546a In RulesMatching(), changed NS_RELEASE to NS_IF_RELEASE for the link handler.
This fixes a crash when doing a print preview


git-svn-id: svn://10.0.0.236/trunk@23067 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 17:20:27 +00:00
troy%netscape.com
8c2eb5770c Changed ComputeDesiredWidth() to get the table layout strategy from the
first-in-flow. This fixes a crash in paginated mode


git-svn-id: svn://10.0.0.236/trunk@23066 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 17:01:15 +00:00
briano%netscape.com
6842a254dd Automated update
git-svn-id: svn://10.0.0.236/trunk@23065 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 15:16:10 +00:00
ramiro%netscape.com
16659349cb Latest AIX fixes from waqar@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@23064 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 15:09:48 +00:00
ramiro%netscape.com
0602774650 Fix printf format. Thanks to (waqar@netscape.com).
git-svn-id: svn://10.0.0.236/trunk@23063 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 15:07:44 +00:00
ramiro%netscape.com
393e76453d Latest AIX fixes from waqar@netscape.com.
I added this define before and its not needed now, thanks to the c++ feature
detection magic in configure.in.


git-svn-id: svn://10.0.0.236/trunk@23062 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 15:07:01 +00:00
briano%netscape.com
7666411623 Automated update
git-svn-id: svn://10.0.0.236/trunk@23061 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 12:15:43 +00:00
ramiro%netscape.com
91077bb45b Fix the exceptions flag test.
git-svn-id: svn://10.0.0.236/trunk@23060 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 12:03:42 +00:00
dp%netscape.com
69df3f9c47 Bumping nsRepository version string to force registry to be cleaned
git-svn-id: svn://10.0.0.236/trunk@23059 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 09:11:05 +00:00
dp%netscape.com
a6d34909ca dist/bin/components is where all loadable components will be installed.
git-svn-id: svn://10.0.0.236/trunk@23058 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 09:04:53 +00:00
grail%cafebabe.org
df6e2353c4 Fixed bad type cast.
git-svn-id: svn://10.0.0.236/trunk@23057 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 07:25:10 +00:00
grail%cafebabe.org
115126053e Re-organized for more flexible handling of widget creation.
git-svn-id: svn://10.0.0.236/trunk@23056 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 07:08:01 +00:00
grail%cafebabe.org
76937a8d5e Added documentation.
git-svn-id: svn://10.0.0.236/trunk@23055 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 07:07:34 +00:00
grail%cafebabe.org
20c454d5fb Added MPL license to SearchDirectory, Added it to makefile. Removed
references to AWT as much as possible. I need to enhance pagebuilder to
do other layouts other than GridBagLayout.


git-svn-id: svn://10.0.0.236/trunk@23054 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 07:06:31 +00:00
grail%cafebabe.org
a9752fa00b Fixed DOS end-of-lines from the files.
git-svn-id: svn://10.0.0.236/trunk@23053 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 06:55:26 +00:00
briano%netscape.com
7cf95055d1 Automated update
git-svn-id: svn://10.0.0.236/trunk@23050 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 05:15:39 +00:00
mcafee%netscape.com
26e6bc85e2 Removing -xar from MKSHLIB, this was incorrectly generating .a libs, thanks to Tim McNerney <mumbly@netcom.com> for this fix.
git-svn-id: svn://10.0.0.236/trunk@23049 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 05:08:12 +00:00
troy%netscape.com
cac3fb5b73 Added some XXX comments
git-svn-id: svn://10.0.0.236/trunk@23048 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 05:03:09 +00:00
rjc%netscape.com
a4b87102ee Add RDF to list of include directories on Windows.
git-svn-id: svn://10.0.0.236/trunk@23047 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 04:57:20 +00:00
mcafee%netscape.com
cdc5264bdb Directly calling const char* const() operator to avoid ambiguity on Solaris. r=mcmullen@netscape.com
git-svn-id: svn://10.0.0.236/trunk@23046 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 04:42:08 +00:00
warren%netscape.com
c65396ffe0 Fixing someone's RDF breakage.
git-svn-id: svn://10.0.0.236/trunk@23045 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 04:12:56 +00:00
rjc%netscape.com
898583b974 Its a good thing to compile nsXULSortService.cpp, isn't it? (cyeh is making the same change to Makefile.win after verifying the fix.)
git-svn-id: svn://10.0.0.236/trunk@23044 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 04:05:38 +00:00
warren%netscape.com
140018846d Fixed multiple mRefCnt problem.
git-svn-id: svn://10.0.0.236/trunk@23043 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 03:56:24 +00:00
warren%netscape.com
9eaa6a745d Fixed uninitialized variable problem.
git-svn-id: svn://10.0.0.236/trunk@23042 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 03:54:19 +00:00
troy%netscape.com
6002e5995c Used style data pointer in HTML reflow state and eliminated some calls to
GetStyleData()


git-svn-id: svn://10.0.0.236/trunk@23041 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 03:37:44 +00:00
troy%netscape.com
009e3818fb Changed Reflow() to use style info from the HTML reflow state
git-svn-id: svn://10.0.0.236/trunk@23040 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 03:30:25 +00:00
talisman%anamorphic.com
8b0e4bddd5 *** empty log message ***
git-svn-id: svn://10.0.0.236/trunk@23039 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 02:49:47 +00:00
talisman%anamorphic.com
2910c0269d Added per Mauro Botelho.
git-svn-id: svn://10.0.0.236/trunk@23038 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 02:49:24 +00:00
mcmullen%netscape.com
f74a94e9ff More bustage (more calls to Read() with old parameters).
git-svn-id: svn://10.0.0.236/trunk@23037 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 02:42:44 +00:00
mcmullen%netscape.com
f54f7a537e More lurking calls to Read() with the old API.
git-svn-id: svn://10.0.0.236/trunk@23036 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 02:38:27 +00:00
mcmullen%netscape.com
f6c1353346 Adapt to new stream interfaces some more.
git-svn-id: svn://10.0.0.236/trunk@23033 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 02:12:52 +00:00
nisheeth%netscape.com
b0dfaee405 Changed nsIContentSink->NotifyError() to accept an nsParserError argument. This change is needed for propagating errors from the new expat parser.
git-svn-id: svn://10.0.0.236/trunk@23032 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 02:09:46 +00:00
nisheeth%netscape.com
0127c619d0 Changed nsIContentSink->NotifyError() to accept an nsParserError argument. This change is needed for propagating errors from the new expat parser.
git-svn-id: svn://10.0.0.236/trunk@23031 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 02:01:11 +00:00
troy%netscape.com
21a6536307 Removed some code that is no longer needed
git-svn-id: svn://10.0.0.236/trunk@23030 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 01:58:33 +00:00
troy%netscape.com
5bd0174c47 Eliminated some code that's no longer needed now that the info is in the
HTML reflow state


git-svn-id: svn://10.0.0.236/trunk@23029 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 01:48:28 +00:00
nisheeth%netscape.com
5016ed7684 Changed nsIContentSink->NotifyError() to accept an nsParserError argument.
This change is needed for propagating errors from the new
expat parser.


git-svn-id: svn://10.0.0.236/trunk@23028 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 01:48:11 +00:00
hyatt%netscape.com
304b78af18 Changing the name of a function. It was hiding another function in a base class.
git-svn-id: svn://10.0.0.236/trunk@23027 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 01:43:33 +00:00
troy%netscape.com
cd506df1a1 Eliminated some code that's no longer needed now that the info is in the
HTML reflow state


git-svn-id: svn://10.0.0.236/trunk@23026 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 01:40:29 +00:00
mscott%netscape.com
da3ad2f309 fix build breakage when the base file i/o stream changed.
git-svn-id: svn://10.0.0.236/trunk@23025 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 01:37:00 +00:00
nisheeth%netscape.com
ec2572e0af Exporting nsParserError.h...
git-svn-id: svn://10.0.0.236/trunk@23024 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 01:32:00 +00:00
alecf%netscape.com
5f05c90ce0 fix up autoregistration messenger bootstrap code
git-svn-id: svn://10.0.0.236/trunk@23023 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 01:29:31 +00:00
nisheeth%netscape.com
72db16df3a Exported nsParserError.h.
git-svn-id: svn://10.0.0.236/trunk@23022 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 01:29:11 +00:00
alecf%netscape.com
888ba4dea8 fix newline at end of file problem
git-svn-id: svn://10.0.0.236/trunk@23021 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 01:24:36 +00:00
alecf%netscape.com
3c77f2e6a3 rev the idl-generated headers
git-svn-id: svn://10.0.0.236/trunk@23020 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 01:24:00 +00:00
alecf%netscape.com
d7ba80c1da update interface to prepare to move nsMsgGroupRecord to be behind an interface
git-svn-id: svn://10.0.0.236/trunk@23019 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 01:23:07 +00:00
mscott%netscape.com
3f035f4167 Fix build breakage for mcmullen using the file stream changes.
git-svn-id: svn://10.0.0.236/trunk@23018 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 01:21:41 +00:00
nisheeth%netscape.com
8425c6c0d5 Adding nsParserError.h for export.
git-svn-id: svn://10.0.0.236/trunk@23017 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 01:20:18 +00:00
hyatt%netscape.com
04bdd7657a onchange handler implemented for observes nodes.
git-svn-id: svn://10.0.0.236/trunk@23016 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 01:19:13 +00:00
mscott%netscape.com
faafbf7f8d fix build breakage. file stream updates for mcmullen.
git-svn-id: svn://10.0.0.236/trunk@23015 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 01:17:55 +00:00
mcmullen%netscape.com
86f1a505d9 Adapt to the removed offset parameter in streams.
git-svn-id: svn://10.0.0.236/trunk@23014 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 01:03:12 +00:00
tague%netscape.com
00fb8568a5 Fixed tree bustage
git-svn-id: svn://10.0.0.236/trunk@23013 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 00:58:50 +00:00
mscott%netscape.com
9d3ed613ec Don't link with rdf_utils. That is already linked into msglocal.lib.
git-svn-id: svn://10.0.0.236/trunk@23012 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 00:53:32 +00:00
mscott%netscape.com
6babebf41f Remove extraneous functions....update to use ::RegisterComponent.
git-svn-id: svn://10.0.0.236/trunk@23011 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 00:53:11 +00:00
troy%netscape.com
b81fd87c6f Removed some static functions that are no longer needed
git-svn-id: svn://10.0.0.236/trunk@23010 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 00:48:45 +00:00
mcmullen%netscape.com
470d81fb75 Trying to fix the use of streams (the offset parameter has gone).
git-svn-id: svn://10.0.0.236/trunk@23009 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 00:44:40 +00:00
law%netscape.com
53806f3573 Updating test case
git-svn-id: svn://10.0.0.236/trunk@23008 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 00:44:32 +00:00
chuang%netscape.com
759293bc9a Java script functions for shared command between mail and browser, like Communicator and Help menu
git-svn-id: svn://10.0.0.236/trunk@23007 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 00:43:10 +00:00
chuang%netscape.com
d6d84cff70 Java script functions for mailnews commands
git-svn-id: svn://10.0.0.236/trunk@23006 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 00:41:56 +00:00
chuang%netscape.com
1157593c07 Java script functions for UI widgets
git-svn-id: svn://10.0.0.236/trunk@23005 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 00:41:21 +00:00
mscott%netscape.com
40a3deefd3 woops....fix typo....
git-svn-id: svn://10.0.0.236/trunk@23004 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 00:39:46 +00:00
troy%netscape.com
a468a48e17 Added ComputePadding() member function
git-svn-id: svn://10.0.0.236/trunk@23003 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 00:36:59 +00:00
sfraser%netscape.com
7e33e3843a Changes to get DOM IDL compiler to build on Mac.
git-svn-id: svn://10.0.0.236/trunk@23002 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 00:33:35 +00:00
mscott%netscape.com
d5832e6c07 Add test code for displaying a mailbox message from a berkley mail folder.
git-svn-id: svn://10.0.0.236/trunk@23001 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 00:31:59 +00:00
mscott%netscape.com
c2555fd151 LoadUrl now takes a display consumer. Add functionality for reading & displaying a mailbox message.
Right now we write the message to a temp file and then run a file url on the temp file to display the message.
So mkfile handles the rfc-822 to html conversion for us...


git-svn-id: svn://10.0.0.236/trunk@23000 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 00:31:06 +00:00
mscott%netscape.com
2fe594628c interface change, display message now takes a message id and a message key.
git-svn-id: svn://10.0.0.236/trunk@22999 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 00:30:10 +00:00
mcmullen%netscape.com
0f802d5ed2 Adapt to new stream interfaces
git-svn-id: svn://10.0.0.236/trunk@22998 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 00:29:58 +00:00
mscott%netscape.com
db151a164a Implemented a DisplayMessage service which takes a msg id, msg key a display consumer and possibly a url listener. It builds a mailbox url and runs it. Also, nsMailboxProtocol::LoadUrl now takes the consumer as an argument..
git-svn-id: svn://10.0.0.236/trunk@22997 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 00:29:50 +00:00
mscott%netscape.com
61558e8f53 many changes to how we parse a url. Added ability to extract message ID and message key from the search part.
When generating the url_struct for netlib, if we are a display mailbox url, then set the byte range based on message key and message size.


git-svn-id: svn://10.0.0.236/trunk@22996 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 00:29:10 +00:00
sfraser%netscape.com
846a9b8069 First Checked In.
git-svn-id: svn://10.0.0.236/trunk@22995 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 00:28:40 +00:00
mscott%netscape.com
539e846fce accessors for fetching a message key for the current url and a setter for setting the message size.
git-svn-id: svn://10.0.0.236/trunk@22994 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 00:28:23 +00:00
mscott%netscape.com
c877cb06b8 display message takes a message key and a messageID.
git-svn-id: svn://10.0.0.236/trunk@22993 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 00:27:58 +00:00
mcmullen%netscape.com
f90ec6e3ba Adapt to new Write()
git-svn-id: svn://10.0.0.236/trunk@22992 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 00:27:37 +00:00
slamm%netscape.com
ed35e74c15 Put test bookmarks at top.
git-svn-id: svn://10.0.0.236/trunk@22991 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 00:11:55 +00:00
rjc%netscape.com
19f8c00e28 Small cleanup to nsXULSortService.
git-svn-id: svn://10.0.0.236/trunk@22990 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 00:11:14 +00:00
mscott%netscape.com
2504363772 Leverage name spaces and remove rdf:id leaving just 'id'. This was causing the folder pane to come up blank....
git-svn-id: svn://10.0.0.236/trunk@22989 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 00:07:27 +00:00
slamm%netscape.com
1fed87b221 Simple bookmarks that launch.
git-svn-id: svn://10.0.0.236/trunk@22988 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 00:07:23 +00:00
mcmullen%netscape.com
adc585142d Fixing nsCOMPtr usage for unix.
git-svn-id: svn://10.0.0.236/trunk@22987 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 00:07:06 +00:00
slamm%netscape.com
8e97b9e85f Add some bookmarks without redirection. delete ^M's
git-svn-id: svn://10.0.0.236/trunk@22986 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 00:05:52 +00:00
alecf%netscape.com
7d408cc5c0 rev IDL-generated headers, won't bust on nsIID this time.
git-svn-id: svn://10.0.0.236/trunk@22985 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 00:05:51 +00:00
alecf%netscape.com
158065dfd1 add mozilla/compose/build/Makefile
git-svn-id: svn://10.0.0.236/trunk@22984 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 00:04:33 +00:00
troy%netscape.com
b2ed84683d Removed some code that's no longer needed, because mComputedPadding is now
part of the HTML reflow state


git-svn-id: svn://10.0.0.236/trunk@22983 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 00:04:24 +00:00
hyatt%netscape.com
f13c2c1cce More tweaks to broadcasters.
git-svn-id: svn://10.0.0.236/trunk@22982 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 23:53:01 +00:00
pavlov%pavlov.net
bb3f6aa1df proper fix
git-svn-id: svn://10.0.0.236/trunk@22981 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 23:52:34 +00:00
rjc%netscape.com
13142f4a98 First Checked In.
git-svn-id: svn://10.0.0.236/trunk@22980 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 23:51:41 +00:00
rjc%netscape.com
cd01332f38 nsXULSortService implementation: XUL sort functionality.
git-svn-id: svn://10.0.0.236/trunk@22979 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 23:51:13 +00:00
despotdaemon%netscape.com
ec7933732a Pseudo-automatic update of changes made by gbeasley@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@22978 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 23:48:18 +00:00
mcmullen%netscape.com
a801f8e296 Adding stringstreams
git-svn-id: svn://10.0.0.236/trunk@22977 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 23:44:22 +00:00
mcmullen%netscape.com
bda242b372 Have the right fix now, so backing out the hack.
git-svn-id: svn://10.0.0.236/trunk@22976 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 23:43:37 +00:00
mcmullen%netscape.com
58c3fd7fc2 Need the exports, so checking in the makefiles.
git-svn-id: svn://10.0.0.236/trunk@22975 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 23:41:46 +00:00
pavlov%pavlov.net
0c52e9f756 hacky fix to fix build. someone please do this correctly.
git-svn-id: svn://10.0.0.236/trunk@22974 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 23:41:40 +00:00
mscott%netscape.com
61ff77fdea Definition for LINEBREAK moved up into msgCore.h
git-svn-id: svn://10.0.0.236/trunk@22973 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 23:41:27 +00:00
mscott%netscape.com
beec466d17 Add platform specific defintions for LINEBREAK (these came from nsMsgLineBuffer)
git-svn-id: svn://10.0.0.236/trunk@22972 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 23:40:53 +00:00
cyeh%netscape.com
538e46343a fix pdb file generation so that the go into $(OBJDIR) and also
have more useful names other than "none.pdb". some cleanup remains.


git-svn-id: svn://10.0.0.236/trunk@22971 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 23:24:48 +00:00
nisheeth%netscape.com
ec4eb761d4 First commit for nsParserError struct.
git-svn-id: svn://10.0.0.236/trunk@22970 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 23:24:32 +00:00
syd%netscape.com
8bf9391538 Fix for 2503.
Communicate GTK_DELETE event so that higher levels can deal with the window
closure.


git-svn-id: svn://10.0.0.236/trunk@22969 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 23:21:51 +00:00
mcmullen%netscape.com
b9816559be Reversing the previous change. This was checked in in error.
git-svn-id: svn://10.0.0.236/trunk@22968 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 23:08:56 +00:00
hyatt%netscape.com
456017166d Fixed a memory leak in the broadcasters.
git-svn-id: svn://10.0.0.236/trunk@22967 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 23:08:34 +00:00
terry%netscape.com
0da1ca453e Check qa_contact IDs.
git-svn-id: svn://10.0.0.236/trunk@22966 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 23:08:23 +00:00
mcmullen%netscape.com
848546e2e8 Fix a unix warning
git-svn-id: svn://10.0.0.236/trunk@22965 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 23:00:57 +00:00
mcmullen%netscape.com
5b8c2045d8 Removed the offset parameter from the base stream interfaces. Implemented string streams.
git-svn-id: svn://10.0.0.236/trunk@22964 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 22:53:56 +00:00
hyatt%netscape.com
278305681e Changes to broadcasters.
git-svn-id: svn://10.0.0.236/trunk@22963 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 22:43:02 +00:00
alecf%netscape.com
49bedf1ec8 split up nsISupports macros into seperate files
git-svn-id: svn://10.0.0.236/trunk@22962 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 22:39:03 +00:00
alecf%netscape.com
932e5a5e58 oops, don't include nsID.idl, it's not being exported right now
git-svn-id: svn://10.0.0.236/trunk@22961 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 22:37:35 +00:00
hyatt%netscape.com
f1b078cf1c Changing the broadcaster methods to take DOM elements instead of DOM
nodes.


git-svn-id: svn://10.0.0.236/trunk@22960 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 22:37:24 +00:00
hyatt%netscape.com
3c2abba5dd Cleaning up some code.
git-svn-id: svn://10.0.0.236/trunk@22959 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 22:33:27 +00:00
wtc%netscape.com
aee1618592 Another update from the internal CVS repository /m/src.
git-svn-id: svn://10.0.0.236/trunk@22958 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 22:32:56 +00:00
alecf%netscape.com
0201c25604 removed lower-case version
git-svn-id: svn://10.0.0.236/trunk@22957 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 22:24:49 +00:00
troy%netscape.com
6bf1e58e48 Added ComputeMargin() member function that takes the containing block width
as an argument. This is necessary for absolutely positioned elements which use
the padding edge and not the content edge for the containing block


git-svn-id: svn://10.0.0.236/trunk@22956 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 22:24:27 +00:00
rhp%netscape.com
596b678a4c New files for XP-COM stream converter interface
git-svn-id: svn://10.0.0.236/trunk@22955 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 22:18:42 +00:00
slamm%netscape.com
5b89d0fbca Via irc vote, turn on 'checkins since' links even for nocrap.
git-svn-id: svn://10.0.0.236/trunk@22954 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 22:10:04 +00:00
alecf%netscape.com
2893cb0c07 fix linux -pedantic casting problems
git-svn-id: svn://10.0.0.236/trunk@22953 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 21:39:55 +00:00
mcmullen%netscape.com
72a74134c2 Made a function static to remove a warning.
git-svn-id: svn://10.0.0.236/trunk@22952 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 21:35:23 +00:00
alecf%netscape.com
f79fad04dc eliminate netlib dependancy by removing call to FE_Alert
git-svn-id: svn://10.0.0.236/trunk@22951 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 21:33:02 +00:00
alecf%netscape.com
adb9ab93da add OLD_MAIL_NEWS macros to eliminate libpref dependancy from libxp
git-svn-id: svn://10.0.0.236/trunk@22950 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 21:31:00 +00:00
ramiro%netscape.com
7ee4fc82c7 Filename was misspelled. Broke unix. Blessed by cyeh.
git-svn-id: svn://10.0.0.236/trunk@22949 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 21:29:26 +00:00
troy%netscape.com
cab2885013 Fixed containing block calculation for absolutely positioned elements. Now
uses padding edge and not the content edge


git-svn-id: svn://10.0.0.236/trunk@22948 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 21:26:49 +00:00
slamm%netscape.com
4d872e3116 Fix type and add m4 to path.
git-svn-id: svn://10.0.0.236/trunk@22947 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 21:26:04 +00:00
bienvenu%netscape.com
c2dcf1f296 load mail root path from prefs.js
git-svn-id: svn://10.0.0.236/trunk@22946 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 21:17:59 +00:00
rods%netscape.com
653fd3b694 Made sure nsIRadioGroup has been removed
git-svn-id: svn://10.0.0.236/trunk@22945 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 21:06:09 +00:00
cmanske%netscape.com
6987407539 Changed editor classes to inherited model. Fixed lots of destructor warnings.
git-svn-id: svn://10.0.0.236/trunk@22944 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 21:05:35 +00:00
cmanske%netscape.com
f6ff40c486 Change InitHTMLEditor to Init and removed EnableUndo, which is done in Init
git-svn-id: svn://10.0.0.236/trunk@22943 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 21:05:31 +00:00
cmanske%netscape.com
f6d9c2d5f8 Changed InitHTMLEditor to Init and removed EnableUndo, which is done in the Init
git-svn-id: svn://10.0.0.236/trunk@22942 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 21:05:26 +00:00
rods%netscape.com
bc22754c21 cleaned up some comment and debugging
git-svn-id: svn://10.0.0.236/trunk@22941 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 21:04:57 +00:00
alecf%netscape.com
d4d4126684 make clobber remove .deps directory too
git-svn-id: svn://10.0.0.236/trunk@22940 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 21:03:54 +00:00
mcmullen%netscape.com
859bdf20d9 Added nsIStringStream.h
git-svn-id: svn://10.0.0.236/trunk@22939 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 21:01:38 +00:00
mcmullen%netscape.com
1e5ac4f1d3 Make the FilesTest project build again.
git-svn-id: svn://10.0.0.236/trunk@22938 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 21:01:11 +00:00
beard%netscape.com
b0ca311028 Removed nsIRadioGroup.h (evidently obsolete?)
git-svn-id: svn://10.0.0.236/trunk@22937 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 20:59:34 +00:00
mcmullen%netscape.com
239f08d915 First Checked In.
git-svn-id: svn://10.0.0.236/trunk@22936 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 20:55:10 +00:00
slamm%netscape.com
ca8f6c08f7 Have script write out its own .cvspass. Use '.mozconfig.sh' symbolic link for Save As
git-svn-id: svn://10.0.0.236/trunk@22935 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 20:53:22 +00:00
slamm%netscape.com
50b1b3d4b2 Script writes its own .cvspass now
git-svn-id: svn://10.0.0.236/trunk@22934 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 20:51:12 +00:00
rods%netscape.com
379cc1597f Fixed crash bug on releaseing null pointer
git-svn-id: svn://10.0.0.236/trunk@22933 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 20:41:37 +00:00
sdagley%netscape.com
275c0f7692 Re-checking in pinkerton's fix as the project seemed to have cached something and kept putting nsGlobalVariables.cpp back into Rescued Items every time it was opened.
git-svn-id: svn://10.0.0.236/trunk@22932 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 20:31:19 +00:00
hyatt%netscape.com
6068e57e94 Fixes to enable getElementById to work with HTML elements.
git-svn-id: svn://10.0.0.236/trunk@22931 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 20:30:13 +00:00
sar%netscape.com
cf2eed582c adding mailnews to the SeaMonkeyAll module
git-svn-id: svn://10.0.0.236/trunk@22930 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 20:30:02 +00:00
sar%netscape.com
4078c85c95 enabling mailnews by default
git-svn-id: svn://10.0.0.236/trunk@22929 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 20:29:36 +00:00
rods%netscape.com
6ffeafda85 I have removed nsRadioGroup and nsIRadioGroup and all references to it.
git-svn-id: svn://10.0.0.236/trunk@22928 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 20:28:16 +00:00
danm%netscape.com
cc44e7799b adding convenience makefile (not part of the normal build)
git-svn-id: svn://10.0.0.236/trunk@22927 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 20:25:48 +00:00
dougt%netscape.com
547cad0b24 added nsSpecialSystemDirectory to build.
git-svn-id: svn://10.0.0.236/trunk@22926 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 20:25:05 +00:00
danm%netscape.com
5a423eb9bb changed name of onConstruction event to onload
git-svn-id: svn://10.0.0.236/trunk@22925 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 20:23:19 +00:00
dougt%netscape.com
1cbb8d488d Added testcases for nsSpecialSystemDirectory. These cases are
currently turned off until mcmullen takes a look at them on the mac.


git-svn-id: svn://10.0.0.236/trunk@22924 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 20:21:33 +00:00
pinkerton%netscape.com
1517688bd7 handle toolbar demo sample menu command.
git-svn-id: svn://10.0.0.236/trunk@22923 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 20:21:25 +00:00
pinkerton%netscape.com
fcd702d820 Remove toolbar/tree demo code (which was commented out).
git-svn-id: svn://10.0.0.236/trunk@22922 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 20:21:14 +00:00
dougt%netscape.com
96bdde7c31 adding nsSpecialSystemDirectory.cpp to windows makefile.
Fixed MakeAllDirectory bug in nsFileSpec.cpp


git-svn-id: svn://10.0.0.236/trunk@22921 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 20:20:22 +00:00
pinkerton%netscape.com
460615666c export toolbar samples and css file.
git-svn-id: svn://10.0.0.236/trunk@22920 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 20:20:18 +00:00
pinkerton%netscape.com
edce09c3ab table for main toolbar, removing html namespace stuff, onClick->onclick
git-svn-id: svn://10.0.0.236/trunk@22919 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 20:19:46 +00:00
pinkerton%netscape.com
020161f824 add new toolbar sample, remove old widget samples.
git-svn-id: svn://10.0.0.236/trunk@22918 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 20:19:13 +00:00
pinkerton%netscape.com
b76c4a887f fix for bug #3449 (onClick should be onclick).
git-svn-id: svn://10.0.0.236/trunk@22917 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 20:18:59 +00:00
dougt%netscape.com
59a658730f Updating makefiles so that nsSpecialSystemDirectory.h gets exported.
git-svn-id: svn://10.0.0.236/trunk@22916 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 20:18:33 +00:00
pinkerton%netscape.com
7fcd6c2b23 New menus for xul tests
git-svn-id: svn://10.0.0.236/trunk@22915 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 20:18:25 +00:00
pinkerton%netscape.com
467f6cdca7 remove toolbar/tree stuff, add xul tests.
git-svn-id: svn://10.0.0.236/trunk@22914 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 20:18:05 +00:00
dougt%netscape.com
9e5d173364 Initial Checkin
git-svn-id: svn://10.0.0.236/trunk@22913 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 20:17:47 +00:00
pinkerton%netscape.com
6a9df86f26 First Checked In.
git-svn-id: svn://10.0.0.236/trunk@22912 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 20:17:45 +00:00
dougt%netscape.com
b170bd79a4 Initial Checkin.
git-svn-id: svn://10.0.0.236/trunk@22911 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 20:16:47 +00:00
slamm%netscape.com
92478835cc Use symbolic link instead of rewrite rule.
git-svn-id: svn://10.0.0.236/trunk@22910 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 20:15:57 +00:00
rods%netscape.com
e0396140b8 Aded check for null parent to fix printing
git-svn-id: svn://10.0.0.236/trunk@22909 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 20:14:05 +00:00
terry%netscape.com
36da73bc23 Fixed bug 3365 -- was generating wrong statistics if there were no NEW
or no ASSIGNED bugs.


git-svn-id: svn://10.0.0.236/trunk@22908 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 20:05:53 +00:00
terry%netscape.com
0029bda371 Reformated all the code to match the rest of Bugzilla.
git-svn-id: svn://10.0.0.236/trunk@22907 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 19:48:26 +00:00
pinkerton%netscape.com
451990367b removed nsGlobalVariables.cpp for kipp. permission to checkin to a closed tree given to kipp by cyeh.
git-svn-id: svn://10.0.0.236/trunk@22906 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 19:35:01 +00:00
kipp%netscape.com
7d9aebda71 Cleanup state recomputation; fix bug # 3453 crasher; debug out some max-element-size issues
git-svn-id: svn://10.0.0.236/trunk@22905 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 19:25:44 +00:00
kipp%netscape.com
4717ed3aa4 nuked global variables
git-svn-id: svn://10.0.0.236/trunk@22904 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 19:24:45 +00:00
kipp%netscape.com
2521770fa4 Disable trim code for now; disable horizontal alignment during pass1 table reflow
git-svn-id: svn://10.0.0.236/trunk@22903 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 19:24:15 +00:00
kipp%netscape.com
1bd6230ab0 Remove dead global-variable nonsense
git-svn-id: svn://10.0.0.236/trunk@22902 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 19:23:52 +00:00
kipp%netscape.com
9d77708387 Partial fix to bug #3094
git-svn-id: svn://10.0.0.236/trunk@22901 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 19:23:24 +00:00
kipp%netscape.com
e24dd0c2bf Removed dead include
git-svn-id: svn://10.0.0.236/trunk@22900 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 19:23:09 +00:00
slamm%netscape.com
2ce22c6452 Avoid copying the list pointers
git-svn-id: svn://10.0.0.236/trunk@22899 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 18:08:24 +00:00
terry%netscape.com
984cd512c6 Add check to make sure versions table is OK.
git-svn-id: svn://10.0.0.236/trunk@22898 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 17:55:45 +00:00
slamm%netscape.com
6be2f1a5ba Don't use unshift because it is slow. Use push/reverse combo instead.
git-svn-id: svn://10.0.0.236/trunk@22897 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 17:14:03 +00:00
rods%netscape.com
8edb5cad46 Added ref counting to vertical scrollbar
git-svn-id: svn://10.0.0.236/trunk@22896 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 15:50:04 +00:00
briano%netscape.com
3d3781560b Automated update
git-svn-id: svn://10.0.0.236/trunk@22895 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 15:45:38 +00:00
rods%netscape.com
704f4fa587 Added where a scrolled view sets the widget for the vertical scrollbar
into the window so the window can send the vertical scrollbar the appropriate
message.


git-svn-id: svn://10.0.0.236/trunk@22894 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 15:41:50 +00:00
ramiro%netscape.com
019d74afca Add --enable-cpp-rtti , --enable-cpp-exceptions flags.
RTTI and exceptions are off by default on Linux.


git-svn-id: svn://10.0.0.236/trunk@22893 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 15:36:20 +00:00
rods%netscape.com
90e6c696a7 Major update for tracking the popping up and dropping down of menus.
Added Mouse Wheel tracking


git-svn-id: svn://10.0.0.236/trunk@22892 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 15:34:53 +00:00
rods%netscape.com
0bde4cee94 Fixed voidarray problem and a few other minor things
git-svn-id: svn://10.0.0.236/trunk@22891 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 15:33:40 +00:00
rods%netscape.com
bd3a759b8d Fixed up ref counting issues
git-svn-id: svn://10.0.0.236/trunk@22890 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 15:32:54 +00:00
rods%netscape.com
c713510396 Changed VoidArray to nsISupportsArray
git-svn-id: svn://10.0.0.236/trunk@22889 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 15:30:11 +00:00
rods%netscape.com
1a87528672 Added impl of SetVerticalScrollbar
git-svn-id: svn://10.0.0.236/trunk@22888 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 15:25:24 +00:00
rods%netscape.com
1af1e7d436 Added new method "SetVerticalScrollbar"
git-svn-id: svn://10.0.0.236/trunk@22887 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 15:25:21 +00:00
kipp%netscape.com
3f13e4f864 nuked
git-svn-id: svn://10.0.0.236/trunk@22886 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 15:23:46 +00:00
kipp%netscape.com
2095143fa1 Removed ref to dead nsFrameReflowState
git-svn-id: svn://10.0.0.236/trunk@22885 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 15:22:03 +00:00
edwin%woudt.nl
43b7410fae I'm backing out the changes to use the provider registry for now, because of problems. We should investigate this!
git-svn-id: svn://10.0.0.236/trunk@22884 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 15:16:09 +00:00
dcone%netscape.com
41675a0381 Update the surfaces to include graphics state
git-svn-id: svn://10.0.0.236/trunk@22883 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 14:48:44 +00:00
rpotts%netscape.com
169729d0bb changed all references to getElementByID(...) into getElementById(...). This fixed the URL typein bar...
git-svn-id: svn://10.0.0.236/trunk@22882 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 11:38:40 +00:00
waterson%netscape.com
af04e281fe Added nsRDFInterfaces.h to EXPORTS.
git-svn-id: svn://10.0.0.236/trunk@22881 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 11:12:58 +00:00
waterson%netscape.com
6a06193da5 Added C++-specific #include of nscore.h to make sure that PRUnichar gets included.
git-svn-id: svn://10.0.0.236/trunk@22880 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 11:12:24 +00:00
waterson%netscape.com
700e04eda4 Initial revision. Generated from nsRDFInterfaces.idl.
git-svn-id: svn://10.0.0.236/trunk@22879 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 10:55:04 +00:00
waterson%netscape.com
a68b77b40b Initial revision. Generated from nsRDFInterfaces.idl.
git-svn-id: svn://10.0.0.236/trunk@22878 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 10:49:13 +00:00
waterson%netscape.com
9492eb4357 Removed individual interface files for now, and plugged everything into nsRDFInterfaces.idl.
git-svn-id: svn://10.0.0.236/trunk@22877 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 10:48:07 +00:00
pierre%netscape.com
02557cd6d4 Fix #3408 "When mousedown, mousemoves should all go to same widget"
git-svn-id: svn://10.0.0.236/trunk@22876 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 10:04:07 +00:00
pierre%netscape.com
d711f26063 Improved SetCursor() to use the Appearance Mgr
git-svn-id: svn://10.0.0.236/trunk@22875 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 10:02:16 +00:00
pierre%netscape.com
a9a81bed98 Added nsToolkit::HasAppearanceManager()
git-svn-id: svn://10.0.0.236/trunk@22874 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 10:01:07 +00:00
mcafee%netscape.com
aee2bf8765 Fixing enums for the Solaris 5.0 compiler, thanks to Tim McNerney <mumbly@netcom.com> for this change.
git-svn-id: svn://10.0.0.236/trunk@22873 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 09:29:52 +00:00
grail%cafebabe.org
2cb1be4194 Signature storage into prefs.
git-svn-id: svn://10.0.0.236/trunk@22872 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 09:06:36 +00:00
grail%cafebabe.org
bb0a72c8b7 Removed old references to AWT file chooser. We're never going back there.
git-svn-id: svn://10.0.0.236/trunk@22871 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 09:06:16 +00:00
saari%netscape.com
8979faf55a Fixing menus on Win32
git-svn-id: svn://10.0.0.236/trunk@22870 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 07:31:54 +00:00
bienvenu%netscape.com
761756c428 fix folder info uint32 handling
git-svn-id: svn://10.0.0.236/trunk@22869 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 07:23:24 +00:00
saari%netscape.com
71cb6461a1 Fixing IID() to GetIID() to fix warren's bustage
git-svn-id: svn://10.0.0.236/trunk@22868 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 07:02:27 +00:00
leaf%mozilla.org
f88b33e5c1 ok, this time for sure, fixing mozbot.
git-svn-id: svn://10.0.0.236/trunk@22867 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 06:28:58 +00:00
leaf%mozilla.org
4e45aa3274 making the bot's given nick (an argument) global, because i'm evil.
git-svn-id: svn://10.0.0.236/trunk@22866 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 06:19:28 +00:00
warren%netscape.com
2395acaf74 Fixed up Advance methods.
git-svn-id: svn://10.0.0.236/trunk@22865 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 06:12:47 +00:00
warren%netscape.com
dde7c45373 Removed obsolete mail folder installation.
git-svn-id: svn://10.0.0.236/trunk@22864 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 06:09:43 +00:00
warren%netscape.com
fca11f6c47 Removed obsolete mail folder installation.
git-svn-id: svn://10.0.0.236/trunk@22863 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 06:03:36 +00:00
rjc%netscape.com
84f2cdbbb7 Only have one arc (a child) going out, otherwise duplicates! Also commented out NS_INIT_REFCNT() due to weirdness.
git-svn-id: svn://10.0.0.236/trunk@22862 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 06:03:03 +00:00
troy%netscape.com
ab4b858697 Fixed HTML to be correct: CAPTION must be at start of table, and TFOOT must be
before any body section row groups


git-svn-id: svn://10.0.0.236/trunk@22861 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 06:02:11 +00:00
troy%netscape.com
a759e230cf Table header/footer are repeated when splitting tables
git-svn-id: svn://10.0.0.236/trunk@22860 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 06:00:40 +00:00
warren%netscape.com
7e12e54f21 Added prlog tracing code. Fixed some error codes. Fixed DBArcsInOutCursor::Advance to check for failure on GetValue.
git-svn-id: svn://10.0.0.236/trunk@22859 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 05:59:02 +00:00
warren%netscape.com
4fee15d393 Fixed First method to return error.
git-svn-id: svn://10.0.0.236/trunk@22858 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 05:48:21 +00:00
sdagley%netscape.com
41a3b015d5 Fix bug #3405. Thanks to sfraser's research we discovered that there was a nasty problem caused by mactime.c including xp_mcom.h (added by brade on 3/3) causing ctime to be redefined as macctime. This is bad since macctime calls ctime (can you say recursion, recusrion, recusrsion...). Fix was to add an #undef for ctime after including xp_mcom.h and sacrificing a purple dinosaur.
git-svn-id: svn://10.0.0.236/trunk@22857 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 05:39:20 +00:00
rjc%netscape.com
ab4a1fe960 Fix bug 3401: aliases to shared libraries which auto-register need to be placed inside of a "components" directory (which itself needs to exist in the same directory as apprunner/viewer). Review/approval: sdagley
git-svn-id: svn://10.0.0.236/trunk@22856 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 05:09:04 +00:00
mcafee%netscape.com
ee18b1bc83 Uninitialized variables
git-svn-id: svn://10.0.0.236/trunk@22855 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 04:40:14 +00:00
kipp%netscape.com
00c7d42996 Use proper new/delete operators
git-svn-id: svn://10.0.0.236/trunk@22854 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 04:36:00 +00:00
kipp%netscape.com
54765b7652 Stop linking with other libraries to avoid finding symbols with dlsym that we don't want to find
git-svn-id: svn://10.0.0.236/trunk@22853 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 04:35:49 +00:00
kipp%netscape.com
fb97ac8491 Clean up query-interface; attempt to work around bug (failed; left some commentary in to help the netlib crew)
git-svn-id: svn://10.0.0.236/trunk@22852 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 04:35:37 +00:00
kipp%netscape.com
b76038d16c Use proper new operator
git-svn-id: svn://10.0.0.236/trunk@22851 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 04:33:57 +00:00
kipp%netscape.com
f73b4b8971 use new nsHTMLReflowState ctors
git-svn-id: svn://10.0.0.236/trunk@22850 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 04:29:11 +00:00
kipp%netscape.com
001a19082a Eliminate some compiler warnings
git-svn-id: svn://10.0.0.236/trunk@22849 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 04:28:54 +00:00
kipp%netscape.com
c9fd8c7538 Output rects in twips; eliminated some typo bugs with selection directions
git-svn-id: svn://10.0.0.236/trunk@22848 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 04:28:40 +00:00
kipp%netscape.com
399ce5dd64 use new nsHTMLReflowState ctors; made pages support IsPercentageBase
git-svn-id: svn://10.0.0.236/trunk@22847 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 04:28:07 +00:00
kipp%netscape.com
3a72fd18c3 Output rects in twips
git-svn-id: svn://10.0.0.236/trunk@22846 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 04:26:40 +00:00
kipp%netscape.com
65edef0640 Refactored code to make effecient use of computed state in nsHTMLReflowState
git-svn-id: svn://10.0.0.236/trunk@22845 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 04:26:21 +00:00
kipp%netscape.com
15c4920b73 use computed values from reflow state; made inline-reflow-state no longer isa html-reflow-state
git-svn-id: svn://10.0.0.236/trunk@22844 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 04:25:57 +00:00
kipp%netscape.com
f90b774ae9 Store more computed state; reformulated the constructors for nsHTMLReflowState
git-svn-id: svn://10.0.0.236/trunk@22843 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 04:25:25 +00:00
kipp%netscape.com
3bdcb1e967 Revised computations for blocks; store more computed values
git-svn-id: svn://10.0.0.236/trunk@22842 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 04:24:20 +00:00
kipp%netscape.com
44c66a325c Spanked almost away
git-svn-id: svn://10.0.0.236/trunk@22841 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 04:23:41 +00:00
kipp%netscape.com
bad84e485e Removed dead code; output rects naturally
git-svn-id: svn://10.0.0.236/trunk@22840 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 04:22:54 +00:00
kipp%netscape.com
e8c1baf1a5 Removed List method
git-svn-id: svn://10.0.0.236/trunk@22839 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 04:22:29 +00:00
kipp%netscape.com
4dfe8022be Minor tweaks to work better with computed values in html reflow state
git-svn-id: svn://10.0.0.236/trunk@22838 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 04:22:11 +00:00
kipp%netscape.com
bcf95a83f5 nsBlockReflowState no longer is-a nsHTMLReflowState; fixes to numerous bugs; reworked to use computed values from reflow-state
git-svn-id: svn://10.0.0.236/trunk@22837 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 04:21:32 +00:00
mcafee%netscape.com
2a7cf46dd3 Uninitialized variables
git-svn-id: svn://10.0.0.236/trunk@22836 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 04:20:54 +00:00
kipp%netscape.com
9c5a7c3cee Some asserts for me
git-svn-id: svn://10.0.0.236/trunk@22835 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 04:20:31 +00:00
kipp%netscape.com
e72cc15886 Support more css style for hr's; map align to auto margins
git-svn-id: svn://10.0.0.236/trunk@22834 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 04:20:07 +00:00
kipp%netscape.com
b4d19704fd use new nsHTMLReflowState ctors
git-svn-id: svn://10.0.0.236/trunk@22833 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 04:19:09 +00:00
kipp%netscape.com
6ef266bc6c Cleaned up margins hackery and made things use css instead of evil code in the block layout code
git-svn-id: svn://10.0.0.236/trunk@22832 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 04:18:58 +00:00
kipp%netscape.com
0b37e12e30 Removed constructors for nsReflowState
git-svn-id: svn://10.0.0.236/trunk@22831 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 04:17:00 +00:00
ftang%netscape.com
eb77f0eb37 add iso-8859-7 and windows-1253
git-svn-id: svn://10.0.0.236/trunk@22830 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 04:11:25 +00:00
bienvenu%netscape.com
a488d0f3fc add factory method, remove oid parameter to match real mdb
git-svn-id: svn://10.0.0.236/trunk@22829 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 03:29:41 +00:00
bienvenu%netscape.com
65d1575b3b try to fix time stamp and stat routines so we can re-open existing db's
git-svn-id: svn://10.0.0.236/trunk@22828 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 03:28:34 +00:00
bienvenu%netscape.com
ee28f1915e add rdf to the stupid mailbox parsing test app
git-svn-id: svn://10.0.0.236/trunk@22827 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 03:25:51 +00:00
rjc%netscape.com
108021ada8 Changes to autoregister the file system datasource (broken due to Warren's earlier changes.)
git-svn-id: svn://10.0.0.236/trunk@22826 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 03:22:51 +00:00
bienvenu%netscape.com
fe85c4dab4 add morkConfig to makefile
git-svn-id: svn://10.0.0.236/trunk@22825 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 02:49:36 +00:00
pavlov%pavlov.net
229469c47e start fixing file selector, fix menus under apprunner, fix font setting for
widgets.


git-svn-id: svn://10.0.0.236/trunk@22824 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 02:48:43 +00:00
slamm%netscape.com
4b94d0dfe4 Speed it up right.
git-svn-id: svn://10.0.0.236/trunk@22823 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 01:57:13 +00:00
cmanske%netscape.com
1d5ae5c42a This fixes build bustage if you are using nglayout.mak (editor must be built after htmlparser)
git-svn-id: svn://10.0.0.236/trunk@22822 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 01:54:22 +00:00
edwin%woudt.nl
97812d1705 The last step in updating the docs.
git-svn-id: svn://10.0.0.236/trunk@22821 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 01:48:15 +00:00
michaelp%netscape.com
3b152094ca added return code check WRT off screen surface allocation.
part of mac fixes.


git-svn-id: svn://10.0.0.236/trunk@22820 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 01:43:06 +00:00
slamm%netscape.com
6c1bce143c Uhoh, change wasn't ready for prime-time. backout.
git-svn-id: svn://10.0.0.236/trunk@22819 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 01:33:38 +00:00
edwin%woudt.nl
ee4e4ad487 Updated build docs
git-svn-id: svn://10.0.0.236/trunk@22818 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 01:26:30 +00:00
slamm%netscape.com
e702ebfd8d Speed up data reading. Read it backwards and only as much as needed.
git-svn-id: svn://10.0.0.236/trunk@22817 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 01:25:23 +00:00
edwin%woudt.nl
ba1c568fb4 Updated lib dependencies
git-svn-id: svn://10.0.0.236/trunk@22816 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 01:18:23 +00:00
slamm%netscape.com
44504c8755 Stick /opt/cvs-tools/bin on the path for cvs on cvs-mirror.
git-svn-id: svn://10.0.0.236/trunk@22815 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 01:03:33 +00:00
slamm%netscape.com
f53189a4ae add a comment
git-svn-id: svn://10.0.0.236/trunk@22814 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 00:48:35 +00:00
slamm%netscape.com
b36d37e499 Try to create a subdir.
git-svn-id: svn://10.0.0.236/trunk@22813 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 00:44:17 +00:00
despotdaemon%netscape.com
6d014280f1 Pseudo-automatic update of changes made by sgehani@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@22812 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 00:33:08 +00:00
hyatt%netscape.com
b528dce697 Adding XUL attributes to the project.
git-svn-id: svn://10.0.0.236/trunk@22811 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 00:32:18 +00:00
slamm%netscape.com
27a6125dd9 Need a cvs login for checking out configure.in
git-svn-id: svn://10.0.0.236/trunk@22810 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 00:23:57 +00:00
hyatt%netscape.com
15eb16c4b7 Fix for the Mac crash.
git-svn-id: svn://10.0.0.236/trunk@22809 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 00:20:10 +00:00
hyatt%netscape.com
79d6609992 Fixes to layout to allow nsHTMLCSSStyleSheet to be instantiable from outside
the layout DLL.


git-svn-id: svn://10.0.0.236/trunk@22808 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 00:06:31 +00:00
edwin%woudt.nl
8708ff3f6a Backed out mauros changes until they get fixed.
git-svn-id: svn://10.0.0.236/trunk@22807 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 00:04:48 +00:00
hyatt%netscape.com
68339f3d58 Fix to allow nsHTMLCSSStyleSheet to be instantiable.
git-svn-id: svn://10.0.0.236/trunk@22806 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 00:04:04 +00:00
hyatt%netscape.com
c5fb807561 Fix to the RFind method of nsString.
git-svn-id: svn://10.0.0.236/trunk@22805 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 00:03:46 +00:00
hyatt%netscape.com
b67c7ebb6b Fixing the split of the attribute name (into a URI and an ID).
git-svn-id: svn://10.0.0.236/trunk@22804 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 00:03:30 +00:00
hyatt%netscape.com
571769ba85 Changes to the content sink to make sure attributes are not converted to lower case
and to make sure attributes are put into the correct namespace.


git-svn-id: svn://10.0.0.236/trunk@22803 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 00:02:33 +00:00
hyatt%netscape.com
1db9fb2927 Regenerated the IDL for the XUlDocument. Changed getElementById to return
an element (and to have a lowercase d) for consistency with the HTML document
method of the same name.


git-svn-id: svn://10.0.0.236/trunk@22802 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 00:02:00 +00:00
hyatt%netscape.com
29dfb19d4e Many bug fixes to the RDF content model including namespace changes and
style support.


git-svn-id: svn://10.0.0.236/trunk@22801 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 00:01:26 +00:00
hyatt%netscape.com
d37bec4951 Modified the makefiles to handle the new XUL attribute class.
git-svn-id: svn://10.0.0.236/trunk@22800 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 00:00:56 +00:00
hyatt%netscape.com
a8fd6e7560 Committing the new attribute class for the handling of XUL attributes.
git-svn-id: svn://10.0.0.236/trunk@22799 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 00:00:40 +00:00
hyatt%netscape.com
37b30b463e generic attribute is going away in favor of a XUL-specific attribute class.
git-svn-id: svn://10.0.0.236/trunk@22798 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-04 23:59:57 +00:00
slamm%netscape.com
f54f68aef9 Pull configure.in in subdir, configure-mirror.
git-svn-id: svn://10.0.0.236/trunk@22797 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-04 23:53:38 +00:00
despotdaemon%netscape.com
7dbb8763e1 Pseudo-automatic update of changes made by terry@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@22796 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-04 23:49:05 +00:00
kin%netscape.com
1caf25fce0 Fix win32 build bustage. The editor directory is now built after the htmlparser directory.
git-svn-id: svn://10.0.0.236/trunk@22795 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-04 23:43:23 +00:00
slamm%netscape.com
4aed7b0f83 Retire the old 'express' code. Also reduce the default hours from 36 down to 12.
git-svn-id: svn://10.0.0.236/trunk@22794 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-04 23:41:02 +00:00
evaughan%netscape.com
45aec1474e Fixed a bug that caused TitledButtons and ProgressMeters to be skews when made inline.
git-svn-id: svn://10.0.0.236/trunk@22793 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-04 23:39:06 +00:00
evaughan%netscape.com
86a935fe8b Fixed buttons in apprunner so there borders appear when moved over.
git-svn-id: svn://10.0.0.236/trunk@22792 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-04 23:36:12 +00:00
edwin%woudt.nl
60335641a1 A few weeks earlier I fixed a bug that the whole class was synchronized. I just removed it. A few methods however should have been synchronized instead. I've done that now.
git-svn-id: svn://10.0.0.236/trunk@22791 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-04 22:31:34 +00:00
briano%netscape.com
b391febd29 Automated update
git-svn-id: svn://10.0.0.236/trunk@22790 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-04 22:30:40 +00:00
scc%netscape.com
2f7394142e make HAVE_CPP_NEW_CASTS stronger for bug in Solaris/CC
git-svn-id: svn://10.0.0.236/trunk@22789 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-04 22:22:14 +00:00
akkana%netscape.com
a535f86c0d Add displaytext/displayhtml to gtk menu. This is part of kostello's change, approved by sar
git-svn-id: svn://10.0.0.236/trunk@22788 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-04 21:59:13 +00:00
sfraser%netscape.com
da5c3ac0d9 Project change for kostello, approved sar. New link dependency on htmlParser.shlb
git-svn-id: svn://10.0.0.236/trunk@22787 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-04 21:57:59 +00:00
sfraser%netscape.com
40ba827e51 Project checkin for kostello, approved sar. Added nsHTMLToTXTSinkStream.cpp.
git-svn-id: svn://10.0.0.236/trunk@22786 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-04 21:55:26 +00:00
kostello%netscape.com
575a96dca1 Added Implementations for OutputHTML and OutputTXT
git-svn-id: svn://10.0.0.236/trunk@22785 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-04 21:53:42 +00:00
kostello%netscape.com
1d257371a8 Added new sink that outputs a Text stream instead of
an HTML stream.


git-svn-id: svn://10.0.0.236/trunk@22784 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-04 21:52:57 +00:00
despotdaemon%netscape.com
825e4caa13 Pseudo-automatic update of changes made by sgehani@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@22783 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-04 21:52:21 +00:00
despotdaemon%netscape.com
570e36e2b8 Pseudo-automatic update of changes made by terry@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@22782 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-04 21:50:49 +00:00
kostello%netscape.com
a484974367 Added Debug Output HTML and Debug Output Text
Note: these only work in editor mode.


git-svn-id: svn://10.0.0.236/trunk@22781 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-04 21:50:44 +00:00
slamm%netscape.com
820d265112 Add 'express_fast' which is a much faster than 'express'. Uses Backwards.pm. This will probably replace 'express'.
git-svn-id: svn://10.0.0.236/trunk@22780 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-04 21:46:07 +00:00
despotdaemon%netscape.com
b13907ba45 Pseudo-automatic update of changes made by sgehani@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@22779 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-04 21:27:13 +00:00
terry%netscape.com
de0928b4a1 Added "Grendel".
git-svn-id: svn://10.0.0.236/trunk@22778 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-04 20:37:25 +00:00
mscott%netscape.com
45559f72cb Don't add a null urllistener...
git-svn-id: svn://10.0.0.236/trunk@22777 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-04 20:10:20 +00:00
despotdaemon%netscape.com
35a6891c11 Pseudo-automatic update of changes made by terry@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@22776 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-04 20:07:22 +00:00
ducarroz%netscape.com
e389dcf261 no comment
git-svn-id: svn://10.0.0.236/trunk@22775 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-04 19:43:28 +00:00
ducarroz%netscape.com
4b14c18672 Add the function NewMessage to popup the compose window.
git-svn-id: svn://10.0.0.236/trunk@22774 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-04 19:33:55 +00:00
gordon%netscape.com
56df6d033f Bug fix for #3410 & #3403 by Simon Fraser, reviewed by Gordon Sheridan. Stop leaking UPPs everytime we do a file read.
git-svn-id: svn://10.0.0.236/trunk@22773 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-04 19:27:19 +00:00
fur%netscape.com
48762f0205 Add Object.registerNatives() dummy stub.
git-svn-id: svn://10.0.0.236/trunk@22772 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-04 19:17:24 +00:00
fur%netscape.com
15fdcab054 Artur Biasiaodowski's patch so that instruction immediates print out correctly.
git-svn-id: svn://10.0.0.236/trunk@22771 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-04 19:06:31 +00:00
bienvenu%netscape.com
aed8a4d01f add a couple cursors
git-svn-id: svn://10.0.0.236/trunk@22770 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-04 15:58:52 +00:00
putterman%netscape.com
396c97c1be Need to register the datasource.
git-svn-id: svn://10.0.0.236/trunk@22769 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-04 05:24:12 +00:00
briano%netscape.com
ea7eb46d00 Patched for QNX by Jerry.Kirk@Nexwarecorp.com.
git-svn-id: svn://10.0.0.236/trunk@22768 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-04 05:10:45 +00:00
putterman%netscape.com
606cc3c5ed changed id to rdf:id
git-svn-id: svn://10.0.0.236/trunk@22767 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-04 05:03:32 +00:00
briano%netscape.com
68f6e9c649 Minor change to make it acceptable to QNX.
git-svn-id: svn://10.0.0.236/trunk@22766 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-04 05:02:09 +00:00
talisman%anamorphic.com
07d8ae14ef Added by Mauro Botelho - we are now building addressbook gui from xml.
git-svn-id: svn://10.0.0.236/trunk@22765 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-04 04:14:09 +00:00
talisman%anamorphic.com
336e3f2ec9 *** empty log message ***
git-svn-id: svn://10.0.0.236/trunk@22764 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-04 04:13:07 +00:00
alecf%netscape.com
c4f27f980d remove FE_Alert to remove dependancy on netlib
git-svn-id: svn://10.0.0.236/trunk@22763 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-04 03:11:59 +00:00
slamm%netscape.com
1f2bcbebf5 Add ability to reread options. Still need to modify a few of them (nspr, with pthreads, debug, checkout options) before anyone uses this feature.
git-svn-id: svn://10.0.0.236/trunk@22762 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-04 03:07:50 +00:00
rjc%netscape.com
b668b7ec9b Now store pathnames as strings which prevents nr_MacAliasFromPath() from ever being called (it was being passed a Unix path when it really wanted a Mac path anyway). Also, autoregistration now looks inside the "components" directory (which is in the same folder as the program.) Also, bumped up registry version # due to change. Also, at startup, when building up list of arguments, check argv[0] against NULL as it might be (on the Mac).
git-svn-id: svn://10.0.0.236/trunk@22761 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-04 03:01:33 +00:00
mscott%netscape.com
3b3c01c8bc Changes for naoki to implement SetDocumentCharset.
git-svn-id: svn://10.0.0.236/trunk@22760 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-04 02:02:12 +00:00
briano%netscape.com
cf07d498ba Now it'll be able to capture all of CVS's output instead of just stdout.
git-svn-id: svn://10.0.0.236/trunk@22759 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-04 01:53:23 +00:00
alecf%netscape.com
eaf4267034 make this test compile on unix
git-svn-id: svn://10.0.0.236/trunk@22758 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-04 01:40:40 +00:00
alecf%netscape.com
cb9b4dedc6 forgot to include nsUInt32Array.cpp in this library!
git-svn-id: svn://10.0.0.236/trunk@22757 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-04 01:40:03 +00:00
alecf%netscape.com
ada6d5ba21 fully resolve all symbols and make the base mailnews library a component
git-svn-id: svn://10.0.0.236/trunk@22756 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-04 01:39:36 +00:00
alecf%netscape.com
2fb77ae582 only build tests when ENABLE_TESTS (i.e. --enable-tests) is turned on
git-svn-id: svn://10.0.0.236/trunk@22755 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-04 01:36:25 +00:00
terry%netscape.com
530633b1ad "regenerate" was busted.
git-svn-id: svn://10.0.0.236/trunk@22754 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-04 01:22:27 +00:00
terry%netscape.com
348f970a15 Do the grand component/product renaming.
git-svn-id: svn://10.0.0.236/trunk@22753 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-04 01:12:31 +00:00
mscott%netscape.com
cb4aefdcb9 part of scc's merge: change interface calls to IID() to GetIID().
git-svn-id: svn://10.0.0.236/trunk@22752 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-04 00:57:51 +00:00
mscott%netscape.com
4376db8133 part of scc's merge: change IID() calls to GetIID().
git-svn-id: svn://10.0.0.236/trunk@22751 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-04 00:44:05 +00:00
scc%netscape.com
033c58f132 rename |IID()| --> |GetIID()|
git-svn-id: svn://10.0.0.236/trunk@22750 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 23:03:34 +00:00
terry%netscape.com
04e2508b2a Added a "component/product" sanity check.
git-svn-id: svn://10.0.0.236/trunk@22749 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 22:55:36 +00:00
mscott%netscape.com
37569d2d56 attribute name space changes.
git-svn-id: svn://10.0.0.236/trunk@22748 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 21:59:04 +00:00
mscott%netscape.com
0d254799fe attribute name space changes. Spell start up correctly.
git-svn-id: svn://10.0.0.236/trunk@22747 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 21:56:48 +00:00
terry%netscape.com
4240a2d4ca Oops; forgot description for "Apprunner".
git-svn-id: svn://10.0.0.236/trunk@22746 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 21:21:31 +00:00
terry%netscape.com
51e61e5d03 Added "Apprunner".
git-svn-id: svn://10.0.0.236/trunk@22745 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 21:19:33 +00:00
scc%netscape.com
817f56596f rename |IID()| --> |GetIID()|
git-svn-id: svn://10.0.0.236/trunk@22744 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 19:48:57 +00:00
mscott%netscape.com
c09668ebed Fix build breakage by defining SetDocumentCharSet which was added to nsIDOMAppCore.
git-svn-id: svn://10.0.0.236/trunk@22743 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 18:47:16 +00:00
mscott%netscape.com
64dd7f377a Fix build breakage by adding SetDocumentCharset function which was added to nIDOMMsgAppCore.
git-svn-id: svn://10.0.0.236/trunk@22742 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 18:44:12 +00:00
buster%netscape.com
8ee6a7d6a6 added editor module (#define NS_ERROR_MODULE_EDITOR )
git-svn-id: svn://10.0.0.236/trunk@22741 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 18:30:09 +00:00
terry%netscape.com
d5426845f8 Added a "disallownew" field to the products table. If non-zero, then
don't let people file new bugs against this product.  (This is for when a
product is retired, but you want to keep the bug reports around for posterity.)


git-svn-id: svn://10.0.0.236/trunk@22740 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 18:16:24 +00:00
mscott%netscape.com
5bd6463a64 Updates to restore commands by changing Onclick to onclick. Also fixed the syntax error in the openURL call that was preventing the LoadMsg button from working.
git-svn-id: svn://10.0.0.236/trunk@22739 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 18:11:53 +00:00
alecf%netscape.com
4efe12e3f7 onClick -> onclick
git-svn-id: svn://10.0.0.236/trunk@22738 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 17:48:34 +00:00
pinkerton%netscape.com
a60bed6b62 don't look in xul namespace for "src" attribute. Images show up again. permission to checkin to closed tree by sar.
git-svn-id: svn://10.0.0.236/trunk@22737 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 17:28:27 +00:00
val4%cornell.edu
b9e50b7bfe Suport module for jsperl.c. It's not intended for use from Perl.
git-svn-id: svn://10.0.0.236/trunk@22736 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 16:42:57 +00:00
troy%netscape.com
2c9f8c326c Work-in-progress for table pagination
git-svn-id: svn://10.0.0.236/trunk@22735 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 16:33:57 +00:00
dcone%netscape.com
583e3dd616 First Checked In.
git-svn-id: svn://10.0.0.236/trunk@22734 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 15:46:43 +00:00
brade%netscape.com
9a1dd1f7df add static to ConsumeConditional to reduce Macintosh compiler warnings
git-svn-id: svn://10.0.0.236/trunk@22733 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 15:37:27 +00:00
brade%netscape.com
65a77a958a add static to two functions and a compare to reduce Macintosh compiler warnings
git-svn-id: svn://10.0.0.236/trunk@22732 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 15:36:42 +00:00
brade%netscape.com
3df52d033c reduce Macintosh compiler warnings
git-svn-id: svn://10.0.0.236/trunk@22731 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 15:35:49 +00:00
brade%netscape.com
5ac6f5b4a8 remove unused local variable in #ifdef XP_MAC section
git-svn-id: svn://10.0.0.236/trunk@22730 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 15:29:56 +00:00
brade%netscape.com
8cab29de0c add static to 2 functions to reduce Macintosh compiler warnings
git-svn-id: svn://10.0.0.236/trunk@22729 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 15:28:43 +00:00
rods%netscape.com
8ab43c6e54 Added static IID() method
git-svn-id: svn://10.0.0.236/trunk@22728 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 15:17:33 +00:00
brade%netscape.com
f51a003d2b add static to 2 functions to reduce Macintosh compiler warnings
git-svn-id: svn://10.0.0.236/trunk@22727 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 14:54:48 +00:00
brade%netscape.com
501edd5e13 add static to reduce Macintosh compiler warnings
git-svn-id: svn://10.0.0.236/trunk@22726 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 14:54:20 +00:00
brade%netscape.com
b48a462046 add "static" to HandleRobotEvent and HandleSiteEvent to reduce compiler warnings on Macintosh
git-svn-id: svn://10.0.0.236/trunk@22725 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 14:53:39 +00:00
brade%netscape.com
115b5fd0fb reduce compiler warnings on Macintosh by adding comparison in loop (around assignments)
git-svn-id: svn://10.0.0.236/trunk@22724 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 14:50:41 +00:00
brade%netscape.com
4aa447a575 add static to reduce Macintosh compiler warnings
git-svn-id: svn://10.0.0.236/trunk@22723 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 14:47:48 +00:00
brade%netscape.com
a97cdf9aba add curly braces to reduce Macintosh compiler warnings
git-svn-id: svn://10.0.0.236/trunk@22722 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 14:47:18 +00:00
brade%netscape.com
3eb66d6cd6 add static to 4 functions to reduce Macintosh compiler warnings
git-svn-id: svn://10.0.0.236/trunk@22721 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 14:44:02 +00:00
brade%netscape.com
95d563e707 add static to reduce Macintosh compiler warnings
git-svn-id: svn://10.0.0.236/trunk@22720 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 14:37:04 +00:00
brade%netscape.com
129375e2ec *** empty log message ***
git-svn-id: svn://10.0.0.236/trunk@22719 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 14:35:06 +00:00
brade%netscape.com
bf6e876ffb reduce compiler warnings
git-svn-id: svn://10.0.0.236/trunk@22718 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 14:31:00 +00:00
ramiro%netscape.com
bd55e1a422 Unhardcode nspr libs.
git-svn-id: svn://10.0.0.236/trunk@22717 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 13:35:52 +00:00
edwin%woudt.nl
b8371710b9 Patch from Morgan Schweers <morgan@vixen.com> to directly edit the From: header in the composition window. We need to add an advanced configuration option to turn this on, because otherwise not-so-clueful users might make mistakes. It'll stay here for now
git-svn-id: svn://10.0.0.236/trunk@22716 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 11:18:50 +00:00
edwin%woudt.nl
64e95c338b We don't want to send the whole path, just the filename.
git-svn-id: svn://10.0.0.236/trunk@22715 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 11:01:22 +00:00
edwin%woudt.nl
6ee1a4f682 For adding attachments a swing JFileChooser is now displayed instead of the AWT FileDialog
git-svn-id: svn://10.0.0.236/trunk@22714 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 10:47:40 +00:00
edwin%woudt.nl
33ab54f1dc Patches from Thomas Down <thomas.down@tri.ox.ac.uk> for better attachment sending handling.
git-svn-id: svn://10.0.0.236/trunk@22713 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 10:46:57 +00:00
edwin%woudt.nl
fe009e1c51 Moving Constants from grendel.storage to grendel.util. Also a little bit of cleaning up on this subject.
git-svn-id: svn://10.0.0.236/trunk@22712 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 10:10:23 +00:00
edwin%woudt.nl
fcf0c79e84 Message deletion works
git-svn-id: svn://10.0.0.236/trunk@22711 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 10:03:06 +00:00
mcafee%netscape.com
df71a67b17 Removing tests that link with components, we need to dlopen() these libraries and not link with them.
git-svn-id: svn://10.0.0.236/trunk@22710 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 09:17:32 +00:00
pierre%netscape.com
37d4d179e6 fix last part of #2336 "Miscellaneous cosmetic problems with scrollbars"
git-svn-id: svn://10.0.0.236/trunk@22709 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 09:05:50 +00:00
pierre%netscape.com
95a3f47239 fix funny button hilites that happened when moving quickly the mouse after doing a dragWindow
git-svn-id: svn://10.0.0.236/trunk@22708 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 09:04:42 +00:00
pierre%netscape.com
72f155cfdc fix #3358 "Missed mouse up events cause chaos"
fix double-clicks in buttons


git-svn-id: svn://10.0.0.236/trunk@22707 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 09:02:54 +00:00
pierre%netscape.com
70413d9059 fix #3358 "Missed mouse up events cause chaos"
git-svn-id: svn://10.0.0.236/trunk@22706 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 09:01:58 +00:00
pierre%netscape.com
c5ce5f5263 updated some comments about nsIWindow
git-svn-id: svn://10.0.0.236/trunk@22705 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 09:00:44 +00:00
rickg%netscape.com
6bea38145b ifdef expat until more testing can be done
git-svn-id: svn://10.0.0.236/trunk@22704 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 08:55:23 +00:00
rickg%netscape.com
26bb7f0161 enabled expat in parsing engine
git-svn-id: svn://10.0.0.236/trunk@22703 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 08:34:23 +00:00
waterson%netscape.com
d97c4079fb Cleaned up OnSetAttribute() and OnRemoveAttribute() to only listen on elements in the tree. Special-cased the 'open' attribute on a xul:treeitem to construct and destroy treechildren as its value is set and unset.
git-svn-id: svn://10.0.0.236/trunk@22702 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 08:10:20 +00:00
waterson%netscape.com
88fe4eb36c Cleaned up OnSetAttribute() and OnRemoveAttribute() to only listen on elements in the XUL document. Renamed the 'contentsgenerated' attribute to 'xulcontentsgenerated' to differentiate from the tree builder's stuff. Made this actually work.
git-svn-id: svn://10.0.0.236/trunk@22701 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 08:09:21 +00:00
waterson%netscape.com
0de97e73ef Removed tree-specific open and close code. This is now in the nsRDFTreeBuilder, where it belongs.
git-svn-id: svn://10.0.0.236/trunk@22700 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 08:07:10 +00:00
waterson%netscape.com
e26551151b Modified tree double-click handler to use DOM APIs instead of nsIContent.
git-svn-id: svn://10.0.0.236/trunk@22699 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 08:05:32 +00:00
beard%netscape.com
9947d53238 struct -> class
git-svn-id: svn://10.0.0.236/trunk@22698 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 06:10:58 +00:00
rhp%netscape.com
5043661316 More cleanup for stream conveter interface.
git-svn-id: svn://10.0.0.236/trunk@22697 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 05:58:00 +00:00
rhp%netscape.com
f4a97dd7af Changes for new XP-COM interface for stream converters.
git-svn-id: svn://10.0.0.236/trunk@22696 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 05:45:55 +00:00
rhp%netscape.com
62ba78eb1d New files for XP-COM stream converter interface.
git-svn-id: svn://10.0.0.236/trunk@22695 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 05:36:20 +00:00
bienvenu%netscape.com
c41d98b442 fix build bustage courtesy of the nsCOMPtr team
git-svn-id: svn://10.0.0.236/trunk@22694 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 05:13:21 +00:00
beard%netscape.com
a1c27dc778 resolving aliases.
git-svn-id: svn://10.0.0.236/trunk@22693 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 04:11:15 +00:00
beard%netscape.com
6ef5b7280e rewrote SetUpPluginInstance to use GetPluginFactory.
git-svn-id: svn://10.0.0.236/trunk@22692 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 04:10:54 +00:00
beard%netscape.com
320d4de322 moved NS_CALLBACK to nsCom.h.
git-svn-id: svn://10.0.0.236/trunk@22691 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 04:09:33 +00:00
beard%netscape.com
7b32613a59 Added NS_CALLBACK macro for standard callback APIs
git-svn-id: svn://10.0.0.236/trunk@22690 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 04:09:11 +00:00
evaughan%netscape.com
c0c44744db Fixed mac event bug.
Fixed alignment bug.


git-svn-id: svn://10.0.0.236/trunk@22689 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 04:04:48 +00:00
waterson%netscape.com
dd3eeaa644 Added mozilla/rdf/base/idl so Makefile is generated. This is not otherwise in the build.
git-svn-id: svn://10.0.0.236/trunk@22688 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 03:30:17 +00:00
waterson%netscape.com
73584bff5f Initial revision: all of the IDL files globbed together.
git-svn-id: svn://10.0.0.236/trunk@22687 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 03:29:37 +00:00
waterson%netscape.com
82e63ea07a Fixed use of Object, which is apparently a keyword.
git-svn-id: svn://10.0.0.236/trunk@22686 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 03:29:13 +00:00
mscott%netscape.com
40e81c3ce8 Remove nsIsmgSend->Test() call.
git-svn-id: svn://10.0.0.236/trunk@22685 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 03:27:31 +00:00
bienvenu%netscape.com
c6bf3f0b96 latest drop of mork files
git-svn-id: svn://10.0.0.236/trunk@22684 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 03:15:45 +00:00
hyatt%netscape.com
c3752a8df8 Fix to the ContentInserted function (ifdef XUL only) for treechildren.
git-svn-id: svn://10.0.0.236/trunk@22683 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 03:11:55 +00:00
pollmann%netscape.com
6385ee828c Handle readonly changes for TextAreas as well as Text Inputs.
git-svn-id: svn://10.0.0.236/trunk@22682 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 03:06:36 +00:00
pollmann%netscape.com
4642b85847 Give nsTextControlFrame a notification when readonly on a TextArea is changed.
git-svn-id: svn://10.0.0.236/trunk@22681 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 03:05:31 +00:00
pollmann%netscape.com
7692e0c4c1 Fix bug #3375 and #3368: Allow hidden inputs and password inputs to store values.
git-svn-id: svn://10.0.0.236/trunk@22680 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 02:54:25 +00:00
nisheeth%netscape.com
8ce7dc3e65 We've decided to do away with the notion of an nsExpatDTD. The expat tokenizer which encapsulates the expat parser will be driven by nsWellFormedDTD. So, nsExpatTokenizer has changed accordingly. nsWellFormedDTD() creates an nsExpatTokenizer if EXPAT is #define'd; otherwise it creates the old nsXMLTokenizer. nsParser no longer registers and createsthe nsExpatDTD.
git-svn-id: svn://10.0.0.236/trunk@22679 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 02:34:18 +00:00
dp%netscape.com
787945c1bd Forcing registry upgrade to alpha0.30 due to autoreg beginning at ./components instead of ./
git-svn-id: svn://10.0.0.236/trunk@22678 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 02:17:57 +00:00
mscott%netscape.com
92d7fc1050 Fix build breakage. Seems like none of these interfaces implement a Test() method...
git-svn-id: svn://10.0.0.236/trunk@22677 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 02:03:48 +00:00
joki%netscape.com
c41dbba1c6 Fix for frames not resizing.
git-svn-id: svn://10.0.0.236/trunk@22676 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 01:59:50 +00:00
nisheeth%netscape.com
614b3fd83c We've decided to do away with the notion of an nsExpatDTD. The expat tokenizer which encapsulates the expat parser will be driven by nsWellFormedDTD. So, I'm removing the code that constructed an expat DTD for controlling the parsing of an XML document.
git-svn-id: svn://10.0.0.236/trunk@22675 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 01:57:03 +00:00
mjudge%netscape.com
86f2920385 fixes for selection code, batching at correct point
git-svn-id: svn://10.0.0.236/trunk@22674 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 01:51:59 +00:00
mjudge%netscape.com
4bb2e93aeb updates and fixes for CTRL left arrow and right arrow. also fixes for releasing the presshell correctly. the selection code was leaking it. updates for PREV and NEXT in nsFrameTraversal
git-svn-id: svn://10.0.0.236/trunk@22673 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 01:51:21 +00:00
hyatt%netscape.com
35f4281b4d More fixes to make sure the right attribute namespace is being used.
git-svn-id: svn://10.0.0.236/trunk@22672 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 01:38:32 +00:00
mscott%netscape.com
71ce6f1280 url listener update.
git-svn-id: svn://10.0.0.236/trunk@22671 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 01:32:10 +00:00
mscott%netscape.com
bdd7ff4c36 Remove RegisterFactory call for an rfc822 parser. this is done during the self register phase of the msgcore dll.
git-svn-id: svn://10.0.0.236/trunk@22670 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 01:31:28 +00:00
mscott%netscape.com
254261aa33 Update smtp test to register itself as a url listener on the current smtp url being run.
git-svn-id: svn://10.0.0.236/trunk@22669 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 01:27:11 +00:00
hyatt%netscape.com
90b4ba1563 Fixes so that attributes are set correctly.
git-svn-id: svn://10.0.0.236/trunk@22668 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 01:26:33 +00:00
mscott%netscape.com
5d70853340 Don't rely on msgcore.lib, use the dll instead....
git-svn-id: svn://10.0.0.236/trunk@22667 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 01:25:49 +00:00
dp%netscape.com
2cce57d913 Installing loadable components in components/ directory
git-svn-id: svn://10.0.0.236/trunk@22666 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 01:25:21 +00:00
mscott%netscape.com
9fb4f82661 asking the smtp service to send a message requires you to pass in a url listener (which can be nsnull if you don't care).
git-svn-id: svn://10.0.0.236/trunk@22665 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 01:24:56 +00:00
bienvenu%netscape.com
231ebbbf1a make sure message key gets set correctly
git-svn-id: svn://10.0.0.236/trunk@22664 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 01:22:49 +00:00
mscott%netscape.com
e7b00ca17e Pass in a url listener to send message.
git-svn-id: svn://10.0.0.236/trunk@22663 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 01:22:20 +00:00
briano%netscape.com
46acc683f2 Major housecleaning, and a hack to allow me to build on Solaris using Workshop.
git-svn-id: svn://10.0.0.236/trunk@22662 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 01:21:42 +00:00
mscott%netscape.com
1042739ca9 Update to latest version of nsIMsgMailNewsUrl which includes url listener registration and notification stuff.
git-svn-id: svn://10.0.0.236/trunk@22661 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 01:21:38 +00:00
nhotta%netscape.com
9d42323693 Reformat code for MIME encoder, otherwise unreadable.
git-svn-id: svn://10.0.0.236/trunk@22660 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 01:20:22 +00:00
mscott%netscape.com
32e276e2af Update to take a url listener when sending a message.
git-svn-id: svn://10.0.0.236/trunk@22659 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 01:19:50 +00:00
waterson%netscape.com
73e6f37199 Initial revision. They don't work.
git-svn-id: svn://10.0.0.236/trunk@22658 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 01:19:11 +00:00
mscott%netscape.com
83539652d8 Changes to make the mailbox test driver a url listener on the currently loaded url. This allowed me to use the test driver for mailbox urls as a test for url listeners...
git-svn-id: svn://10.0.0.236/trunk@22657 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 01:18:18 +00:00
waterson%netscape.com
a1cd895bd4 Added ProgIDToCLSID cache.
git-svn-id: svn://10.0.0.236/trunk@22656 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 01:18:15 +00:00
hyatt%netscape.com
49fc7c85a3 Fixes to attributes so that they are properly added in with a namespace of
NONE.


git-svn-id: svn://10.0.0.236/trunk@22655 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 01:17:29 +00:00
mscott%netscape.com
cf21ad834f Update urlListener stuff.
git-svn-id: svn://10.0.0.236/trunk@22654 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 01:16:42 +00:00
mscott%netscape.com
e3367656c2 pass in urlListener as argument to parsing a mailbox.
git-svn-id: svn://10.0.0.236/trunk@22653 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 01:15:40 +00:00
mscott%netscape.com
8a0fa9b3cf Add url listener manager support to mailbox urls.
git-svn-id: svn://10.0.0.236/trunk@22652 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 01:14:45 +00:00
mscott%netscape.com
133e65fe26 When parsing a mailbox, allow the caller to pass in a url listener on the action....
git-svn-id: svn://10.0.0.236/trunk@22651 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 01:13:34 +00:00
mscott%netscape.com
4135eec9c9 Requires netlib.
git-svn-id: svn://10.0.0.236/trunk@22650 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 01:12:20 +00:00
mscott%netscape.com
0230d7ef17 Add code to register a url listener manager.
git-svn-id: svn://10.0.0.236/trunk@22649 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 01:11:53 +00:00
akkana%netscape.com
ad596eb161 Turn on blinking caret
git-svn-id: svn://10.0.0.236/trunk@22648 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 01:11:50 +00:00
akkana%netscape.com
08d2fe9b17 Fix Unix crash: comment out an assert
git-svn-id: svn://10.0.0.236/trunk@22647 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 01:11:28 +00:00
mscott%netscape.com
dafcb92bca Build nsUrlListenerManager.
git-svn-id: svn://10.0.0.236/trunk@22646 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 01:10:42 +00:00
mscott%netscape.com
695610eea1 Build the url listener manager.
git-svn-id: svn://10.0.0.236/trunk@22645 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 01:08:29 +00:00
mscott%netscape.com
0a1d781831 A generic url listener manager...
git-svn-id: svn://10.0.0.236/trunk@22644 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 01:07:55 +00:00
mscott%netscape.com
73b36312cb MailNews Urls now support url listeners. Add these new methods to the base url interface class.
git-svn-id: svn://10.0.0.236/trunk@22643 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 01:06:52 +00:00
mscott%netscape.com
fb502c1c77 Remove from directory...
git-svn-id: svn://10.0.0.236/trunk@22642 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 01:05:37 +00:00
mscott%netscape.com
f9aca39111 Export nsIUrlListener.h and nsIUrlListenerManager.h
git-svn-id: svn://10.0.0.236/trunk@22641 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 01:05:04 +00:00
mscott%netscape.com
216e25711a Export nsIListenerUrl.h and nsIUrlListenerManager.h
git-svn-id: svn://10.0.0.236/trunk@22640 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 01:03:27 +00:00
mscott%netscape.com
35b5fa40ce UrlListener interface and the interface for a generic url listener manager. Each of our url classes will have a url listener manager to handle the book keeping related to url listeners.
git-svn-id: svn://10.0.0.236/trunk@22639 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 01:02:53 +00:00
briano%netscape.com
6976369168 Automated update
git-svn-id: svn://10.0.0.236/trunk@22638 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 00:45:39 +00:00
karnaze%netscape.com
a726826198 improved <iframe> sizing to consider left, right, etc borders
git-svn-id: svn://10.0.0.236/trunk@22637 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 00:37:55 +00:00
alecf%netscape.com
b18062f12e start splitting nsISupports.h into multiple header files (blank right now until we get them into the Mac build)
git-svn-id: svn://10.0.0.236/trunk@22636 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 00:31:50 +00:00
briano%netscape.com
1d4497a497 Fix the SunOS4 shared lib linking problem. Probably ought to be done more elegantly, though....
git-svn-id: svn://10.0.0.236/trunk@22635 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 00:31:42 +00:00
slamm%netscape.com
7e51be6e16 still not working
git-svn-id: svn://10.0.0.236/trunk@22634 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 00:01:03 +00:00
mscott%netscape.com
ec6ceee69a Build mailbox test.
git-svn-id: svn://10.0.0.236/trunk@22633 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 23:56:27 +00:00
slamm%netscape.com
2a20d151e1 a little more
git-svn-id: svn://10.0.0.236/trunk@22632 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 23:56:12 +00:00
scc%netscape.com
e70b8e958a backed out depency on nscore.h
git-svn-id: svn://10.0.0.236/trunk@22631 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 23:52:38 +00:00
slamm%netscape.com
5f08e71779 try again
git-svn-id: svn://10.0.0.236/trunk@22630 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 23:47:31 +00:00
briano%netscape.com
09a337ad35 Automated update
git-svn-id: svn://10.0.0.236/trunk@22628 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 23:31:36 +00:00
brade%netscape.com
dc58e7d168 add static to GetTagName to reduce Macintosh compiler warnings
git-svn-id: svn://10.0.0.236/trunk@22626 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 23:28:04 +00:00
slamm%netscape.com
07f28f211e Change the order of --disable-build-xpfe and --disable-build-nspr
git-svn-id: svn://10.0.0.236/trunk@22625 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 23:25:29 +00:00
vidur%netscape.com
2041f859c6 Fixes to get CDATASections working again. Also changes to fix XML links.
git-svn-id: svn://10.0.0.236/trunk@22623 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 23:22:05 +00:00
vidur%netscape.com
e7ba5a8b0b Fix to get old XML parser to see CDATASections again
git-svn-id: svn://10.0.0.236/trunk@22622 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 23:20:45 +00:00
wtc%netscape.com
01ee68305f Undo the temporary "depend: clean" hack.
git-svn-id: svn://10.0.0.236/trunk@22621 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 23:19:01 +00:00
scc%netscape.com
ce584e3c02 now rely on "nscore.h" for NS_REINTERPRET_CAST instead of defining my own. now relying on autoconf system for all unixes. Some tests may need to be fixed.
git-svn-id: svn://10.0.0.236/trunk@22620 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 23:08:54 +00:00
val4%cornell.edu
90515a0a91 Fix a prolem with prev. check-in
git-svn-id: svn://10.0.0.236/trunk@22619 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 23:08:06 +00:00
scc%netscape.com
533c3d1f11 fix for nsCOMPtr: no direct construction/assignment from raw COM interface pointers
git-svn-id: svn://10.0.0.236/trunk@22618 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 23:00:09 +00:00
val4%cornell.edu
9684e39320 Divided JS.pm into two modules to break dependencies between jsperl.c support functions
and functions exporsed from Perl. test.pl fails one of the tests -- need to look at that.
Worspace  build settings also changed.


git-svn-id: svn://10.0.0.236/trunk@22617 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 22:53:16 +00:00
jband%netscape.com
8fda3403f8 nsID JSObject can now do mapping to and from interface names using nsIInterfaceInfoManager. Fixed a bug in getting name. Added nsID tests
git-svn-id: svn://10.0.0.236/trunk@22616 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 22:51:11 +00:00
scc%netscape.com
a6ad86bdb2 fix for nsCOMPtr: no construction/assignment from raw COM interface pointers
git-svn-id: svn://10.0.0.236/trunk@22615 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 22:44:55 +00:00
kmcclusk%netscape.com
4bd141876c gfx vs native widget rendering can now be specified in the viewer at run-time.
Added methods to GetWidgetRenderingMode and SetWidgetRenderingMode in nsPresContext
Removed NS_GFX_RENDER_FORM_ELEMENTS define, now it uses the GetWidgetRenderingMode
method on the rendering context.
Resurrected Rod's listbox frame-based widget code.
Added -moz-option-selected pseudo attribute to control the appearance of selected items for the listbox frame-based widget.
Added a style rule with attribute selector for -moz-option-selected to the ua.css style sheet.
Modifed nsView::SetVFlags to do a bitwise or instead of bitwise and to set flags.
Modified nsView::HandleEvent to compare mVFlags with NS_VIEW_FLAG_DONT_CHECK_CHILDREN


git-svn-id: svn://10.0.0.236/trunk@22614 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 22:43:26 +00:00
scc%netscape.com
8525928774 fixed for nsCOMPtr: no constructions assignments from raw COM interface pointers
git-svn-id: svn://10.0.0.236/trunk@22613 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 22:38:42 +00:00
beard%netscape.com
d264efb592 removed all vestiges of nsIMalloc.
git-svn-id: svn://10.0.0.236/trunk@22612 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 22:33:32 +00:00
beard%netscape.com
a9d898c78c made inheritance public.
git-svn-id: svn://10.0.0.236/trunk@22611 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 22:31:54 +00:00
beard%netscape.com
e53b867cea fix menu double dispatching
git-svn-id: svn://10.0.0.236/trunk@22610 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 22:30:02 +00:00
scc%netscape.com
84d4e393bc fixed for nsCOMPtr: no construction or assignment from raw COM interface pointers
git-svn-id: svn://10.0.0.236/trunk@22609 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 22:27:46 +00:00
wtc%netscape.com
cda9f78e88 Another update of the latest stuff from the internal CVS repository /m/src.
git-svn-id: svn://10.0.0.236/trunk@22608 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 22:23:14 +00:00
kmcclusk%netscape.com
f5e311af18 Added debug/style/widget render mode to the viewer menu in GTK. This allows
the viewer to set whether native or gfx-rendered widgets should be used.


git-svn-id: svn://10.0.0.236/trunk@22607 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 22:15:35 +00:00
despotdaemon%netscape.com
5816235d2a Pseudo-automatic update of changes made by val4@cornell.edu.
git-svn-id: svn://10.0.0.236/trunk@22606 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 21:32:53 +00:00
dougt%netscape.com
ca9ff84fe2 Added Unix makefiles (that really do not do anything)
Added Arguments and Jarfile variables to the Install object which
are now being reflected into js.
Fixed how ExtractJarFile in Install was working
Hooked up to libjar.

** These changes are not part of the Tinderbox builds **


git-svn-id: svn://10.0.0.236/trunk@22605 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 20:25:42 +00:00
mcafee%netscape.com
ccb66a01d5 mcom_db.h, cdefs.h also had copies over in mozilla/dbm/include, this was causing much confusion as you can imagine. I've merged changes over to the dbm versions and am retiring these files. r=pinkerton@netscape.com,leaf@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@22604 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 19:41:25 +00:00
despotdaemon%netscape.com
55d295b1ef Pseudo-automatic update of changes made by syd@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@22603 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 19:40:53 +00:00
leaf%mozilla.org
9f0b197029 Helping mcafee change the default location of cdefs.h and mcom_db.h
git-svn-id: svn://10.0.0.236/trunk@22602 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 19:37:15 +00:00
despotdaemon%netscape.com
1874aee396 Pseudo-automatic update of changes made by leaf@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@22601 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 19:27:01 +00:00
alecf%netscape.com
42f969b1e0 fix HPUX bustage - confused by too many similar constructors
git-svn-id: svn://10.0.0.236/trunk@22600 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 19:23:06 +00:00
joki%netscape.com
e62bbe65fe Adding new tab handling and focus support.
git-svn-id: svn://10.0.0.236/trunk@22599 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 19:19:24 +00:00
akkana%netscape.com
59406ac999 nsWindow.cpp didn't like the fcn name SelectionClear
git-svn-id: svn://10.0.0.236/trunk@22598 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 19:06:28 +00:00
joki%netscape.com
6e83286f60 Adding new interface for focusable content
git-svn-id: svn://10.0.0.236/trunk@22597 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 19:05:54 +00:00
pinkerton%netscape.com
62116e0985 add manifest for dbm/include
git-svn-id: svn://10.0.0.236/trunk@22596 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 19:02:28 +00:00
pinkerton%netscape.com
88055a803c remove duplicated files already in dbm
git-svn-id: svn://10.0.0.236/trunk@22595 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 19:01:56 +00:00
slamm%netscape.com
267f358295 Style changes.
git-svn-id: svn://10.0.0.236/trunk@22594 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 18:41:21 +00:00
ducarroz%netscape.com
78124a6bda clean up: change PR_MALLOC for PR_Malloc
git-svn-id: svn://10.0.0.236/trunk@22593 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 18:36:58 +00:00
ducarroz%netscape.com
2ab9da25ac sources clean up
git-svn-id: svn://10.0.0.236/trunk@22592 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 18:35:42 +00:00
putterman%netscape.com
dc666000f4 Add ".msf" to the list of files types we should ignore when building folders.
git-svn-id: svn://10.0.0.236/trunk@22591 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 18:32:39 +00:00
jband%netscape.com
6c33d541a1 fix misguided use of ebx in tests too
git-svn-id: svn://10.0.0.236/trunk@22590 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 18:31:25 +00:00
ftang%netscape.com
88f3ce7132 fix SmallCap to make it work for the whole range of unicode
git-svn-id: svn://10.0.0.236/trunk@22589 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 18:25:22 +00:00
ftang%netscape.com
48f5a3a3d8 add IsUpper and IsLower which work for all Unicode, reviewed and approved by kipp
git-svn-id: svn://10.0.0.236/trunk@22588 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 18:24:42 +00:00
jband%netscape.com
b59c75350a fixes to make it work in release builds: some #ifdef DEBUGs, don't munge ebx register on win32!, stray star, friendlier result if linux code included in non-Linux build
git-svn-id: svn://10.0.0.236/trunk@22587 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 18:24:17 +00:00
akkana%netscape.com
40a8bc718d Improvements in handling of the X selection, and some explanatory comments
git-svn-id: svn://10.0.0.236/trunk@22586 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 18:08:49 +00:00
nhotta%netscape.com
e99241e1d8 Added SetDocumentCharset.
git-svn-id: svn://10.0.0.236/trunk@22585 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 17:53:52 +00:00
nhotta%netscape.com
4e4a33af41 Added SetDocumentCharset.
git-svn-id: svn://10.0.0.236/trunk@22584 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 17:48:05 +00:00
rhp%netscape.com
3e62888ba3 Changes for new header conversion interfaces
git-svn-id: svn://10.0.0.236/trunk@22583 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 17:47:31 +00:00
terry%netscape.com
1c7a9c70cb Oops! Mispelled "petersen".
git-svn-id: svn://10.0.0.236/trunk@22582 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 17:45:23 +00:00
rhp%netscape.com
ca91c60636 Update for header defines
git-svn-id: svn://10.0.0.236/trunk@22581 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 17:43:02 +00:00
putterman%netscape.com
8640a14ce1 update to use RDF:containment tag. ThreadPane now loads from RDF.
Removed xul: from threadPane.


git-svn-id: svn://10.0.0.236/trunk@22580 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 17:21:11 +00:00
putterman%netscape.com
52e99acea6 Added ability to GetMessages from prepopulated database.
git-svn-id: svn://10.0.0.236/trunk@22579 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 17:17:53 +00:00
putterman%netscape.com
32d57dc133 Added temporary code for creating a URI and adding it to nsMsgHdr.
git-svn-id: svn://10.0.0.236/trunk@22578 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 17:17:00 +00:00
harishd%netscape.com
6b0ff9e89c We don't create a content node for <NOEMBED> tags.
Therefore, added kDiscardTag to noembed special properties bit.


git-svn-id: svn://10.0.0.236/trunk@22577 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 17:13:55 +00:00
harishd%netscape.com
33d3b8cb7f Included flag kLegalOpen which will be used later
in handling <BODY>, <SCRIPT>, and <TITLE> tags.


git-svn-id: svn://10.0.0.236/trunk@22576 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 17:13:18 +00:00
rhp%netscape.com
0bbbe6bed9 Changes for new XP-COM interface.
git-svn-id: svn://10.0.0.236/trunk@22575 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 17:06:48 +00:00
rhp%netscape.com
7aa66bf8b7 Change for interface
git-svn-id: svn://10.0.0.236/trunk@22574 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 16:57:16 +00:00
dcone%netscape.com
9d7acd41c1 Update some functions, and formating
git-svn-id: svn://10.0.0.236/trunk@22573 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 16:47:16 +00:00
rhp%netscape.com
d752c91db0 New interfaces to be exported.
git-svn-id: svn://10.0.0.236/trunk@22572 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 16:46:02 +00:00
rhp%netscape.com
f7c8fc398a Adding new header converter interface.
git-svn-id: svn://10.0.0.236/trunk@22570 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 16:10:28 +00:00
fur%netscape.com
98dc06cfc5 Eliminating New* files, which are old snapshots of other files
git-svn-id: svn://10.0.0.236/trunk@22569 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 16:07:50 +00:00
rhp%netscape.com
a6aaae7794 New header conversion interface
git-svn-id: svn://10.0.0.236/trunk@22568 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 15:58:15 +00:00
8590 changed files with 2081821 additions and 5141 deletions

40
mozilla/LEGAL Normal file
View File

@@ -0,0 +1,40 @@
Please be apprised of the following Legal Notices:
A) The U.S. District Court for the Eastern District of Virginia has
ruled that the Netscape Navigator code does not infringe Wang's U.S.
Patent No. 4,751,669 ("the '669 Patent") because: 1) HTML is not
Videotex as defined by the '669 patent; 2) web servers are not central
suppliers; and 3) Navigator does not "connect," as defined by the '669
Patent, to web servers on the Internet. Wang may appeal this decision to
the Federal Circuit. Wang contended that its Patent disclosing a
"Videotext" system, is infringed by the following functionality in the
Netscape Navigator code: 1) the animated logo and status line indicators
--See Claims 1,8 and 9; 2) the "File Save As" function --See Claims
23-27; 3) Bookmarks and Rename Bookmarks in the Properties window --See
Claims 20-22; 4) storing HTML, GIF, and JPEG files and adding filename
extensions --See Claim 38
B) Intermind owns pending U.S. patent applications on communications
systems which employ metadata ("channel objects") to define a control
structure for information transfer. The Netscape code does not infringe
as released; however, modifications which utilize channel objects as
described by Intermind should be considered carefully. The following is
a statement from Intermind: "Intermind's claims fundamentally involve
the use of a control structure to automate communications. ...The
essence of Intermind's top claim is that two devices sender and
receiver have persistent storage, communicate over a network,
and exchange a control structure including metadata which describes: 1)
what information is to be updated, 2) when to update this information,
and 3) how to transfer the updated information. In addition, at least
the receiving device must be able to process the metadata in order to
perform the update determination and transfer. Any digital
communications system which incorporates all of these elements will be
covered by Intermind's patents." See Intermind.com.
C) Stac, Inc., and its licensing agent Hi/fn, own several patents which
disclose data compression methods implementing an LZS compression
algorithm, including U.S. Patent Nos. 4,701,745 and 5,016, 009 ("the
Stac Patents"). The Netscape Communicator code does not perform
compression. If you modify the Netscape source code to perform
compression, please take notice of the Stac Patents.

421
mozilla/LICENSE Normal file
View File

@@ -0,0 +1,421 @@
NETSCAPE PUBLIC LICENSE
Version 1.0
----------------
1. Definitions.
1.1. ``Contributor'' means each entity that creates or contributes to
the creation of Modifications.
1.2. ``Contributor Version'' means the combination of the Original
Code, prior Modifications used by a Contributor, and the Modifications
made by that particular Contributor.
1.3. ``Covered Code'' means the Original Code or Modifications or the
combination of the Original Code and Modifications, in each case
including portions thereof.
1.4. ``Electronic Distribution Mechanism'' means a mechanism generally
accepted in the software development community for the electronic
transfer of data.
1.5. ``Executable'' means Covered Code in any form other than Source
Code.
1.6. ``Initial Developer'' means the individual or entity identified as
the Initial Developer in the Source Code notice required by Exhibit A.
1.7. ``Larger Work'' means a work which combines Covered Code or
portions thereof with code not governed by the terms of this License.
1.8. ``License'' means this document.
1.9. ``Modifications'' means any addition to or deletion from the
substance or structure of either the Original Code or any previous
Modifications. When Covered Code is released as a series of files, a
Modification is:
A. Any addition to or deletion from the contents of a file
containing Original Code or previous Modifications.
B. Any new file that contains any part of the Original Code or
previous Modifications.
1.10. ``Original Code'' means Source Code of computer software code
which is described in the Source Code notice required by Exhibit A as
Original Code, and which, at the time of its release under this License
is not already Covered Code governed by this License.
1.11. ``Source Code'' means the preferred form of the Covered Code for
making modifications to it, including all modules it contains, plus any
associated interface definition files, scripts used to control
compilation and installation of an Executable, or a list of source code
differential comparisons against either the Original Code or another
well known, available Covered Code of the Contributor's choice. The
Source Code can be in a compressed or archival form, provided the
appropriate decompression or de-archiving software is widely available
for no charge.
1.12. ``You'' means an individual or a legal entity exercising rights
under, and complying with all of the terms of, this License or a future
version of this License issued under Section 6.1. For legal entities,
``You'' includes any entity which controls, is controlled by, or is
under common control with You. For purposes of this definition,
``control'' means (a) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (b) ownership of fifty percent (50%) or more of the
outstanding shares or beneficial ownership of such entity.
2. Source Code License.
2.1. The Initial Developer Grant.
The Initial Developer hereby grants You a world-wide, royalty-free,
non-exclusive license, subject to third party intellectual property
claims:
(a) to use, reproduce, modify, display, perform, sublicense and
distribute the Original Code (or portions thereof) with or without
Modifications, or as part of a Larger Work; and
(b) under patents now or hereafter owned or controlled by Initial
Developer, to make, have made, use and sell (``Utilize'') the
Original Code (or portions thereof), but solely to the extent that
any such patent is reasonably necessary to enable You to Utilize
the Original Code (or portions thereof) and not to any greater
extent that may be necessary to Utilize further Modifications or
combinations.
2.2. Contributor Grant.
Each Contributor hereby grants You a world-wide, royalty-free,
non-exclusive license, subject to third party intellectual property
claims:
(a) to use, reproduce, modify, display, perform, sublicense and
distribute the Modifications created by such Contributor (or
portions thereof) either on an unmodified basis, with other
Modifications, as Covered Code or as part of a Larger Work; and
(b) under patents now or hereafter owned or controlled by
Contributor, to Utilize the Contributor Version (or portions
thereof), but solely to the extent that any such patent is
reasonably necessary to enable You to Utilize the Contributor
Version (or portions thereof), and not to any greater extent that
may be necessary to Utilize further Modifications or combinations.
3. Distribution Obligations.
3.1. Application of License.
The Modifications which You create or to which You contribute are
governed by the terms of this License, including without limitation
Section 2.2. The Source Code version of Covered Code may be distributed
only under the terms of this License or a future version of this
License released under Section 6.1, and You must include a copy of this
License with every copy of the Source Code You distribute. You may not
offer or impose any terms on any Source Code version that alters or
restricts the applicable version of this License or the recipients'
rights hereunder. However, You may include an additional document
offering the additional rights described in Section 3.5.
3.2. Availability of Source Code.
Any Modification which You create or to which You contribute must be
made available in Source Code form under the terms of this License
either on the same media as an Executable version or via an accepted
Electronic Distribution Mechanism to anyone to whom you made an
Executable version available; and if made available via Electronic
Distribution Mechanism, must remain available for at least twelve (12)
months after the date it initially became available, or at least six
(6) months after a subsequent version of that particular Modification
has been made available to such recipients. You are responsible for
ensuring that the Source Code version remains available even if the
Electronic Distribution Mechanism is maintained by a third party.
3.3. Description of Modifications.
You must cause all Covered Code to which you contribute to contain a
file documenting the changes You made to create that Covered Code and
the date of any change. You must include a prominent statement that the
Modification is derived, directly or indirectly, from Original Code
provided by the Initial Developer and including the name of the Initial
Developer in (a) the Source Code, and (b) in any notice in an
Executable version or related documentation in which You describe the
origin or ownership of the Covered Code.
3.4. Intellectual Property Matters
(a) Third Party Claims.
If You have knowledge that a party claims an intellectual property
right in particular functionality or code (or its utilization
under this License), you must include a text file with the source
code distribution titled ``LEGAL'' which describes the claim and
the party making the claim in sufficient detail that a recipient
will know whom to contact. If you obtain such knowledge after You
make Your Modification available as described in Section 3.2, You
shall promptly modify the LEGAL file in all copies You make
available thereafter and shall take other steps (such as notifying
appropriate mailing lists or newsgroups) reasonably calculated to
inform those who received the Covered Code that new knowledge has
been obtained.
(b) Contributor APIs.
If Your Modification is an application programming interface and
You own or control patents which are reasonably necessary to
implement that API, you must also include this information in the
LEGAL file.
3.5. Required Notices.
You must duplicate the notice in Exhibit A in each file of the Source
Code, and this License in any documentation for the Source Code, where
You describe recipients' rights relating to Covered Code. If You
created one or more Modification(s), You may add your name as a
Contributor to the notice described in Exhibit A. If it is not possible
to put such notice in a particular Source Code file due to its
structure, then you must include such notice in a location (such as a
relevant directory file) where a user would be likely to look for such
a notice. You may choose to offer, and to charge a fee for, warranty,
support, indemnity or liability obligations to one or more recipients
of Covered Code. However, You may do so only on Your own behalf, and
not on behalf of the Initial Developer or any Contributor. You must
make it absolutely clear than any such warranty, support, indemnity or
liability obligation is offered by You alone, and You hereby agree to
indemnify the Initial Developer and every Contributor for any liability
incurred by the Initial Developer or such Contributor as a result of
warranty, support, indemnity or liability terms You offer.
3.6. Distribution of Executable Versions.
You may distribute Covered Code in Executable form only if the
requirements of Section 3.1-3.5 have been met for that Covered Code,
and if You include a notice stating that the Source Code version of the
Covered Code is available under the terms of this License, including a
description of how and where You have fulfilled the obligations of
Section 3.2. The notice must be conspicuously included in any notice in
an Executable version, related documentation or collateral in which You
describe recipients' rights relating to the Covered Code. You may
distribute the Executable version of Covered Code under a license of
Your choice, which may contain terms different from this License,
provided that You are in compliance with the terms of this License and
that the license for the Executable version does not attempt to limit
or alter the recipient's rights in the Source Code version from the
rights set forth in this License. If You distribute the Executable
version under a different license You must make it absolutely clear
that any terms which differ from this License are offered by You alone,
not by the Initial Developer or any Contributor. You hereby agree to
indemnify the Initial Developer and every Contributor for any liability
incurred by the Initial Developer or such Contributor as a result of
any such terms You offer.
3.7. Larger Works.
You may create a Larger Work by combining Covered Code with other code
not governed by the terms of this License and distribute the Larger
Work as a single product. In such a case, You must make sure the
requirements of this License are fulfilled for the Covered Code.
4. Inability to Comply Due to Statute or Regulation.
If it is impossible for You to comply with any of the terms of this
License with respect to some or all of the Covered Code due to statute
or regulation then You must: (a) comply with the terms of this License
to the maximum extent possible; and (b) describe the limitations and
the code they affect. Such description must be included in the LEGAL
file described in Section 3.4 and must be included with all
distributions of the Source Code. Except to the extent prohibited by
statute or regulation, such description must be sufficiently detailed
for a recipient of ordinary skill to be able to understand it.
5. Application of this License.
This License applies to code to which the Initial Developer has
attached the notice in Exhibit A, and to related Covered Code.
6. Versions of the License.
6.1. New Versions.
Netscape Communications Corporation (``Netscape'') may publish revised
and/or new versions of the License from time to time. Each version will
be given a distinguishing version number.
6.2. Effect of New Versions.
Once Covered Code has been published under a particular version of the
License, You may always continue to use it under the terms of that
version. You may also choose to use such Covered Code under the terms
of any subsequent version of the License published by Netscape. No one
other than Netscape has the right to modify the terms applicable to
Covered Code created under this License.
6.3. Derivative Works.
If you create or use a modified version of this License (which you may
only do in order to apply it to code which is not already Covered Code
governed by this License), you must (a) rename Your license so that the
phrases ``Mozilla'', ``MOZILLAPL'', ``MOZPL'', ``Netscape'', ``NPL'' or
any confusingly similar phrase do not appear anywhere in your license
and (b) otherwise make it clear that your version of the license
contains terms which differ from the Mozilla Public License and
Netscape Public License. (Filling in the name of the Initial Developer,
Original Code or Contributor in the notice described in Exhibit A shall
not of themselves be deemed to be modifications of this License.)
7. DISCLAIMER OF WARRANTY.
COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN ``AS IS'' BASIS,
WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF
DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING.
THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE
IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT,
YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE
COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER
OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF
ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
8. TERMINATION.
This License and the rights granted hereunder will terminate
automatically if You fail to comply with terms herein and fail to cure
such breach within 30 days of becoming aware of the breach. All
sublicenses to the Covered Code which are properly granted shall
survive any termination of this License. Provisions which, by their
nature, must remain in effect beyond the termination of this License
shall survive.
9. LIMITATION OF LIABILITY.
UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT
(INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL THE INITIAL
DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE,
OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO YOU OR ANY OTHER
PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF
GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND
ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE
BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY
RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW
PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE
EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THAT
EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
10. U.S. GOVERNMENT END USERS.
The Covered Code is a ``commercial item,'' as that term is defined in
48 C.F.R. 2.101 (Oct. 1995), consisting of ``commercial computer
software'' and ``commercial computer software documentation,'' as such
terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48
C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995),
all U.S. Government End Users acquire Covered Code with only those
rights set forth herein.
11. MISCELLANEOUS.
This License represents the complete agreement concerning subject
matter hereof. If any provision of this License is held to be
unenforceable, such provision shall be reformed only to the extent
necessary to make it enforceable. This License shall be governed by
California law provisions (except to the extent applicable law, if any,
provides otherwise), excluding its conflict-of-law provisions. With
respect to disputes in which at least one party is a citizen of, or an
entity chartered or registered to do business in, the United States of
America: (a) unless otherwise agreed in writing, all disputes relating
to this License (excepting any dispute relating to intellectual
property rights) shall be subject to final and binding arbitration,
with the losing party paying all costs of arbitration; (b) any
arbitration relating to this Agreement shall be held in Santa Clara
County, California, under the auspices of JAMS/EndDispute; and (c) any
litigation relating to this Agreement shall be subject to the
jurisdiction of the Federal Courts of the Northern District of
California, with venue lying in Santa Clara County, California, with
the losing party responsible for costs, including without limitation,
court costs and reasonable attorneys fees and expenses. The application
of the United Nations Convention on Contracts for the International
Sale of Goods is expressly excluded. Any law or regulation which
provides that the language of a contract shall be construed against the
drafter shall not apply to this License.
12. RESPONSIBILITY FOR CLAIMS.
Except in cases where another Contributor has failed to comply with
Section 3.4, You are responsible for damages arising, directly or
indirectly, out of Your utilization of rights under this License, based
on the number of copies of Covered Code you made available, the
revenues you received from utilizing such rights, and other relevant
factors. You agree to work with affected parties to distribute
responsibility on an equitable basis.
AMENDMENTS
Additional Terms applicable to the Netscape Public License.
I. Effect.
These additional terms described in this Netscape Public License --
Amendments shall apply to the Mozilla Communicator client code and to
all Covered Code under this License.
II. ``Netscape's Branded Code'' means Covered Code that Netscape
distributes and/or permits others to distribute under one or more
trademark(s) which are controlled by Netscape but which are not
licensed for use under this License.
III. Netscape and logo.
This License does not grant any rights to use the trademark
``Netscape'', the ``Netscape N and horizon'' logo or the Netscape
lighthouse logo, even if such marks are included in the Original Code.
IV. Inability to Comply Due to Contractual Obligation.
Prior to licensing the Original Code under this License, Netscape has
licensed third party code for use in Netscape's Branded Code. To the
extent that Netscape is limited contractually from making such third
party code available under this License, Netscape may choose to
reintegrate such code into Covered Code without being required to
distribute such code in Source Code form, even if such code would
otherwise be considered ``Modifications'' under this License.
V. Use of Modifications and Covered Code by Initial Developer.
V.1. In General.
The obligations of Section 3 apply to Netscape, except to the
extent specified in this Amendment, Section V.2 and V.3.
V.2. Other Products.
Netscape may include Covered Code in products other than the
Netscape's Branded Code which are released by Netscape during the
two (2) years following the release date of the Original Code,
without such additional products becoming subject to the terms of
this License, and may license such additional products on
different terms from those contained in this License.
V.3. Alternative Licensing.
Netscape may license the Source Code of Netscape's Branded Code,
including Modifications incorporated therein, without such
additional products becoming subject to the terms of this License,
and may license such additional products on different terms from
those contained in this License.
VI. Arbitration and Litigation.
Notwithstanding the limitations of Section 11 above, the provisions
regarding arbitration and litigation in Section 11(a), (b) and (c) of
the License shall apply to all disputes relating to this License.
EXHIBIT A.
``The contents of this file are subject to the Netscape Public License
Version 1.0 (the "License"); you may not use this file except in
compliance with the License. You may obtain a copy of the License at
http://www.mozilla.org/NPL/
Software distributed under the License is distributed on an "AS IS"
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
License for the specific language governing rights and limitations
under the License.
The Original Code is Mozilla Communicator client code, released March
31, 1998.
The Initial Developer of the Original Code is Netscape Communications
Corporation. Portions created by Netscape are Copyright (C) 1998
Netscape Communications Corporation. All Rights Reserved.
Contributor(s): ______________________________________.''
[NOTE: The text of this Exhibit A may differ slightly from the text of
the notices in the Source Code files of the Original Code. This is due
to time constraints encountered in simultaneously finalizing the
License and in preparing the Original Code for release. You should use
the text of this Exhibit A rather than the text found in the Original
Code Source Code for Your Modifications.]

105
mozilla/Makefile.in Normal file
View File

@@ -0,0 +1,105 @@
#
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL. You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
# Reserved.
#
DEPTH = .
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
# The list of directories that need to be built to build the standalone
# nglayout test program. The order is important.
DIRS = \
config \
$(NULL)
ifdef MOZ_BUILD_NSPR
DIRS += \
nsprpub \
$(NULL)
endif
DIRS += \
dbm \
modules/libreg \
xpcom \
$(NULL)
ifndef MOZ_NATIVE_ZLIB
DIRS += \
modules/zlib \
$(NULL)
endif
ifndef MOZ_NATIVE_JPEG
DIRS += \
jpeg \
$(NULL)
endif
DIRS += \
modules/libutil \
base \
intl \
js \
modules/security/freenav \
modules/libpref \
modules/libimg \
modules/oji \
modules/plugin \
caps \
lib/xp \
lib/libpwcac \
network \
htmlparser \
expat \
gfx \
dom \
view \
widget \
layout \
rdf \
webshell \
editor \
silentdl \
sun-java \
$(NULL)
ifdef MOZ_BUILD_XPFE
DIRS += xpfe
endif
ifdef MOZ_MAIL_NEWS
DIRS += mailnews
endif
include $(topsrcdir)/config/config.mk
include $(topsrcdir)/config/rules.mk
real_all: all
real_export: export
real_libs: libs
real_install: install
real_clobber: clobber
real_depend: depend

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@@ -0,0 +1,443 @@
<HEAD>
<TITLE>Building Mozilla on the Macintosh PPC platform</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" LINK="#0000EE" VLINK="#551A8B">
<P>
<HR>
</P>
<H1>Building Mozilla on the Macintosh PPC platform</H1>
<H2>Daniel Nunes, <A HREF="mailto:leaf@netscape.com"><TT>leaf@netscape.com</TT></A></H2>
<P>v 1.1, 1998-9-29<BR>
updated for the Pro4 IDE</P>
<P>
<HR>
<I>How to build Mozilla on a Macintosh PPC System.</I>
<HR>
</P>
<H2>1. <A HREF="#s1">Introduction</A></H2>
<H2>2. <A HREF="#s2">Building Mozilla</A></H2>
<UL>
<LI><A HREF="#ss2.1">2.1 Get the Code </A></LI>
<LI><A HREF="#ss2.2">2.2 Requirements</A></LI>
<LI><A HREF="#ss2.3">2.3 Set up the Build Environment</A></LI>
<LI><A HREF="#ss2.4">2.4 Build the Lizard </A></LI>
</UL>
<H2>3. <A HREF="#s3"> Common Problems </A></H2>
<H2>4. <A HREF="#s4"> Credits </A></H2>
<P>
<HR>
</P>
<H2><A NAME=s1></A>1. Introduction</H2>
<P>What this document is: A guide to building the Mozilla
application. This includes:</P>
<OL>
<LI>A listing of the development tools you will need to build
Mozilla.</LI>
<LI>A list of environment variables you will need to set before
building.</LI>
</OL>
<P>If you're looking for documentation on developing features or
fixing bugs, the Mozilla <A HREF="http://www.mozilla.org/docs/tplist/tplist.html">Technical
Documents </A> or <A HREF="http://www.mozilla.org/library.html">
Library </A> are probably what you're looking for.</P>
<P>
<HR>
</P>
<H2><A NAME=s2></A>2. Building Mozilla</H2>
<P>&nbsp;</P>
<UL>
<LI>Each of the following subsections describes, or gives
references to descriptions of, the steps necessary to build
Mozilla.
<H2><A NAME="ss2.1"></A>2.1 Get the Code</H2>
<P>&nbsp;</P>
<UL>
<LI>There are two principal ways of getting the code, <A HREF="http://www.mozilla.org/download.html">
ftp</A> and <A HREF="http://www.mozilla.org/cvs.html"> CVS</A>.
CVS will provide the most current code for building, but is
slower than ftp. Ftp drops are generally produced once per
month, and are known to compile.</LI>
</UL>
<P>&nbsp;</P>
<H2><A NAME="ss2.2"></A>2.2 Requirements</H2>
<P>The following need to be installed:</P>
<UL>
<LI>CodeWarrior (CW) Pro4 - obtainable from <A HREF="http://www.metrowerks.com">Metrowerks</A>.
See <A HREF="#s3">Common Sticking Points</A> if you have a
different version. Mozilla will no longer build with anything
earlier.</LI>
<LI>PowerPlant - obtainable from the CodeWarrior CD.</LI>
<LI>MSL - the Metrowerks Standard Library, obtainable from the
CodeWarrior CD</LI>
<LI><A HREF="ftp://ftp.boingo.com//dan/WASTE/waste-13.hqx">WASTE
1.3</A></LI>
<LI><A HREF="http://www.bact.wisc.edu/CWASTEEdit/CWASTEEdit.sit.hqx">CWASTE
1.6.2</A></LI>
<LI><A HREF="ftp://ftp.scripting.com/userland/menuSharingToolkit4.1.sit.hqx">Menu
Sharing Toolkit</A> (from UserLand)</LI>
<LI><A HREF="ftp://ftp.share.com/pub/internet-configuration/ICProgKit1.4.sit">Internet
Config 1.4 SDK</A></LI>
<LI><A HREF="http://www.mooseyard.com/Jens/Software/">AEGizmos
1.4.2</A></LI>
<LI><A HREF="ftp://sunsite.cnlab-switch.ch/software/platform/macos/perl/Mac_Perl_520r4_tool.bin">MacPerl
5 MPW Tool</A></LI>
<LI><A HREF="ftp://sunsite.cnlab-switch.ch/software/platform/macos/perl/Mac_Perl_520r4_appl.bin">MacPerl
5 Application</A></LI>
<LI>The module Mac:AppleEvents:Simple, which should be stored
in your Perl library folder under :Mac:AppleEvents:Simple.pm,
may be downloaded <A HREF="http://www.perl.com/CPAN-local/modules/by-module/Mac/Mac-AppleEvents-Simple-0.10.tgz">here</A>.</LI>
<LI>The module Mac:Apps:Launch, which should be stored in your
Perl library folder under :Mac:Apps:Launch.pm, may be
downloaded <A HREF="http://www.perl.com/CPAN-local/modules/by-module/Mac/Mac-Apps-Launch-1.30.tar.gz">here</A>.</LI>
<LI>MakeStub - MPW (installed with CodeWarrior Heaven option).
If you choose not to install MPW, it is located on the MacOS
Tools CD in "CW Pro 4 Tools:CodeWarrior MPW:MPW:Tools"</LI>
<LI>RunTSScript - in Mozilla source distribution
(mozilla:build:mac:RunTSScript), needs to be installed by
hand</LI>
<LI><A HREF="ftp://dev.apple.com/devworld/Tool_Chest/Core_Mac_OS_Tools/MPW_etc./MPW-GM/MPW/ToolServer.sit.hqx">ToolServer</A>
- or in the CW distribution (CW Pro 4 Tools:Apple Development
Tools:ToolServer 3.4.1.sit). <B>We recommend pulling it off the
CD</B> because it comes with configuration files for
CodeWarrior which you would have to create manually were you to
pull it off the net.</LI>
<LI><A HREF="http://sunsite.cnlab-switch.ch/ftp/software/platform/macos/src/HTML/MPW_C.html">patch
2.1</A></LI>
</UL>
<P>Hardware/OS</P>
<UL>
<LI>To build Navigator, you need a fast PPC Mac. The faster the
better.</LI>
<LI>You will need about 96 MB of physical RAM to "fast link"
the app. You can still fast link if you give your machine 96 MB
of virtual memory, but then the VM hit is large enough to
counteract any improvement. One of our beta testers had a
machine with only 64MB of physical RAM (VM was off) and it ran
out of memory trying to link. Turning VM on got it to link, but
build time increased greatly.</LI>
<LI>Reports from the net indicate that the optimized version
(MozillaPPC) take much less RAM to build than the 96MB we
suggest. If you are running out of memory, try building that
instead of the debug version (the debug symbols require a lot
of RAM come link time).</LI>
<LI>You should be ok with a 400MB disk partition, even when
fully built. This does not include tools like the IDE, just
source.</LI>
<LI>On an HFS+ volume, a full build takes about 110MB. HFS+ is
good, but utilities are sparse.</LI>
</UL>
<P>&nbsp;</P>
<H2><A NAME="ss2.3"></A>2.3 Setup the Build Environment</H2>
<P>&nbsp;</P>
<OL>
<LI>Install CodeWarrior from the CD. While it is large,
installing the "CodeWarrior Heaven" option will guarantee that
you have everything you need. This will give you PowerPlant,
MSL, and MPW. If you choose to install less, proceed at your
own risk.</LI>
<LI>In the Finder, increase the memory partition of the IDE to
15MB (you can get by with 12, if need be).</LI>
<LI>Uncompress the StuffIt Archive for ToolServer. The goal is
to let ToolServer and MPW share the same Tools directory so you
don't need to have multiple versions of tools. Do the
following:
<OL>
<LI>Open ToolServer's Tools folder. There is one file called
"RMetrowerks".</LI>
<LI>Move RMetrowerks to Tools folder of MPW. MPW folder must
be at "Metrowerks:Codewarrior MPW:MPW" if you installed
Codewarrior Heaven.</LI>
<LI>Remove ToolServer's Tools folder.</LI>
<LI>Now create an alias of Tools folder in "CodeWarrior MPW"
and move it to your ToolServer folder. Rename the alias
(probably called "Tools alias") to "Tools"</LI>
<LI><FONT COLOR="#FF0000"><B>IMPORTANT</B></FONT>: Make sure
you only have one instance of ToolServer on your machine. If
the build script finds the wrong one, the correct tools will
not be found and strange things will happen.</LI>
</OL>
</LI>
<LI>After installing the MacPerl MPW Tool distribution (run the
InstallerVISE application), in the "MacPerl &#131;" folder,
there will be an MPW tool named "perl". Install this in MPW's
tools folder.</LI>
<LI>Install the MacPerl Application (run the InstallerVISE
application). You can install this anywhere, but it is
recommended that you install it inside of your CodeWarrior
folder for easy reference. After installation, you will need to
set a preference to enable double-click launch of the perl
scripts. This preference is set by going under the Edit Menu to
Preferences. Click on the "Script" button and hit the radio
button "Run Scripts opened from Finder"</LI>
<LI>Install the "patch" and "MakeStub" Tools in the tools
folder. Note that "MakeStub" is automatically installed by the
"CodeWarrior Heaven" install option.</LI>
<LI>Install RunTSScript (found in the Mozilla source
distribution) in the compilers folder in your build environment
("Metrowerks:Metrowerks Codewarrior:Codewarrior
Plugins:Compilers")</LI>
<LI>Next, after downloading all the 3rd party software
components, drag WASTE, CWASTE, Menu Sharing, Internet Config,
and the AEGizmo folders (just as they are) into the "MacOS
Support" folder in your build environment.</LI>
<LI>Create a folder inside the PowerPlant folder
(Metrowerks:Metrowerks CodeWarrior:MacOS Support:PowerPlant)
called "_Will Be Obsolete" Make sure you include the leading
underscore.</LI>
<LI>Unstuff the obsolete LGA classes (located on the Reference
CD in "CodeWarrior Examples:MacOS Examples:PowerPlant
Examples:Obsolete PP Items:Old GA Classes.sit) and place the
resulting folder into the "_Will Be Obsolete" folder you
created in the previous step.</LI>
<LI>Start ToolServer from within CodeWarrior (or use MPW if you
are brave enough). We're about to patch some files. Make sure
the ToolServer menu is in the CodeWarrior menu bar by turning
on the <A HREF="IDEPrefs.gif">preference</A> under the "Extras"
panel in the IDE Preferences (not the project preferences!).
The menu bar should look like this:
<P><IMG SRC="IDEMenuBar.gif" WIDTH=359 HEIGHT=20 X-CLARIS-USEIMAGEWIDTH X-CLARIS-USEIMAGEHEIGHT ALIGN=bottom></P>
<P>Choose "Start ToolServer" from the ToolServer menu (this is
the icon menu between "Window" and "Help" in the menubar
above). You will now see a window with no close box. This is
your ToolServer Worksheet where you will type (or cut &amp;
paste) the commands for the following steps.</P>
<P>In case you have never used MPW/ToolServer before, the
following is <B>very important</B>. Pressing "return" does not
execute commands like you might think. It just inserts a
newline into the worksheet like a normal text editor. <B>To
actually get ToolServer to execute the command, you must press
"Enter" (lower right of numeric keypad).</B> This executes the
line that the cursor is on, and only that line. If you want to
execute multiple lines at once, select them all and hit
Enter.</P></LI>
<LI>Set the shell variables {IDE} and {Source} to the correct
paths for your build environment. {IDE} is where your
CodeWarrior IDE is located. {Source} is the folder containing
the toplevel "ns" folder of the Mozilla source. Mine look like
this (don't forget to keep the quotes if your path includes
spaces), yours will almost certainly be different
(<FONT COLOR="#FF0000">to punctuate this, the things you need
to change are in red</FONT>).
<PRE>Set IDE "<FONT COLOR="#FF0000">Develop:CW Pro 4:Metrowerks CodeWarrior:</FONT>"
Set Source "<FONT COLOR="#FF0000">Source:FreeSource:</FONT>"</PRE></LI>
<LI>Execute the following lines to patch menusharing.c to allow
it to compile with the new Universal Headers. It references an
obsolete header file (GestaltEqu.h).
<PRE>directory "{IDE}MacOS Support:Menu Sharing Toolkit 4.1:"
patch menusharing.c "{Source}mozilla:lib:mac:patches:menusharing.patch"</PRE></LI>
<LI>You need to patch stat.mac.h to fix a problem in MSL where
lines were omitted.
<PRE>directory "{IDE}Metrowerks Standard Library:MSL C:MSL Mac:Public Includes"
patch stat.mac.h "{Source}mozilla:lib:mac:patches:stat.mac.h.patch"</PRE></LI>
<LI>Congratulations! Now you are ready to build. Once these
steps are done, you don't have to repeat these setups the next
time!</LI>
</OL>
<P>&nbsp;</P>
<H2><A NAME="ss2.4"></A>2.4 Run the build</H2>
<UL>
<LI>In the folder mozilla:build:mac:, there are several Perl
scripts with names of the form BuildMozillaXXX.pl, where XXX is
"Optimized", "Debug", "Tinderbox", et al. Each script builds
the corresponding version of Mozilla. If you configured the
MacPerl application to execute scripts that are opened from the
finder, all you have to do is double click on the appropriate
one; otherwise, launch MacPerl, and run the appropriate script
from the "Run Script..." menu item.
<P>These `configured build' scripts are simple, and you might
want to make your own to force your build to StopForErrors(),
or alternatively DontStopForErrors(), et al. You can set up
certain build-script variables and (soon) compile-time flags.
Compare the supplied scripts to figure out what you might want.
Note that CodeWarriorLib, Moz.pm, and BuildList.pm, are
AppleScript libraries and Perl modules meant to be used by a
`configured build'. Use your favorite POD viewer (Shuck comes
with MacPerl) to view the documentation in the Perl
scripts.</P>
<P>If there were any errors in any of the projects along the
way, the script will stop at that point and the IDE will tell
you the errors. You can fix them and make sure they current
project builds, but to continue the automation, you have to
start from the beginning by double-clicking the script again.
This isn't quite as bad as it sounds because the previous
projects are already built (unless you changed some major
header file). Please note that stopping the script once it has
started is difficult. We are working to address this issue.</P>
<P>After the build is complete, you can find aliases to the
built libraries and the final Mozilla application. Debug builds
are built to Mozilla:dist:client_debug, while optimized builds
are built to Mozilla:dist:client.</P>
<P>Don't worry too much about the numerous warnings generated
during the build. We try our best to get the XP teams to use
real compilers, but alas, they continue to write warning-laden
code. There is also some generated code (Java is one example)
that has a lot of warnings that we can't help either. If you
write any new code, please help us in our quest to get zero
warnings.</P></LI>
</UL>
</LI>
</UL>
<P>
<HR>
</P>
<H2><A NAME=s3></A>3. Common Sticking Points</H2>
<UL>
<LI><B>I only have CodeWarrior Pro3 or Pro2. How do i build with
it?</B>
<UL>
<LI>Currently, the answer is, "You don't." We make use of
several classes in PowerPlant which recently appeared in Pro4.
Time to upgrade, I'm afraid. Don't even try opening the
projects with Pro2 because you will get data loss and have to
throw the project away (it won't even prompt you!)</LI>
</UL>
</LI>
<LI><B>I'm having problems building. MacPerl tells me it can't
fine MemAllocatorStubs</B>
<UL>
<LI>It sounds like your ToolServer environment is not setup
correctly. Make sure you follow the directions to the letter.
You could also be seeing this if you have multiple versions of
ToolServer on your computer and the Finder lauches the wrong
one. This is very common, as the <I>Carbon Dater</I> app from
Apple DTS contains a copy of ToolServer. Either remove all the
other versions of ToolServer or make sure you launch the
appropriate version before you start building.</LI>
</UL>
</LI>
<LI><B>The IDE runs out of memory building jsinterp.c. What do I
do?</B>
<UL>
<LI>We have seen this every now and then, and it only appears
to show up when building optimized (non-debug) builds. You can
normally get around this by building that file by itself
(select it and choose "Compile") and then continuing the make.
We're not sure why this is happening, so if you have any
answers or solutions, please let us know!</LI>
</UL>
</LI>
</UL>
<P>
<HR>
</P>
<H2><A NAME=s4></A>4. Credits</H2>
<UL>
<LI>The majority of this document is taken from the build document
included in the Mozilla source distribution at
README:mozilla:macbuild.htm written by Mike Pinkerton, <A HREF="mailto:pinkerton@netscape.com">
pinkerton@netscape.com</A>.</LI>
</UL>
</BODY>
</HTML>

View File

@@ -0,0 +1,158 @@
<HTML>
<HEAD>
<TITLE>Building Mozilla on unix platforms</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000EE" VLINK="#551A8B"
ALINK="#FF0000">
<HR>
<H1>
Building Mozilla on Unix platforms</H1>
<H2>
Daniel Nunes, <TT><A HREF="mailto:leaf@netscape.com">leaf@netscape.com</A></TT></H2>
v 1.1, June 1998
<P>
<HR><I>How to build Mozilla on a Unix System.</I>
<HR>
<H2>1. <A HREF="#s1">Introduction</A></H2>
<H2>2. <A HREF="#s2">Building Mozilla</A></H2>
<UL>
<LI>
<A HREF="#ss2.1">2.1 Get the Code </A></LI>
<LI>
<A HREF="#ss2.2">2.2 Requirements</A></LI>
<LI>
<A HREF="#ss2.3">2.3 Set up the Build Environment</A></LI>
<LI>
<A HREF="#ss2.4">2.4 Build the Lizard </A></LI>
<LI>
<A HREF="#ss2.5">2.5 Run the Lizard </A></LI>
</UL>
<H2>3. <A HREF="#s3"> Common Problems </A></H2>
<HR>
<H2><A NAME="s1">1. Introduction</A></H2>
<P>
What this document is: A guide to building the Mozilla application.
<BR>
This includes:
<OL>
<LI> A listing of the development tools you will need to build Mozilla. </LI>
<LI> A list of environment variables you will need to set before building. </LI>
</OL>
<P>
If you're looking for documentation on developing features or fixing bugs,
the Mozilla
<A HREF="http://www.mozilla.org/docs/tplist/tplist.html">Technical Documents
</A> or <A HREF="http://www.mozilla.org/library.html"> Library </A>
are probably what you're looking for.
<P>
<HR>
<H2><A NAME="s2">2. Building Mozilla </A></H2>
<P>
<UL>Each of the following subsections describes, or gives references to
descriptions of, the steps necessary to build Mozilla.
</UL>
<H2><A NAME="ss2.1">2.1 Get the Code</A></H2>
<P>
<UL>
There are two principal ways of getting the code,
<A HREF="http://www.mozilla.org/download.html"> ftp</A> and
<A HREF="http://www.mozilla.org/cvs.html"> CVS</A>.
CVS will provide the most current code for building, but is
slower than ftp. Ftp drops are generally produced once per month,
and are known to compile.
</UL>
<P>
<H2><A NAME="ss2.2">2.2 Requirements</A></H2>
<UL>
The following should be installed:
<UL>
<LI>Motif 1.2
<LI>The native C/C++ compiler (or GNU C/C++ compiler 2.7.2 in lieu of the
native compiler)
<LI>GNU make 3.74 or better
<LI>Perl (or, if you have no Perl, then set <CODE>PERL=/bin/echo</CODE>)
</UL>
<P>
Your hardware should be equal to, or better than:
<UL>
32 MB RAM, 128 MB swap (64 MB RAM recommended)
</UL>
</UL>
<P>
<H2><A NAME="ss2.3">2.3 Setup the Build Environment</A></H2>
<P>
<UL>
The following environment variables need to be set:
<CODE>
<PRE>
MOZILLA_CLIENT=1
MOZ_MEDIUM=1
NO_MDUPDATE=1
</PRE>
</CODE>
Optionally, you can set <CODE>BUILD_OPT=1</CODE> if you don't want a debug
build.
<P>
If your Motif libraries are installed in a non-standard place, you can tell
the Mozilla makefiles where to look by setting
<CODE>MOZILLA_MOTIF_SEARCH_PATH</CODE> to point to the directory in which
your Motif installation resides.
<P>
Environment variables are set by the shell, and there are two common ways
of setting them. <BR>
Type <CODE>setenv VARIABLE value</CODE> or <CODE>export VARIABLE=value</CODE>.
<P>
</UL>
<H2><A NAME="ss2.4">2.4 Run the build </A></H2>
<UL>
Change to the directory you copied the source into (for example,
<CODE>cd /builds</CODE>). If this directory was empty before you
installed the source, there should be two directories here:
<CODE>README</CODE> and <CODE>mozilla</CODE>.
<CODE>
<PRE>
cd mozilla
gmake
</PRE>
</CODE>
</UL>
<H2><A NAME="ss2.5">2.5 After the build </A></H2>
<UL>
You may notice that if you try running mozilla-export right after the build,
you'll run into a problem. You need to set <CODE>LD_LIBRARY_PATH</CODE> to
<CODE>
${LD_LIBRARY_PATH}:/PATH_TO_SOURCE/mozilla/dist/Linux2.0.32_x86_OPT.OBJ/bin
</CODE> (where <CODE>PATH_TO_SOURCE</CODE> is the full path to your source
tree) before the dynamically linked binary will run. <BR><BR>
This varies by platform:<br>
<UL>
<LI>On HP-UX, the equivalent environment variable is <CODE>SHLIB_PATH</CODE>.
<LI>On AIX, the equivalent environment variable is <CODE>LIBPATH</CODE>.
</UL>
</UL>
<HR>
<H2><A NAME="s3">3. Common Sticking Points</A></H2>
<LI>My linker dies with this error: undefined reference to `_Xsetlocale'
<UL>If this error occurs, you might have to recompile libX11.so
with the -DX_LOCALE flag (thanks to Scott Lampert,
<A HREF="mailto:fortunato@heavymetal.org">fortunato@heavymetal.org</A>).
</UL>
<HR>
</BODY>
</HTML>

View File

@@ -0,0 +1,217 @@
<HTML>
<HEAD>
<TITLE>Building Mozilla on Microsoft Windows 32-bit platforms</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000EE" VLINK="#551A8B"
ALINK="#FF0000">
<HR>
<H1>
Building Mozilla on Microsoft Windows 32-bit platforms</H1>
<H2>
Daniel Nunes, <TT><A HREF="mailto:leaf@netscape.com">leaf@netscape.com</A></TT>
</H2>
v 1.0, June 1998
<P>
<HR><I>How to build Mozilla on a Microsoft Windows 32-bit System.</I>
<HR>
<H2>1. <A HREF="#s1">Introduction</A></H2>
<H2>2. <A HREF="#s2">Building Mozilla</A></H2>
<UL>
<LI>
<A HREF="#ss2.1">2.1 Get the Code </A></LI>
<LI>
<A HREF="#ss2.2">2.2 Requirements</A></LI>
<LI>
<A HREF="#ss2.3">2.3 Set up the Build Environment</A></LI>
<LI>
<A HREF="#ss2.4">2.4 Build the Lizard </A></LI>
</UL>
<H2>3. <A HREF="#s3"> Common Problems </A></H2>
<HR>
<H2><A NAME="s1">1. Introduction</A></H2>
<P>
What this document is: A guide to building the Mozilla application.
<BR>
This includes:
<OL>
<LI> A listing of the development tools you will need to build Mozilla. </LI>
<LI> A list of environment variables you will need to set before building. </LI>
</OL>
<P>
If you're looking for documentation on developing features or fixing bugs,
the Mozilla
<A HREF="http://www.mozilla.org/docs/tplist/tplist.html">Technical Documents
</A> or <A HREF="http://www.mozilla.org/library.html"> Library </A>
are probably what you're looking for.
<P>
<HR>
<H2><A NAME="s2">2. Building Mozilla </A></H2>
<P>
<UL>Each of the following subsections describes, or gives references to
descriptions of, the steps necessary to build Mozilla.
<H2><A NAME="ss2.1">2.1 Get the Code</A></H2>
<P>
<UL>
There are two principal ways of getting the code,
<A HREF="http://www.mozilla.org/download.html"> ftp</A> and
<A HREF="http://www.mozilla.org/cvs.html"> CVS</A>.
CVS will provide the most current code for building, but is
slower than ftp. Ftp drops are generally produced once per month,
and are known to compile.
</UL>
<P>
<H2><A NAME="ss2.2">2.2 Requirements</A></H2>
<UL>
The following need to be installed:
<UL>
<LI>Microsoft Visual C++ version 4.2 or later
<LI>GNU Tools for Microsoft Windows, located:
<UL>
<LI><A HREF="http://www.cygnus.com/misc/gnu-win32">Cygnus</A></LI>
<LI><A HREF="http://www.gnu.org/order/ftp.html">GNU home page</A></LI>
<LI><A HREF="ftp://prep.ai.mit.edu/pub/gnu">MIT</A></LI>
</UL>
Specifically, you'll need:
<UL><CODE>
cp.exe<BR>
rm.exe<BR>
uname.exe<BR>
</CODE>
</UL>
Netscape has internally modified version of gmake, shmsdos and win32gnu
that we use to get around some problems we were having keeping in sync
with the Unix version of gmake. This version of gmake can be found in the
Windows Build Tools package, which can be ftp'd from
<A HREF="http://www.mozilla.org/download-mozilla.html"> the Mozilla
Download page</A>.
The three files you will need are:
<UL><CODE>
gmake.exe<BR>
shmsdos.exe<BR>
uname.exe<BR>
</CODE>
</UL>
</UL>
<P>
Hardware/OS
<UL>
<LI>Pentium 133 MHz or better</LI>
<LI>64 MB RAM, 128 MB recommended</LI>
<LI>250 MB NTFS or 500 MB FAT disk space</LI>
<LI>NT 4.0 is preferred; NT 3.51 will also work.
</LI>
</UL>
</UL>
<P>
<H2><A NAME="ss2.3">2.3 Setup the Build Environment</A></H2>
<P>
<UL>
The following environment variables need to be set:
<UL>
<CODE>
set MOZ_BITS=32
<BR>
set MOZ_DEBUG=1 (set this only if you want to build a debug build)
<BR>
set MOZ_MEDIUM=1
<BR>
set MOZ_NT=351 (if running NT3.51)
<BR>
set MOZ_OUT=(optional: specifies location of resultant executable)
<BR>
set MOZ_SRC=(top of your tree, for example: set MOZ_SRC=d:\mozilla_source
if this is the directory where you checked or unzipped the source into)
<BR>
set MOZ_TOOLS=(the parent directory of the GNU tools 'bin' directory. The build
looks for MOZ_TOOLS\bin\gmake.exe, so make sure that the gmake.exe from
the Windows Build Tools package resides there.)
<BR>
set NSPR20=1
<BR>
set _MSC_VER=1100 (if you are running VC++ 5.0) or 1200
(if you are running VC++ 6.0)
<BR>
</CODE>
</UL>
<BR>
<P>
</UL>
<H2><A NAME="ss2.4">2.4 Run the build </A></H2>
<UL>
Change to the directory you copied the source into (for example,
<CODE>cd d:\mozilla_source</CODE>). If this directory was empty before you
installed the source, there should be two directories here:
<CODE>README</CODE> and <CODE>mozilla</CODE>.
<CODE>
<PRE>
cd mozilla\config
nmake /f makefile.win
cd ..
nmake /f client.mak
</PRE>
</CODE>
</UL>
</UL>
<HR>
<H2><A NAME="s3">3. Common Sticking Points</A></H2>
<UL>
<LI><B>nmake has a 'fatal error', listing one of the GNU commands and a
hexadecimal return code.</B>
<UL>
This will happen as a result of not having the GNU tools and Windows Build
tools in your path. Add the directories with the appropriate binaries to your
path.
</UL>
</LI>
<LI>
<B>It fails with the message "'.\WIN32' unexpected": </B>
<UL>
You didn't properly
set the environment variables -- you must not include a space at the end
of the set statements (be careful if you are cut'n'pasting).
</UL>
</LI>
<LI>
<B>It fails to build, with directory-related errors: </B>
<UL>
The full path
to the source must not include any spaces. Additionally, the source must
be extracted with an intact directory structure by a utility that understands
long filenames. If in doubt, grab Info-Zip at
<A HREF="ftp://ftp.cdrom.com/pub/infozip">ftp://ftp.cdrom.com/pub/infozip</A>
</UL>
</LI>
<LI>
<B>It fails immediately with the message "Cannot find specified directory":
</B>
<UL>
You didn't properly set the environment variable MOZ_TOOLS;
this needs to be set to the path up to, but not including, the final \bin
directory in the path to the gnu tools. So, the path to the tool executables
is '%MOZ_TOOLS%\bin\<executable>'.
</UL>
</LI>
<LI>
<B>I'm not running a 32-bit windows system, how do i build?</B>
<UL>
Currently, the build process depends on a 32-bit operating system.
Windows NT 4.0 is the recommended windows operating system.
</UL>
</UL>
<HR>
</BODY>
</HTML>

View File

@@ -0,0 +1,400 @@
<HTML>
<HEAD>
<TITLE>Building Mozilla on the Macintosh PPC platform</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000EE" VLINK="#551A8B"
ALINK="#FF0000">
<HR>
<H1>
Building Mozilla on the Macintosh PPC platform</H1>
<H2>
Daniel Nunes, <TT><A HREF="mailto:leaf@netscape.com">leaf@netscape.com</A></TT>
</H2>
v 1.0, June 1998
<P>
<HR><I>How to build Mozilla on a Macintosh PPC System.</I>
<HR>
<H2>1. <A HREF="#s1">Introduction</A></H2>
<H2>2. <A HREF="#s2">Building Mozilla</A></H2>
<UL>
<LI>
<A HREF="#ss2.1">2.1 Get the Code </A></LI>
<LI>
<A HREF="#ss2.2">2.2 Requirements</A></LI>
<LI>
<A HREF="#ss2.3">2.3 Set up the Build Environment</A></LI>
<LI>
<A HREF="#ss2.4">2.4 Build the Lizard </A></LI>
</UL>
<H2>3. <A HREF="#s3"> Common Problems </A></H2>
<H2>4. <A HREF="#s4"> Credits </A></H2>
<HR>
<H2><A NAME="s1">1. Introduction</A></H2>
<P>
What this document is: A guide to building the Mozilla application.
This includes:
<OL>
<LI> A listing of the development tools you will need to build Mozilla. </LI>
<LI> A list of environment variables you will need to set before building. </LI>
</OL>
<P>
If you're looking for documentation on developing features or fixing bugs,
the Mozilla
<A HREF="http://www.mozilla.org/docs/tplist/tplist.html">Technical Documents
</A> or <A HREF="http://www.mozilla.org/library.html"> Library </A>
are probably what you're looking for.
<P>
<HR>
<H2><A NAME="s2">2. Building Mozilla </A></H2>
<P>
<UL>Each of the following subsections describes, or gives references to
descriptions of, the steps necessary to build Mozilla.
<H2><A NAME="ss2.1">2.1 Get the Code</A></H2>
<P>
<UL>
There are two principal ways of getting the code,
<A HREF="http://www.mozilla.org/download.html"> ftp</A> and
<A HREF="http://www.mozilla.org/cvs.html"> CVS</A>.
CVS will provide the most current code for building, but is
slower than ftp (takes longer to download).
</UL>
<P>
<H2><A NAME="ss2.2">2.2 Requirements</A></H2>
The following need to be installed:
<UL>
<LI>CodeWarrior (CW) 2 - obtainable from
<A HREF="http://www.metrowerks.com">Metrowerks</A>.
See <A HREF="#s3">Common Sticking Points</A> if you have a different
version.
</LI>
<LI>PowerPlant 1.8 - obtainable from the CodeWarrior CD.</LI>
<LI>MSL - the Metrowerks Standard Library, obtainable from the
CodeWarrior CD</LI>
<LI><A HREF="ftp://ftp.boingo.com//dan/WASTE/waste-13.hqx">WASTE
1.3</A></LI>
<LI><A HREF="http://www.bact.wisc.edu/CWASTEEdit/CWASTEEdit.sit.hqx">CWASTE
1.6.2</A></LI>
<LI>
<A HREF="ftp://ftp.scripting.com/userland/menuSharingToolkit4.1.sit.hqx">
Menu Sharing Toolkit</A> (from UserLand)</LI>
<LI>
<A HREF="ftp://ftp.digitalalchemy.com/pub/digitalalchemy/mercutio-SDK.sit.bin">
Mercutio 1.5 SDK</A> (only download the SDK, not the entire package, else
the access paths will be wrong)</LI>
<LI>
<A HREF="ftp://ftp.share.com/pub/internet-configuration/ICProgKit1.4.sit">
Internet Config 1.4 SDK</A></LI>
<LI><A HREF="http://www.mooseyard.com/Jens/Software/">AEGizmos
1.4.2</A></LI>
<LI><A HREF="ftp://sunsite.cnlab-switch.ch/software/platform/macos/perl/Mac_Perl_520r4_tool.bin">
MacPerl 5 MPW Tool</A></LI>
<LI>
<A HREF="ftp://sunsite.cnlab-switch.ch/software/platform/macos/perl/Mac_Perl_520r4_appl.bin">MacPerl 5 Application</A></LI>
<LI>MakeStub - MPW (installed with CodeWarrior Heaven option). If
you choose not to install MPW, it is located on the MacOS Tools CD
in "CW Pro 2 Tools:CodeWarrior MPW:MPW:Tools"</LI>
<LI>RunTSScript - in Mozilla source distribution
(mozilla:build:mac:RunTSScript), needs to be installed by hand</LI>
<LI><A HREF="ftp://dev.apple.com/devworld/Tool_Chest/Core_Mac_OS_Tools/MPW_etc./MPW-GM/MPW/ToolServer.sit.hqx">ToolServer</A>
- or in the CW distribution (CW Pro 2 Tools:Apple Development
Tools:ToolServer 3.4.1.sit). <B>We recommend pulling it off the
CD</B> because it comes with configuration files for CodeWarrior
which you would have to create manually were you to pull it off
the net.</LI>
<LI>
<A HREF="http://people.netscape.com/sfraser/software/NewAlias_tool.sit.hqx">
New Alias MPW Tool</A> An MPW tool that creates Finder aliases for files.
</LI>
<LI>StreamEdit MPW Tool - MPW (installed with CodeWarrior Heaven option). If
you choose not to install MPW, it is located on the MacOS Tools CD
in "CW Pro 2 Tools:CodeWarrior MPW:MPW:Tools"</LI>
</LI>
<LI>
<A HREF="ftp://dev.apple.com/devworld/Periodicals/develop/develop25/develop_Issue_25_code/ToolFrontEnd.sit.hqx">ToolFrontEnd</A></LI>
<LI>
<A HREF="http://sunsite.cnlab-switch.ch/ftp/software/platform/macos/src/HTML/MPW_C.html">
patch 2.1</A></LI>
</UL>
<P>
Hardware/OS
<UL>
<LI>To build Navigator, you need a fast PPC Mac. The faster the
better. You can't build with a 68K machine because we have too many
resources, and the build process will crash when trying to generate
resources out of our cross-platform strings. See the discussion below
for a way around this.
</LI>
<LI>You will need about 96 MB of physical RAM to "fast link" the app.
You can still fast link if you give your machine 96 MB of virtual
memory, but then the VM hit is large enough to counteract any
improvement. One of our beta testers had a machine with only 64MB of
physical RAM (VM was off) and it ran out of memory trying to link.
Turning VM on got it to link, but build time increased greatly.
</LI>
<LI>Reports from the net indicate that the optimized version
(MozillaPPC) take much less RAM to build than the 96MB we suggest. If
you are running out of memory, try building that instead of the debug
version (the debug symbols require a lot of RAM come link time).
</LI>
<LI>You should be ok with a 400MB disk partition, even when fully
built. This does not include tools like the IDE, just source.
</LI>
<LI>On an HFS+ volume, a full build takes about 110MB. HFS+ is good,
but utilities are sparse.
</LI>
</UL>
<P>
<H2><A NAME="ss2.3">2.3 Setup the Build Environment</A></H2>
<P>
<OL>
<LI>Install CodeWarrior from the CD. While it is large, installing
the "CodeWarrior Heaven" option will guarantee that you have
everything you need. This will give you PowerPlant, MSL, and MPW.
If you choose to install less, proceed at your own risk.</LI>
<LI>In the Finder, increase the memory partition of the IDE to
15MB (you can get by with 12, if need be).</LI>
<LI>Download ToolFrontEnd. After expanding it, in "ToolFrontEnd
Folder:Drop-Ins" there are three items:
<UL>
<LI><I>#include</I></LI>
<LI><I>ToolFrontEnd</I></LI>
<LI><I>ToolFrontEnd Panel</I></LI>
</UL>
<P>Create a folder named "Include Scanners". Place the file
"#include" into the Include Scanners folder. Move the Include
Scanners folder to the CodeWarrior Plugins folder. Create a folder
named "ToolFrontEnd". Place the files "ToolFrontEnd" and
"ToolFrontEnd Panel" into the ToolFrontEnd folder. Place this
folder in the CodeWarrior Plugins folder.</P></LI>
<LI>Open "ToolFrontEnd Panel" with ResEdit. Change the file type
from <B>'Panl'</B> to <B>'PanL'</B>. Save.</LI>
<LI>Uncompress the StuffIt Archive for ToolServer. The goal is to
let ToolServer and MPW share the same Tools directory so you don't
need to have multiple versions of tools. Do the following:
<OL>
<LI>Open ToolServer's Tools folder. There is one file called
"RMetrowerks". </LI>
<LI>Move RMetrowerks to Tools folder of MPW. MPW folder must be
at "Metrowerks:Codewarrior MPW:MPW" if you installed
Codewarrior Heaven. </LI>
<LI>Remove ToolServer's Tools folder.</LI>
<LI>Now create an alias of Tools folder in "CodeWarrior MPW"
and move it to your ToolServer folder. Rename the alias
(probably called "Tools alias") to "Tools"</LI>
<LI><FONT COLOR="#FF0000"><B>IMPORTANT</B></FONT>: Make sure
you only have one instance of ToolServer on your machine. If
the build script finds the wrong one, the correct tools will
not be found and strange things will happen.</LI>
</OL>
</LI>
<LI>After installing the MacPerl MPW Tool distribution (run the
InstallerVISE application), in the "MacPerl &#131;" folder, there
will be an MPW tool named "perl". Install this in MPW's tools
folder.</LI>
<LI>Install the MacPerl Application (run the
InstallerVISE application). You can install this anywhere, but it is
recommended that you install it inside of your CodeWarrior folder for
easy reference. After installation, you will need to set a preference
to enable double-click launch of the perl scripts. This preference is set
by going under the Edit Menu to Preferences. Click on the "Script" button
and hit the radio button "Run Scripts opened from Finder"</LI>
<LI>Install the "patch", "MakeStub", "NewAlias" and "StreamEdit" Tools in the
tools
folder. Note that "MakeStub" and "StreamEdit" are automatically installed by the
"CodeWarrior Heaven" install option.</LI>
<LI>Install RunTSScript (found in the Mozilla source distribution)
in the compilers folder in your build environment
("Metrowerks:Metrowerks Codewarrior:Codewarrior
Plugins:Compilers")</LI>
<LI>Next, after downloading all the 3rd party software components,
drag WASTE, CWASTE, Menu Sharing, Mercutio, Internet Config, and
the AEGizmo folders (just as they are) into the "MacOS Support"
folder in your build environment.</LI>
<LI>Start ToolServer from within CodeWarrior (or use MPW if you
are brave enough). We're about to patch some files. Make sure the
ToolServer menu is in the CodeWarrior menu bar by turning on the
<A HREF="IDEPrefs.gif">preference</A> under the "Extras" panel in
the IDE Preferences (not the project preferences!). The menu bar
should look like this:
<P><IMG SRC="IDEMenuBar.gif" WIDTH=359 HEIGHT=20 X-CLARIS-USEIMAGEWIDTH X-CLARIS-USEIMAGEHEIGHT ALIGN=bottom></P>
<P>Choose "Start ToolServer" from the ToolServer menu (this is the
icon menu between "Window" and "Help" in the menubar above). You
will now see a window with no close box. This is your ToolServer
Worksheet where you will type (or cut &amp; paste) the commands
for the following steps.</P>
<P>In case you have never used MPW/ToolServer before, the
following is <B>very important</B>. Pressing "return" does not
execute commands like you might think. It just inserts a newline
into the worksheet like a normal text editor. <B>To actually get
ToolServer to execute the command, you must press "Enter" (lower
right of numeric keypad).</B> This executes the line that the
cursor is on, and only that line. If you want to execute multiple
lines at once, select them all and hit Enter.</P></LI>
<LI>Set the shell variables {IDE} and {Source} to the correct
paths for your build environment. {IDE} is where your CodeWarrior
IDE is located. {Source} is the folder containing the toplevel
"ns" folder of the Mozilla source. Mine look like this (don't
forget to keep the quotes if your path includes spaces), yours
will almost certainly be different (<FONT COLOR="#FF0000">to
punctuate this, the things you need to change are in red</FONT>).
<PRE>Set IDE "<FONT COLOR="#FF0000">Develop:Source331 Build Environment:CW Pro 2:Metrowerks CodeWarrior:</FONT>"
Set Source "<FONT COLOR="#FF0000">Source:FreeSource:</FONT>"</PRE>
</LI>
<LI>If you are using CWPro2, execute the following lines to patch
LDropFlag to draw correcly over non-white backgrounds.
<PRE>directory "{IDE}MacOS Support:PowerPlant:_In Progress:_Table Classes:"
patch LDropFlag.cp "{Source}mozilla:lib:mac:patches:LDropFlag.patch"
duplicate -y "{Source}mozilla:lib:mac:patches:DropFlag Icons.rsrc" "{IDE}MacOS Support:PowerPlant:PowerPlant Resources:"</PRE></LI>
<LI>Execute the following lines to patch menusharing.c to allow it
to compile with the new Universal Headers. It references an
obsolete header file (GestaltEqu.h).
<PRE>directory "{IDE}MacOS Support:Menu Sharing Toolkit 4.1:"
patch menusharing.c "{Source}mozilla:lib:mac:patches:menusharing.patch"</PRE></LI>
<LI>If you are using CWPro2 straight off the CD, you need to patch
AppleEvents.r to fix a problem with the Universal Headers (the
definition of the 'aedt' resource was omitted). <B>You do not have
to do this if you have applied the netborne patch to Pro2e
</B> because it has been fixed.
<PRE>directory "{IDE}MacOS Support:Headers:Rez Headers:"
patch AppleEvents.r "{Source}mozilla:lib:mac:patches:AppleEvents.r.patch"</PRE></LI>
<LI>You need to patch stat.mac.h to fix a problem in MSL where
lines were omitted.
<PRE>directory "{IDE}Metrowerks Standard Library:MSL C:MSL Mac:Public Includes"
patch stat.mac.h "{Source}mozilla:lib:mac:patches:stat.mac.h.patch"</PRE></LI>
<LI>Congratulations! Now you are ready to build. Once these steps
are done, you don't have to repeat these setups the next
time!</LI>
</OL>
<P>
<H2><A NAME="ss2.4">2.4 Run the build </A></H2>
<UL>
<P>In the folder mozilla:build:mac:, there are several Perl scripts with
names of the form BuildMozillaXXX.pl, where XXX is "Optimized",
"Debug", "Tinderbox", et al. Each script builds the corresponding
version of Mozilla. If you configured the MacPerl application to
execute scripts that are opened from the finder, all you have to do is
double click on the appropriate one; otherwise, launch MacPerl, and
run the appropriate script from the "Run Script..." menu item.</P>
<P>These `configured build' scripts are simple, and you might want to
make your own to force your build to StopForErrors(), or alternatively
DontStopForErrors(), et al. You can set up certain build-script
variables and (soon) compile-time flags. Compare the supplied scripts
to figure out what you might want. Note that CodeWarriorLib, Moz.pm,
and BuildList.pm, are AppleScript libraries and Perl modules meant to
be used by a `configured build'. Use your favorite POD viewer (Shuck
comes with MacPerl) to view the documentation in the Perl scripts.</P>
<P>If there were any errors in any of the projects along the way, the
script will stop at that point and the IDE will tell you the errors.
You can fix them and make sure they current project builds, but to
continue the automation, you have to start from the beginning by
double-clicking the script again. This isn't quite as bad as it
sounds because the previous projects are already built (unless you
changed some major header file). Please note that stopping the script
once it has started is difficult. We are working to address
this issue.</P>
<P>After the build is complete, you can find aliases to the built libraries
and the final Mozilla application. Debug builds are built to
Mozilla:dist:client_debug, while optimized builds are built to Mozilla:dist:client.
</P>
<P>Don't worry too much about the numerous warnings generated during
the build. We try our best to get the XP teams to use real compilers,
but alas, they continue to write warning-laden code. There is also
some generated code (Java is one example) that has a lot of warnings
that we can't help either. If you write any new code, please help us
in our quest to get zero warnings.</P>
</UL>
</UL>
<HR>
<H2><A NAME="s3">3. Common Sticking Points</A></H2>
<UL>
<LI><B>I have CodeWarrior3, how do i build with it?</B>
<UL> Currently, the answer is, "You don't." Eventually, the distribution
will be modified to allow building using CodeWarrior3, but for now
CodeWarrior2 is the only IDE that is supported.
</UL>
</LI>
</UL>
<HR>
<H2><A NAME="s4">4. Credits</A></H2>
<UL>
The majority of this document is taken from the build document included
in the Mozilla source distribution at README:mozilla:macbuild.htm written
by Mike Pinkerton, <A HREF="mailto:pinkerton@netscape.com">
pinkerton@netscape.com</A>.
</BODY>
</HTML>

View File

@@ -0,0 +1,163 @@
<HTML>
<HEAD>
<TITLE>Building the Mozilla client on unix platforms</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000EE" VLINK="#551A8B"
ALINK="#FF0000">
<HR>
<H1>Building the Mozilla client on Unix platforms</H1>
<H2>
Daniel Nunes, <TT><A HREF="mailto:leaf@mozilla.org">leaf@mozilla.org</A></TT></H2>
v 1.2, 1998-11-02
<P>
<HR><I>How to build Mozilla on a Unix System.</I>
<HR>
<H2>1. <A HREF="#s1">Introduction</A></H2>
<H2>2. <A HREF="#s2">Building Mozilla</A></H2>
<UL>
<LI>
<A HREF="#ss2.1">2.1 Get the Code </A></LI>
<LI>
<A HREF="#ss2.2">2.2 Requirements</A></LI>
<LI>
<A HREF="#ss2.3">2.3 Build the Lizard</A></LI>
<LI>
<A HREF="#ss2.4">2.4 After the Build</A></LI>
</UL>
<H2>3. <A HREF="#s3"> Common Problems </A></H2>
<HR>
<H2><A NAME="s1">1. Introduction</A></H2>
<P>
Perhaps you are interested in building classic Mozilla, before the
fall of the old layout engine, and the rise of the new. If so, the
<B><A HREF="classic-unix.html">Classic Mozilla Build document</A></B>
is what you're looking for.
<P>
<P>
What this document is: A guide to building the Mozilla application.
<BR>
This includes:
<OL>
<LI> A listing of the development tools you will need to build Mozilla. </LI>
<LI> A sample set of commands to build Mozilla using the Autoconf
build system. </LI>
</OL>
<P>
If you're looking for documentation on developing features or fixing bugs,
the Mozilla
<A HREF="../tplist.html">Technical Documents</A> or
<A HREF="../../../library.html"> Library </A>
are probably what you're looking for.
<P>
<HR>
<H2><A NAME="s2">2. Building Mozilla </A></H2>
<P>
<UL>Each of the following subsections describes, or gives references to
descriptions of, the steps necessary to build Mozilla.
</UL>
<UL>
<H2><A NAME="ss2.1">2.1 Get the Code</A></H2>
<P>
<UL>
Eventually, there will be two principal ways of getting the code,
<A HREF="../../../download.html"> ftp</A> and
<A HREF="../../../cvs.html"> CVS</A>.
CVS will provide the most current code for building, but is
slower than ftp. Ftp drops are generally produced once per month,
and are known to compile on some machine, somewhere.
<B>For now</B>, however, you must do the following to obtain the newest
browser source:
<BR>
<CODE>
cvs co mozilla/nglayout.mk<BR>
cd mozilla<BR>
gmake -f nglayout.mk pull_all<BR>
</CODE>
<BR>
This should pull all the right source.
</UL>
<P>
<H2><A NAME="ss2.2">2.2 Requirements</A></H2>
<UL>
The following should be installed:
<UL>
<LI>Motif 1.2
<LI>The native C/C++ compiler (or GNU C/C++ compiler 2.7.2 in lieu of the
native compiler)
<LI>GNU make 3.74 or better
<LI>Perl5
<LI><A HREF="../../../projects/autoconf/">Autconf</A> requirements,
including NSPR.
<LI><CODE>LD_LIBRARY_PATH</CODE> must include the path to the NSPR
shared objects.<BR>
For most people, this means adding <CODE>/usr/local/nspr/lib</CODE>
to <CODE>LD_LIBRARY_PATH</CODE>
(either:
<BR>
<CODE>setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:/usr/local/nspr/lib</CODE>
<BR>
or
<BR>
<CODE>export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/nspr/lib</CODE>
.<BR>
If you get an error like "No such variable" then omit the
<CODE>${LD_LIBRARY_PATH}:</CODE> part
)
</UL>
<P>
Your hardware should be equal to, or better than:
<UL>
32 MB RAM, 128 MB swap (64 MB RAM recommended)
</UL>
</UL>
<P>
<H2><A NAME="ss2.3">2.3 Build the Lizard</A></H2>
<P>
<UL>
<CODE>
autoconf<BR>
mkdir obj-`./build/autoconf/config.guess`<BR>
cd obj-`./build/autoconf/config.guess`<BR>
../configure --with-nspr=/usr/local/nspr --enable-toolkit=motif<BR>
gmake depend<BR>
gmake<BR>
</CODE>
</UL>
<H2><A NAME="ss2.4">2.4 After the build </A></H2>
<UL>
<LI> <CODE>cd dist/bin</CODE> and you should see links to the objects you
need to run <CODE>main</CODE>.
<LI>On most unixen LD_LIBRARY_PATH must be set to wherever the necessary
libraries are.
<UL>
<LI>On HP-UX, the equivalent environment variable is <CODE>SHLIB_PATH</CODE>.
<LI>On AIX, the equivalent environment variable is <CODE>LIBPATH</CODE>.
</UL>
</UL>
</UL>
<HR>
<H2><A NAME="s3">3. Common Sticking Points</A></H2>
<LI>I'm sure there are bound to be some. Send
<A HREF="mailto:leaf@mozilla.org"> me</A> mail.
<HR>
</BODY>
</HTML>

View File

@@ -0,0 +1,209 @@
<HTML>
<HEAD>
<TITLE>Building Mozilla on Microsoft Windows 32-bit platforms</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000EE" VLINK="#551A8B"
ALINK="#FF0000">
<HR>
<H1>
Building Mozilla on Microsoft Windows 32-bit platforms</H1>
<H2>
Daniel Nunes, <TT><A HREF="mailto:leaf@netscape.com">leaf@netscape.com</A></TT>
</H2>
v 1.0, June 1998
<P>
<HR><I>How to build Mozilla on a Microsoft Windows 32-bit System.</I>
<HR>
<H2>1. <A HREF="#s1">Introduction</A></H2>
<H2>2. <A HREF="#s2">Building Mozilla</A></H2>
<UL>
<LI>
<A HREF="#ss2.1">2.1 Get the Code </A></LI>
<LI>
<A HREF="#ss2.2">2.2 Requirements</A></LI>
<LI>
<A HREF="#ss2.3">2.3 Set up the Build Environment</A></LI>
<LI>
<A HREF="#ss2.4">2.4 Build the Lizard </A></LI>
</UL>
<H2>3. <A HREF="#s3"> Common Problems </A></H2>
<HR>
<H2><A NAME="s1">1. Introduction</A></H2>
<P>
What this document is: A guide to building the Mozilla application.
<BR>
This includes:
<OL>
<LI> A listing of the development tools you will need to build Mozilla. </LI>
<LI> A list of environment variables you will need to set before building. </LI>
</OL>
<P>
If you're looking for documentation on developing features or fixing bugs,
the Mozilla
<A HREF="http://www.mozilla.org/docs/tplist/tplist.html">Technical Documents
</A> or <A HREF="http://www.mozilla.org/library.html"> Library </A>
are probably what you're looking for.
<P>
<HR>
<H2><A NAME="s2">2. Building Mozilla </A></H2>
<P>
<UL>Each of the following subsections describes, or gives references to
descriptions of, the steps necessary to build Mozilla.
<H2><A NAME="ss2.1">2.1 Get the Code</A></H2>
<P>
<UL>
There are two principal ways of getting the code,
<A HREF="http://www.mozilla.org/download.html"> ftp</A> and
<A HREF="http://www.mozilla.org/cvs.html"> CVS</A>.
CVS will provide the least outdated code for building, but is
slower than ftp.
</UL>
<P>
<H2><A NAME="ss2.2">2.2 Requirements</A></H2>
<UL>
The following need to be installed:
<UL>
<LI>Microsoft Visual C++ version 4.2 or later
<LI>GNU Tools for Microsoft Windows, located:
<UL>
<LI><A HREF="http://www.cygnus.com/misc/gnu-win32">Cygnus</A></LI>
<LI><A HREF="http://www.gnu.org/order/ftp.html">GNU home page</A></LI>
<LI><A HREF="ftp://prep.ai.mit.edu/pub/gnu">MIT</A></LI>
</UL>
Specifically, you'll need:
<UL><CODE>
cp.exe<BR>
rm.exe<BR>
uname.exe<BR>
</CODE>
</UL>
Netscape has internally modified version of gmake, shmsdos and win32gnu
that we use to get around some problems we were having keeping in sync
with the Unix version of gmake. This version of gmake can be found in the
Windows Build Tools package, which can be ftp'd from
<A HREF="http://www.mozilla.org/download-mozilla.html"> the Mozilla
Download page</A>.
The three files you will need are:
<UL><CODE>
gmake.exe<BR>
shmsdos.exe<BR>
uname.exe<BR>
</CODE>
</UL>
</UL>
<P>
Hardware/OS
<UL>
<LI>Pentium 133 MHz or better</LI>
<LI>64 MB RAM, 128 MB recommended</LI>
<LI>250 MB NTFS or 500 MB FAT disk space</LI>
<LI>NT 4.0 is preferred; NT 3.51 will also work.
</LI>
</UL>
</UL>
<P>
<H2><A NAME="ss2.3">2.3 Setup the Build Environment</A></H2>
<P>
<UL>
The following environment variables need to be set:
<UL>
<CODE>
set MOZ_BITS=32
<BR>
set MOZ_DEBUG=1 (set this only if you want to build a debug build)
<BR>
set MOZ_GOLD=1
<BR>
set MOZ_MEDIUM=1
<BR>
set MOZ_NT=351 (if running NT3.51)
<BR>
set MOZ_OUT=(optional: specifies location of resultant executable)
<BR>
set MOZ_SRC=(top of your tree, for example: set MOZ_SRC=d:\mozilla_source
if this is the directory where you checked or unzipped the source into)
<BR>
set MOZ_TOOLS=(location of the bin directory of your GNU tools. The build
looks for MOZ_TOOLS\bin\gmake.exe, so make sure that the gmake.exe from
the Windows Build Tools package resides there.)
<BR>
set NO_SECURITY=1
<BR>
set NSPR20=1
<BR>
set _MSC_VER=1100 (if you are running VC++ 5.0 or higher)
<BR>
</CODE>
</UL>
<BR>
<P>
</UL>
<H2><A NAME="ss2.4">2.4 Run the build </A></H2>
<UL>
Change to the directory you copied the source into (for example,
<CODE>cd d:\mozilla_source</CODE>). If this directory was empty before you
installed the source, there should be two directories here:
<CODE>README</CODE> and <CODE>mozilla</CODE>.
<CODE>
<PRE>
cd mozilla\config
nmake /f makefile.win
cd ..
nmake /f client.mak
</PRE>
</CODE>
</UL>
</UL>
<HR>
<H2><A NAME="s3">3. Common Sticking Points</A></H2>
<UL>
<LI><B>nmake has a 'fatal error', listing one of the GNU commands and a
hexadecimal return code.</B>
<UL>
This will happen as a result of not having the GNU tools and Windows Build
tools in your path. Add the directories with the appropriate binaries to your
path.
</UL>
</LI>
<LI>
<B>It fails with the message "'.\WIN32' unexpected": </B>
<UL>
You didn't properly
set the environment variables -- you must not include a space at the end
of the set statements (be careful if you are cut'n'pasting).
</UL>
</LI>
<LI>
<B>It fails to build, with directory-related errors: </B>
<UL>
The full path
to the source must not include any spaces. Additionally, the source must
be extracted with an intact directory structure by a utility that understands
long filenames. If in doubt, grab Info-Zip at
<A HREF="ftp://ftp.cdrom.com/pub/infozip">ftp://ftp.cdrom.com/pub/infozip</A>
</UL>
</LI>
<LI>
<B>I'm not running a 32-bit windows system, how do i build?</B>
<UL>
Currently, the build process depends on a 32-bit operating system.
Windows NT 4.0 is the recommended windows operating system.
</UL>
</UL>
<HR>
</BODY>
</HTML>

View File

@@ -0,0 +1,53 @@
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Author" CONTENT="Chris Yeh">
<META NAME="GENERATOR" CONTENT="Mozilla/4.05 [en]C-NSCP (WinNT; U) [Netscape]">
<TITLE>Running Mozilla...</TITLE>
</HEAD>
<BODY>
<H2>
<FONT FACE="Arial,Helvetica">Running Mozilla Without Trashing Netscape
Installation</FONT></H2>
This document explains how to run <TT>mozilla.exe</TT> separately from
<TT>netscape.exe</TT> without trashing your regular installation of Netscape
Communicator. This is necessary if, for example, you want to use Communicator's
mail client while you work on Mozilla development.
<BR>
<HR WIDTH="100%">
<OL>
<LI>
Before running <TT>mozilla.exe</TT>, create a new user profile either from
a Netscape 4.0x installation using the "User Profile Manager" shortcut
in the Utilities folder (on Windows) or by using&nbsp; the <TT>-new_account</TT>
option on the command line of either <TT>netscape.exe</TT> or <TT>mozilla.exe</TT>.&nbsp;
We suggest calling the profile "<TT>mozilla</TT>."</LI>
<LI>
Always use that new account when running <TT>mozilla.exe</TT>, and never
run <TT>netscape.exe</TT> using that same account profile.</LI>
</OL>
To make things easier, you can start the application with the user account
on the command line, for example:
<UL><TT>mozilla.exe -P"mozilla"</TT></UL>
This assures that prefs and the cache will not interfere between the two
versions. This will be especially
<BR>important as new prefs are added to the Mozilla product. Note that
you must use quotes around the name and there can be no space between the
"P" and the profile name. Otherwise, the application won't catch the profile
switch, and it will try to load the profile name as the initial URL.
<P>
<HR WIDTH="100%">
<BR>You can copy your <TT>bookmark.htm</TT> file from an existing profile
to your new profile directory if you want to share bookmarks.
<P>After the initial 3/31 release, we will add some code to Mozilla to
prevent running with a profile that is already being used by <TT>netscape.exe</TT>.
<BR>&nbsp;
<HR WIDTH="100%">
<BR><FONT SIZE=-1>Copyright &copy; 1998 <A HREF="http://home.netscape.com/misc/contact_info.html">Netscape
Communications Corporation</A></FONT>
</BODY>
</HTML>

View File

@@ -0,0 +1,184 @@
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=x-mac-roman">
<META NAME="GENERATOR" CONTENT="Mozilla/4.04 [en] (WinNT; I) [Netscape]">
<META NAME="KeyWords" CONTENT="client, source, documentation">
<META NAME="Author" CONTENT="Kipp E.B. Hickman">
<TITLE>NGLayout Windows Build Instructions</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<H2>
<FONT FACE="Arial,Helvetica">NGLayout Windows Build Instructions</FONT></H2>
This document explains how to build NGLayout for the Windows platform.&nbsp;
<HR><B><FONT SIZE=+1>Required Tools:</FONT></B>
<UL>
<LI>
<B>Microsoft Visual C++ version 4.2 or later</B></LI>
<LI>
<B>The same set of tools for building <A HREF="http://www.mozilla.org/docs/tplist/catBuild/winbuild.htm">Mozilla</A></B></LI>
</UL>
<B><FONT SIZE=+1>Setting up:</FONT></B>
<UL>
<LI>
You need a Pentium with at least a 133 MHz processor and at least 250 megs
(NTFS partition) or 500 megs (FAT partition) of hard drive space. You need
to have a minimum of 64 megs of memory in order to build this tree. These
numbers are approximations.</LI>
<LI>
The preferred platform is NT 4.0. NT 3.51 will also work, and Win95 might
work if you're lucky. Maybe.</LI>
<LI>
Install MSVC. If you don't choose to have the MSVC install modify your
environment variables for PATH, INCLUDE, and LIB information, be sure to
run VCVARS32.BAT out of the MSVC bin directory prior to attempting to build.</LI>
<LI>
Download and install GNU tools. Put them in your path.</LI>
<LI>
Install NGLayout source.</LI>
<UL>
<LI>
cd &lt;your-source-area></LI>
<LI>
unzip -o -q win-19980415.zip</LI>
</UL>
<LI>
There are several environment variables you will need to set, either manually
or via a script within a command session, or by setting them in your system
environment located through the Control Panel | System icon.</LI>
<P>&nbsp;<B>Note: There is an additional variable for building NGLayout!
Use this list carefully!</B>
<P>&nbsp;The variables are:
<UL>
<LI>
set MOZ_BITS=32</LI>
<LI>
set MOZ_DEBUG=1 (don't set this if you want to build an optimized release
build)</LI>
<LI>
set MOZ_GOLD=1</LI>
<LI>
set MOZ_MEDIUM=1</LI>
<LI>
set MOZ_NT=351 (if running NT 3.51, don't set otherwise)</LI>
<LI>
set MOZ_OUT=(location of resulting executable and totally optional, see
Notes for more details)</LI>
<LI>
set MOZ_SRC=(top of your tree, drive letter and path, i.e. set MOZ_SRC=d:\mozilla_src.
The topmost directory under this should be mozilla)</LI>
<LI>
set MOZ_TOOLS=(location of the bin directory containing your GNU tools.
The build looks for MOZ_TOOLS\bin\gmake.exe, so make sure your MOZ_TOOLS
is figured appropriately)</LI>
<LI>
set NO_SECURITY=1</LI>
<LI>
set NSPR20=1</LI>
<LI>
if you are running VC++ 5.0 or higher: set _MSC_VER=1100; if you are running
VC++ 4.2 then set MOZ_VCVER=42</LI>
<LI>
<B>set STANDALONE_IMAGE_LIB=1</B></LI>
<LI>
<B>set MODULAR_NETLIB=1</B></LI>
</UL>
</UL>
<B><FONT SIZE=+1>Building:</FONT></B>
<UL>
<LI>
You need to be running a vanilla command prompt. Other shells may work,
but you might have to tweak makefiles.</LI>
<LI>
<B>Build the tools:</B> This generates several tools that handle things
like dependency generation</LI>
<UL>
<LI>
cd mozilla\config</LI>
<LI>
nmake /f makefile.win</LI>
</UL>
<LI>
<B>Build the NGLayout:</B> This will do a complete build of the source
tree. You will end up with a viewer.exe at the end. The viewer.exe will
be in your dist\win32_[OD].obj\bin directory (O will be used when you don't
set MOZ_DEBUG; D will be used when you set MOZ_DEBUG).</LI>
<UL>
<LI>
cd mozilla</LI>
<LI>
nmake /f nglayout.mak</LI>
</UL>
</UL>
<B><FONT SIZE=+1>Running:</FONT></B>
<UL>
<LI>
Once you have built the system, do this to run the viewer program (the
viewer program is a simple test program that uses the nsIWebWidget API
to embed a web widget object). The viewer program has a few basic menu
items, include "Samples" which load sample tests.</LI>
<UL>
<LI>
cd mozilla\dist\win32_[OD].obj\bin</LI>
<LI>
.\viewer.exe</LI>
</UL>
</UL>
<B><FONT SIZE=+1>Notes:</FONT></B>
<UL>
<LI>
This build process does not use Visual C++ generated project files for
several reasons having to do with (among other things) size, maintainability,
and the long term desire to start using more of tools like gmake, or plug
and play developer tools. This does not preclude you from using the Visual
C++ IDE, or it's debugger. Once you have built a viewer.exe do this to
run it under the debugger:</LI>
</UL>
<UL>
<UL>
<LI>
cd mozilla\dist\win32_[OD].obj\bin</LI>
<LI>
msdev viewer.exe</LI>
</UL>
</UL>
<HR WIDTH="100%">
<CENTER><FONT SIZE=-1>Copyright &copy; 1998 <A HREF="http://home.netscape.com/misc/contact_info.html">Netscape
Communications Corporation</A></FONT></CENTER>
&nbsp;
</BODY>
</HTML>

8
mozilla/aclocal.m4 vendored Normal file
View File

@@ -0,0 +1,8 @@
dnl
dnl Local autoconf macros used with mozilla
dnl The contents of this file are under the Public Domain.
dnl
builtin(include, build/autoconf/gtk.m4)dnl
builtin(include, build/autoconf/altoptions.m4)dnl

345
mozilla/allmakefiles.sh Executable file
View File

@@ -0,0 +1,345 @@
#! /bin/sh
#
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL. You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1999 Netscape Communications Corporation. All Rights
# Reserved.
#
# allmakefiles.sh - List of all makefiles.
# Appends the list of makefiles to the variable, MAKEFILES.
# There is no need to rerun autoconf after adding makefiles.
# You only need to run configure.
#
# Unused makefiles may be commented out with '#'.
# ('#' must be the first character on the line).
# add_makefiles - Shell function to add makefiles to MAKEFILES
add_makefiles() {
while read line; do
case $line in
\#*|dnl*) ;;
*) MAKEFILES="$MAKEFILES $line" ;;
esac
done
}
if [ -z "${srcdir}" ]; then
srcdir=.
fi
add_makefiles <<END_NGMAKEFILES
Makefile
base/Makefile
base/public/Makefile
base/src/Makefile
base/src/motif/Makefile
base/src/rhapsody/Makefile
base/src/gtk/Makefile
base/tests/Makefile
config/Makefile
config/autoconf.mk
config/mkdepend/Makefile
config/mkdetect/Makefile
config/ports/Makefile
dbm/Makefile
dbm/include/Makefile
dbm/src/Makefile
dbm/tests/Makefile
dom/Makefile
dom/public/Makefile
dom/public/base/Makefile
dom/public/coreDom/Makefile
dom/public/coreEvents/Makefile
dom/public/css/Makefile
dom/public/events/Makefile
dom/public/html/Makefile
dom/src/Makefile
dom/src/base/Makefile
dom/src/build/Makefile
dom/src/coreDOM/Makefile
dom/src/css/Makefile
dom/src/events/Makefile
dom/src/html/Makefile
dom/src/jsurl/Makefile
dom/tools/Makefile
editor/Makefile
editor/public/Makefile
expat/Makefile
expat/xmlparse/Makefile
expat/xmltok/Makefile
gfx/Makefile
gfx/public/Makefile
gfx/src/Makefile
gfx/src/gtk/Makefile
gfx/src/ps/Makefile
gfx/src/motif/Makefile
gfx/src/rhapsody/Makefile
gfx/tests/Makefile
htmlparser/Makefile
htmlparser/robot/Makefile
htmlparser/src/Makefile
htmlparser/tests/Makefile
htmlparser/tests/grabpage/Makefile
htmlparser/tests/logparse/Makefile
include/Makefile
intl/Makefile
intl/uconv/Makefile
intl/uconv/public/Makefile
intl/uconv/src/Makefile
intl/uconv/tests/Makefile
intl/uconv/ucvja/Makefile
intl/uconv/ucvlatin/Makefile
intl/uconv/ucvja2/Makefile
intl/locale/Makefile
intl/locale/public/Makefile
intl/locale/src/Makefile
intl/locale/src/unix/Makefile
intl/locale/tests/Makefile
intl/lwbrk/Makefile
intl/lwbrk/src/Makefile
intl/lwbrk/public/Makefile
intl/lwbrk/tests/Makefile
intl/unicharutil/Makefile
intl/unicharutil/src/Makefile
intl/unicharutil/public/Makefile
intl/unicharutil/tests/Makefile
intl/unicharutil/tools/Makefile
intl/strres/Makefile
intl/strres/public/Makefile
intl/strres/src/Makefile
intl/strres/tests/Makefile
jpeg/Makefile
js/Makefile
js/jsd/Makefile
js/jsd/classes/Makefile
js/src/Makefile
js/src/fdlibm/Makefile
js/src/liveconnect/Makefile
js/src/liveconnect/classes/Makefile
# js/src/xpcom/Makefile
js/src/xpconnect/Makefile
js/src/xpconnect/md/Makefile
js/src/xpconnect/md/unix/Makefile
js/src/xpconnect/test/Makefile
layout/Makefile
layout/base/Makefile
layout/base/public/Makefile
layout/base/src/Makefile
layout/base/tests/Makefile
layout/build/Makefile
layout/events/Makefile
layout/events/public/Makefile
layout/events/src/Makefile
layout/html/Makefile
layout/html/base/Makefile
layout/html/base/src/Makefile
layout/html/content/Makefile
layout/html/content/public/Makefile
layout/html/content/src/Makefile
layout/html/document/Makefile
layout/html/document/src/Makefile
layout/html/forms/Makefile
layout/html/forms/public/Makefile
layout/html/forms/src/Makefile
layout/html/style/Makefile
layout/html/style/public/Makefile
layout/html/style/src/Makefile
layout/html/table/Makefile
layout/html/table/public/Makefile
layout/html/table/src/Makefile
layout/html/tests/Makefile
layout/tools/Makefile
layout/xml/Makefile
layout/xml/content/Makefile
layout/xml/content/public/Makefile
layout/xml/content/src/Makefile
layout/xml/document/Makefile
layout/xml/document/public/Makefile
layout/xml/document/src/Makefile
layout/xul/Makefile
layout/xul/base/Makefile
layout/xul/base/src/Makefile
layout/xul/content/Makefile
layout/xul/content/src/Makefile
# lib/liblayer/Makefile
# lib/liblayer/include/Makefile
# lib/liblayer/src/Makefile
lib/libpwcac/Makefile
lib/xp/Makefile
modules/libimg/Makefile
modules/libimg/classes/Makefile
modules/libimg/classes/netscape/Makefile
modules/libimg/classes/netscape/libimg/Makefile
modules/libimg/png/Makefile
modules/libimg/public/Makefile
modules/libimg/src/Makefile
modules/libpref/Makefile
modules/libpref/admin/Makefile
modules/libpref/l10n/Makefile
modules/libpref/public/Makefile
modules/libpref/src/Makefile
modules/libreg/Makefile
modules/libreg/include/Makefile
modules/libreg/src/Makefile
modules/libutil/Makefile
modules/libutil/public/Makefile
modules/libutil/src/Makefile
modules/oji/Makefile
modules/oji/public/Makefile
modules/oji/src/Makefile
modules/plugin/Makefile
modules/plugin/nglsrc/Makefile
modules/plugin/public/Makefile
modules/plugin/src/Makefile
modules/plugin/test/Makefile
modules/security/freenav/Makefile
modules/zlib/Makefile
modules/zlib/src/Makefile
nav-java/Makefile
nav-java/stubs/Makefile
nav-java/stubs/include/Makefile
nav-java/stubs/jri/Makefile
nav-java/stubs/src/Makefile
network/Makefile
network/cache/Makefile
network/cache/nu/Makefile
network/cache/nu/include/Makefile
network/cache/nu/public/Makefile
network/cache/nu/src/Makefile
network/cache/nu/tests/Makefile
network/cache/nu/tests/fftest/Makefile
network/client/Makefile
network/cnvts/Makefile
network/cstream/Makefile
network/main/Makefile
network/mimetype/Makefile
network/public/Makefile
network/module/Makefile
network/module/tests/Makefile
network/protocol/Makefile
network/protocol/about/Makefile
network/protocol/callback/Makefile
network/protocol/dataurl/Makefile
network/protocol/file/Makefile
network/protocol/ftp/Makefile
network/protocol/gopher/Makefile
network/protocol/http/Makefile
network/protocol/js/Makefile
network/protocol/ldap/Makefile
network/protocol/marimba/Makefile
network/protocol/remote/Makefile
network/protocol/sockstub/Makefile
network/util/Makefile
rdf/Makefile
rdf/base/Makefile
rdf/base/idl/Makefile
rdf/base/public/Makefile
rdf/base/src/Makefile
rdf/util/Makefile
rdf/util/public/Makefile
rdf/util/src/Makefile
rdf/build/Makefile
rdf/content/Makefile
rdf/content/public/Makefile
rdf/content/src/Makefile
rdf/datasource/Makefile
rdf/datasource/public/Makefile
rdf/datasource/src/Makefile
rdf/tests/Makefile
rdf/tests/localfile/Makefile
rdf/tests/rdfsink/Makefile
sun-java/Makefile
sun-java/stubs/Makefile
sun-java/stubs/include/Makefile
sun-java/stubs/jri/Makefile
sun-java/stubs/src/Makefile
caps/Makefile
caps/include/Makefile
caps/public/Makefile
caps/src/Makefile
view/Makefile
view/public/Makefile
view/src/Makefile
webshell/Makefile
webshell/public/Makefile
webshell/src/Makefile
webshell/tests/Makefile
webshell/tests/viewer/Makefile
webshell/tests/viewer/public/Makefile
widget/Makefile
widget/public/Makefile
widget/src/Makefile
widget/src/build/Makefile
widget/src/motif/Makefile
widget/src/rhapsody/Makefile
widget/src/gtk/Makefile
widget/src/xpwidgets/Makefile
widget/tests/Makefile
widget/tests/scribble/Makefile
widget/tests/widget/Makefile
xpcom/Makefile
xpcom/public/Makefile
xpcom/src/Makefile
xpcom/tests/Makefile
xpcom/tests/dynamic/Makefile
xpcom/tools/Makefile
xpcom/tools/xpidl/Makefile
xpcom/libxpt/Makefile
xpcom/libxpt/public/Makefile
xpcom/libxpt/src/Makefile
xpcom/libxpt/tests/Makefile
xpcom/libxpt/tools/Makefile
xpcom/libxpt/xptinfo/Makefile
xpcom/libxpt/xptinfo/public/Makefile
xpcom/libxpt/xptinfo/src/Makefile
xpcom/libxpt/xptinfo/tests/Makefile
xpcom/idl/Makefile
silentdl/Makefile
xpfe/Makefile
xpfe/AppCores/Makefile
xpfe/AppCores/public/Makefile
xpfe/AppCores/src/Makefile
xpfe/AppCores/xul/Makefile
xpfe/AppCores/idl/Makefile
xpfe/browser/Makefile
xpfe/browser/public/Makefile
xpfe/browser/src/Makefile
# xpfe/xpviewer/Makefile
# xpfe/xpviewer/src/Makefile
# xpfe/xpviewer/public/Makefile
xpfe/appshell/Makefile
xpfe/appshell/src/Makefile
xpfe/appshell/public/Makefile
xpfe/bootstrap/Makefile
xpfe/browser/Makefile
xpfe/browser/src/Makefile
# xpfe/browser/public/Makefile
END_NGMAKEFILES
if [ "$MOZ_EDITOR" ]; then
add_makefiles <<END_EDITOR_MAKEFILES
editor/base/Makefile
editor/txmgr/Makefile
editor/txmgr/public/Makefile
editor/txmgr/src/Makefile
editor/txmgr/tests/Makefile
editor/guimgr/Makefile
editor/guimgr/src/Makefile
editor/guimgr/public/Makefile
END_EDITOR_MAKEFILES
fi
if [ "$MOZ_MAIL_NEWS" ]; then
add_makefiles < ${srcdir}/mailnews/makefiles
fi

33
mozilla/base/Makefile.in Normal file
View File

@@ -0,0 +1,33 @@
#!gmake
#
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL. You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
# Reserved.
DEPTH = ..
topsrcdir = @top_srcdir@
VPATH = @srcdir@
srcdir = @srcdir@
include $(DEPTH)/config/autoconf.mk
DIRS = public src
ifdef ENABLE_TESTS
DIRS += tests
endif
include $(topsrcdir)/config/config.mk
include $(topsrcdir)/config/rules.mk

View File

@@ -0,0 +1,21 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#define _IMPL_NS_BASE 1
#include "MacPrefix_debug.h"

View File

@@ -0,0 +1,21 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#define _IMPL_NS_BASE 1
#include "MacPrefix.h"

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,19 @@
# target: baseDebug.shlb
mozilla/base/src/mac/nsTimerMac.cpp
mozilla/base/src/nsArena.cpp
mozilla/base/src/nsAtomTable.cpp
mozilla/base/src/nsBaseDLL.cpp
mozilla/base/src/nsBTree.cpp
mozilla/base/src/nsByteBuffer.cpp
mozilla/base/src/nsCRT.cpp
mozilla/base/src/nsDeque.cpp
mozilla/base/src/nsEscape.cpp
mozilla/base/src/nsFileSpec.cpp
mozilla/base/src/nsFileStream.cpp
mozilla/base/src/nsRBTree.cpp
mozilla/base/src/nsProperties.cpp
mozilla/base/src/nsSizeOfHandler.cpp
mozilla/base/src/nsString.cpp
mozilla/base/src/nsUnicharBuffer.cpp
mozilla/base/src/nsUnicharInputStream.cpp
mozilla/base/src/nsVoidArray.cpp

View File

@@ -1,4 +1,4 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
@@ -16,5 +16,4 @@
* Reserved.
*/
#include "Fundamentals.h"
#include "HashSet.h"
#include "MacPrefix_debug.h"

View File

@@ -0,0 +1,19 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#include "MacPrefix_debug.h"

23
mozilla/base/makefile.win Normal file
View File

@@ -0,0 +1,23 @@
#!nmake
#
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL. You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
# Reserved.
DEPTH=..
IGNORE_MANIFEST=1
DIRS=public src
include <$(DEPTH)\config\rules.mak>

View File

@@ -0,0 +1,14 @@
#
# This is a list of local files which get copied to the mozilla:dist:base directory
#
nsAutoLock.h
nsISizeOfHandler.h
nsFileStream.h
nsIFileStream.h
nsIStringStream.h
nsFileSpec.h
nsRepeater.h
nsIProperties.h
nsCaretProperties.h
nsSpecialSystemDirectory.h

View File

@@ -0,0 +1,46 @@
#!gmake
#
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL. You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
# Reserved.
DEPTH=../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
DEFINES += -D_IMPL_NS_BASE
EXPORTS = \
nsAutoLock.h \
nsIProperties.h \
nsISizeOfHandler.h \
nsCaretProperties.h \
nsEscape.h \
nsFileSpec.h \
nsFileStream.h \
nsIFileStream.h \
nsIStringStream.h \
nsSpecialSystemDirectory.h \
$(NULL)
EXPORTS := $(addprefix $(srcdir)/, $(EXPORTS))
MODULE=base
include $(topsrcdir)/config/config.mk
include $(topsrcdir)/config/rules.mk

View File

@@ -0,0 +1,39 @@
#!nmake
#
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL. You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
# Reserved.
DEPTH=..\..
IGNORE_MANIFEST=1
DEFINES = -D_IMPL_NS_BASE
EXPORTS = \
nsAutoLock.h \
nsCaretProperties.h \
nsIProperties.h \
nsISizeOfHandler.h \
nsEscape.h \
nsFileSpec.h \
nsFileStream.h \
nsIFileStream.h \
nsIStringStream.h \
nsSpecialSystemDirectory.h \
$(NULL)
MODULE = raptor
include <$(DEPTH)\config\rules.mak>

View File

@@ -0,0 +1,116 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
/*
A stack-based lock object that makes using PRLock a bit more
convenient. It acquires the monitor when constructed, and releases
it when it goes out of scope.
For example,
class Foo {
private:
PRLock* mLock;
public:
Foo(void) {
mLock = PR_NewLock();
}
virtual ~Foo(void) {
PR_DestroyLock(mLock);
}
void ThreadSafeMethod(void) {
// we're don't hold the lock yet...
nsAutoLock lock(mLock);
// ...but now we do.
// we even can do wacky stuff like return from arbitrary places w/o
// worrying about forgetting to release the lock
if (some_weird_condition)
return;
// otherwise do some other stuff
}
void ThreadSafeBlockScope(void) {
// we're not in the lock here...
{
nsAutoLock lock(mLock);
// but we are now, at least until the block scope closes
}
// ...now we're not in the lock anymore
}
};
*/
#ifndef nsAutoLock_h__
#define nsAutoLock_h__
#include "nscore.h"
#include "prlock.h"
#include "prlog.h"
// If you ever decide that you need to add a non-inline method to this
// class, be sure to change the class declaration to "class NS_BASE
// nsAutoLock".
class nsAutoLock {
private:
PRLock* mLock;
// Not meant to be implemented. This makes it a compiler error to
// construct or assign an nsAutoLock object incorrectly.
nsAutoLock(void) {}
nsAutoLock(nsAutoLock& aLock) {}
nsAutoLock& operator =(nsAutoLock& aLock) {
return *this;
}
// Not meant to be implemented. This makes it a compiler error to
// attempt to create an nsAutoLock object on the heap.
static void* operator new(size_t size) {
return nsnull;
}
static void operator delete(void* memory) {}
public:
nsAutoLock(PRLock* aLock) : mLock(aLock) {
PR_ASSERT(mLock);
// This will assert deep in the bowels of NSPR if you attempt
// to re-enter the lock.
PR_Lock(mLock);
}
~nsAutoLock(void) {
PR_Unlock(mLock);
}
};
#endif // nsAutoLock_h__

View File

@@ -0,0 +1,53 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
// this class is used to gather caret properties from the OS. It
// must be implemented by each platform that wants more than
// the generic caret properties.
class nsCaretProperties
{
public:
nsCaretProperties();
virtual ~nsCaretProperties() {}
virtual PRInt32 GetCaretWidth() { return mCaretWidth; }
virtual PRUint32 GetCaretBlinkRate() { return mBlinkRate; }
protected:
// have value for no blinking
enum {
eDefaulBlinkRate = 500, // twice a second
eDefaultCaretWidth = 20 // 20 twips = 1 pixel
};
PRInt32 mCaretWidth; // caret width in twips
PRUint32 mBlinkRate; // blink rate in milliseconds
// members for vertical placement & size?
};
NS_BASE nsCaretProperties* NewCaretProperties();

View File

@@ -0,0 +1,62 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
/* First checked in on 98/12/03 by John R. McMullen, derived from net.h/mkparse.c. */
#ifndef _ESCAPE_H_
#define _ESCAPE_H_
#include "prtypes.h"
#include "nscore.h"
/* valid mask values for NET_Escape() and NET_EscapedSize(). */
typedef enum {
url_XAlphas = (1<<0)
, url_XPAlphas = (1<<1)
, url_Path = (1<<2)
} nsEscapeMask;
#ifdef __cplusplus
extern "C" {
#endif
NS_BASE char * nsEscape(const char * str, nsEscapeMask mask);
/* Caller must use delete [] on the result */
NS_BASE char * nsUnescape(char * str);
/* decode % escaped hex codes into character values,
* modifies the parameter, returns the same buffer
*/
NS_BASE char * nsEscapeCount(const char * str, PRInt32 len, nsEscapeMask mask, PRInt32* out_len);
/* Like nsEscape, but if out_len is non-null, return result string length
* in *out_len, and uses len instead of NUL termination.
* Caller must use delete [] on the result.
*/
NS_BASE PRInt32 nsUnescapeCount (char * str);
/* decode % escaped hex codes into character values,
* modifies the parameter buffer, returns the length of the result
* (result may contain \0's).
*/
#ifdef __cplusplus
}
#endif
#endif // _ESCAPE_H_

View File

@@ -0,0 +1,617 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
// First checked in on 98/11/20 by John R. McMullen in the wrong directory.
// Checked in again 98/12/04.
// Polished version 98/12/08.
//========================================================================================
//
// Classes defined:
//
// nsFilePath, nsFileURL, nsFileSpec, nsPersistentFileDescriptor
// nsDirectoryIterator. Oh, and a convenience class nsAutoCString.
//
// Q. How should I represent files at run time?
// A. Use nsFileSpec. Using char* will lose information on some platforms.
//
// Q. Then what are nsFilePath and nsFileURL for?
// A. Only when you need a char* parameter for legacy code.
//
// Q. How should I represent files in a persistent way (eg, in a disk file)?
// A. Use nsPersistentFileDescriptor. Convert to and from nsFileSpec at run time.
//
// This suite provides the following services:
//
// 1. Encapsulates all platform-specific file details, so that files can be
// described correctly without any platform #ifdefs
//
// 2. Type safety. This will fix the problems that used to occur because people
// confused file paths. They used to use const char*, which could mean three
// or four different things. Bugs were introduced as people coded, right up
// to the moment Communicator 4.5 shipped.
//
// 3. Used in conjunction with nsFileStream.h (q.v.), this supports all the power
// and readability of the ansi stream syntax.
//
// Basic example:
//
// nsFilePath myPath("/Development/iotest.txt");
//
// nsOutputFileStream testStream(myPath);
// testStream << "Hello World" << nsEndl;
//
// 4. Handy methods for manipulating file specifiers safely, e.g. MakeUnique(),
// SetLeafName(), Exists().
//
// 5. Easy cross-conversion.
//
// Examples:
//
// Initialize a URL from a string without suffix
//
// nsFileURL fileURL("file:///Development/MPW/MPW%20Shell");
//
// Initialize a Unix path from a URL
//
// nsFilePath filePath(fileURL);
//
// Initialize a native file spec from a URL
//
// nsFileSpec fileSpec(fileURL);
//
// Make the spec unique (this one has no suffix).
//
// fileSpec.MakeUnique();
//
// Assign the spec to a URL
//
// fileURL = fileSpec;
//
// Assign a unix path using a string with a suffix.
//
// filePath = "/Development/MPW/SysErrs.err";
//
// Assign to a file spec using a unix path.
//
// fileSpec = filePath;
//
// Make this unique (this one has a suffix).
//
// fileSpec.MakeUnique();
//
// 6. Fixes a bug that have been there for a long time, and
// is inevitable if you use NSPR alone, where files are described as paths.
//
// The problem affects platforms (Macintosh) in which a path does not fully
// specify a file, because two volumes can have the same name. This
// is solved by holding a "private" native file spec inside the
// nsFilePath and nsFileURL classes, which is used when appropriate.
//
// Not yet done:
//
// Equality operators... much more.
//
//========================================================================================
#ifndef _FILESPEC_H_
#define _FILESPEC_H_
#include "nscore.h"
#include "nsError.h"
#include "nsString.h"
//========================================================================================
// Compiler-specific macros, as needed
//========================================================================================
#if !defined(NS_USING_NAMESPACE) && (defined(__MWERKS__) || defined(XP_PC))
#define NS_USING_NAMESPACE
#endif
#ifdef NS_USING_NAMESPACE
#define NS_NAMESPACE_PROTOTYPE
#define NS_NAMESPACE namespace
#define NS_NAMESPACE_END
#define NS_EXPLICIT explicit
#else
#define NS_NAMESPACE_PROTOTYPE static
#define NS_NAMESPACE struct
#define NS_NAMESPACE_END ;
#define NS_EXPLICIT
#endif
//=========================== End Compiler-specific macros ===============================
#ifdef XP_MAC
#include <Files.h>
#elif defined(XP_UNIX) || defined (XP_OS2)
#include <dirent.h>
#elif XP_PC
#include "prio.h"
#endif
//========================================================================================
// Here are the allowable ways to describe a file.
//========================================================================================
class nsFileSpec; // Preferred. For i/o use nsInputFileStream, nsOutputFileStream
class nsFilePath; // This can be passed to NSPR file I/O routines, if you must.
class nsFileURL;
class nsPersistentFileDescriptor; // Used for storage across program launches.
#define kFileURLPrefix "file://"
#define kFileURLPrefixLength (7)
class nsOutputStream;
class nsInputStream;
class nsIOutputStream;
class nsIInputStream;
class nsOutputFileStream;
class nsInputFileStream;
class nsOutputConsoleStream;
class nsString;
//========================================================================================
// Conversion of native file errors to nsresult values. These are really only for use
// in the file module, clients of this interface shouldn't really need them.
// Error results returned from this interface have, in the low-order 16 bits,
// native errors that are masked to 16 bits. Assumption: a native error of 0 is success
// on all platforms. Note the way we define this using an inline function. This
// avoids multiple evaluation if people go NS_FILE_RESULT(function_call()).
#define NS_FILE_RESULT(x) ns_file_convert_result((PRInt32)x)
nsresult ns_file_convert_result(PRInt32 nativeErr);
#define NS_FILE_FAILURE NS_FILE_RESULT(-1)
//========================================================================================
class NS_BASE nsAutoCString
//
// This should be in nsString.h, but the owner would not reply to my proposal. After four
// weeks, I decided to put it in here.
//
// This is a quiet little class that acts as a sort of autoptr for
// a const char*. If you used to call nsString::ToNewCString(), just
// to pass the result a parameter list, it was a nuisance having to
// call delete [] on the result after the call. Now you can say
// nsString myStr;
// ...
// f(nsAutoCString(myStr));
// where f is declared as void f(const char*); This call will
// make a temporary char* pointer on the stack and delete[] it
// when the function returns.
//========================================================================================
{
public:
NS_EXPLICIT nsAutoCString(const nsString& other) : mCString(other.ToNewCString()) {}
virtual ~nsAutoCString();
operator const char*() const { return mCString; }
operator const char*() { return mCString; }
protected:
const char* mCString;
}; // class nsAutoCString
//========================================================================================
class NS_BASE nsFileSpec
// This is whatever each platform really prefers to describe files as. Declared first
// because the other two types have an embedded nsFileSpec object.
//========================================================================================
{
public:
nsFileSpec();
NS_EXPLICIT nsFileSpec(const char* inString, PRBool inCreateDirs = PR_FALSE);
NS_EXPLICIT nsFileSpec(const nsString& inString, PRBool inCreateDirs = PR_FALSE);
NS_EXPLICIT nsFileSpec(const nsFilePath& inPath);
NS_EXPLICIT nsFileSpec(const nsFileURL& inURL);
NS_EXPLICIT nsFileSpec(const nsPersistentFileDescriptor& inURL);
nsFileSpec(const nsFileSpec& inPath);
virtual ~nsFileSpec();
void operator = (const char* inPath);
void operator = (const nsString& inPath)
{
const nsAutoCString path(inPath);
*this = path;
}
void operator = (const nsFilePath& inPath);
void operator = (const nsFileURL& inURL);
void operator = (const nsFileSpec& inOther);
void operator = (const nsPersistentFileDescriptor& inOther);
PRBool operator ==(const nsFileSpec& inOther) const;
PRBool operator !=(const nsFileSpec& inOther) const;
operator const char* () const { return GetCString(); }
// Same as GetCString (please read the comments).
const char* GetCString() const;
// This is the only conversion to const char*
// that is provided, and it allows the
// path to be "passed" to legacy code. This practice
// is VERY EVIL and should only be used to support legacy
// code. Using it guarantees bugs on Macintosh.
// The path is cached and freed by the nsFileSpec destructor
// so do not delete (or free) it.
#ifdef XP_MAC
// For Macintosh people, this is meant to be useful in its own right as a C++ version
// of the FSSpec struct.
nsFileSpec(
short vRefNum,
long parID,
ConstStr255Param name);
nsFileSpec(const FSSpec& inSpec)
: mSpec(inSpec), mError(NS_OK), mPath(nsnull) {}
void operator = (const FSSpec& inSpec)
{ mSpec = inSpec; mError = NS_OK; }
operator FSSpec* () { return &mSpec; }
operator const FSSpec* const () { return &mSpec; }
operator FSSpec& () { return mSpec; }
operator const FSSpec& () const { return mSpec; }
const FSSpec& GetFSSpec() const { return mSpec; }
FSSpec& GetFSSpec() { return mSpec; }
ConstFSSpecPtr GetFSSpecPtr() const { return &mSpec; }
FSSpecPtr GetFSSpecPtr() { return &mSpec; }
void MakeAliasSafe();
// Called for the spec of an alias. Copies the alias to
// a secret temp directory and modifies the spec to point
// to it. Sets mError.
void ResolveAlias(PRBool& wasAliased);
// Called for the spec of an alias. Modifies the spec to
// point to the original. Sets mError.
void MakeUnique(ConstStr255Param inSuggestedLeafName);
StringPtr GetLeafPName() { return mSpec.name; }
ConstStr255Param GetLeafPName() const { return mSpec.name; }
#endif // end of Macintosh utility methods.
PRBool Valid() const { return NS_SUCCEEDED(Error()); }
nsresult Error() const
{
#ifndef XP_MAC
if (!mPath && NS_SUCCEEDED(mError))
((nsFileSpec*)this)->mError = NS_FILE_FAILURE;
#endif
return mError;
}
PRBool Failed() const { return NS_FAILED(Error()); }
friend NS_BASE nsOutputStream& operator << (
nsOutputStream& s,
const nsFileSpec& spec); // THIS IS FOR DEBUGGING ONLY.
// see PersistentFileDescriptor for the real deal.
//--------------------------------------------------
// Queries and path algebra. These do not modify the disk.
//--------------------------------------------------
char* GetLeafName() const; // Allocated. Use delete [].
void SetLeafName(const char* inLeafName);
// inLeafName can be a relative path, so this allows
// one kind of concatenation of "paths".
void SetLeafName(const nsString& inLeafName)
{
const nsAutoCString leafName(inLeafName);
SetLeafName(leafName);
}
void GetParent(nsFileSpec& outSpec) const;
// Return the filespec of the parent directory. Used
// in conjunction with GetLeafName(), this lets you
// parse a path into a list of node names. Beware,
// however, that the top node is still not a name,
// but a spec. Volumes on Macintosh can have identical
// names. Perhaps could be used for an operator --() ?
typedef PRUint32 TimeStamp; // ie nsFileSpec::TimeStamp. This is 32 bits now,
// but might change, eg, to a 64-bit class. So use the
// typedef, and use a streaming operator to convert
// to a string, so that your code won't break. It's
// none of your business what the number means. Don't
// rely on the implementation.
void GetModDate(TimeStamp& outStamp) const;
// This will return different values on different
// platforms, even for the same file (eg, on a server).
// But if the platform is constant, it will increase after
// every file modification.
PRBool ModDateChanged(const TimeStamp& oldStamp) const
{
TimeStamp newStamp;
GetModDate(newStamp);
return newStamp != oldStamp;
}
PRUint32 GetFileSize() const;
PRUint32 GetDiskSpaceAvailable() const;
nsFileSpec operator + (const char* inRelativePath) const;
nsFileSpec operator + (const nsString& inRelativePath) const
{
const nsAutoCString
relativePath(inRelativePath);
return *this + relativePath;
}
void operator += (const char* inRelativePath);
// Concatenate the relative path to this directory.
// Used for constructing the filespec of a descendant.
// This must be a directory for this to work. This differs
// from SetLeafName(), since the latter will work
// starting with a sibling of the directory and throws
// away its leaf information, whereas this one assumes
// this is a directory, and the relative path starts
// "below" this.
void operator += (const nsString& inRelativePath)
{
const nsAutoCString relativePath(inRelativePath);
*this += relativePath;
}
void MakeUnique();
void MakeUnique(const char* inSuggestedLeafName);
void MakeUnique(const nsString& inSuggestedLeafName)
{
const nsAutoCString suggestedLeafName(inSuggestedLeafName);
MakeUnique(suggestedLeafName);
}
PRBool IsDirectory() const;
// More stringent than Exists()
PRBool IsFile() const;
// More stringent than Exists()
PRBool Exists() const;
//--------------------------------------------------
// Creation and deletion of objects. These can modify the disk.
//--------------------------------------------------
void CreateDirectory(int mode = 0700 /* for unix */);
void Delete(PRBool inRecursive) const;
nsresult Rename(const char* inNewName); // not const: gets updated
nsresult Rename(const nsString& inNewName)
{
const nsAutoCString newName(inNewName);
return Rename(newName);
}
nsresult Copy(const nsFileSpec& inNewParentDirectory) const;
nsresult Move(const nsFileSpec& inNewParentDirectory) const;
nsresult Execute(const char* args) const;
nsresult Execute(const nsString& args) const
{
const nsAutoCString argsString(args);
return Execute(argsString);
}
protected:
#ifdef XP_MAC
OSErr GetCatInfo(CInfoPBRec& outInfo) const;
#endif
//--------------------------------------------------
// Data
//--------------------------------------------------
protected:
friend class nsFilePath;
friend class nsFileURL;
friend class nsDirectoryIterator;
#ifdef XP_MAC
FSSpec mSpec;
#endif
char* mPath;
nsresult mError;
}; // class nsFileSpec
// FOR HISTORICAL REASONS:
typedef nsFileSpec nsNativeFileSpec;
//========================================================================================
class NS_BASE nsFileURL
// This is an escaped string that looks like "file:///foo/bar/mumble%20fish". Since URLs
// are the standard way of doing things in mozilla, this allows a string constructor,
// which just stashes the string with no conversion.
//========================================================================================
{
public:
nsFileURL(const nsFileURL& inURL);
NS_EXPLICIT nsFileURL(const char* inString, PRBool inCreateDirs = PR_FALSE);
NS_EXPLICIT nsFileURL(const nsString& inString, PRBool inCreateDirs = PR_FALSE);
NS_EXPLICIT nsFileURL(const nsFilePath& inPath);
NS_EXPLICIT nsFileURL(const nsFileSpec& inPath);
virtual ~nsFileURL();
// nsString GetString() const { return mPath; }
// may be needed for implementation reasons,
// but should not provide a conversion constructor.
void operator = (const nsFileURL& inURL);
void operator = (const char* inString);
void operator = (const nsString& inString)
{
const nsAutoCString string(inString);
*this = string;
}
void operator = (const nsFilePath& inOther);
void operator = (const nsFileSpec& inOther);
operator const char* () const { return mURL; } // deprecated.
const char* GetAsString() const { return mURL; }
friend NS_BASE nsOutputStream& operator << (
nsOutputStream& s, const nsFileURL& spec);
#ifdef XP_MAC
// Accessor to allow quick assignment to a mFileSpec
const nsFileSpec& GetFileSpec() const { return mFileSpec; }
#endif
private:
// Should not be defined (only nsFilePath is to be treated as strings.
operator char* ();
protected:
friend class nsFilePath; // to allow construction of nsFilePath
char* mURL;
#ifdef XP_MAC
// Since the path on the macintosh does not uniquely specify a file (volumes
// can have the same name), stash the secret nsFileSpec, too.
nsFileSpec mFileSpec;
#endif
}; // class nsFileURL
//========================================================================================
class NS_BASE nsFilePath
// This is a string that looks like "/foo/bar/mumble fish". Same as nsFileURL, but
// without the "file:// prefix", and NOT %20 ENCODED! Strings passed in must be
// valid unix-style paths in this format.
//========================================================================================
{
public:
nsFilePath(const nsFilePath& inPath);
NS_EXPLICIT nsFilePath(const char* inString, PRBool inCreateDirs = PR_FALSE);
NS_EXPLICIT nsFilePath(const nsString& inString, PRBool inCreateDirs = PR_FALSE);
NS_EXPLICIT nsFilePath(const nsFileURL& inURL);
NS_EXPLICIT nsFilePath(const nsFileSpec& inPath);
virtual ~nsFilePath();
operator const char* () const { return mPath; }
// This is the only automatic conversion to const char*
// that is provided, and it allows the
// path to be "passed" to NSPR file routines.
operator char* () { return mPath; }
// This is the only automatic conversion to string
// that is provided, because a naked string should
// only mean a standard file path.
void operator = (const nsFilePath& inPath);
void operator = (const char* inString);
void operator = (const nsString& inString)
{
const nsAutoCString string(inString);
*this = string;
}
void operator = (const nsFileURL& inURL);
void operator = (const nsFileSpec& inOther);
#ifdef XP_MAC
public:
// Accessor to allow quick assignment to a mFileSpec
const nsFileSpec& GetFileSpec() const { return mFileSpec; }
#endif
private:
char* mPath;
#ifdef XP_MAC
// Since the path on the macintosh does not uniquely specify a file (volumes
// can have the same name), stash the secret nsFileSpec, too.
nsFileSpec mFileSpec;
#endif
}; // class nsFilePath
//========================================================================================
class NS_BASE nsPersistentFileDescriptor
// To save information about a file's location in another file, initialize
// one of these from your nsFileSpec, and then write this out to your output stream.
// To retrieve the info, create one of these, read its value from an input stream.
// and then make an nsFileSpec from it.
//========================================================================================
{
public:
nsPersistentFileDescriptor() : mDescriptorString(nsnull) {}
// For use prior to reading in from a stream
nsPersistentFileDescriptor(const nsPersistentFileDescriptor& inPath);
virtual ~nsPersistentFileDescriptor();
void operator = (const nsPersistentFileDescriptor& inPath);
// Conversions
NS_EXPLICIT nsPersistentFileDescriptor(const nsFileSpec& inPath);
void operator = (const nsFileSpec& inPath);
nsresult Read(nsIInputStream* aStream);
nsresult Write(nsIOutputStream* aStream);
// writes the data to a file
friend NS_BASE nsInputStream& operator >> (nsInputStream&, nsPersistentFileDescriptor&);
// reads the data from a file
friend NS_BASE nsOutputStream& operator << (nsOutputStream&, const nsPersistentFileDescriptor&);
// writes the data to a file
friend class nsFileSpec;
private:
// Here are the ways to get data in and out of a file.
void GetData(void*& outData, PRInt32& outSize) const;
// DON'T FREE the returned data!
void SetData(const void* inData, PRInt32 inSize);
protected:
char* mDescriptorString;
}; // class nsPersistentFileDescriptor
//========================================================================================
class NS_BASE nsDirectoryIterator
// Example:
//
// nsFileSpec parentDir(...); // directory over whose children we shall iterate
// for (nsDirectoryIterator i(parentDir); i; i++)
// {
// // do something with (const nsFileSpec&)i
// }
//
// or:
//
// for (nsDirectoryIterator i(parentDir, PR_FALSE); i; i--)
// {
// // do something with (const nsFileSpec&)i
// }
//
// Currently, the only platform on which backwards iteration actually goes backwards
// is Macintosh. On other platforms, both styles will work, but will go forwards.
//========================================================================================
{
public:
nsDirectoryIterator(
const nsFileSpec& parent,
int iterateDirection = +1);
#ifndef XP_MAC
// Macintosh currently doesn't allocate, so needn't clean up.
virtual ~nsDirectoryIterator();
#endif
PRBool Exists() const { return mExists; }
nsDirectoryIterator& operator ++(); // moves to the next item, if any.
nsDirectoryIterator& operator ++(int) { return ++(*this); } // post-increment.
nsDirectoryIterator& operator --(); // moves to the previous item, if any.
nsDirectoryIterator& operator --(int) { return --(*this); } // post-decrement.
operator nsFileSpec&() { return mCurrent; }
private:
nsFileSpec mCurrent;
PRBool mExists;
#if defined(XP_UNIX)
DIR* mDir;
#elif defined(XP_PC)
PRDir* mDir; // XXX why not use PRDir for Unix & Mac, too?
#elif defined(XP_MAC)
OSErr SetToIndex();
short mIndex;
short mMaxIndex;
#endif
}; // class nsDirectoryIterator
#endif // _FILESPEC_H_

View File

@@ -0,0 +1,743 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0(the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright(C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
// First checked in on 98/11/20 by John R. McMullen in the wrong directory.
// Checked in again 98/12/04.
// Polished version 98/12/08.
// Completely rewritten to integrate with nsIInputStream and nsIOutputStream (the
// xpcom stream objects.
//========================================================================================
//
// Classes defined:
//
// nsInputStream, nsOutputStream
// These are the lightweight STATICALLY LINKED wrappers for
// the xpcom objects nsIInputStream and nsIOutputstream.
// Possible uses:
// If you are implementing a function that accepts one of these xpcom
// streams, just make one of these little jobbies on the stack, and
// the handy << or >> notation can be yours.
//
// nsInputFileStream, nsOutputFileStream
// These are the STATICALLY LINKED wrappers for the file-related
// versions of the above.
// nsIOFileStream
// An input and output file stream attached to the same file.
//
// This suite provide the following services:
//
// 1. Encapsulates all platform-specific file details, so that file i/o
// can be done correctly without any platform #ifdefs
//
// 2. Uses NSPR file services (NOT ansi file I/O), in order to get best
// native performance. This performance difference is especially large on
// macintosh.
//
// 3. Allows all the power of the ansi stream syntax.
//
// Basic example:
//
// nsFileSpec myPath("/Development/iotest.txt");
//
// nsOutputFileStream testStream(myPath);
// testStream << "Hello World" << nsEndl;
//
// 4. Requires streams to be constructed using typesafe nsFileSpec specifier
// (not the notorious and bug prone const char*), namely nsFileSpec. See
// nsFileSpec.h for more details.
//
// 5. Fixes a bug that have been there for a long time, and
// is inevitable if you use NSPR alone:
//
// The problem on platforms (Macintosh) in which a path does not fully
// specify a file, because two volumes can have the same name.
//
// Not yet provided:
//
// Endian-awareness for reading and writing crossplatform binary files. At this
// time there seems to be no demand for this.
//
//========================================================================================
#ifndef _FILESTREAM_H_
#define _FILESTREAM_H_
#include "nscore.h"
#ifdef XP_MAC
#include "pprio.h" // To get PR_ImportFile
#else
#include "prio.h"
#endif
#include "nsCOMPtr.h"
#include "nsIFileStream.h"
// Defined elsewhere
class nsFileSpec;
class nsString;
class nsIInputStream;
class nsIOutputStream;
//========================================================================================
// Compiler-specific macros, as needed
//========================================================================================
#if !defined(NS_USING_NAMESPACE) && (defined(__MWERKS__) || defined(XP_PC))
#define NS_USING_NAMESPACE
#endif
#if !defined(NS_USING_STL) && (defined(__MWERKS__) || defined(XP_PC))
#define NS_USING_STL
#endif
#ifdef NS_USING_NAMESPACE
#define NS_NAMESPACE_PROTOTYPE
#define NS_NAMESPACE namespace
#define NS_NAMESPACE_END
#else
#define NS_NAMESPACE_PROTOTYPE static
#define NS_NAMESPACE struct
#define NS_NAMESPACE_END ;
#endif // NS_USING_NAMESPACE
#ifndef XP_MAC
// PR_STDOUT and PR_STDIN are fatal on Macintosh. So for console i/o, we must use the std
// stream stuff instead. However, we have to require that cout and cin are passed in
// to the constructor because in the current build, there is a copy in the base.shlb,
// and another in the caller's file. Passing it in as a parameter ensures that the
// caller and this library are using the same global object. Groan.
//
// Unix currently does not support iostreams at all. Their compilers do not support
// ANSI C++, or even ARM C++.
//
// Windows supports them, but only if you turn on the -GX compile flag, to support
// exceptions.
// Catch 22.
#define NS_USE_PR_STDIO
#endif
#ifdef NS_USE_PR_STDIO
class istream;
class ostream;
#define CONSOLE_IN 0
#define CONSOLE_OUT 0
#else
#include <iostream>
using std::istream;
using std::ostream;
#define CONSOLE_IN &std::cin
#define CONSOLE_OUT &std::cout
#endif
//=========================== End Compiler-specific macros ===============================
//========================================================================================
class NS_BASE nsInputStream
// This is a convenience class, for use on the STACK ("new" junkies: get detoxed first).
// Given a COM-style stream, this allows you to use the >> operators. It also acquires and
// reference counts its stream.
// Please read the comments at the top of this file
//========================================================================================
{
public:
nsInputStream(nsIInputStream* inStream)
: mInputStream(do_QueryInterface(inStream))
, mEOF(PR_FALSE)
{}
virtual ~nsInputStream();
nsCOMPtr<nsIInputStream> GetIStream() const
{
return mInputStream;
}
char eof() const { return get_at_eof(); }
char get();
void close()
{
mInputStream->Close();
}
PRInt32 read(void* s, PRInt32 n);
// Input streamers. Add more as needed (int&, unsigned int& etc). (but you have to
// add delegators to the derived classes, too, because these operators don't inherit).
nsInputStream& operator >> (char& ch);
// Support manipulators
nsInputStream& operator >> (nsInputStream& (*pf)(nsInputStream&))
{
return pf(*this);
}
protected:
// These certainly need to be overridden, they give the best shot we can at detecting
// eof in a simple nsIInputStream.
virtual void set_at_eof(PRBool atEnd)
{
mEOF = atEnd;
}
virtual PRBool get_at_eof() const
{
return mEOF;
}
private:
nsInputStream& operator >> (char* buf); // TOO DANGEROUS. DON'T DEFINE.
// DATA
protected:
nsCOMPtr<nsIInputStream> mInputStream;
PRBool mEOF;
}; // class nsInputStream
typedef nsInputStream nsBasicInStream; // historic support for this name
//========================================================================================
class NS_BASE nsOutputStream
// This is a convenience class, for use on the STACK ("new" junkies, get detoxed first).
// Given a COM-style stream, this allows you to use the << operators. It also acquires and
// reference counts its stream.
// Please read the comments at the top of this file
//========================================================================================
{
public:
nsOutputStream() {}
nsOutputStream(nsIOutputStream* inStream)
: mOutputStream(do_QueryInterface(inStream))
{}
virtual ~nsOutputStream();
nsCOMPtr<nsIOutputStream> GetIStream() const
{
return mOutputStream;
}
void close()
{
mOutputStream->Close();
}
void put(char c);
PRInt32 write(const void* s, PRInt32 n);
virtual void flush();
// Output streamers. Add more as needed (but you have to add delegators to the derived
// classes, too, because these operators don't inherit).
nsOutputStream& operator << (const char* buf);
nsOutputStream& operator << (char ch);
nsOutputStream& operator << (short val);
nsOutputStream& operator << (unsigned short val);
nsOutputStream& operator << (long val);
nsOutputStream& operator << (unsigned long val);
nsOutputStream& operator << (int val);
nsOutputStream& operator << (unsigned int val);
// Support manipulators
nsOutputStream& operator << (nsOutputStream& (*pf)(nsOutputStream&))
{
return pf(*this);
}
// DATA
protected:
nsCOMPtr<nsIOutputStream> mOutputStream;
}; // class nsOutputStream
typedef nsOutputStream nsBasicOutStream; // Historic support for this name
//========================================================================================
class NS_BASE nsErrorProne
// Common (virtual) base class for remembering errors on demand
//========================================================================================
{
public:
nsErrorProne() // for delayed opening
: mResult(NS_OK)
{
}
PRBool failed() const
{
return NS_FAILED(mResult);
}
// DATA
protected:
nsresult mResult;
}; // class nsErrorProne
//========================================================================================
class NS_BASE nsFileClient
// Because COM does not allow us to write functions which return a boolean value etc,
// this class is here to take care of the tedious "declare variable then call with
// the address of the variable" chores.
//========================================================================================
: public virtual nsErrorProne
{
public:
nsFileClient(const nsCOMPtr<nsIFile>& inFile)
: mFile(do_QueryInterface(inFile))
{
}
virtual ~nsFileClient() {}
void open(
const nsFileSpec& inFile,
int nsprMode,
PRIntn accessMode)
{
if (mFile)
mResult = mFile->Open(inFile, nsprMode, accessMode);
}
PRBool is_open() const
{
PRBool result = PR_FALSE;
if (mFile)
mFile->GetIsOpen(&result);
return result;
}
PRBool is_file() const
{
return mFile ? PR_TRUE : PR_FALSE;
}
protected:
nsFileClient() // for delayed opening
{
}
// DATA
protected:
nsCOMPtr<nsIFile> mFile;
}; // class nsFileClient
//========================================================================================
class NS_BASE nsRandomAccessStoreClient
// Because COM does not allow us to write functions which return a boolean value etc,
// this class is here to take care of the tedious "declare variable then call with
// the address of the variable" chores.
//========================================================================================
: public virtual nsErrorProne
{
public:
nsRandomAccessStoreClient() // for delayed opening
{
}
nsRandomAccessStoreClient(const nsCOMPtr<nsIRandomAccessStore>& inStore)
: mStore(do_QueryInterface(inStore))
{
}
virtual ~nsRandomAccessStoreClient() {}
void seek(PRInt32 offset)
{
seek(PR_SEEK_SET, offset);
}
void seek(PRSeekWhence whence, PRInt32 offset)
{
set_at_eof(PR_FALSE);
if (mStore)
mResult = mStore->Seek(whence, offset);
}
PRIntn tell()
{
PRIntn result = -1;
if (mStore)
mResult = mStore->Tell(&result);
return result;
}
protected:
virtual PRBool get_at_eof() const
{
PRBool result = PR_TRUE;
if (mStore)
mStore->GetAtEOF(&result);
return result;
}
virtual void set_at_eof(PRBool atEnd)
{
if (mStore)
mStore->SetAtEOF(atEnd);
}
// DATA
protected:
nsCOMPtr<nsIRandomAccessStore> mStore;
}; // class nsRandomAccessStoreClient
//========================================================================================
class NS_BASE nsRandomAccessInputStream
// Please read the comments at the top of this file
//========================================================================================
: public nsRandomAccessStoreClient
, public nsInputStream
{
public:
nsRandomAccessInputStream(nsIInputStream* inStream)
: nsRandomAccessStoreClient(do_QueryInterface(inStream))
, nsInputStream(inStream)
{
}
PRBool readline(char* s, PRInt32 n);
// Result always null-terminated.
// Check eof() before each call.
// CAUTION: false result only indicates line was truncated
// to fit buffer, or an error occurred (OTHER THAN eof).
// Input streamers. Unfortunately, they don't inherit!
nsInputStream& operator >> (char& ch)
{ return nsInputStream::operator >>(ch); }
nsInputStream& operator >> (nsInputStream& (*pf)(nsInputStream&))
{ return nsInputStream::operator >>(pf); }
protected:
nsRandomAccessInputStream()
: nsInputStream(nsnull)
{
}
virtual PRBool get_at_eof() const
{
return nsRandomAccessStoreClient::get_at_eof();
}
virtual void set_at_eof(PRBool atEnd)
{
nsRandomAccessStoreClient::set_at_eof(atEnd);
}
}; // class nsRandomAccessInputStream
//========================================================================================
class NS_BASE nsInputStringStream
//========================================================================================
: public nsRandomAccessInputStream
{
public:
nsInputStringStream(const char* stringToRead);
nsInputStringStream(const nsString& stringToRead);
// Input streamers. Unfortunately, they don't inherit!
nsInputStream& operator >> (char& ch)
{ return nsInputStream::operator >>(ch); }
nsInputStream& operator >> (nsInputStream& (*pf)(nsInputStream&))
{ return nsInputStream::operator >>(pf); }
}; // class nsInputStringStream
//========================================================================================
class NS_BASE nsInputFileStream
// Please read the comments at the top of this file
//========================================================================================
: public nsRandomAccessInputStream
, public nsFileClient
{
public:
enum { kDefaultMode = PR_RDONLY };
nsInputFileStream(nsIInputStream* inStream)
: nsRandomAccessInputStream(inStream)
, nsFileClient(do_QueryInterface(inStream))
, mFileInputStream(do_QueryInterface(inStream))
{
}
nsInputFileStream(
const nsFileSpec& inFile,
int nsprMode = kDefaultMode,
PRIntn accessMode = 00700); // <- OCTAL
void Open(
const nsFileSpec& inFile,
int nsprMode = kDefaultMode,
PRIntn accessMode = 00700) // <- OCTAL
{
if (mFile)
mFile->Open(inFile, nsprMode, accessMode);
}
// Input streamers. Unfortunately, they don't inherit!
nsInputStream& operator >> (char& ch)
{ return nsInputStream::operator >>(ch); }
nsInputStream& operator >> (nsInputStream& (*pf)(nsInputStream&))
{ return nsInputStream::operator >>(pf); }
// DATA
protected:
nsCOMPtr<nsIFileInputStream> mFileInputStream;
}; // class nsInputFileStream
//========================================================================================
class NS_BASE nsRandomAccessOutputStream
// Please read the comments at the top of this file
//========================================================================================
: public nsRandomAccessStoreClient
, public nsOutputStream
{
public:
nsRandomAccessOutputStream(nsIOutputStream* inStream)
: nsRandomAccessStoreClient(do_QueryInterface(inStream))
, nsOutputStream(inStream)
{
}
// Output streamers. Unfortunately, they don't inherit!
nsOutputStream& operator << (const char* buf)
{ return nsOutputStream::operator << (buf); }
nsOutputStream& operator << (char ch)
{ return nsOutputStream::operator << (ch); }
nsOutputStream& operator << (short val)
{ return nsOutputStream::operator << (val); }
nsOutputStream& operator << (unsigned short val)
{ return nsOutputStream::operator << (val); }
nsOutputStream& operator << (long val)
{ return nsOutputStream::operator << (val); }
nsOutputStream& operator << (unsigned long val)
{ return nsOutputStream::operator << (val); }
nsOutputStream& operator << (int val)
{ return nsOutputStream::operator << (val); }
nsOutputStream& operator << (unsigned int val)
{ return nsOutputStream::operator << (val); }
nsOutputStream& operator << (nsOutputStream& (*pf)(nsOutputStream&))
{ return nsOutputStream::operator << (pf); }
protected:
nsRandomAccessOutputStream()
: nsOutputStream(nsnull)
{
}
}; // class nsRandomAccessOutputStream
//========================================================================================
class NS_BASE nsOutputStringStream
//========================================================================================
: public nsRandomAccessOutputStream
{
public:
nsOutputStringStream(char*& stringToChange);
nsOutputStringStream(nsString& stringToChange);
// Output streamers. Unfortunately, they don't inherit!
nsOutputStream& operator << (const char* buf)
{ return nsOutputStream::operator << (buf); }
nsOutputStream& operator << (char ch)
{ return nsOutputStream::operator << (ch); }
nsOutputStream& operator << (short val)
{ return nsOutputStream::operator << (val); }
nsOutputStream& operator << (unsigned short val)
{ return nsOutputStream::operator << (val); }
nsOutputStream& operator << (long val)
{ return nsOutputStream::operator << (val); }
nsOutputStream& operator << (unsigned long val)
{ return nsOutputStream::operator << (val); }
nsOutputStream& operator << (int val)
{ return nsOutputStream::operator << (val); }
nsOutputStream& operator << (unsigned int val)
{ return nsOutputStream::operator << (val); }
nsOutputStream& operator << (nsOutputStream& (*pf)(nsOutputStream&))
{ return nsOutputStream::operator << (pf); }
}; // class nsOutputStringStream
//========================================================================================
class NS_BASE nsOutputFileStream
// Please read the comments at the top of this file
//========================================================================================
: public nsRandomAccessOutputStream
, public nsFileClient
{
public:
enum { kDefaultMode = (PR_WRONLY | PR_CREATE_FILE | PR_TRUNCATE) };
nsOutputFileStream() {}
nsOutputFileStream(
const nsFileSpec& inFile,
int nsprMode = kDefaultMode,
PRIntn accessMode = 00700) // <- OCTAL
{
nsISupports* stream;
if (NS_FAILED(NS_NewIOFileStream(
&stream,
inFile, nsprMode, accessMode)))
return;
mFile = nsQueryInterface(stream);
mOutputStream = nsQueryInterface(stream);
mStore = nsQueryInterface(stream);
mFileOutputStream = nsQueryInterface(stream);
NS_RELEASE(stream);
}
virtual void flush();
// Output streamers. Unfortunately, they don't inherit!
nsOutputStream& operator << (const char* buf)
{ return nsOutputStream::operator << (buf); }
nsOutputStream& operator << (char ch)
{ return nsOutputStream::operator << (ch); }
nsOutputStream& operator << (short val)
{ return nsOutputStream::operator << (val); }
nsOutputStream& operator << (unsigned short val)
{ return nsOutputStream::operator << (val); }
nsOutputStream& operator << (long val)
{ return nsOutputStream::operator << (val); }
nsOutputStream& operator << (unsigned long val)
{ return nsOutputStream::operator << (val); }
nsOutputStream& operator << (int val)
{ return nsOutputStream::operator << (val); }
nsOutputStream& operator << (unsigned int val)
{ return nsOutputStream::operator << (val); }
nsOutputStream& operator << (nsOutputStream& (*pf)(nsOutputStream&))
{ return nsOutputStream::operator << (pf); }
// DATA
protected:
nsCOMPtr<nsIFileOutputStream> mFileOutputStream;
}; // class nsOutputFileStream
//========================================================================================
class NS_BASE nsOutputConsoleStream
// Please read the comments at the top of this file
//========================================================================================
: public nsOutputFileStream
{
public:
nsOutputConsoleStream()
{
nsISupports* stream;
if (NS_FAILED(NS_NewOutputConsoleStream(&stream)))
return;
mFile = nsQueryInterface(stream);
mOutputStream = nsQueryInterface(stream);
mFileOutputStream = nsQueryInterface(stream);
NS_RELEASE(stream);
}
// Output streamers. Unfortunately, they don't inherit!
nsOutputStream& operator << (const char* buf)
{ return nsOutputStream::operator << (buf); }
nsOutputStream& operator << (char ch)
{ return nsOutputStream::operator << (ch); }
nsOutputStream& operator << (short val)
{ return nsOutputStream::operator << (val); }
nsOutputStream& operator << (unsigned short val)
{ return nsOutputStream::operator << (val); }
nsOutputStream& operator << (long val)
{ return nsOutputStream::operator << (val); }
nsOutputStream& operator << (unsigned long val)
{ return nsOutputStream::operator << (val); }
nsOutputStream& operator << (int val)
{ return nsOutputStream::operator << (val); }
nsOutputStream& operator << (unsigned int val)
{ return nsOutputStream::operator << (val); }
nsOutputStream& operator << (nsOutputStream& (*pf)(nsOutputStream&))
{ return nsOutputStream::operator << (pf); }
}; // class nsOutputConsoleStream
//========================================================================================
class NS_BASE nsIOFileStream
// Please read the comments at the top of this file
//========================================================================================
: public nsInputFileStream
, public nsOutputStream
{
public:
enum { kDefaultMode = (PR_RDWR | PR_CREATE_FILE) };
nsIOFileStream(
nsIInputStream* inInputStream
, nsIOutputStream* inOutputStream)
: nsInputFileStream(inInputStream)
, nsOutputStream(inOutputStream)
, mFileOutputStream(do_QueryInterface(inOutputStream))
{
}
nsIOFileStream(
const nsFileSpec& inFile,
int nsprMode = kDefaultMode,
PRIntn accessMode = 00700) // <- OCTAL
: nsInputFileStream(nsnull)
, nsOutputStream(nsnull)
{
nsISupports* stream;
if (NS_FAILED(NS_NewIOFileStream(
&stream,
inFile, nsprMode, accessMode)))
return;
mFile = nsQueryInterface(stream);
mStore = nsQueryInterface(stream);
mInputStream = nsQueryInterface(stream);
mOutputStream = nsQueryInterface(stream);
mFileInputStream = nsQueryInterface(stream);
mFileOutputStream = nsQueryInterface(stream);
NS_RELEASE(stream);
}
virtual void close()
{
// Doesn't matter which of the two we close:
// they're hooked up to the same file.
nsInputFileStream::close();
}
// Output streamers. Unfortunately, they don't inherit!
nsOutputStream& operator << (const char* buf)
{ return nsOutputStream::operator << (buf); }
nsOutputStream& operator << (char ch)
{ return nsOutputStream::operator << (ch); }
nsOutputStream& operator << (short val)
{ return nsOutputStream::operator << (val); }
nsOutputStream& operator << (unsigned short val)
{ return nsOutputStream::operator << (val); }
nsOutputStream& operator << (long val)
{ return nsOutputStream::operator << (val); }
nsOutputStream& operator << (unsigned long val)
{ return nsOutputStream::operator << (val); }
nsOutputStream& operator << (int val)
{ return nsOutputStream::operator << (val); }
nsOutputStream& operator << (unsigned int val)
{ return nsOutputStream::operator << (val); }
nsOutputStream& operator << (nsOutputStream& (*pf)(nsOutputStream&))
{ return nsOutputStream::operator << (pf); }
// Input streamers. Unfortunately, they don't inherit!
nsInputStream& operator >> (char& ch)
{ return nsInputStream::operator >>(ch); }
nsInputStream& operator >> (nsInputStream& (*pf)(nsInputStream&))
{ return nsInputStream::operator >>(pf); }
// DATA
protected:
nsCOMPtr<nsIFileOutputStream> mFileOutputStream;
}; // class nsIOFileStream
//========================================================================================
// Manipulators
//========================================================================================
NS_BASE nsOutputStream& nsEndl(nsOutputStream& os); // outputs and FLUSHES.
#endif /* _FILESTREAM_H_ */

View File

@@ -0,0 +1,147 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#ifndef nsIFileStream_h___
#define nsIFileStream_h___
#include "nsIInputStream.h"
#include "nsIOutputStream.h"
#include "prio.h"
class nsFileSpec;
/* a6cf90e8-15b3-11d2-932e-00805f8add32 */
#define NS_IFILE_IID \
{ 0xa6cf90e8, 0x15b3, 0x11d2, \
{0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }
//========================================================================================
class nsIFile
// Represents a file, and supports Open.
//========================================================================================
: public nsISupports
{
public:
static const nsIID& GetIID() { static nsIID iid = NS_IFILE_IID; return iid; }
NS_IMETHOD Open(
const nsFileSpec& inFile,
int nsprMode,
PRIntn accessMode) = 0;
// Note: Open() is only needed after
// an explicit Close(). All file streams
// are automatically opened on construction.
NS_IMETHOD GetIsOpen(PRBool* outOpen) = 0;
}; // class nsIFile
/* a6cf90e8-15b3-11d2-932e-00805f8add32 */
#define NS_IRANDOMACCESS_IID \
{ 0xa6cf90eb, 0x15b3, 0x11d2, \
{0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }
//========================================================================================
class nsIRandomAccessStore
// Supports Seek, Tell etc.
//========================================================================================
: public nsISupports
{
public:
static const nsIID& GetIID() { static nsIID iid = NS_IRANDOMACCESS_IID; return iid; }
NS_IMETHOD Seek(PRSeekWhence whence, PRInt32 offset) = 0;
NS_IMETHOD Tell(PRIntn* outWhere) = 0;
/* "PROTECTED" */
NS_IMETHOD GetAtEOF(PRBool* outAtEOF) = 0;
NS_IMETHOD SetAtEOF(PRBool inAtEOF) = 0;
}; // class nsIRandomAccessStore
/* a6cf90e6-15b3-11d2-932e-00805f8add32 */
#define NS_IFILEINPUTSTREAM_IID \
{ 0xa6cf90e6, 0x15b3, 0x11d2, \
{0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }
//========================================================================================
class nsIFileInputStream
// These are additional file-specific methods that files have, above what
// nsIInputStream supports. The current implementation supports both
// interfaces.
//========================================================================================
: public nsIInputStream
{
public:
static const nsIID& GetIID() { static nsIID iid = NS_IFILEINPUTSTREAM_IID; return iid; }
}; // class nsIFileInputStream
/* a6cf90e7-15b3-11d2-932e-00805f8add32 */
#define NS_IFILEOUTPUTSTREAM_IID \
{ 0xa6cf90e7, 0x15b3, 0x11d2, \
{0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }
//========================================================================================
class nsIFileOutputStream
// These are additional file-specific methods that files have, above what
// nsIOutputStream supports. The current implementation supports both
// interfaces.
//========================================================================================
: public nsIOutputStream
{
public:
static const nsIID& GetIID() { static nsIID iid = NS_IFILEOUTPUTSTREAM_IID; return iid; }
NS_IMETHOD Flush() = 0;
// Forces a write to disk.
}; // class nsIFileOutputStream
//----------------------------------------------------------------------------------------
extern "C" NS_BASE nsresult NS_NewTypicalInputFileStream(
nsISupports** aStreamResult,
const nsFileSpec& inFile
/*Default nsprMode == PR_RDONLY*/
/*Default accessmode = 0700 (octal)*/);
// Factory method to get an nsInputStream from a file, using most common options
//----------------------------------------------------------------------------------------
extern "C" NS_BASE nsresult NS_NewOutputConsoleStream(
nsISupports** aStreamResult);
// Factory method to get an nsOutputStream to the console.
//----------------------------------------------------------------------------------------
extern "C" NS_BASE nsresult NS_NewTypicalOutputFileStream(
nsISupports** aStreamResult, // will implement all the above interfaces
const nsFileSpec& inFile
/*default nsprMode= (PR_WRONLY | PR_CREATE_FILE | PR_TRUNCATE)*/
/*Default accessMode= 0700 (octal)*/);
// Factory method to get an nsOutputStream to a file - most common case.
//----------------------------------------------------------------------------------------
extern "C" NS_BASE nsresult NS_NewTypicalIOFileStream(
nsISupports** aStreamResult, // will implement all the above interfaces
const nsFileSpec& inFile
/*default nsprMode = (PR_RDWR | PR_CREATE_FILE)*/
/*Default accessMode = 0700 (octal)*/);
// Factory method to get an object that implements both nsIInputStream
// and nsIOutputStream, associated with a single file.
//----------------------------------------------------------------------------------------
extern "C" NS_BASE nsresult NS_NewIOFileStream(
nsISupports** aStreamResult, // will implement all the above interfaces
const nsFileSpec& inFile,
PRInt32 nsprMode,
PRInt32 accessMode);
// Factory method to get an object that implements both nsIInputStream
// and nsIOutputStream, associated with a single file.
#endif /* nsIFileStream_h___ */

View File

@@ -0,0 +1,48 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#ifndef nsIProperties_h___
#define nsIProperties_h___
#include "nsID.h"
#include "nsIInputStream.h"
#include "nsIOutputStream.h"
#include "nsISupports.h"
#include "nsString.h"
// {1A180F60-93B2-11d2-9B8B-00805F8A16D9}
#define NS_IPROPERTIES_IID \
{ 0x1a180f60, 0x93b2, 0x11d2, \
{ 0x9b, 0x8b, 0x0, 0x80, 0x5f, 0x8a, 0x16, 0xd9 } }
// {2245E573-9464-11d2-9B8B-00805F8A16D9}
NS_DECLARE_ID(kPropertiesCID,
0x2245e573, 0x9464, 0x11d2, 0x9b, 0x8b, 0x0, 0x80, 0x5f, 0x8a, 0x16, 0xd9);
class nsIProperties : public nsISupports
{
public:
NS_IMETHOD Load(nsIInputStream* aIn) = 0;
NS_IMETHOD GetProperty(const nsString& aKey, nsString& aValue) = 0;
NS_IMETHOD SetProperty(const nsString& aKey, nsString& aNewValue,
nsString& aOldValue) = 0;
NS_IMETHOD Save(nsIOutputStream* aOut, const nsString& aHeader) = 0;
NS_IMETHOD Subclass(nsIProperties* aSubclass) = 0;
};
#endif /* nsIProperties_h___ */

View File

@@ -0,0 +1,66 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#ifndef nsISizeOfHandler_h___
#define nsISizeOfHandler_h___
#include "nscore.h"
#include "nsISupports.h"
/* c028d1f0-fc9e-11d1-89e4-006008911b81 */
#define NS_ISIZEOF_HANDLER_IID \
{ 0xc028d1f0, 0xfc9e, 0x11d1, {0x89, 0xe4, 0x00, 0x60, 0x08, 0x91, 0x1b, 0x81}}
/**
* An API to managing a sizeof computation of an arbitrary graph.
* The handler is responsible for remembering which objects have been
* seen before. Note that the handler doesn't hold references to
* nsISupport's objects; the assumption is that the objects being
* sized are stationary and will not be modified during the sizing
* computation and therefore do not need an extra reference count.
*/
class nsISizeOfHandler : public nsISupports {
public:
/**
* Add in a simple size value to the running total.
* Always returns NS_OK.
*/
NS_IMETHOD Add(size_t aSize) = 0;
/**
* Update aResult with PR_TRUE if the object has been traversed
* by the sizeof computation before. Otherwise aResult is set to
* PR_FALSE and the object is added to the internal database
* of objects that have been traversed. It's ok to pass a null
* pointer in; aResult will be set to PR_TRUE so you won't accidently
* try to traverse through null pointer.
*
* Note: This violates the COM API standard on purpose; so there!
*/
virtual PRBool HaveSeen(void* anObject) = 0;
/**
* Return the currently computed size.
* Always returns NS_OK.
*/
NS_IMETHOD GetSize(PRUint32& aResult) = 0;
};
extern NS_BASE nsresult
NS_NewSizeOfHandler(nsISizeOfHandler** aInstancePtrResult);
#endif /* nsISizeofHandler_h___ */

View File

@@ -0,0 +1,67 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#ifndef nsIStringStream_h___
#define nsIStringStream_h___
#include "nsIInputStream.h"
#include "nsIOutputStream.h"
#include "nsString.h"
//----------------------------------------------------------------------------------------
extern "C" NS_BASE nsresult NS_NewStringInputStream(
nsISupports** aStreamResult,
const nsString& aStringToRead);
// Factory method to get an nsInputStream from a string. Result will implement all the
// file stream interfaces in nsIFileStream.h
//----------------------------------------------------------------------------------------
extern "C" NS_BASE nsresult NS_NewStringOutputStream(
nsISupports** aStreamResult,
nsString& aStringToChange);
// Factory method to get an nsOutputStream from a string. Result will implement all the
// file stream interfaces in nsIFileStream.h
//----------------------------------------------------------------------------------------
extern "C" NS_BASE nsresult NS_NewCharInputStream(
nsISupports** aStreamResult,
const char* aStringToRead);
// Factory method to get an nsInputStream from a string. Result will implement all the
// file stream interfaces in nsIFileStream.h
//----------------------------------------------------------------------------------------
extern "C" NS_BASE nsresult NS_NewCharOutputStream(
nsISupports** aStreamResult,
char** aStringToChange);
// Factory method to get an nsOutputStream to a string. Result will implement all the
// file stream interfaces in nsIFileStream.h
//----------------------------------------------------------------------------------------
extern "C" NS_BASE nsresult NS_NewStringIOStream(
nsISupports** aStreamResult,
nsString& aStringToChange);
// Factory method to get an nsOutputStream to a string. Result will implement all the
// file stream interfaces in nsIFileStream.h
//----------------------------------------------------------------------------------------
extern "C" NS_BASE nsresult NS_NewCharIOStream(
nsISupports** aStreamResult,
char** aStringToChange);
// Factory method to get an nsOutputStream to a string. Result will implement all the
// file stream interfaces in nsIFileStream.h
#endif /* nsIStringStream_h___ */

View File

@@ -0,0 +1,60 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#ifndef nsRepeater_h___
#define nsRepeater_h___
#include "nscore.h"
class EventRecord;
class NS_BASE Repeater {
public:
Repeater();
virtual ~Repeater();
virtual void RepeatAction(const EventRecord &aMacEvent) = 0;
void StartRepeating();
void StopRepeating();
void StartIdling();
void StopIdling();
static void DoRepeaters(const EventRecord &aMacEvent);
static void DoIdlers(const EventRecord &aMacEvent);
protected:
void AddToRepeatList();
void RemoveFromRepeatList();
void AddToIdleList();
void RemoveFromIdleList();
static Repeater* sRepeaters;
static Repeater* sIdlers;
bool mRepeating;
bool mIdling;
Repeater* mPrevRptr;
Repeater* mNextRptr;
Repeater* mPrevIdlr;
Repeater* mNextIdlr;
};
#endif

View File

@@ -0,0 +1,84 @@
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Mozilla Communicator client code,
* released March 31, 1998.
*
* The Initial Developer of the Original Code is Netscape Communications
* Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*
* Contributors:
* Doug Turner <dougt@netscape.com>
*/
#ifndef _NSSPECIALSYSTEMDIRECTORY_H_
#define _NSSPECIALSYSTEMDIRECTORY_H_
#include "nscore.h"
#include "nsFileSpec.h"
#ifdef XP_MAC
#include "Types.h"
#endif
// SEE ALSO:
// mozilla/xpfe/appshell/public/nsFileLocations.h
class NS_BASE nsSpecialSystemDirectory : public nsFileSpec
{
public:
enum SystemDirectories
{
OS_DriveDirectory = 1
, OS_TemporaryDirectory = 2
, OS_CurrentProcessDirectory= 3
, Mac_SystemDirectory = 101
, Mac_DesktopDirectory = 102
, Mac_TrashDirectory = 103
, Mac_StartupDirectory = 104
, Mac_ShutdownDirectory = 105
, Mac_AppleMenuDirectory = 106
, Mac_ControlPanelDirectory = 107
, Mac_ExtensionDirectory = 108
, Mac_FontsDirectory = 109
, Mac_PreferencesDirectory = 110
, Mac_DocumentsDirectory = 111
, Win_SystemDirectory = 201
, Win_WindowsDirectory = 202
, Unix_LocalDirectory = 301
, Unix_LibDirectory = 302
};
//nsSpecialSystemDirectory();
nsSpecialSystemDirectory(SystemDirectories aSystemSystemDirectory);
virtual ~nsSpecialSystemDirectory();
void operator = (SystemDirectories aSystemSystemDirectory);
#ifdef XP_MAC
void operator = (OSType folderType);
nsSpecialSystemDirectory(OSType folderType);
#endif
private:
void operator = (const char* inPath) { *(nsFileSpec*)this = inPath; }
}; // class NS_BASE nsSpecialSystemDirectory
#endif

View File

@@ -0,0 +1,939 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0(the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright(C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#error "Do not use this file. The unix compilers do not support standard C++. Use nsFileStream"
// First checked in on 98/11/20 by John R. McMullen in the wrong directory.
// Checked in again 98/12/04.
// Polished version 98/12/08.
//========================================================================================
//
// Classes defined:
//
// single-byte char:
//
// nsInputFileStream, nsOutputFileStream, nsIOFileStream
//
// wide char:
//
// nsWideInputFileStream, nsWideOutputFileStream, nsWideIOFileStream
//
// This suite provide the following services:
//
// 1. Encapsulates all platform-specific file details, so that file i/o
// can be done correctly without any platform #ifdefs
//
// 2. Uses NSPR file services (NOT ansi file I/O), in order to get best
// native performance. This performance difference is especially large on
// macintosh.
//
// 3. Allows all the power of the ansi stream syntax: these streams
// ARE derived classes of ostream, istream, and iostream. ALL METHODS OF
// istream, ostream, AND iostream ARE AVAILABLE!
//
// Basic example:
//
// nsFilePath myPath("/Development/iotest.txt");
//
// nsOutputFileStream testStream(myPath);
// testStream << "Hello World" << endl;
//
// 4. Requires streams to be constructed using typesafe nsFilePath specifier
// (not the notorious and bug prone const char*), namely nsFilePath. See
// nsFileSpec.h for more details.
//
// 5. Fixes a bug that have been there for a long time, and
// is inevitable if you use NSPR alone:
//
// The problem on platforms (Macintosh) in which a path does not fully
// specify a file, because two volumes can have the same name.
//
// Not yet provided:
//
// Endian-awareness for reading and writing crossplatform binary files. At this
// time there seems to be no demand for this.
//
//========================================================================================
#ifndef _FILESTREAM_H_
#define _FILESTREAM_H_
#include "nscore.h"
#ifdef XP_MAC
#include "pprio.h" // To get PR_ImportFile
#else
#include "prio.h"
#endif
#include "nsFileSpec.h"
//========================================================================================
// Compiler-specific macros, as needed
//========================================================================================
#if !defined(NS_USING_NAMESPACE) && (defined(__MWERKS__) || defined(XP_PC))
#define NS_USING_NAMESPACE
#endif
#if !defined(NS_USING_STL) && (defined(__MWERKS__) || defined(XP_PC))
#define NS_USING_STL
#endif
#ifdef NS_USING_NAMESPACE
#define NS_NAMESPACE_PROTOTYPE
#define NS_NAMESPACE namespace
#define NS_NAMESPACE_END
#else
#define NS_NAMESPACE_PROTOTYPE static
#define NS_NAMESPACE struct
#define NS_NAMESPACE_END ;
#endif // NS_USING_NAMESPACE
#ifdef NS_USING_STL
// Macintosh and Windows use this section.
//
// Here's where the party is. When Unix wants to join in (by supporting
// a build system with STL headers), what fun we'll have! Meanwhile, I've used
// macros to make this build on all our platforms. Unix doesn't have support for
// STL, and therefore we could not use the template forms of these classes on Unix.
// (it's a long story). Therefore, Unix supports no stream char types except 1-byte
// characters, and therefore nobody else does now either, until Unix catches up.
#define DEFINING_FILE_STREAM // templateers define this when this file is included.
#define IOS_BASE ios_base
#include <istream>
using std::ios_base;
using std::basic_streambuf;
using std::codecvt_base;
using std::codecvt;
using std::streamsize;
using std::locale;
using std::basic_istream;
using std::basic_ostream;
using std::basic_iostream;
using std::char_traits;
#define TEMPLATE_DEF template<class charT, class traits>
#define FILE_BUFFER_TYPE nsFileBufferT<charT, traits>
#define INPUT_FILE_STREAM nsInputFileStreamT<charT, traits>
#define OUTPUT_FILE_STREAM nsOutputFileStreamT<charT, traits>
#define IO_FILE_STREAM nsIOFileStreamT<charT, traits>
#define BASIC_STREAMBUF basic_streambuf<charT, traits>
#define BASIC_ISTREAM basic_istream<charT, traits>
#define BASIC_OSTREAM basic_ostream<charT, traits>
#define BASIC_IOSTREAM basic_iostream<charT, traits>
#define INT_TYPE FILE_BUFFER_TYPE::int_type
#define POS_TYPE FILE_BUFFER_TYPE::pos_type
#define OFF_TYPE FILE_BUFFER_TYPE::off_type
#define SEEK_DIR IOS_BASE::seekdir
#define EOF_VALUE traits::eof()
#else
// Unix uses this section until it supports STL. This means no locales, no traits,
// no wide chars, etc. Also, the stream classes are the original ARM-style ones,
// and are not templatized.
#define IOS_BASE ios
#include <istream.h>
#define TEMPLATE_DEF
#define FILE_BUFFER_TYPE nsFileBufferT
#define INPUT_FILE_STREAM nsInputFileStreamT
#define OUTPUT_FILE_STREAM nsOutputFileStreamT
#define IO_FILE_STREAM nsIOFileStreamT
#define BASIC_STREAMBUF streambuf
#define BASIC_ISTREAM istream
#define BASIC_OSTREAM ostream
#define BASIC_IOSTREAM iostream
#define INT_TYPE int
#define POS_TYPE long
#define OFF_TYPE long
#define SEEK_DIR ios::seek_dir
#define int_type int
#define pos_type long
#define off_type long
#define char_type char
#define EOF_VALUE EOF
#endif // NS_USING_STL
#ifdef __MWERKS__
#ifdef MSIPL_WCHART
#define NS_USING_WIDE_CHAR
#endif
#ifdef MSIPL_EXPLICIT_FUNC_TEMPLATE_ARG
#define NS_EXPLICIT_FUNC_TEMPLATE_ARG
#endif
#define NS_READ_LOCK(mut) READ_LOCK(mut)
#define NS_WRITE_LOCK(mut) WRITE_LOCK(mut)
#else
// Fix me, if necessary, for thread-safety.
#define NS_READ_LOCK(mut)
#define NS_WRITE_LOCK(mut)
#endif // __MWERKS__
//=========================== End Compiler-specific macros ===============================
//========================================================================================
NS_NAMESPACE nsFileStreamHelpers
// Prototypes for common (non-template) implementations in the .cpp file which do not
// need the template args (charT, traits).
//========================================================================================
{
NS_NAMESPACE_PROTOTYPE NS_BASE PRFileDesc* open(
const nsFilePath& inFile,
IOS_BASE::openmode mode,
PRIntn accessMode);
} NS_NAMESPACE_END // nsFileStreamHelpers
//========================================================================================
// Template declarations
//========================================================================================
//========================================================================================
TEMPLATE_DEF
class nsFileBufferT
//========================================================================================
: public BASIC_STREAMBUF
{
#ifdef NS_USING_STL
typedef codecvt_base::result result;
public:
typedef charT char_type;
typedef typename traits::pos_type pos_type;
typedef typename traits::off_type off_type;
typedef typename traits::int_type int_type;
typedef traits traits_type;
typedef typename traits::state_type state_type;
typedef codecvt<charT, char, state_type> ofacet_type;
typedef codecvt<char, charT, state_type> ifacet_type;
#endif
public:
nsFileBufferT();
nsFileBufferT(PRFileDesc* pfile_arg);
virtual ~nsFileBufferT();
bool is_open() const;
FILE_BUFFER_TYPE* open(
const nsFilePath& inFile,
IOS_BASE::openmode mode,
PRIntn accessMode);
FILE_BUFFER_TYPE* close();
protected:
virtual int_type overflow(int_type c=EOF_VALUE);
virtual int_type pbackfail(int_type c=EOF_VALUE);
virtual int_type underflow();
virtual pos_type seekoff(
off_type off, SEEK_DIR way,
IOS_BASE::openmode which=IOS_BASE::in|IOS_BASE::out);
virtual pos_type seekpos(pos_type sp,
IOS_BASE::openmode which=IOS_BASE::in|IOS_BASE::out);
virtual BASIC_STREAMBUF* setbuf(char_type* s, streamsize n);
virtual int sync();
virtual int_type uflow();
#ifdef NS_USING_STL
virtual void imbue(const locale& loc);
#endif
virtual streamsize showmanyc();
virtual streamsize xsgetn(char_type* s, streamsize n);
virtual streamsize xsputn(const char_type* s, streamsize n);
private:
PRFileDesc* mFileDesc;
IOS_BASE::openmode mode_;
}; // class nsFileBufferT
//========================================================================================
TEMPLATE_DEF
class nsInputFileStreamT
//========================================================================================
: public BASIC_ISTREAM
{
#ifdef NS_USING_STL
public:
typedef charT char_type;
typedef typename traits::pos_type pos_type;
typedef typename traits::off_type off_type;
typedef typename traits::int_type int_type;
typedef traits traits_type;
#endif
public:
nsInputFileStreamT();
explicit nsInputFileStreamT(
const nsFilePath& inFile,
IOS_BASE::openmode mode=IOS_BASE::in,
PRIntn accessMode = 0x00400);
virtual ~nsInputFileStreamT();
FILE_BUFFER_TYPE* rdbuf() const;
inline bool is_open();
inline void open(
const nsFilePath& inFile,
IOS_BASE::openmode mode=IOS_BASE::in,
PRIntn accessMode = 0x00400);
inline void close();
private:
FILE_BUFFER_TYPE mBuffer;
}; // class nsInputFileStreamT
//========================================================================================
TEMPLATE_DEF
class nsOutputFileStreamT
//========================================================================================
: public BASIC_OSTREAM
{
#ifdef NS_USING_STL
public:
typedef charT char_type;
typedef typename traits::pos_type pos_type;
typedef typename traits::off_type off_type;
typedef typename traits::int_type int_type;
typedef traits traits_type;
#endif
public:
nsOutputFileStreamT();
explicit nsOutputFileStreamT(
const nsFilePath& inFile,
IOS_BASE::openmode mode = IOS_BASE::out|IOS_BASE::trunc,
PRIntn accessMode = 0x00200);
virtual ~nsOutputFileStreamT();
FILE_BUFFER_TYPE* rdbuf() const;
inline bool is_open();
inline void open(
const nsFilePath& inFile,
IOS_BASE::openmode mode = IOS_BASE::out|IOS_BASE::trunc,
PRIntn accessMode = 0x00200);
inline void close();
private:
FILE_BUFFER_TYPE mBuffer;
}; // class nsOutputFileStreamT
//========================================================================================
// Implementation of nsFileBufferT
//========================================================================================
//----------------------------------------------------------------------------------------
TEMPLATE_DEF
inline FILE_BUFFER_TYPE::nsFileBufferT()
: BASIC_STREAMBUF(), mFileDesc(NULL)
//----------------------------------------------------------------------------------------
{
}
//----------------------------------------------------------------------------------------
TEMPLATE_DEF
inline FILE_BUFFER_TYPE::nsFileBufferT(PRFileDesc* pfarg)
: BASIC_STREAMBUF(), mFileDesc(pfarg)
//----------------------------------------------------------------------------------------
{
}
//----------------------------------------------------------------------------------------
TEMPLATE_DEF
inline FILE_BUFFER_TYPE* FILE_BUFFER_TYPE::close()
// Must precede the destructor because both are inline.
//----------------------------------------------------------------------------------------
{
if (mFileDesc==PR_STDIN || mFileDesc==PR_STDOUT || mFileDesc==PR_STDERR)
return this;
NS_WRITE_LOCK(_mutex);
return (mFileDesc && PR_Close(mFileDesc) == PR_SUCCESS) ? mFileDesc = 0, this : 0;
}
#if defined(DEFINING_FILE_STREAM)
//----------------------------------------------------------------------------------------
TEMPLATE_DEF
FILE_BUFFER_TYPE::~nsFileBufferT()
//----------------------------------------------------------------------------------------
{
close();
}
#endif // #if defined(DEFINING_FILE_STREAM)
//----------------------------------------------------------------------------------------
TEMPLATE_DEF
inline bool
FILE_BUFFER_TYPE::is_open() const
//----------------------------------------------------------------------------------------
{
NS_READ_LOCK(_mutex);
return bool(mFileDesc); // in case it is typedefed to int
}
//----------------------------------------------------------------------------------------
TEMPLATE_DEF
inline FILE_BUFFER_TYPE* FILE_BUFFER_TYPE::open(
const nsFilePath& inFile,
IOS_BASE::openmode mode,
PRIntn accessMode)
//----------------------------------------------------------------------------------------
{
if (mFileDesc)
return 0;
NS_WRITE_LOCK(_mutex);
mFileDesc = nsFileStreamHelpers::open(inFile, mode, accessMode);
if (!mFileDesc)
return 0;
mode_ = mode;
return this;
} // FILE_BUFFER_TYPE::open
//----------------------------------------------------------------------------------------
TEMPLATE_DEF
inline int FILE_BUFFER_TYPE:: sync()
//----------------------------------------------------------------------------------------
{
return (mFileDesc ? (int)PR_Sync(mFileDesc) : 0);
}
//----------------------------------------------------------------------------------------
TEMPLATE_DEF
inline BASIC_STREAMBUF* FILE_BUFFER_TYPE::setbuf(char_type*, streamsize)
//----------------------------------------------------------------------------------------
{
return (!mFileDesc) ? 0 : this;
}
#if defined(DEFINING_FILE_STREAM)
//----------------------------------------------------------------------------------------
TEMPLATE_DEF
INT_TYPE FILE_BUFFER_TYPE::overflow(int_type c)
//----------------------------------------------------------------------------------------
{
#ifndef NS_USING_STL
char ch = c;
PRInt32 bytesWrit1 = PR_Write(mFileDesc, &ch, sizeof(ch));
return bytesWrit1 < sizeof(ch) ? EOF_VALUE : c;
#else
#ifdef NS_EXPLICIT_FUNC_TEMPLATE_ARG
const ofacet_type& ft=use_facet<ofacet_type>(getloc());
#elif defined(XP_PC)
const ofacet_type& ft=use_facet(getloc(), (ofacet_type*)0, false);
#else
const ofacet_type& ft=use_facet(getloc(), (ofacet_type*)0);
#endif
char_type ch = traits_type::to_char_type(c);
if (!mFileDesc)
return EOF_VALUE;
if (traits_type::eq_int_type(c, EOF_VALUE))
return traits_type::not_eof(c);
if (ft.always_noconv())
{
PRInt32 bytesWrit1 = PR_Write(mFileDesc, &ch, sizeof(ch));
return bytesWrit1 < sizeof(ch) ? EOF_VALUE : c;
}
{ // <- sic!
state_type fst;
const char_type* end;
char buf[4];
char* ebuf;
result conv;
if ((conv=ft.out(fst, &ch, &ch+1, end, buf, buf+3, ebuf))==
codecvt_base::noconv)
{
PRInt32 bytesWrit2 = PR_Write(mFileDesc, &ch, sizeof(ch));
return bytesWrit2 < sizeof(ch) ? EOF_VALUE : c;
}
if ((conv==codecvt_base::partial)||(conv==codecvt_base::error))
return EOF_VALUE;
*ebuf=0;
PRInt32 bytesWrit3 = strlen(buf);
return PR_Write(mFileDesc, buf, bytesWrit3) < bytesWrit3 ? EOF_VALUE : c;
}
#endif
}
#endif // #if defined(DEFINING_FILE_STREAM)
//----------------------------------------------------------------------------------------
TEMPLATE_DEF
inline INT_TYPE FILE_BUFFER_TYPE::underflow()
//----------------------------------------------------------------------------------------
{
if (!mFileDesc)
return EOF_VALUE;
char_type s;
PRInt32 request = 1;
if (1 != PR_Read(mFileDesc, &s, request))
return EOF_VALUE;
PR_Seek(mFileDesc, -1, PR_SEEK_CUR);
return (int_type)s;
}
#if defined(DEFINING_FILE_STREAM)
//----------------------------------------------------------------------------------------
TEMPLATE_DEF
streamsize FILE_BUFFER_TYPE::xsputn(const char_type* s, streamsize n)
//----------------------------------------------------------------------------------------
{
#ifndef NS_USING_STL
PRInt32 bytesWrit1 = PR_Write(mFileDesc, s, sizeof(char) * size_t(n));
return bytesWrit1 < 0 ? 0 : (streamsize)bytesWrit1;
#else
#ifdef NS_EXPLICIT_FUNC_TEMPLATE_ARG
const ofacet_type& ft=use_facet<ofacet_type>(loc);
#elif defined(XP_PC)
const ofacet_type& ft=use_facet(getloc(), (ofacet_type*)0, false);
#else
const ofacet_type& ft=use_facet(getloc(), (ofacet_type*)0);
#endif
if (!mFileDesc || !n)
return 0;
if (ft.always_noconv())
{
PRInt32 bytesWrit1 = PR_Write(mFileDesc, s, sizeof(char) * size_t(n));
return bytesWrit1 < 0 ? 0 : (streamsize)bytesWrit1;
}
{ // <- sic!
state_type fst;
const char_type* end;
char buf[8];
char* ebuf;
result conv;
#ifdef NS_EXPLICIT_FUNC_TEMPLATE_ARG
if ((conv=use_facet<ofacet_type>(getloc()).
#elif defined(XP_PC)
if ((conv=use_facet(getloc(), (ofacet_type*)0, false).
#else
if ((conv=use_facet(getloc(), (ofacet_type*)0).
#endif
out(fst, s, s+n, end, buf, buf+7, ebuf))==codecvt_base::noconv)
return (streamsize)PR_Write(mFileDesc, s, sizeof(char) * size_t(n));
if ((conv==codecvt_base::partial) ||(conv==codecvt_base::error))
return 0;
*ebuf=0;
PRInt32 bytesWrit2 = strlen(buf);
bytesWrit2 = PR_Write(mFileDesc, buf, bytesWrit2);
return bytesWrit2 < 0 ? 0 : streamsize(bytesWrit2 / sizeof(char_type));
}
#endif
} // FILE_BUFFER_TYPE::xsputn
#endif // #if defined(DEFINING_FILE_STREAM)
//----------------------------------------------------------------------------------------
TEMPLATE_DEF
inline INT_TYPE FILE_BUFFER_TYPE::pbackfail(int_type c)
//----------------------------------------------------------------------------------------
{
if (!mFileDesc)
return EOF_VALUE;
if (PR_Seek(mFileDesc, -1, PR_SEEK_CUR) < 0)
return EOF_VALUE;
#ifdef NS_USING_STL
return (traits::eq_int_type(c, EOF_VALUE)) ? traits::not_eof(c) : c;
#else
return c;
#endif
}
//----------------------------------------------------------------------------------------
TEMPLATE_DEF
inline INT_TYPE FILE_BUFFER_TYPE::uflow()
//----------------------------------------------------------------------------------------
{
if (!mFileDesc)
return EOF_VALUE;
char_type s;
if (1 != PR_Read(mFileDesc, &s, 1)) // attempt to read 1 byte, confirm 1 byte
return EOF_VALUE;
return (int_type)s;
}
//----------------------------------------------------------------------------------------
TEMPLATE_DEF
inline streamsize FILE_BUFFER_TYPE::xsgetn(char_type* s, streamsize n)
//----------------------------------------------------------------------------------------
{
return mFileDesc ? (streamsize)PR_Read(mFileDesc, s, sizeof(char) * size_t(n)) : 0;
}
#ifdef NS_USING_STL
//----------------------------------------------------------------------------------------
TEMPLATE_DEF
inline void FILE_BUFFER_TYPE::imbue(const locale& loc_arg)
//----------------------------------------------------------------------------------------
{
#ifdef XP_MAC
loc = loc_arg;
#endif
}
#endif
//----------------------------------------------------------------------------------------
TEMPLATE_DEF
inline streamsize FILE_BUFFER_TYPE::showmanyc()
//----------------------------------------------------------------------------------------
{
return (streamsize)PR_Available(mFileDesc);
}
#if defined(DEFINING_FILE_STREAM)
//----------------------------------------------------------------------------------------
TEMPLATE_DEF
POS_TYPE FILE_BUFFER_TYPE::seekoff(
OFF_TYPE off,
SEEK_DIR way,
IOS_BASE::openmode /* which */)
//----------------------------------------------------------------------------------------
{
if (!mFileDesc ||
#ifdef NS_USING_STL
((way&IOS_BASE::beg) && off<0) || ((way&IOS_BASE::end) && off > 0)
#else
((way == IOS_BASE::beg) && off<0) || ((way == IOS_BASE::end) && off > 0)
#endif
)
return pos_type(-1);
PRSeekWhence poseek = PR_SEEK_CUR;
switch (way)
{
case IOS_BASE::beg : poseek= PR_SEEK_SET;
break;
case IOS_BASE::end : poseek= PR_SEEK_END;
break;
}
PRInt32 position = PR_Seek(mFileDesc, off, poseek);
if (position < 0)
return pos_type(-1);
return pos_type(position);
}
#endif // #if defined(DEFINING_FILE_STREAM)
#if defined(DEFINING_FILE_STREAM)
//----------------------------------------------------------------------------------------
TEMPLATE_DEF
POS_TYPE FILE_BUFFER_TYPE::seekpos(pos_type sp, IOS_BASE::openmode)
//----------------------------------------------------------------------------------------
{
if (!mFileDesc || sp==pos_type(-1))
return -1;
#if defined(XP_PC) || defined(XP_UNIX)
PRInt32 position = sp;
#else
PRInt32 position = sp.offset();
#endif
position = PR_Seek(mFileDesc, position, PR_SEEK_SET);
if (position < 0)
return pos_type(-1);
return position;
}
#endif // #if defined(DEFINING_FILE_STREAM)
//========================================================================================
// Implementation of nsInputFileStreamT
//========================================================================================
//----------------------------------------------------------------------------------------
TEMPLATE_DEF
inline INPUT_FILE_STREAM::nsInputFileStreamT()
: BASIC_ISTREAM(&mBuffer)
//----------------------------------------------------------------------------------------
{
// already inited
}
//----------------------------------------------------------------------------------------
TEMPLATE_DEF
inline INPUT_FILE_STREAM::nsInputFileStreamT(
const nsFilePath& inFile,
IOS_BASE::openmode mode,
PRIntn accessMode)
//----------------------------------------------------------------------------------------
: BASIC_ISTREAM(&mBuffer)
{
// already inited
if (!mBuffer.open(inFile, openmode(mode|in), accessMode))
setstate(failbit);
}
#if defined(DEFINING_FILE_STREAM)
//----------------------------------------------------------------------------------------
TEMPLATE_DEF
INPUT_FILE_STREAM::~nsInputFileStreamT()
//----------------------------------------------------------------------------------------
{
}
#endif // #if defined(DEFINING_FILE_STREAM)
//----------------------------------------------------------------------------------------
TEMPLATE_DEF
inline FILE_BUFFER_TYPE* INPUT_FILE_STREAM::rdbuf() const
//----------------------------------------------------------------------------------------
{
return (FILE_BUFFER_TYPE*)&mBuffer;
}
//----------------------------------------------------------------------------------------
TEMPLATE_DEF
inline bool INPUT_FILE_STREAM:: is_open()
//----------------------------------------------------------------------------------------
{
return mBuffer.is_open();
}
//----------------------------------------------------------------------------------------
TEMPLATE_DEF
inline void INPUT_FILE_STREAM::open(
const nsFilePath& inFile,
IOS_BASE::openmode mode,
PRIntn accessMode)
//----------------------------------------------------------------------------------------
{
if (!mBuffer.open(inFile, openmode(mode|in), accessMode))
setstate(failbit);
}
//----------------------------------------------------------------------------------------
TEMPLATE_DEF
inline void INPUT_FILE_STREAM::close()
//----------------------------------------------------------------------------------------
{
if (!mBuffer.close())
setstate(failbit);
}
//========================================================================================
// Implementation of nsOutputFileStreamT
//========================================================================================
//----------------------------------------------------------------------------------------
TEMPLATE_DEF
inline OUTPUT_FILE_STREAM::nsOutputFileStreamT()
: BASIC_OSTREAM(&mBuffer)
//----------------------------------------------------------------------------------------
{
// already inited
}
#if defined(DEFINING_FILE_STREAM)
//----------------------------------------------------------------------------------------
TEMPLATE_DEF
OUTPUT_FILE_STREAM::nsOutputFileStreamT(
const nsFilePath& inFile,
IOS_BASE::openmode mode,
PRIntn accessMode)
//----------------------------------------------------------------------------------------
: BASIC_OSTREAM(&mBuffer)
{
// already inited
if (!mBuffer.open(inFile, openmode(mode|out), accessMode))
setstate(failbit);
}
#endif // #if defined(DEFINING_FILE_STREAM)
#if defined(DEFINING_FILE_STREAM)
//----------------------------------------------------------------------------------------
TEMPLATE_DEF
inline OUTPUT_FILE_STREAM::~nsOutputFileStreamT()
//----------------------------------------------------------------------------------------
{
}
#endif // #if defined(DEFINING_FILE_STREAM)
//----------------------------------------------------------------------------------------
TEMPLATE_DEF
inline FILE_BUFFER_TYPE*
OUTPUT_FILE_STREAM::rdbuf() const
//----------------------------------------------------------------------------------------
{
return (FILE_BUFFER_TYPE*)&mBuffer;
}
//----------------------------------------------------------------------------------------
TEMPLATE_DEF
inline bool OUTPUT_FILE_STREAM:: is_open()
//----------------------------------------------------------------------------------------
{
return mBuffer.is_open();
}
//----------------------------------------------------------------------------------------
TEMPLATE_DEF
inline void OUTPUT_FILE_STREAM::open(
const nsFilePath& inFile,
IOS_BASE::openmode mode,
PRIntn accessMode)
//----------------------------------------------------------------------------------------
{
if (!mBuffer.open(inFile, openmode(mode | out), accessMode))
setstate(failbit);
}
//----------------------------------------------------------------------------------------
TEMPLATE_DEF
inline void OUTPUT_FILE_STREAM:: close()
//----------------------------------------------------------------------------------------
{
if (!mBuffer.close())
setstate(failbit);
}
//========================================================================================
TEMPLATE_DEF
class nsIOFileStreamT : public BASIC_IOSTREAM
//========================================================================================
{
#ifdef NS_USING_STL
public:
typedef charT char_type;
typedef typename traits::pos_type pos_type;
typedef typename traits::off_type off_type;
typedef typename traits::int_type int_type;
typedef traits traits_type;
#endif
public:
nsIOFileStreamT();
explicit nsIOFileStreamT(
const nsFilePath& inFile,
IOS_BASE::openmode mode = IOS_BASE::in|IOS_BASE::out,
PRIntn accessMode = 0x00600);
virtual ~nsIOFileStreamT();
FILE_BUFFER_TYPE* rdbuf() const;
inline bool is_open();
inline void open(
const nsFilePath& inFile,
IOS_BASE::openmode mode = IOS_BASE::in|IOS_BASE::out,
PRIntn accessMode = 0x00600);
inline void close();
private:
FILE_BUFFER_TYPE mBuffer;
}; // class nsIOFileStreamT
//========================================================================================
// Implementation of nsIOFileStream
//========================================================================================
//----------------------------------------------------------------------------------------
TEMPLATE_DEF
inline IO_FILE_STREAM::nsIOFileStreamT()
//----------------------------------------------------------------------------------------
: mBuffer(), BASIC_IOSTREAM(&mBuffer)
{
// already inited
}
//----------------------------------------------------------------------------------------
TEMPLATE_DEF
inline IO_FILE_STREAM::nsIOFileStreamT(
const nsFilePath& inFile,
IOS_BASE::openmode mode,
PRIntn accessMode)
//----------------------------------------------------------------------------------------
: mBuffer(), BASIC_IOSTREAM(&mBuffer)
{
// already inited
if (!mBuffer.open(inFile, mode, accessMode))
setstate(failbit);
}
//----------------------------------------------------------------------------------------
TEMPLATE_DEF
inline IO_FILE_STREAM::~nsIOFileStreamT()
//----------------------------------------------------------------------------------------
{
}
//----------------------------------------------------------------------------------------
TEMPLATE_DEF
inline FILE_BUFFER_TYPE*
IO_FILE_STREAM::rdbuf() const
//----------------------------------------------------------------------------------------
{
return (FILE_BUFFER_TYPE*)&mBuffer;
}
//----------------------------------------------------------------------------------------
TEMPLATE_DEF
inline bool IO_FILE_STREAM::is_open()
//----------------------------------------------------------------------------------------
{
return mBuffer.is_open();
}
//----------------------------------------------------------------------------------------
TEMPLATE_DEF
inline void IO_FILE_STREAM::open(
const nsFilePath& inFile,
IOS_BASE::openmode mode,
PRIntn accessMode)
//----------------------------------------------------------------------------------------
{
if (!mBuffer.open(inFile, mode, accessMode))
setstate(failbit);
}
//----------------------------------------------------------------------------------------
TEMPLATE_DEF
inline void IO_FILE_STREAM::close()
//----------------------------------------------------------------------------------------
{
if (!mBuffer.close())
setstate(failbit);
}
//========================================================================================
// Specializations of the stream templates
//========================================================================================
#ifdef NS_USING_STL
typedef nsFileBufferT<char, char_traits<char> > nsFileBuffer;
typedef nsInputFileStreamT<char, char_traits<char> > nsInputFileStream;
typedef nsOutputFileStreamT<char, char_traits<char> > nsOutputFileStream;
typedef nsIOFileStreamT<char, char_traits<char> > nsIOFileStream;
#ifdef NS_USING_WIDE_CHAR
typedef nsFileBufferT<wchar_t, char_traits<wchar_t> > nsWideFileBuffer;
typedef nsInputFileStreamT<wchar_t, char_traits<wchar_t> > nsWideInputFileStream;
typedef nsOutputFileStreamT<wchar_t, char_traits<wchar_t> > nsWideOutputFileStream;
typedef nsIOFileStreamT<wchar_t, char_traits<wchar_t> > nsWideIOFileStream;
#endif // NS_USING_WIDE_CHAR
#else
typedef nsFileBufferT nsFileBuffer;
typedef nsInputFileStreamT nsInputFileStream;
typedef nsOutputFileStreamT nsOutputFileStream;
typedef nsIOFileStreamT nsIOFileStream;
#endif
#endif /* _FILESTREAM_H_ */

24
mozilla/base/src/MANIFEST Normal file
View File

@@ -0,0 +1,24 @@
#
# This is a list of local files which get copied to the mozilla:dist directory
#
nscore.h
nsIArena.h
nsIAtom.h
nsIByteBuffer.h
nsBTree.h
nsCRT.h
nsDeque.h
nsITimer.h
nsITimerCallback.h
nsIUnicharBuffer.h
nsRBTree.h
nsIUnicharInputStream.h
nsString.h
nsVoidArray.h
nsUnitConversion.h
nsIBaseStream.h
nsIInputStream.h
nsIOutputStream.h
nsInt64.h
nsTime.h

View File

@@ -0,0 +1,92 @@
#!gmake
#
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL. You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
# Reserved.
DEPTH=../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
DEFINES +=-D_IMPL_NS_BASE
LOCAL_INCLUDES += -I$(topsrcdir)/base/public
DIRS = $(MOZ_TOOLKIT)
LIBRARY_NAME = raptorbase
CPPSRCS = \
nsArena.cpp \
nsAtomTable.cpp \
nsBaseDLL.cpp \
nsBTree.cpp \
nsByteBuffer.cpp \
nsCRT.cpp \
nsDeque.cpp \
nsEscape.cpp \
nsFileSpec.cpp \
nsFileStream.cpp \
nsIFileStream.cpp \
nsIStringStream.cpp \
nsProperties.cpp \
nsRBTree.cpp \
nsSizeOfHandler.cpp \
nsString.cpp \
nsUnicharBuffer.cpp \
nsUnicharInputStream.cpp \
nsVoidArray.cpp \
nsSpecialSystemDirectory.cpp\
$(NULL)
EXPORTS = \
nscore.h \
nsBTree.h \
nsCRT.h \
nsDeque.h \
nsIArena.h \
nsIAtom.h \
nsIByteBuffer.h \
nsIBaseStream.h \
nsIInputStream.h \
nsIOutputStream.h \
nsITimer.h \
nsITimerCallback.h \
nsIUnicharBuffer.h \
nsIUnicharInputStream.h \
nsInt64.h \
nsRBTree.h \
nsString.h \
nsTime.h \
nsVoidArray.h \
nsUnitConversion.h \
$(NULL)
EXPORTS := $(addprefix $(srcdir)/, $(EXPORTS))
MODULE=base
REQUIRES = xpcom netlib raptor
include $(topsrcdir)/config/config.mk
TARGET = $(LIBARY)
include $(topsrcdir)/config/rules.mk
test:
@echo OS_ARCH = $(OS_ARCH)

View File

@@ -0,0 +1,42 @@
#
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL. You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
# Reserved.
#
DEPTH = ../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
LIBRARY_NAME = gmbasegtk
MODULE=base
REQUIRES = xpcom raptor
DEFINES += -D_IMPL_NS_WIDGET
CPPSRCS = \
nsTimer.cpp \
nsCaretProperties.cpp \
$(NULL)
include $(topsrcdir)/config/config.mk
CXXFLAGS += $(TK_CFLAGS)
include $(topsrcdir)/config/rules.mk

View File

@@ -0,0 +1,40 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#include "nscore.h"
#include "nsCaretProperties.h"
//-----------------------------------------------------------------------------
nsCaretProperties::nsCaretProperties()
: mCaretWidth(eDefaultCaretWidth)
, mBlinkRate(eDefaulBlinkRate)
{
// in your platform-specific class, get data from the OS in your constructor
//mBlinkRate = 0; // don't blink the caret
}
//-----------------------------------------------------------------------------
nsCaretProperties* NewCaretProperties()
{
return new nsCaretProperties();
}

View File

@@ -0,0 +1,191 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#include "nsITimer.h"
#include "nsITimerCallback.h"
#include "nsCRT.h"
#include "prlog.h"
#include <stdio.h>
#include <limits.h>
#include <gtk/gtk.h>
static NS_DEFINE_IID(kITimerIID, NS_ITIMER_IID);
extern "C" gint nsTimerExpired(gpointer aCallData);
/*
* Implementation of timers using Gtk timer facility
*/
class TimerImpl : public nsITimer {
public:
public:
TimerImpl();
virtual ~TimerImpl();
virtual nsresult Init(nsTimerCallbackFunc aFunc,
void *aClosure,
// PRBool aRepeat,
PRUint32 aDelay);
virtual nsresult Init(nsITimerCallback *aCallback,
// PRBool aRepeat,
PRUint32 aDelay);
NS_DECL_ISUPPORTS
virtual void Cancel();
virtual PRUint32 GetDelay() { return mDelay; }
virtual void SetDelay(PRUint32 aDelay) { mDelay=aDelay; };
virtual void* GetClosure() { return mClosure; }
void FireTimeout();
private:
nsresult Init(PRUint32 aDelay);
PRUint32 mDelay;
nsTimerCallbackFunc mFunc;
void *mClosure;
nsITimerCallback *mCallback;
// PRBool mRepeat;
TimerImpl *mNext;
guint mTimerId;
};
void TimerImpl::FireTimeout()
{
if (mFunc != NULL) {
(*mFunc)(this, mClosure);
}
else if (mCallback != NULL) {
mCallback->Notify(this); // Fire the timer
}
// Always repeating here
// if (mRepeat)
// mTimerId = gtk_timeout_add(aDelay, nsTimerExpired, this);
}
TimerImpl::TimerImpl()
{
// printf("TimerImple::TimerImpl called for %p\n", this);
NS_INIT_REFCNT();
mFunc = NULL;
mCallback = NULL;
mNext = NULL;
mTimerId = 0;
mDelay = 0;
mClosure = NULL;
}
TimerImpl::~TimerImpl()
{
//printf("TimerImpl::~TimerImpl called for %p\n", this);
Cancel();
NS_IF_RELEASE(mCallback);
}
nsresult
TimerImpl::Init(nsTimerCallbackFunc aFunc,
void *aClosure,
// PRBool aRepeat,
PRUint32 aDelay)
{
//printf("TimerImpl::Init called with func + closure for %p\n", this);
mFunc = aFunc;
mClosure = aClosure;
// mRepeat = aRepeat;
if ((aDelay > 10000) || (aDelay < 0)) {
printf("Timer::Init() called with bogus value \"%d\"! Not enabling timer.\n",
aDelay);
return Init(aDelay);
}
mTimerId = gtk_timeout_add(aDelay, nsTimerExpired, this);
return Init(aDelay);
}
nsresult
TimerImpl::Init(nsITimerCallback *aCallback,
// PRBool aRepeat,
PRUint32 aDelay)
{
//printf("TimerImpl::Init called with callback only for %p\n", this);
mCallback = aCallback;
NS_ADDREF(mCallback);
// mRepeat = aRepeat;
if ((aDelay > 10000) || (aDelay < 0)) {
printf("Timer::Init() called with bogus value \"%d\"! Not enabling timer.\n",
aDelay);
return Init(aDelay);
}
mTimerId = gtk_timeout_add(aDelay, nsTimerExpired, this);
return Init(aDelay);
}
nsresult
TimerImpl::Init(PRUint32 aDelay)
{
//printf("TimerImpl::Init called with delay %d only for %p\n", aDelay, this);
mDelay = aDelay;
// NS_ADDREF(this);
return NS_OK;
}
NS_IMPL_ISUPPORTS(TimerImpl, kITimerIID)
void
TimerImpl::Cancel()
{
//printf("TimerImpl::Cancel called for %p\n", this);
TimerImpl *me = this;
if (mTimerId)
gtk_timeout_remove(mTimerId);
}
NS_BASE nsresult NS_NewTimer(nsITimer** aInstancePtrResult)
{
NS_PRECONDITION(nsnull != aInstancePtrResult, "null ptr");
if (nsnull == aInstancePtrResult) {
return NS_ERROR_NULL_POINTER;
}
TimerImpl *timer = new TimerImpl();
if (nsnull == timer) {
return NS_ERROR_OUT_OF_MEMORY;
}
return timer->QueryInterface(kITimerIID, (void **) aInstancePtrResult);
}
gint nsTimerExpired(gpointer aCallData)
{
//printf("nsTimerExpired for %p\n", aCallData);
TimerImpl* timer = (TimerImpl *)aCallData;
timer->FireTimeout();
return 0;
}

View File

@@ -0,0 +1,43 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#include <Events.h>
#include "nscore.h"
#include "nsCaretProperties.h"
//-----------------------------------------------------------------------------
nsCaretProperties::nsCaretProperties()
: mCaretWidth(eDefaultCaretWidth)
, mBlinkRate(eDefaulBlinkRate)
{
// in your platform-specific class, get data from the OS in your constructor
// MacOS calls
mBlinkRate = ::GetCaretTime() * 1000 / 60;
}
//-----------------------------------------------------------------------------
nsCaretProperties* NewCaretProperties()
{
return new nsCaretProperties();
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,147 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#include "nsRepeater.h"
Repeater* Repeater::sRepeaters = 0;
Repeater* Repeater::sIdlers = 0;
Repeater::Repeater()
{
mRepeating = false;
mIdling = false;
mPrevRptr = 0;
mNextRptr = 0;
mPrevIdlr = 0;
mNextIdlr = 0;
}
Repeater::~Repeater()
{
if (mRepeating) RemoveFromRepeatList();
if (mIdling) RemoveFromIdleList();
}
// protected helper functs
//----------------------------------------------------------------------------
void Repeater::AddToRepeatList()
{
if (sRepeaters)
{
sRepeaters->mPrevRptr = this;
mNextRptr = sRepeaters;
}
sRepeaters = this;
}
//----------------------------------------------------------------------------
void Repeater::RemoveFromRepeatList()
{
if (sRepeaters == this) sRepeaters = mNextRptr;
if (mPrevRptr) mPrevRptr->mNextRptr = mNextRptr;
if (mNextRptr) mNextRptr->mPrevRptr = mPrevRptr;
mPrevRptr = 0;
mNextRptr = 0;
}
//----------------------------------------------------------------------------
void Repeater::AddToIdleList()
{
if (sIdlers)
{
sIdlers->mPrevIdlr = this;
mNextIdlr = sIdlers;
}
sIdlers = this;
}
//----------------------------------------------------------------------------
void Repeater::RemoveFromIdleList()
{
if (sIdlers == this) sIdlers = mNextIdlr;
if (mPrevIdlr) mPrevIdlr->mNextIdlr = mNextIdlr;
if (mNextIdlr) mNextIdlr->mPrevIdlr = mPrevIdlr;
mPrevIdlr = 0;
mNextIdlr = 0;
}
// repeater methods
//----------------------------------------------------------------------------
void Repeater::StartRepeating()
{
if (!mRepeating)
{
AddToRepeatList();
mRepeating = true;
}
}
void Repeater::StopRepeating()
{
if (mRepeating)
{
RemoveFromRepeatList();
mRepeating = false;
}
}
void Repeater::DoRepeaters(const EventRecord &aMacEvent)
{
Repeater* theRepeater = sRepeaters;
while (theRepeater)
{
theRepeater->RepeatAction(aMacEvent);
theRepeater = theRepeater->mNextRptr;
}
}
// idler methods
void Repeater::StartIdling()
{
if (!mIdling)
{
AddToIdleList();
mIdling = true;
}
}
void Repeater::StopIdling()
{
if (mIdling)
{
RemoveFromIdleList();
mIdling = false;
}
}
void Repeater::DoIdlers(const EventRecord &aMacEvent)
{
Repeater* theIdler = sIdlers;
while (theIdler)
{
theIdler->RepeatAction(aMacEvent);
theIdler = theIdler->mNextIdlr;
}
}

View File

@@ -0,0 +1,364 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
//
// Mac implementation of the nsITimer interface
//
#include "nsITimer.h"
#include "nsITimerCallback.h"
#include "prlog.h"
#include "nsRepeater.h"
#include <list.h>
#include <Events.h>
#pragma mark class TimerImpl
//========================================================================================
class TimerImpl : public nsITimer
// TimerImpl implements nsITimer API
//========================================================================================
{
friend class TimerPeriodical;
private:
nsTimerCallbackFunc mCallbackFunc;
nsITimerCallback * mCallbackObject;
void * mClosure;
PRUint32 mDelay;
PRUint32 mFireTime; // Timer should fire when TickCount >= this number
TimerImpl * mPrev;
TimerImpl * mNext;
public:
// constructors
TimerImpl();
virtual ~TimerImpl();
NS_DECL_ISUPPORTS
PRUint32 GetFireTime() const { return mFireTime; }
void Fire();
// nsITimer overrides
virtual nsresult Init(nsTimerCallbackFunc aFunc,
void *aClosure,
PRUint32 aDelay);
virtual nsresult Init(nsITimerCallback *aCallback,
PRUint32 aDelay);
virtual void Cancel();
virtual PRUint32 GetDelay();
virtual void SetDelay(PRUint32 aDelay);
virtual void* GetClosure();
#if DEBUG
enum {
eGoodTimerSignature = 'Barf',
eDeletedTimerSignature = 'oops'
};
Boolean IsGoodTimer() const { return (mSignature == eGoodTimerSignature); }
#endif
private:
// Calculates mFireTime too
void SetDelaySelf( PRUint32 aDelay );
#if DEBUG
UInt32 mSignature;
#endif
};
#pragma mark class TimerPeriodical
//========================================================================================
class TimerPeriodical : public Repeater
// TimerPeriodical is a singleton Repeater subclass that fires
// off TimerImpl. The firing is done on idle.
//========================================================================================
{
static TimerPeriodical * gPeriodical;
TimerImpl* mTimers;
public:
// Returns the singleton instance
static TimerPeriodical * GetPeriodical();
TimerPeriodical();
virtual ~TimerPeriodical();
virtual void RepeatAction( const EventRecord &inMacEvent);
nsresult AddTimer( TimerImpl * aTimer);
nsresult RemoveTimer( TimerImpl * aTimer);
};
//========================================================================================
// TimerImpl implementation
//========================================================================================
NS_IMPL_ISUPPORTS(TimerImpl, nsITimer::GetIID())
//----------------------------------------------------------------------------------------
TimerImpl::TimerImpl()
//----------------------------------------------------------------------------------------
: mCallbackFunc(nsnull)
, mCallbackObject(nsnull)
, mClosure(nsnull)
, mDelay(0)
, mFireTime(0)
, mPrev(nsnull)
, mNext(nsnull)
#if DEBUG
, mSignature(eGoodTimerSignature)
#endif
{
NS_INIT_REFCNT();
}
//----------------------------------------------------------------------------------------
TimerImpl::~TimerImpl()
//----------------------------------------------------------------------------------------
{
Cancel();
NS_IF_RELEASE(mCallbackObject);
#if DEBUG
mSignature = eDeletedTimerSignature;
#endif
}
//----------------------------------------------------------------------------------------
nsresult TimerImpl::Init(nsTimerCallbackFunc aFunc,
void *aClosure,
PRUint32 aDelay)
//----------------------------------------------------------------------------------------
{
mCallbackFunc = aFunc;
mClosure = aClosure;
SetDelaySelf(aDelay);
return TimerPeriodical::GetPeriodical()->AddTimer(this);
}
//----------------------------------------------------------------------------------------
nsresult TimerImpl::Init(nsITimerCallback *aCallback,
PRUint32 aDelay)
//----------------------------------------------------------------------------------------
{
NS_ADDREF(aCallback);
mCallbackObject = aCallback;
SetDelaySelf(aDelay);
return TimerPeriodical::GetPeriodical()->AddTimer(this);
}
//----------------------------------------------------------------------------------------
void TimerImpl::Cancel()
//----------------------------------------------------------------------------------------
{
TimerPeriodical::GetPeriodical()->RemoveTimer(this);
}
//----------------------------------------------------------------------------------------
PRUint32 TimerImpl::GetDelay()
//----------------------------------------------------------------------------------------
{
return mDelay;
}
//----------------------------------------------------------------------------------------
void TimerImpl::SetDelay(PRUint32 aDelay)
//----------------------------------------------------------------------------------------
{
SetDelaySelf(aDelay);
}
//----------------------------------------------------------------------------------------
void* TimerImpl::GetClosure()
//----------------------------------------------------------------------------------------
{
return mClosure;
}
//----------------------------------------------------------------------------------------
void TimerImpl::Fire()
//----------------------------------------------------------------------------------------
{
NS_PRECONDITION(mRefCnt > 0, "Firing a disposed Timer!");
if (mCallbackFunc != NULL)
{
(*mCallbackFunc)(this, mClosure);
}
else if (mCallbackObject != NULL)
{
nsITimerCallback* object = mCallbackObject;
mCallbackObject = nsnull;
// because the Notify call will release it.
// We will release again it in the destructor if
// it is not null when we go away!
object->Notify(this); // Fire the timer
}
}
//----------------------------------------------------------------------------------------
void TimerImpl::SetDelaySelf( PRUint32 aDelay )
//----------------------------------------------------------------------------------------
{
mDelay = aDelay;
mFireTime = TickCount() + (mDelay * 3) / 50; // We need mFireTime in ticks (1/60th)
// but aDelay is in 1000th (60/1000 = 3/50)
}
TimerPeriodical * TimerPeriodical::gPeriodical = nsnull;
TimerPeriodical * TimerPeriodical::GetPeriodical()
{
if (gPeriodical == NULL)
gPeriodical = new TimerPeriodical();
return gPeriodical;
}
TimerPeriodical::TimerPeriodical()
{
mTimers = nsnull;
}
TimerPeriodical::~TimerPeriodical()
{
PR_ASSERT(mTimers == 0);
}
nsresult TimerPeriodical::AddTimer( TimerImpl * aTimer)
{
// make sure it's not already there
RemoveTimer(aTimer);
// keep list sorted by fire time
if (mTimers)
{
if (aTimer->GetFireTime() < mTimers->GetFireTime())
{
mTimers->mPrev = aTimer;
aTimer->mNext = mTimers;
mTimers = aTimer;
}
else
{
TimerImpl *t = mTimers;
TimerImpl *prevt;
// we know we will enter the while loop at least the first
// time, and thus prevt will be initialized
while (t && (t->GetFireTime() <= aTimer->GetFireTime()))
{
prevt = t;
t = t->mNext;
}
aTimer->mPrev = prevt;
aTimer->mNext = prevt->mNext;
prevt->mNext = aTimer;
if (aTimer->mNext) aTimer->mNext->mPrev = aTimer;
}
}
else mTimers = aTimer;
StartRepeating();
return NS_OK;
}
nsresult TimerPeriodical::RemoveTimer( TimerImpl * aTimer)
{
TimerImpl* t = mTimers;
TimerImpl* next_t = nsnull;
if (t) next_t = t->mNext;
while (t)
{
if (t == aTimer)
{
if (mTimers == t) mTimers = t->mNext;
if (t->mPrev) t->mPrev->mNext = t->mNext;
if (t->mNext) t->mNext->mPrev = t->mPrev;
t->mNext = nsnull;
t->mPrev = nsnull;
}
t = next_t;
if (t) next_t = t->mNext;
}
if ( mTimers == nsnull )
StopRepeating();
return NS_OK;
}
// Called through every event loop
// Loops through the list of available timers, and
// fires off the appropriate ones
void TimerPeriodical::RepeatAction( const EventRecord &inMacEvent)
{
PRBool done = false;
while (!done)
{
TimerImpl* t = mTimers;
while (t)
{
NS_ASSERTION(t->IsGoodTimer(), "Bad timer!");
if (t->GetFireTime() <= inMacEvent.when)
{
RemoveTimer(t);
t->Fire();
break;
}
t = t->mNext;
}
done = true;
}
}
NS_BASE nsresult NS_NewTimer(nsITimer** aInstancePtrResult)
{
NS_PRECONDITION(nsnull != aInstancePtrResult, "null ptr");
if (nsnull == aInstancePtrResult) {
return NS_ERROR_NULL_POINTER;
}
TimerImpl *timer = new TimerImpl();
if (nsnull == timer) {
return NS_ERROR_OUT_OF_MEMORY;
}
return timer->QueryInterface(nsITimer::GetIID(), (void **) aInstancePtrResult);
}

View File

@@ -0,0 +1,116 @@
#!nmake
#
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL. You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
# Reserved.
DEPTH=..\..
IGNORE_MANIFEST=1
DIRS = windows
DEFINES=-D_IMPL_NS_BASE -DWIN32_LEAN_AND_MEAN
LIBRARY_NAME=raptorbase
CPPSRCS = \
nsArena.cpp \
nsAtomTable.cpp \
nsBaseDLL.cpp \
nsBTree.cpp \
nsByteBuffer.cpp \
nsCRT.cpp \
nsDeque.cpp \
nsProperties.cpp \
nsRBTree.cpp \
nsSizeOfHandler.cpp \
nsString.cpp \
nsUnicharBuffer.cpp \
nsUnicharInputStream.cpp \
nsVoidArray.cpp \
nsFileSpec.cpp \
nsFileStream.cpp \
nsStringStream.cpp \
nsEscape.cpp \
nsIFileStream.cpp \
nsSpecialSystemDirectory.cpp \
$(NULL)
CPP_OBJS = \
.\$(OBJDIR)\nsArena.obj \
.\$(OBJDIR)\nsAtomTable.obj \
.\$(OBJDIR)\nsBaseDLL.obj \
.\$(OBJDIR)\nsBTree.obj \
.\$(OBJDIR)\nsByteBuffer.obj \
.\$(OBJDIR)\nsCRT.obj \
.\$(OBJDIR)\nsDeque.obj \
.\$(OBJDIR)\nsProperties.obj \
.\$(OBJDIR)\nsRBTree.obj \
.\$(OBJDIR)\nsSizeOfHandler.obj \
.\$(OBJDIR)\nsString.obj \
.\$(OBJDIR)\nsUnicharBuffer.obj \
.\$(OBJDIR)\nsUnicharInputStream.obj \
.\$(OBJDIR)\nsVoidArray.obj \
.\$(OBJDIR)\nsFileSpec.obj \
.\$(OBJDIR)\nsFileStream.obj \
.\$(OBJDIR)\nsEscape.obj \
.\$(OBJDIR)\nsIFileStream.obj \
.\$(OBJDIR)\nsIStringStream.obj \
.\$(OBJDIR)\nsSpecialSystemDirectory.obj \
$(NULL)
EXPORTS=nscore.h nsIArena.h nsIAtom.h nsIByteBuffer.h \
nsBTree.h nsCRT.h nsDeque.h nsITimer.h \
nsITimerCallback.h nsIUnicharBuffer.h nsRBTree.h \
nsIUnicharInputStream.h nsString.h nsVoidArray.h \
nsUnitConversion.h \
nsIBaseStream.h nsIInputStream.h nsIOutputStream.h \
nsInt64.h nsTime.h
MODULE=raptor
REQUIRES=xpcom netlib raptor uconv
LINCS=-I$(PUBLIC)\xpcom -I$(PUBLIC)\netlib \
-I$(PUBLIC)\raptor -I$(PUBLIC)\uconv -I$(PUBLIC)\unicharutil
MAKE_OBJ_TYPE = DLL
DLLNAME = raptorbase
DLL=.\$(OBJDIR)\$(DLLNAME).dll
OBJS = $(OBJS) .\$(OBJDIR)\nsTimer.obj .\$(OBJDIR)\nsCaretProperties.obj
LCFLAGS = \
$(LCFLAGS) \
$(DEFINES) \
$(NULL)
# These are the libraries we need to link with to create the dll
LLIBS= \
$(DIST)\lib\xpcom32.lib \
$(DIST)\lib\plc3.lib \
$(LIBNSPR)
!if "$(MOZ_BITS)"=="32" && defined(MOZ_DEBUG) && defined(GLOWCODE)
LLIBS=$(LLIBS) $(GLOWDIR)\glowcode.lib
!endif
include <$(DEPTH)\config\rules.mak>
libs:: $(DLL)
$(MAKE_INSTALL) .\$(OBJDIR)\$(DLLNAME).dll $(DIST)\bin
$(MAKE_INSTALL) .\$(OBJDIR)\$(DLLNAME).lib $(DIST)\lib
clobber::
rm -f $(DIST)\bin\$(DLLNAME).dll
rm -f $(DIST)\lib\$(DLLNAME).lib

View File

@@ -0,0 +1,39 @@
#
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL. You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
# Reserved.
#
DEPTH = ../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
LIBRARY_NAME = gmbasemotif
MODULE=base
REQUIRES = xpcom raptor
DEFINES += -D_IMPL_NS_WIDGET
CPPSRCS = \
nsTimer.cpp \
nsCaretProperties.cpp \
$(NULL)
include $(topsrcdir)/config/rules.mk

View File

@@ -0,0 +1,39 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#include "nscore.h"
#include "nsCaretProperties.h"
//-----------------------------------------------------------------------------
nsCaretProperties::nsCaretProperties()
: mCaretWidth(eDefaultCaretWidth)
, mBlinkRate(eDefaulBlinkRate)
{
// in your platform-specific class, get data from the OS in your constructor
}
//-----------------------------------------------------------------------------
nsCaretProperties* NewCaretProperties()
{
return new nsCaretProperties();
}

View File

@@ -0,0 +1,173 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#include "nsITimer.h"
#include "nsITimerCallback.h"
#include "nsCRT.h"
#include "prlog.h"
#include <stdio.h>
#include <limits.h>
#include <X11/Intrinsic.h>
static NS_DEFINE_IID(kITimerIID, NS_ITIMER_IID);
// Hack for now. This is Bad because it creates a dependency between the widget
// library and this library. This needs to be replaced with having code
// to pass an interface which can be queried for the app context.
extern XtAppContext gAppContext;
extern void nsTimerExpired(XtPointer aCallData);
/*
* Implementation of timers using Xt timer facility
*/
class TimerImpl : public nsITimer {
public:
public:
TimerImpl();
virtual ~TimerImpl();
virtual nsresult Init(nsTimerCallbackFunc aFunc,
void *aClosure,
// PRBool aRepeat,
PRUint32 aDelay);
virtual nsresult Init(nsITimerCallback *aCallback,
// PRBool aRepeat,
PRUint32 aDelay);
NS_DECL_ISUPPORTS
virtual void Cancel();
virtual PRUint32 GetDelay() { return mDelay; }
virtual void SetDelay(PRUint32 aDelay) { mDelay=aDelay; };
virtual void* GetClosure() { return mClosure; }
void FireTimeout();
private:
nsresult Init(PRUint32 aDelay);
PRUint32 mDelay;
nsTimerCallbackFunc mFunc;
void *mClosure;
nsITimerCallback *mCallback;
// PRBool mRepeat;
TimerImpl *mNext;
XtIntervalId mTimerId;
};
void TimerImpl::FireTimeout()
{
if (mFunc != NULL) {
(*mFunc)(this, mClosure);
}
else if (mCallback != NULL) {
mCallback->Notify(this); // Fire the timer
}
// Always repeating here
// if (mRepeat)
// mTimerId = XtAppAddTimeOut(gAppContext, GetDelay(),(XtTimerCallbackProc)nsTimerExpired, this);
}
TimerImpl::TimerImpl()
{
NS_INIT_REFCNT();
mFunc = NULL;
mCallback = NULL;
mNext = NULL;
mTimerId = 0;
mDelay = 0;
mClosure = NULL;
}
TimerImpl::~TimerImpl()
{
}
nsresult
TimerImpl::Init(nsTimerCallbackFunc aFunc,
void *aClosure,
// PRBool aRepeat,
PRUint32 aDelay)
{
mFunc = aFunc;
mClosure = aClosure;
// mRepeat = aRepeat;
mTimerId = XtAppAddTimeOut(gAppContext, aDelay,(XtTimerCallbackProc)nsTimerExpired, this);
return Init(aDelay);
}
nsresult
TimerImpl::Init(nsITimerCallback *aCallback,
// PRBool aRepeat,
PRUint32 aDelay)
{
mCallback = aCallback;
// mRepeat = aRepeat;
mTimerId = XtAppAddTimeOut(gAppContext, aDelay, (XtTimerCallbackProc)nsTimerExpired, this);
return Init(aDelay);
}
nsresult
TimerImpl::Init(PRUint32 aDelay)
{
mDelay = aDelay;
NS_ADDREF(this);
return NS_OK;
}
NS_IMPL_ISUPPORTS(TimerImpl, kITimerIID)
void
TimerImpl::Cancel()
{
XtRemoveTimeOut(mTimerId);
}
NS_BASE nsresult NS_NewTimer(nsITimer** aInstancePtrResult)
{
NS_PRECONDITION(nsnull != aInstancePtrResult, "null ptr");
if (nsnull == aInstancePtrResult) {
return NS_ERROR_NULL_POINTER;
}
TimerImpl *timer = new TimerImpl();
if (nsnull == timer) {
return NS_ERROR_OUT_OF_MEMORY;
}
return timer->QueryInterface(kITimerIID, (void **) aInstancePtrResult);
}
void nsTimerExpired(XtPointer aCallData)
{
TimerImpl* timer = (TimerImpl *)aCallData;
timer->FireTimeout();
}

View File

@@ -0,0 +1,80 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#include "nsIArena.h"
#include "nsCRT.h"
#define PL_ARENA_CONST_ALIGN_MASK 7
#include "plarena.h"
static NS_DEFINE_IID(kArenaIID, NS_IARENA_IID);
// Simple arena implementation layered on plarena
class ArenaImpl : public nsIArena {
public:
ArenaImpl(PRInt32 aBlockSize);
NS_DECL_ISUPPORTS
virtual void* Alloc(PRInt32 aSize);
protected:
~ArenaImpl();
PLArenaPool mPool;
PRInt32 mBlockSize;
};
ArenaImpl::ArenaImpl(PRInt32 aBlockSize)
{
NS_INIT_REFCNT();
if (aBlockSize < NS_MIN_ARENA_BLOCK_SIZE) {
aBlockSize = NS_DEFAULT_ARENA_BLOCK_SIZE;
}
PL_INIT_ARENA_POOL(&mPool, "nsIArena", aBlockSize);
mBlockSize = aBlockSize;
}
NS_IMPL_ISUPPORTS(ArenaImpl,kArenaIID)
ArenaImpl::~ArenaImpl()
{
PL_FinishArenaPool(&mPool);
}
void* ArenaImpl::Alloc(PRInt32 size)
{
// Adjust size so that it's a multiple of sizeof(double)
PRInt32 align = size & (sizeof(double) - 1);
if (0 != align) {
size += sizeof(double) - align;
}
void* p;
PL_ARENA_ALLOCATE(p, &mPool, size);
return p;
}
NS_BASE nsresult NS_NewHeapArena(nsIArena** aInstancePtrResult,
PRInt32 aArenaBlockSize)
{
ArenaImpl* it = new ArenaImpl(aArenaBlockSize);
if (nsnull == it) {
return NS_ERROR_OUT_OF_MEMORY;
}
return it->QueryInterface(kArenaIID, (void **) aInstancePtrResult);
}

View File

@@ -0,0 +1,158 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#include "nsIAtom.h"
#include "nsString.h"
#include "nsCRT.h"
#include "plhash.h"
#include "nsISizeOfHandler.h"
/**
* The shared hash table for atom lookups.
*/
static nsrefcnt gAtoms;
static struct PLHashTable* gAtomHashTable;
class AtomImpl : public nsIAtom {
public:
AtomImpl();
~AtomImpl();
NS_DECL_ISUPPORTS
void* operator new(size_t size, const PRUnichar* us, PRInt32 uslen);
void operator delete(void* ptr) {
::operator delete(ptr);
}
virtual void ToString(nsString& aBuf) const;
virtual const PRUnichar* GetUnicode() const;
NS_IMETHOD SizeOf(nsISizeOfHandler* aHandler) const;
// Actually more; 0 terminated. This slot is reserved for the
// terminating zero.
PRUnichar mString[1];
};
AtomImpl::AtomImpl()
{
NS_INIT_REFCNT();
// Every live atom holds a reference on the atom hashtable
gAtoms++;
}
AtomImpl::~AtomImpl()
{
NS_PRECONDITION(nsnull != gAtomHashTable, "null atom hashtable");
if (nsnull != gAtomHashTable) {
PL_HashTableRemove(gAtomHashTable, mString);
nsrefcnt cnt = --gAtoms;
if (0 == cnt) {
// When the last atom is destroyed, the atom arena is destroyed
NS_ASSERTION(0 == gAtomHashTable->nentries, "bad atom table");
PL_HashTableDestroy(gAtomHashTable);
gAtomHashTable = nsnull;
}
}
}
static NS_DEFINE_IID(kIAtomIID, NS_IATOM_IID);
NS_IMPL_ISUPPORTS(AtomImpl, kIAtomIID);
void* AtomImpl::operator new(size_t size, const PRUnichar* us, PRInt32 uslen)
{
size = size + uslen * sizeof(PRUnichar);
AtomImpl* ii = (AtomImpl*) ::operator new(size);
nsCRT::memcpy(ii->mString, us, uslen * sizeof(PRUnichar));
ii->mString[uslen] = 0;
return ii;
}
void AtomImpl::ToString(nsString& aBuf) const
{
aBuf.SetLength(0);
aBuf.Append(mString, nsCRT::strlen(mString));
}
const PRUnichar* AtomImpl::GetUnicode() const
{
return mString;
}
NS_IMETHODIMP
AtomImpl::SizeOf(nsISizeOfHandler* aHandler) const
{
aHandler->Add(sizeof(*this) + nsCRT::strlen(mString) * sizeof(PRUnichar));
return NS_OK;
}
//----------------------------------------------------------------------
static PLHashNumber HashKey(const PRUnichar* k)
{
return (PLHashNumber) nsCRT::HashValue(k);
}
static PRIntn CompareKeys(const PRUnichar* k1, const PRUnichar* k2)
{
return nsCRT::strcmp(k1, k2) == 0;
}
NS_BASE nsIAtom* NS_NewAtom(const char* isolatin1)
{
nsAutoString tmp(isolatin1);
return NS_NewAtom(tmp.GetUnicode());
}
NS_BASE nsIAtom* NS_NewAtom(const nsString& aString)
{
return NS_NewAtom(aString.GetUnicode());
}
NS_BASE nsIAtom* NS_NewAtom(const PRUnichar* us)
{
if (nsnull == gAtomHashTable) {
gAtomHashTable = PL_NewHashTable(8, (PLHashFunction) HashKey,
(PLHashComparator) CompareKeys,
(PLHashComparator) nsnull,
nsnull, nsnull);
}
PRUint32 uslen;
PRUint32 hashCode = nsCRT::HashValue(us, &uslen);
PLHashEntry** hep = PL_HashTableRawLookup(gAtomHashTable, hashCode, us);
PLHashEntry* he = *hep;
if (nsnull != he) {
nsIAtom* id = (nsIAtom*) he->value;
NS_ADDREF(id);
return id;
}
AtomImpl* id = new(us, uslen) AtomImpl();
PL_HashTableRawAdd(gAtomHashTable, hep, hashCode, id->mString, id);
NS_ADDREF(id);
return id;
}
NS_BASE nsrefcnt NS_GetNumberOfAtoms(void)
{
if (nsnull != gAtomHashTable) {
NS_PRECONDITION(nsrefcnt(gAtomHashTable->nentries) == gAtoms, "bad atom table");
}
return gAtoms;
}

View File

@@ -0,0 +1,402 @@
/**
* This file defines the binary tree class and it
* nsNode child class.
*
* This simple version stores nodes, and the
* nodes store void* ptrs.
*
* @update gess 4/11/98
* @param
* @return
*/
#include "nsBTree.h"
/**
* default constructor
*
* @update gess 4/11/98
*/
nsNode::nsNode(){
mLeft=0;
mRight=0;
mParent=0;
mColor=eBlack;
}
/**
* Copy constructor
*
* @update gess 4/11/98
* @param
* @return
*/
nsNode::nsNode(const nsNode& aNode){
mLeft=aNode.mLeft;
mRight=aNode.mRight;
mParent=aNode.mParent;
mColor=aNode.mColor;
}
/**
* destructor
*
* @update gess 4/11/98
*/
nsNode::~nsNode(){
}
/**
* Retrive ptr to parent node
*
* @update gess 4/11/98
* @return ptr to parent node
*/
nsNode* nsNode::GetParentNode(void) const{
return mParent;
}
/**
* Retrieve ptr to left (less) node
*
* @update gess 4/11/98
* @return ptr to left (may be NULL)
*/
nsNode* nsNode::GetLeftNode(void) const{
return mLeft;
}
/**
* Retrieve ptr to right (more) node
*
* @update gess 4/11/98
* @return ptr to right node (may be NULL)
*/
nsNode* nsNode::GetRightNode(void) const{
return mRight;
}
/**
*
*
* @update gess 4/11/98
* @param
* @return
*/
nsNode& nsNode::operator=(const nsNode& aNode){
if(this!=&aNode){
mLeft=aNode.mLeft;
mRight=aNode.mRight;
mParent=aNode.mParent;
mColor=aNode.mColor;
}
return *this;
}
/********************************************************
* Here comes the BTREE class...
********************************************************/
/**
* nsBTree constructor
*
* @update gess 4/11/98
*/
nsBTree::nsBTree(){
mRoot=0;
}
/**
* destructor
*
* @update gess 4/11/98
*/
nsBTree::~nsBTree(){
if(mRoot){
//walk the tree and destroy the children.
}
}
/**
* Given a node, we're supposed to add it into
* our tree.
*
* @update gess 4/11/98
* @param aNode to be added to tree
* @return ptr to added node or NULL
*/
nsNode* nsBTree::Add(nsNode& aNode){
nsNode* node1=mRoot; //x
nsNode* node2=0; //y
while(node1) {
node2=node1;
if(aNode<*node1)
node1=node1->mLeft;
else node1=node1->mRight;
}
aNode.mParent=node2;
if(!node2){
mRoot=&aNode;
}
else{
if(aNode<*node2)
node2->mLeft=&aNode;
else node2->mRight=&aNode;
}
return &aNode;
}
/**
* Removes given node from tree if present.
*
* @update gess 4/11/98
* @param aNode to be found and removed
* @return ptr to remove node, or NULL
*/
nsNode* nsBTree::Remove(nsNode& aNode){
nsNode* result=0;
nsNode* node3=Find(aNode);
if(node3) {
nsNode* node1;
nsNode* node2;
if((!node3->mLeft) || (!node3->mRight))
node2=node3;
else node2=After(*node3);
if(node2->mLeft)
node1=node2->mLeft;
else node1=node2->mRight;
if(node1)
node1->mParent=node2->mParent;
if(node2->mParent) {
if(node2==node2->mParent->mLeft)
node2->mParent->mLeft=node1;
else node2->mParent->mRight=node1;
}
else mRoot=node1;
if(node2!=node3)
(*node3)==(*node2);
if(node2->mColor == nsNode::eBlack)
ReBalance(*node1);
delete node2;
result=&aNode;
}
return result;
}
/**
* Clears the tree of any data.
* Be careful here if your objects are heap based!
* This method doesn't free the objects, so if you
* don't have your own pointers, they will become
* orphaned.
*
* @update gess 4/11/98
* @param
* @return this
*/
nsBTree& nsBTree::Empty(nsNode* aNode) {
mRoot=0;
return *this;
}
/**
* This method destroys all the objects in the tree.
* WARNING: Never call this method on stored objects
* that are stack-based!
*
* @update gess 4/11/98
* @param
* @return this
*/
nsBTree& nsBTree::Erase(nsNode* aNode){
// nsNode* node1 =(aNode) ? aNode : mRoot;
if(aNode) {
Erase(aNode->mLeft); //begin by walking left side
Erase(aNode->mRight); //then search right side
delete aNode; //until a leaf, then delete
}
return *this;
}
/**
* Retrieve ptr to first node in tree
*
* @update gess 4/11/98
* @return
*/
nsNode* nsBTree::First(void) const{
if(mRoot)
return First(*mRoot);
return 0;
}
/**
* Retrive ptr to first node rel to given node
*
* @update gess 4/11/98
* @param node to begin scan from
* @return ptr to first node from given node or NULL
*/
nsNode* nsBTree::First(const nsNode& aNode) const{
nsNode* result=0;
if(mRoot) {
result=mRoot;
while(result->GetLeftNode()) {
result=result->GetLeftNode();
}
}
return result;
}
/**
* Retrive ptr to last node
*
* @update gess 4/11/98
* @return ptr to last node rel to root or NULL
*/
nsNode* nsBTree::Last(void) const{
if(mRoot)
return Last(*mRoot);
return 0;
}
/**
* Retrive ptr to last node rel to given node
*
* @update gess 4/11/98
* @param node to begin scan from
* @return ptr to first node from given node or NULL
*/
nsNode* nsBTree::Last(const nsNode& aNode) const{
nsNode* result=0;
if(mRoot) {
result=mRoot;
while(result->GetRightNode()) {
result=result->GetRightNode();
}
}
return result;
}
/**
* Retrive ptr to prior node rel to given node
*
* @update gess 4/11/98
* @param node to begin scan from
* @return ptr to prior node from given node or NULL
*/
nsNode* nsBTree::Before(const nsNode& aNode) const{
if(aNode.GetLeftNode())
return Last(*aNode.GetLeftNode());
//otherwise...
nsNode* node1=(nsNode*)&aNode;
nsNode* node2=aNode.GetParentNode();
while((node2) && (node1==node2->GetLeftNode())) {
node1=node2;
node2=node2->GetParentNode();
}
return node2;
}
/**
* Retrive ptr to next node rel to given node
*
* @update gess 4/11/98
* @param node to begin scan from
* @return ptr to next node from given node or NULL
*/
nsNode* nsBTree::After(const nsNode& aNode) const{
if(aNode.GetRightNode())
return First(*aNode.GetRightNode());
//otherwise...
nsNode* node1=(nsNode*)&aNode;
nsNode* node2=aNode.GetParentNode();
while((node2) && (node1==node2->GetRightNode())) {
node1=node2;
node2=node2->GetParentNode();
}
return node2;
}
/**
* Scan for given node
*
* @update gess 4/11/98
* @param node to find
* @return ptr to given node, or NULL
*/
nsNode* nsBTree::Find(const nsNode& aNode) const{
nsNode* result=mRoot;
while((result) && (!(aNode==(*result)))) {
if(aNode<*result)
result=result->mLeft;
else result=result->mRight;
}
return (nsNode*)result;
}
/**
* Rebalances tree around the given node. This only
* needs to be called after a node is deleted.
* This method does nothing for btrees, but is
* needed for RBTrees.
*
* @update gess 4/11/98
* @param aNode -- node to balance around
* @return this
*/
nsBTree& nsBTree::ReBalance(nsNode& aNode){
return *this;
}
/**
*
*
* @update gess 4/11/98
* @param
* @return
*/
const nsBTree& nsBTree::ForEach(nsNodeFunctor& aFunctor,nsNode* aNode) const{
nsNode* node1 =(aNode) ? aNode : mRoot;
if(node1) {
if(node1->mLeft)
ForEach(aFunctor,node1->mLeft); //begin by walking left side
aFunctor(*node1);
if(node1->mRight)
ForEach(aFunctor,node1->mRight); //then search right side
}
return *this;
}

283
mozilla/base/src/nsBTree.h Normal file
View File

@@ -0,0 +1,283 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
/**
* This file defines the binary tree class and it
* nsNode child class. Note that like all nsBTree
* containers, this one does not automatically balance.
* (Find for random data, bad for pre-ordered data).
*
* This simple version stores nodes, and the
* nodes store void* ptrs.
*
* @update gess 4/11/98
*/
/**
* nsNode
*
* @update gess 4/11/98
* @param
* @return
*/
#ifndef _BTREE_H
#define _BTREE_H
#include "nscore.h"
struct NS_BASE nsNode {
/**
*
* @update gess4/20/98
* @param
* @return
*/
nsNode();
/**
* Copy constructor
* @update gess 4/11/98
*/
nsNode(const nsNode& aNode);
/**
* destructor
* @update gess 4/11/98
*/
virtual ~nsNode();
/**
* Retrieve parent node
*
* @update gess 4/11/98
* @return
*/
nsNode* GetParentNode(void) const;
/**
*
* @update gess 4/11/98
* @param
* @return
*/
nsNode* GetLeftNode() const;
/**
*
* @update gess 4/11/98
* @param
* @return
*/
nsNode* GetRightNode() const;
/**
*
* @update gess 4/11/98
* @param
* @return
*/
virtual nsNode& operator=(const nsNode& aNode);
/**
* This method gets called to determine which of
* two nodes is less. When you create your own
* subclass of nsNode, this is the most important
* method for you to overload.
*
* @update gess 4/11/98
* @param
* @return
*/
virtual PRBool operator<(const nsNode& aNode) const=0;
/**
* This method gets called to determine which of
* two nodes is less. When you create your own
* subclass of nsNode, this is the most important
* method for you to overload.
*
* @update gess 4/11/98
* @param
* @return
*/
virtual PRBool operator==(const nsNode& aNode) const=0;
enum eRBColor {eRed,eBlack};
nsNode* mParent;
nsNode* mLeft;
nsNode* mRight;
eRBColor mColor;
};
/**
* The Nodefunctor class is used when you want to create
* callbacks between the nsRBTree and your generic code.
*
* @update gess4/20/98
*/
class NS_BASE nsNodeFunctor {
public:
virtual nsNodeFunctor& operator()(nsNode& aNode)=0;
};
/****************************************************
* Here comes the nsBTree class...
****************************************************/
class NS_BASE nsBTree {
public:
friend class nsBTreeIterator;
nsBTree();
virtual ~nsBTree();
/**
* Add given node reference into our tree.
*
* @update gess 4/11/98
* @param aNode is a ref to a node to be added
* @return newly added node
*/
nsNode* Add(nsNode& aNode);
/**
* Remove given node reference into our tree.
*
* @update gess 4/11/98
* @param aNode is a ref to a node to be removed
* @return Ptr to node if found (and removed) or NULL
*/
nsNode* Remove(nsNode& aNode);
/**
* Clears the tree of any data.
* Be careful here if your objects are heap based!
* This method doesn't free the objects, so if you
* don't have your own pointers, they will become
* orphaned.
*
* @update gess 4/11/98
* @param
* @return this
*/
nsBTree& Empty(nsNode* aNode=0);
/**
* This method destroys all the objects in the tree.
* WARNING: Never call this method on stored objects
* that are stack-based!
*
* @update gess 4/11/98
* @param
* @return this
*/
nsBTree& Erase(nsNode* aNode=0);
/**
* Retrieve ptr to 1st node in tree (starting at root)
*
* @update gess 4/11/98
* @return ptr to 1st node, possible to be NULL
*/
nsNode* First(void) const;
/**
* Find first node in tree starting at given node
*
* @update gess 4/11/98
* @param aNode node to begin 1st search from
* @return ptr to 1st node below given node
*/
nsNode* First(const nsNode& aNode) const;
/**
* Retrieve ptr to last node in tree relative to root.
*
* @update gess 4/11/98
* @return ptr to last node or NULL
*/
nsNode* Last(void) const;
/**
* Retrieve ptr to last node in tree relative to given node.
*
* @update gess 4/11/98
* @param node to find last node from
* @return ptr to last node or NULL
*/
nsNode* Last(const nsNode& aNode) const;
/**
* Retrieve a ptr to the node that preceeds given node
*
* @update gess 4/11/98
* @param aNode used as reference to find prev.
* @return ptr to prev node or NULL
*/
nsNode* Before(const nsNode& aNode) const;
/**
* Retrieve a ptr to the node after given node
*
* @update gess 4/11/98
* @param aNode used as reference to find next.
* @return ptr to next node or NULL
*/
nsNode* After(const nsNode& aNode) const;
/**
* Find given node in tree.
* (Why would you want to find a node you already have?)
*
* @update gess 4/11/98
* @param aNode is the node you're searching for
* @return ptr to node if found, or NULL
*/
nsNode* Find(const nsNode& aNode) const;
/**
* Walks the tree, starting with root.
*
* @update gess 4/11/98
*/
virtual const nsBTree& ForEach(nsNodeFunctor& aFunctor,nsNode* aNode=0) const;
protected:
/**
* Rebalances tree around the given node. This only
* needs to be called after a node is deleted.
*
* @update gess 4/11/98
* @param aNode -- node to balance around
* @return this
*/
virtual nsBTree& ReBalance(nsNode& aNode);
nsNode* mRoot;
};
#endif

View File

@@ -0,0 +1,108 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#include "nsBaseDLL.h"
#include "nscore.h"
#include "nsIProperties.h"
#include "nsProperties.h"
#include "nsIComponentManager.h"
#include "nsIServiceManager.h"
#include "nsCOMPtr.h"
static NS_DEFINE_CID(kComponentManagerCID, NS_COMPONENTMANAGER_CID);
PRInt32 gLockCount = 0;
NS_DEFINE_IID(kIFactoryIID, NS_IFACTORY_IID);
extern "C" NS_EXPORT nsresult
NSRegisterSelf(nsISupports* aServMgr, const char* path)
{
nsresult rv;
nsCOMPtr<nsIServiceManager> servMgr(do_QueryInterface(aServMgr, &rv));
if (NS_FAILED(rv)) return rv;
nsIComponentManager* compMgr;
rv = servMgr->GetService(kComponentManagerCID,
nsIComponentManager::GetIID(),
(nsISupports**)&compMgr);
if (NS_FAILED(rv)) return rv;
rv = compMgr->RegisterComponent(kPropertiesCID, NULL, NULL,
path, PR_TRUE, PR_TRUE);
(void)servMgr->ReleaseService(kComponentManagerCID, compMgr);
return rv;
}
extern "C" NS_EXPORT nsresult
NSUnregisterSelf(nsISupports* aServMgr, const char* path)
{
nsresult rv;
nsCOMPtr<nsIServiceManager> servMgr(do_QueryInterface(aServMgr, &rv));
if (NS_FAILED(rv)) return rv;
nsIComponentManager* compMgr;
rv = servMgr->GetService(kComponentManagerCID,
nsIComponentManager::GetIID(),
(nsISupports**)&compMgr);
if (NS_FAILED(rv)) return rv;
rv = compMgr->UnregisterFactory(kPropertiesCID, path);
(void)servMgr->ReleaseService(kComponentManagerCID, compMgr);
return rv;
}
extern "C" NS_EXPORT nsresult
NSGetFactory(nsISupports* aServMgr,
const nsCID& aClass,
const char *aClassName,
const char *aProgID,
nsIFactory** aFactory)
{
nsresult res;
if (!aFactory) {
return NS_ERROR_NULL_POINTER;
}
if (aClass.Equals(kPropertiesCID)) {
nsPropertiesFactory *propsFactory = new nsPropertiesFactory();
if (!propsFactory) {
return NS_ERROR_OUT_OF_MEMORY;
}
res = propsFactory->QueryInterface(kIFactoryIID, (void**) aFactory);
if (NS_FAILED(res)) {
*aFactory = nsnull;
delete propsFactory;
}
return res;
}
return NS_NOINTERFACE;
}
extern "C" NS_EXPORT PRBool
NSCanUnload(nsISupports* serviceMgr)
{
return PR_FALSE; // XXX can we unload this?
}

View File

@@ -0,0 +1,26 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#ifndef nsBaseDLL_h___
#define nsBaseDLL_h___
#include "prtypes.h"
extern PRInt32 gLockCount;
#endif /* nsBaseDLL_h___ */

View File

@@ -0,0 +1,137 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#include "nsIByteBuffer.h"
#include "nsIInputStream.h"
#include "nsCRT.h"
#define MIN_BUFFER_SIZE 32
class ByteBufferImpl : public nsIByteBuffer {
public:
ByteBufferImpl(PRUint32 aBufferSize);
~ByteBufferImpl();
NS_DECL_ISUPPORTS
virtual PRUint32 GetLength(void) const;
virtual PRUint32 GetBufferSize(void) const;
virtual char* GetBuffer() const;
virtual PRBool Grow(PRUint32 aNewSize);
virtual PRInt32 Fill(nsresult* aErrorCode, nsIInputStream* aStream,
PRUint32 aKeep);
char* mBuffer;
PRUint32 mSpace;
PRUint32 mLength;
};
ByteBufferImpl::ByteBufferImpl(PRUint32 aBufferSize)
{
if (aBufferSize < MIN_BUFFER_SIZE) {
aBufferSize = MIN_BUFFER_SIZE;
}
mSpace = aBufferSize;
mBuffer = new char[aBufferSize];
mLength = 0;
NS_INIT_REFCNT();
}
NS_DEFINE_IID(kByteBufferIID,NS_IBYTE_BUFFER_IID);
NS_IMPL_ISUPPORTS(ByteBufferImpl,kByteBufferIID)
ByteBufferImpl::~ByteBufferImpl()
{
if (nsnull != mBuffer) {
delete[] mBuffer;
mBuffer = nsnull;
}
mLength = 0;
}
PRUint32 ByteBufferImpl::GetLength(void) const
{
return mLength;
}
PRUint32 ByteBufferImpl::GetBufferSize(void) const
{
return mSpace;
}
char* ByteBufferImpl::GetBuffer(void) const
{
return mBuffer;
}
PRBool ByteBufferImpl::Grow(PRUint32 aNewSize)
{
if (aNewSize < MIN_BUFFER_SIZE) {
aNewSize = MIN_BUFFER_SIZE;
}
char* newbuf = new char[aNewSize];
if (nsnull != newbuf) {
if (0 != mLength) {
nsCRT::memcpy(newbuf, mBuffer, mLength);
}
delete[] mBuffer;
mBuffer = newbuf;
return PR_TRUE;
}
return PR_FALSE;
}
PRInt32 ByteBufferImpl::Fill(nsresult* aErrorCode, nsIInputStream* aStream,
PRUint32 aKeep)
{
NS_PRECONDITION(nsnull != aStream, "null stream");
NS_PRECONDITION(aKeep <= mLength, "illegal keep count");
if ((nsnull == aStream) || (PRUint32(aKeep) > PRUint32(mLength))) {
// whoops
*aErrorCode = NS_BASE_STREAM_ILLEGAL_ARGS;
return -1;
}
if (0 != aKeep) {
// Slide over kept data
nsCRT::memmove(mBuffer, mBuffer + (mLength - aKeep), aKeep);
}
// Read in some new data
mLength = aKeep;
PRUint32 nb;
*aErrorCode = aStream->Read(mBuffer + aKeep, mSpace - aKeep, &nb);
if (NS_SUCCEEDED(*aErrorCode)) {
mLength += nb;
}
else
nb = 0;
return nb;
}
NS_BASE nsresult NS_NewByteBuffer(nsIByteBuffer** aInstancePtrResult,
nsISupports* aOuter,
PRUint32 aBufferSize)
{
if (nsnull != aOuter) {
return NS_ERROR_NO_AGGREGATION;
}
ByteBufferImpl* it = new ByteBufferImpl(aBufferSize);
if (nsnull == it) {
return NS_ERROR_OUT_OF_MEMORY;
}
return it->QueryInterface(kByteBufferIID, (void **) aInstancePtrResult);
}

523
mozilla/base/src/nsCRT.cpp Normal file
View File

@@ -0,0 +1,523 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
/**
* MODULE NOTES:
* @update gess7/30/98
*
* Much as I hate to do it, we were using string compares wrong.
* Often, programmers call functions like strcmp(s1,s2), and pass
* one or more null strings. Rather than blow up on these, I've
* added quick checks to ensure that cases like this don't cause
* us to fail.
*
* In general, if you pass a null into any of these string compare
* routines, we simply return 0.
*/
#include "nsCRT.h"
#include "nsUnicharUtilCIID.h"
#include "nsIServiceManager.h"
#include "nsICaseConversion.h"
// XXX Bug: These tables don't lowercase the upper 128 characters properly
// This table maps uppercase characters to lower case characters;
// characters that are neither upper nor lower case are unaffected.
static const unsigned char kUpper2Lower[256] = {
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
64,
// upper band mapped to lower [A-Z] => [a-z]
97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
112,113,114,115,116,117,118,119,120,121,122,
91, 92, 93, 94, 95,
96, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,
128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,
224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255
};
static const unsigned char kLower2Upper[256] = {
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
96,
// lower band mapped to upper [a-z] => [A-Z]
65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
123,124,125,126,127,
128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,
224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255
};
// XXX bug: this doesn't map 0x80 to 0x9f properly
static const PRUnichar kIsoLatin1ToUCS2[256] = {
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
96, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,
128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,
224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255
};
//----------------------------------------------------------------------
#define TOLOWER(_ucs2) \
(((_ucs2) < 128) ? PRUnichar(kUpper2Lower[_ucs2]) : _ToLower(_ucs2))
#define TOUPPER(_ucs2) \
(((_ucs2) < 128) ? PRUnichar(kLower2Upper[_ucs2]) : _ToUpper(_ucs2))
class HandleCaseConversionShutdown : public nsIShutdownListener {
public :
NS_IMETHOD OnShutdown(const nsCID& cid, nsISupports* service);
HandleCaseConversionShutdown(void) { NS_INIT_REFCNT(); }
virtual ~HandleCaseConversionShutdown(void) {}
NS_DECL_ISUPPORTS
};
static NS_DEFINE_CID(kUnicharUtilCID, NS_UNICHARUTIL_CID);
static NS_DEFINE_IID(kICaseConversionIID, NS_ICASECONVERSION_IID);
static nsICaseConversion * gCaseConv = NULL;
static NS_DEFINE_IID(kIShutdownListenerIID, NS_ISHUTDOWNLISTENER_IID);
NS_IMPL_ISUPPORTS(HandleCaseConversionShutdown, kIShutdownListenerIID);
nsresult
HandleCaseConversionShutdown::OnShutdown(const nsCID& cid, nsISupports* service)
{
if (cid.Equals(kUnicharUtilCID)) {
NS_ASSERTION(service == gCaseConv, "wrong service!");
nsrefcnt cnt = gCaseConv->Release();
gCaseConv = NULL;
}
return NS_OK;
}
static HandleCaseConversionShutdown* gListener = NULL;
static void StartUpCaseConversion()
{
nsresult err;
if ( NULL == gListener )
{
gListener = new HandleCaseConversionShutdown();
gListener->AddRef();
}
err = nsServiceManager::GetService(kUnicharUtilCID, kICaseConversionIID,
(nsISupports**) &gCaseConv, gListener);
}
static void CheckCaseConversion()
{
if(NULL == gCaseConv )
StartUpCaseConversion();
NS_ASSERTION( gCaseConv != NULL , "cannot obtain UnicharUtil");
}
static PRUnichar _ToLower(PRUnichar aChar)
{
PRUnichar oLower;
CheckCaseConversion();
nsresult err = gCaseConv->ToLower(aChar, &oLower);
NS_ASSERTION( NS_SUCCEEDED(err), "failed to communicate to UnicharUtil");
return ( NS_SUCCEEDED(err) ) ? oLower : aChar ;
}
static PRUnichar _ToUpper(PRUnichar aChar)
{
nsresult err;
PRUnichar oUpper;
CheckCaseConversion();
err = gCaseConv->ToUpper(aChar, &oUpper);
NS_ASSERTION( NS_SUCCEEDED(err), "failed to communicate to UnicharUtil");
return ( NS_SUCCEEDED(err) ) ? oUpper : aChar ;
}
//----------------------------------------------------------------------
PRUnichar nsCRT::ToUpper(PRUnichar aChar)
{
return TOUPPER(aChar);
}
PRUnichar nsCRT::ToLower(PRUnichar aChar)
{
return TOLOWER(aChar);
}
PRBool nsCRT::IsUpper(PRUnichar aChar)
{
return aChar != nsCRT::ToLower(aChar);
}
PRBool nsCRT::IsLower(PRUnichar aChar)
{
return aChar != nsCRT::ToUpper(aChar);
}
////////////////////////////////////////////////////////////////////////////////
// My lovely strtok routine
#define IS_DELIM(m, c) ((m)[(c) >> 3] & (1 << ((c) & 7)))
#define SET_DELIM(m, c) ((m)[(c) >> 3] |= (1 << ((c) & 7)))
#define DELIM_TABLE_SIZE 32
char* nsCRT::strtok(char* str, const char* delims, char* *newStr)
{
NS_ASSERTION(str, "Unlike regular strtok, the first argument cannot be null.");
char delimTable[DELIM_TABLE_SIZE];
PRUint32 i;
char* result;
for (i = 0; i < DELIM_TABLE_SIZE; i++)
delimTable[i] = '\0';
for (i = 0; i < DELIM_TABLE_SIZE && delims[i]; i++) {
SET_DELIM(delimTable, delims[i]);
}
NS_ASSERTION(delims[i] == '\0', "too many delimiters");
// skip to beginning
while (*str && IS_DELIM(delimTable, *str)) {
str++;
}
result = str;
// fix up the end of the token
while (*str) {
if (IS_DELIM(delimTable, *str)) {
*str++ = '\0';
break;
}
str++;
}
*newStr = str;
return str == result ? NULL : result;
}
////////////////////////////////////////////////////////////////////////////////
PRUint32 nsCRT::strlen(const PRUnichar* s)
{
PRUint32 len = 0;
if(s) {
while (*s++ != 0) {
len++;
}
}
return len;
}
/**
* Compare unichar string ptrs, stopping at the 1st null
* NOTE: If both are null, we return 0.
* @update gess7/30/98
* @param s1 and s2 both point to unichar strings
* @return 0 if they match, -1 if s1<s2; 1 if s1>s2
*/
PRInt32 nsCRT::strcmp(const PRUnichar* s1, const PRUnichar* s2)
{
if(s1 && s2) {
for (;;) {
PRUnichar c1 = *s1++;
PRUnichar c2 = *s2++;
if (c1 != c2) {
if (c1 < c2) return -1;
return 1;
}
if ((0==c1) || (0==c2)) break;
}
}
return 0;
}
/**
* Compare unichar string ptrs, stopping at the 1st null or nth char.
* NOTE: If either is null, we return 0.
* @update gess7/30/98
* @param s1 and s2 both point to unichar strings
* @return 0 if they match, -1 if s1<s2; 1 if s1>s2
*/
PRInt32 nsCRT::strncmp(const PRUnichar* s1, const PRUnichar* s2, PRUint32 n)
{
if(s1 && s2) {
if(n != 0) {
do {
PRUnichar c1 = *s1++;
PRUnichar c2 = *s2++;
if (c1 != c2) {
if (c1 < c2) return -1;
return 1;
}
if ((0==c1) || (0==c2)) break;
} while (--n != 0);
}
}
return 0;
}
/**
* Compare unichar string ptrs without regard to case
* NOTE: If both are null, we return 0.
* @update gess7/30/98
* @param s1 and s2 both point to unichar strings
* @return 0 if they match, -1 if s1<s2; 1 if s1>s2
*/
PRInt32 nsCRT::strcasecmp(const PRUnichar* s1, const PRUnichar* s2)
{
if(s1 && s2) {
for (;;) {
PRUnichar c1 = *s1++;
PRUnichar c2 = *s2++;
if (c1 != c2) {
c1 = TOLOWER(c1);
c2 = TOLOWER(c2);
if (c1 != c2) {
if (c1 < c2) return -1;
return 1;
}
}
if ((0==c1) || (0==c2)) break;
}
}
return 0;
}
/**
* Compare unichar string ptrs, stopping at the 1st null or nth char;
* also ignoring the case of characters.
* NOTE: If both are null, we return 0.
* @update gess7/30/98
* @param s1 and s2 both point to unichar strings
* @return 0 if they match, -1 if s1<s2; 1 if s1>s2
*/
PRInt32 nsCRT::strncasecmp(const PRUnichar* s1, const PRUnichar* s2, PRUint32 n)
{
if(s1 && s2) {
if(0<n){
while (--n >= 0) {
PRUnichar c1 = *s1++;
PRUnichar c2 = *s2++;
if (c1 != c2) {
c1 = TOLOWER(c1);
c2 = TOLOWER(c2);
if (c1 != c2) {
if (c1 < c2) return -1;
return 1;
}
}
if ((0==c1) || (0==c2)) break;
}
}
}
return 0;
}
/**
* Compare a unichar string ptr to cstring.
* NOTE: If both are null, we return 0.
* @update gess7/30/98
* @param s1 points to unichar string
* @param s2 points to cstring
* @return 0 if they match, -1 if s1<s2; 1 if s1>s2
*/
PRInt32 nsCRT::strcmp(const PRUnichar* s1, const char* s2)
{
if(s1 && s2) {
for (;;) {
PRUnichar c1 = *s1++;
PRUnichar c2 = kIsoLatin1ToUCS2[*(const unsigned char*)s2++];
if (c1 != c2) {
if (c1 < c2) return -1;
return 1;
}
if ((0==c1) || (0==c2)) break;
}
}
return 0;
}
/**
* Compare a unichar string ptr to cstring, up to N chars.
* NOTE: If both are null, we return 0.
* @update gess7/30/98
* @param s1 points to unichar string
* @param s2 points to cstring
* @return 0 if they match, -1 if s1<s2; 1 if s1>s2
*/
PRInt32 nsCRT::strncmp(const PRUnichar* s1, const char* s2, PRUint32 n)
{
if(s1 && s2) {
if(n != 0){
do {
PRUnichar c1 = *s1++;
PRUnichar c2 = kIsoLatin1ToUCS2[*(const unsigned char*)s2++];
if (c1 != c2) {
if (c1 < c2) return -1;
return 1;
}
if ((0==c1) || (0==c2)) break;
} while (--n != 0);
}
}
return 0;
}
/**
* Compare a unichar string ptr to cstring without regard to case
* NOTE: If both are null, we return 0.
* @update gess7/30/98
* @param s1 points to unichar string
* @param s2 points to cstring
* @return 0 if they match, -1 if s1<s2; 1 if s1>s2
*/
PRInt32 nsCRT::strcasecmp(const PRUnichar* s1, const char* s2)
{
if(s1 && s2) {
for (;;) {
PRUnichar c1 = *s1++;
PRUnichar c2 = kIsoLatin1ToUCS2[*(const unsigned char*)s2++];
if (c1 != c2) {
c1 = TOLOWER(c1);
c2 = TOLOWER(c2);
if (c1 != c2) {
if (c1 < c2) return -1;
return 1;
}
}
if ((0==c1) || (0==c2)) break;
}
}
return 0;
}
/**
* Caseless compare up to N chars between unichar string ptr to cstring.
* NOTE: If both are null, we return 0.
* @update gess7/30/98
* @param s1 points to unichar string
* @param s2 points to cstring
* @return 0 if they match, -1 if s1<s2; 1 if s1>s2
*/
PRInt32 nsCRT::strncasecmp(const PRUnichar* s1, const char* s2, PRUint32 n)
{
if(s1 && s2){
if(n != 0){
do {
PRUnichar c1 = *s1++;
PRUnichar c2 = kIsoLatin1ToUCS2[*(const unsigned char*)s2++];
if (c1 != c2) {
c1 = TOLOWER(c1);
c2 = TOLOWER(c2);
if (c1 != c2) {
if (c1 < c2) return -1;
return 1;
}
}
if (c1 == 0) break;
} while (--n != 0);
}
}
return 0;
}
PRUnichar* nsCRT::strdup(const PRUnichar* str)
{
PRUint32 len = nsCRT::strlen(str) + 1; // add one for null
PRUnichar* rslt = new PRUnichar[len];
if (rslt == NULL) return NULL;
nsCRT::memcpy(rslt, str, len * sizeof(PRUnichar));
return rslt;
}
PRUint32 nsCRT::HashValue(const PRUnichar* us)
{
PRUint32 rv = 0;
if(us) {
PRUnichar ch;
while ((ch = *us++) != 0) {
// FYI: rv = rv*37 + ch
rv = ((rv << 5) + (rv << 2) + rv) + ch;
}
}
return rv;
}
PRUint32 nsCRT::HashValue(const PRUnichar* us, PRUint32* uslenp)
{
PRUint32 rv = 0;
PRUint32 len = 0;
PRUnichar ch;
while ((ch = *us++) != 0) {
// FYI: rv = rv*37 + ch
rv = ((rv << 5) + (rv << 2) + rv) + ch;
len++;
}
*uslenp = len;
return rv;
}
PRInt32 nsCRT::atoi( const PRUnichar *string )
{
return atoi(string);
}

196
mozilla/base/src/nsCRT.h Normal file
View File

@@ -0,0 +1,196 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#ifndef nsCRT_h___
#define nsCRT_h___
#include <stdlib.h>
#include <string.h>
#include "plstr.h"
#include "nscore.h"
#define CR '\015'
#define LF '\012'
#define VTAB '\013'
#define FF '\014'
#define TAB '\011'
#define CRLF "\015\012" /* A CR LF equivalent string */
// This macro can be used in a class declaration for classes that want
// to ensure that their instance memory is zeroed.
#define NS_DECL_AND_IMPL_ZEROING_OPERATOR_NEW \
void* operator new(size_t sz) { \
void* rv = ::operator new(sz); \
if (rv) { \
nsCRT::zero(rv, sz); \
} \
return rv; \
} \
void operator delete(void* ptr) { \
::operator delete(ptr); \
}
// This macro works with the next macro to declare a non-inlined
// version of the above.
#define NS_DECL_ZEROING_OPERATOR_NEW \
void* operator new(size_t sz); \
void operator delete(void* ptr);
#define NS_IMPL_ZEROING_OPERATOR_NEW(_class) \
void* _class::operator new(size_t sz) { \
void* rv = ::operator new(sz); \
if (rv) { \
nsCRT::zero(rv, sz); \
} \
return rv; \
} \
void _class::operator delete(void* ptr) { \
::operator delete(ptr); \
}
/// This is a wrapper class around all the C runtime functions.
class NS_BASE nsCRT {
public:
/** Copy bytes from aSrc to aDest.
@param aDest the destination address
@param aSrc the source address
@param aCount the number of bytes to copy
*/
static void memcpy(void* aDest, const void* aSrc, PRUint32 aCount) {
::memcpy(aDest, aSrc, (size_t)aCount);
}
static void memmove(void* aDest, const void* aSrc, PRUint32 aCount) {
::memmove(aDest, aSrc, (size_t)aCount);
}
static void memset(void* aDest, PRUint8 aByte, PRUint32 aCount) {
::memset(aDest, aByte, aCount);
}
static void zero(void* aDest, PRUint32 aCount) {
::memset(aDest, 0, (size_t)aCount);
}
/** Compute the string length of s
@param s the string in question
@return the length of s
*/
static PRUint32 strlen(const char* s) {
return PRUint32(::strlen(s));
}
/// Compare s1 and s2.
static PRInt32 strcmp(const char* s1, const char* s2) {
return PRUint32(PL_strcmp(s1, s2));
}
static PRUint32 strncmp(const char* s1, const char* s2,
PRUint32 aMaxLen) {
return PRInt32(PL_strncmp(s1, s2, aMaxLen));
}
/// Case-insensitive string comparison.
static PRInt32 strcasecmp(const char* s1, const char* s2) {
return PRInt32(PL_strcasecmp(s1, s2));
}
/// Case-insensitive string comparison with length
static PRInt32 strncasecmp(const char* s1, const char* s2, PRUint32 aMaxLen) {
return PRInt32(PL_strncasecmp(s1, s2, aMaxLen));
}
static PRInt32 strncmp(const char* s1, const char* s2, PRInt32 aMaxLen) {
return PRInt32(PL_strncmp(s1,s2,aMaxLen));
}
static char* strdup(const char* str) {
return PL_strdup(str);
}
/**
How to use this fancy (thread-safe) version of strtok:
void main( void ) {
printf( "%s\n\nTokens:\n", string );
// Establish string and get the first token:
char* newStr;
token = nsCRT::strtok( string, seps, &newStr );
while( token != NULL ) {
// While there are tokens in "string"
printf( " %s\n", token );
// Get next token:
token = nsCRT::strtok( newStr, seps, &newStr );
}
}
*/
static char* strtok(char* str, const char* delims, char* *newStr);
/// Like strlen except for ucs2 strings
static PRUint32 strlen(const PRUnichar* s);
/// Like strcmp except for ucs2 strings
static PRInt32 strcmp(const PRUnichar* s1, const PRUnichar* s2);
/// Like strcmp except for ucs2 strings
static PRInt32 strncmp(const PRUnichar* s1, const PRUnichar* s2,
PRUint32 aMaxLen);
/// Like strcasecmp except for ucs2 strings
static PRInt32 strcasecmp(const PRUnichar* s1, const PRUnichar* s2);
/// Like strncasecmp except for ucs2 strings
static PRInt32 strncasecmp(const PRUnichar* s1, const PRUnichar* s2,
PRUint32 aMaxLen);
/// Like strcmp with a char* and a ucs2 string
static PRInt32 strcmp(const PRUnichar* s1, const char* s2);
/// Like strncmp with a char* and a ucs2 string
static PRInt32 strncmp(const PRUnichar* s1, const char* s2,
PRUint32 aMaxLen);
/// Like strcasecmp with a char* and a ucs2 string
static PRInt32 strcasecmp(const PRUnichar* s1, const char* s2);
/// Like strncasecmp with a char* and a ucs2 string
static PRInt32 strncasecmp(const PRUnichar* s1, const char* s2,
PRUint32 aMaxLen);
// Note: uses new[] to allocate memory, so you must use delete[] to
// free the memory
static PRUnichar* strdup(const PRUnichar* str);
/// Compute a hashcode for a ucs2 string
static PRUint32 HashValue(const PRUnichar* s1);
/// Same as above except that we return the length in s1len
static PRUint32 HashValue(const PRUnichar* s1, PRUint32* s1len);
/// String to integer.
static PRInt32 atoi( const PRUnichar *string );
static PRUnichar ToUpper(PRUnichar aChar);
static PRUnichar ToLower(PRUnichar aChar);
static PRBool IsUpper(PRUnichar aChar);
static PRBool IsLower(PRUnichar aChar);
};
#endif /* nsCRT_h___ */

View File

@@ -0,0 +1,553 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#include "nsDeque.h"
#include "nsCRT.h"
//#define _SELFTEST_DEQUE 1
#undef _SELFTEST_DEQUE
/**
* Standard constructor
* @update gess4/18/98
* @return new deque
*/
nsDeque::nsDeque(nsDequeFunctor* aDeallocator) {
mDeallocator=aDeallocator;
mCapacity=eGrowthDelta;
mOrigin=mSize=0;
mData=new void*[mCapacity];
}
/**
* Destructor
* @update gess4/18/98
*/
nsDeque::~nsDeque() {
Erase();
delete [] mData;
mData=0;
if(mDeallocator) {
delete mDeallocator;
}
mDeallocator=0;
}
/**
* Returns the number of elements currently stored in
* this deque.
*
* @update gess4/18/98
* @param
* @return int contains element count
*/
PRInt32 nsDeque::GetSize(void) const {
return mSize;
}
void nsDeque::SetDeallocator(nsDequeFunctor* aDeallocator){
if(mDeallocator) {
delete mDeallocator;
}
mDeallocator=aDeallocator;
}
/**
* Remove all items from container without destroying them.
*
* @update gess4/18/98
* @param
* @return
*/
nsDeque& nsDeque::Empty() {
if((0<mCapacity) && (mData)) {
nsCRT::zero(mData,mCapacity*sizeof(mData));
}
mSize=0;
mOrigin=0;
return *this;
}
/**
* Remove and delete all items from container
*
* @update gess4/18/98
* @return this
*/
nsDeque& nsDeque::Erase() {
if(mDeallocator) {
ForEach(*mDeallocator);
}
return Empty();
}
/**
* This method adds an item to the end of the deque.
* This operation has the potential to cause the
* underlying buffer to resize.
*
* @update gess4/18/98
* @param anItem: new item to be added to deque
* @return nada
*/
nsDeque& nsDeque::Push(void* anItem) {
if(mSize==mCapacity) {
void** temp=new void*[mCapacity+eGrowthDelta];
//Here's the interesting part: You can't just move the elements
//directy (in situ) from the old buffer to the new one.
//Since capacity has changed, the old origin doesn't make
//sense anymore. It's better to resequence the elements now.
int tempi=0;
int i=0;
int j=0;
for(i=mOrigin;i<mCapacity;i++) temp[tempi++]=mData[i]; //copy the leading elements...
for(j=0;j<mOrigin;j++) temp[tempi++]=mData[j]; //copy the trailing elements...
mCapacity+=eGrowthDelta;
mOrigin=0; //now realign the origin...
delete[]mData;
mData=temp;
}
int offset=mOrigin+mSize;
if(offset<mCapacity)
mData[offset]=anItem;
else mData[offset-mCapacity]=anItem;
mSize++;
return *this;
}
/**
* This method adds an item to the front of the deque.
* This operation has the potential to cause the
* underlying buffer to resize.
*
* @update gess4/18/98
* @param anItem: new item to be added to deque
* @return nada
*/
nsDeque& nsDeque::PushFront(void* anItem) {
if(mOrigin>0) {
mOrigin-=1;
mData[mOrigin]=anItem;
mSize++;
}
else {
Push(anItem);
mOrigin=mSize-1;
}
return *this;
}
/**
* Remove and return the last item in the container.
*
* @update gess4/18/98
* @param none
* @return ptr to last item in container
*/
void* nsDeque::Pop(void) {
void* result=0;
if(mSize>0) {
int offset=mOrigin+mSize-1;
if(offset>=mCapacity)
offset-=mCapacity;
result=mData[offset];
mData[offset]=0;
mSize--;
if(0==mSize)
mOrigin=0;
}
return result;
}
/**
* This method gets called you want to remove and return
* the first member in the container.
*
* @update gess4/18/98
* @param nada
* @return last item in container
*/
void* nsDeque::PopFront() {
void* result=0;
if(mSize>0) {
result=mData[mOrigin];
mData[mOrigin++]=0; //zero it out for debugging purposes.
mSize--;
if(mCapacity==mOrigin) //you popped off the end, so cycle back around...
mOrigin=0;
if(0==mSize)
mOrigin=0;
}
NS_ASSERTION(mOrigin<mCapacity,"Error: Bad origin");
return result;
}
/**
* This method gets called you want to peek at the topmost
* member without removing it.
*
* @update gess4/18/98
* @param nada
* @return last item in container
*/
void* nsDeque::Peek() {
void* result=0;
if(mSize>0) {
result=mData[mOrigin];
}
return result;
}
/**
* Call this to retrieve the ith element from this container.
* Keep in mind that accessing the underlying elements is
* done in a relative fashion. Object 0 is not necessarily
* the first element (the first element is at mOrigin).
*
* @update gess4/18/98
* @param anIndex : 0 relative offset of item you want
* @return void* or null
*/
void* nsDeque::ObjectAt(PRInt32 anIndex) const {
void* result=0;
if((anIndex>=0) && (anIndex<mSize))
{
if(anIndex<(mCapacity-mOrigin)) {
result=mData[mOrigin+anIndex];
}
else {
result=mData[anIndex-(mCapacity-mOrigin)];
}
}
return result;
}
/**
* Create and return an iterator pointing to
* the beginning of the queue. Note that this
* takes the circular buffer semantics into account.
*
* @update gess4/18/98
* @return new deque iterator, init'ed to 1st item
*/
nsDequeIterator nsDeque::Begin(void) const{
return nsDequeIterator(*this,0);
}
/**
* Create and return an iterator pointing to
* the last of the queue. Note that this
* takes the circular buffer semantics into account.
*
* @update gess4/18/98
* @return new deque iterator, init'ed to last item
*/
nsDequeIterator nsDeque::End(void) const{
return nsDequeIterator(*this,mSize);
}
/**
* Call this method when you wanto to iterate all the
* members of the container, passing a functor along
* to call your code.
*
* @update gess4/20/98
* @param aFunctor object to call for each member
* @return *this
*/
void nsDeque::ForEach(nsDequeFunctor& aFunctor) const{
int i=0;
for(i=0;i<mSize;i++){
void* obj=ObjectAt(i);
obj=aFunctor(obj);
}
}
/**
* Call this method when you wanto to iterate all the
* members of the container, passing a functor along
* to call your code. Iteration continues until your
* functor returns a non-null.
*
* @update gess4/20/98
* @param aFunctor object to call for each member
* @return *this
*/
const void* nsDeque::FirstThat(nsDequeFunctor& aFunctor) const{
int i=0;
for(i=0;i<mSize;i++){
void* obj=ObjectAt(i);
obj=aFunctor(obj);
if(obj)
return obj;
}
return 0;
}
/******************************************************
* Here comes the nsDequeIterator class...
******************************************************/
/**
* DequeIterator is an object that knows how to iterate (forward and backward)
* a Deque. Normally, you don't need to do this, but there are some special
* cases where it is pretty handy, so here you go.
*
* This is a standard dequeiterator constructor
*
* @update gess4/18/98
* @param aQueue is the deque object to be iterated
* @param anIndex is the starting position for your iteration
*/
nsDequeIterator::nsDequeIterator(const nsDeque& aQueue,int anIndex): mIndex(anIndex), mDeque(aQueue) {
}
/**
* Copy construct a new iterator beginning with given
*
* @update gess4/20/98
* @param aCopy is another iterator to copy from
* @return
*/
nsDequeIterator::nsDequeIterator(const nsDequeIterator& aCopy) : mIndex(aCopy.mIndex), mDeque(aCopy.mDeque) {
}
/**
* Moves iterator to first element in deque
* @update gess4/18/98
* @return this
*/
nsDequeIterator& nsDequeIterator::First(void){
mIndex=0;
return *this;
}
/**
* Standard assignment operator for dequeiterator
*
* @update gess4/18/98
* @param aCopy is an iterator to be copied from
* @return *this
*/
nsDequeIterator& nsDequeIterator::operator=(const nsDequeIterator& aCopy) {
//queue's are already equal.
mIndex=aCopy.mIndex;
return *this;
}
/**
* preform ! operation against to iterators to test for equivalence
* (or lack thereof)!
*
* @update gess4/18/98
* @param anIter is the object to be compared to
* @return TRUE if NOT equal.
*/
PRBool nsDequeIterator::operator!=(nsDequeIterator& anIter) {
return PRBool(!this->operator==(anIter));
}
/**
* Compare 2 iterators for equivalence.
*
* @update gess4/18/98
* @param anIter is the other iterator to be compared to
* @return TRUE if EQUAL
*/
PRBool nsDequeIterator::operator<(nsDequeIterator& anIter) {
return PRBool(((mIndex<anIter.mIndex) && (&mDeque==&anIter.mDeque)));
}
/**
* Compare 2 iterators for equivalence.
*
* @update gess4/18/98
* @param anIter is the other iterator to be compared to
* @return TRUE if EQUAL
*/
PRBool nsDequeIterator::operator==(nsDequeIterator& anIter) {
return PRBool(((mIndex==anIter.mIndex) && (&mDeque==&anIter.mDeque)));
}
/**
* Compare 2 iterators for equivalence.
*
* @update gess4/18/98
* @param anIter is the other iterator to be compared to
* @return TRUE if EQUAL
*/
PRBool nsDequeIterator::operator>=(nsDequeIterator& anIter) {
return PRBool(((mIndex>=anIter.mIndex) && (&mDeque==&anIter.mDeque)));
}
/**
* Pre-increment operator
*
* @update gess4/18/98
* @return object at preincremented index
*/
void* nsDequeIterator::operator++() {
return mDeque.ObjectAt(++mIndex);
}
/**
* Post-increment operator
*
* @update gess4/18/98
* @param param is ignored
* @return object at post-incremented index
*/
void* nsDequeIterator::operator++(int) {
return mDeque.ObjectAt(mIndex++);
}
/**
* Pre-decrement operator
*
* @update gess4/18/98
* @return object at pre-decremented index
*/
void* nsDequeIterator::operator--() {
return mDeque.ObjectAt(--mIndex);
}
/**
* Post-decrement operator
*
* @update gess4/18/98
* @param param is ignored
* @return object at post-decremented index
*/
void* nsDequeIterator::operator--(int) {
return mDeque.ObjectAt(mIndex--);
}
/**
* Dereference operator
*
* @update gess4/18/98
* @return object at ith index
*/
void* nsDequeIterator::GetCurrent(void) {
return mDeque.ObjectAt(mIndex);
}
/**
* Call this method when you wanto to iterate all the
* members of the container, passing a functor along
* to call your code.
*
* @update gess4/20/98
* @param aFunctor object to call for each member
* @return *this
*/
void nsDequeIterator::ForEach(nsDequeFunctor& aFunctor) const{
mDeque.ForEach(aFunctor);
}
/**
* Call this method when you wanto to iterate all the
* members of the container, passing a functor along
* to call your code.
*
* @update gess4/20/98
* @param aFunctor object to call for each member
* @return *this
*/
const void* nsDequeIterator::FirstThat(nsDequeFunctor& aFunctor) const{
return mDeque.FirstThat(aFunctor);
}
#ifdef _SELFTEST_DEQUE
/**************************************************************
Now define the token deallocator class...
**************************************************************/
class _SelfTestDeallocator: public nsDequeFunctor{
public:
_SelfTestDeallocator::_SelfTestDeallocator() {
nsDeque::SelfTest();
}
virtual void* operator()(void* anObject) {
return 0;
}
};
static _SelfTestDeallocator gDeallocator;
#endif
/**
* conduct automated self test for this class
*
* @update gess4/18/98
* @param
* @return
*/
void nsDeque::SelfTest(void) {
#ifdef _SELFTEST_DEQUE
{
nsDeque theDeque(gDeallocator); //construct a simple one...
int ints[200];
int count=sizeof(ints)/sizeof(int);
int i=0;
for(i=0;i<count;i++){ //initialize'em
ints[i]=10*(1+i);
}
for(i=0;i<70;i++){
theDeque.Push(&ints[i]);
}
for(i=0;i<56;i++){
int* temp=(int*)theDeque.Pop();
}
for(i=0;i<55;i++){
theDeque.Push(&ints[i]);
}
for(i=0;i<35;i++){
int* temp=(int*)theDeque.Pop();
}
for(i=0;i<35;i++){
theDeque.Push(&ints[i]);
}
for(i=0;i<38;i++){
int* temp=(int*)theDeque.Pop();
}
}
int x;
x=10;
#endif
}

408
mozilla/base/src/nsDeque.h Normal file
View File

@@ -0,0 +1,408 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
/**
* MODULE NOTES:
* @update gess 4/15/98 (tax day)
*
* The Deque is a very small, very efficient container object
* than can hold elements of type void*, offering the following features:
* It's interface supports pushing and poping of children.
* It can iterate (via an interator class) it's children.
* When full, it can efficently resize dynamically.
*
*
* NOTE: The only bit of trickery here is that this deque is
* built upon a ring-buffer. Like all ring buffers, the first
* element may not be at index[0]. The mOrigin member determines
* where the first child is. This point is quietly hidden from
* customers of this class.
*
*/
#ifndef _NSDEQUE
#define _NSDEQUE
#include "nscore.h"
/**
* The nsDequefunctor class is used when you want to create
* callbacks between the deque and your generic code.
* Use these objects in a call to ForEach();
*
* @update gess4/20/98
*/
class NS_BASE nsDequeFunctor{
public:
virtual void* operator()(void* anObject)=0;
};
/******************************************************
* Here comes the nsDeque class itself...
******************************************************/
/**
* The deque (double-ended queue) class is a common container type,
* whose behavior mimics a line in your favorite checkout stand.
* Classic CS describes the common behavior of a queue as FIFO.
* A Deque allows items to be added and removed from either end of
* the queue.
*
* @update gess4/20/98
*/
class NS_BASE nsDeque {
friend class nsDequeIterator;
public:
nsDeque(nsDequeFunctor* aDeallocator);
~nsDeque();
/**
* Returns the number of elements currently stored in
* this deque.
*
* @update gess4/18/98
* @param
* @return int contains element count
*/
PRInt32 GetSize() const;
/**
* Pushes new member onto the end of the deque
*
* @update gess4/18/98
* @param ptr to object to store
* @return *this
*/
nsDeque& Push(void* anItem);
/**
* Pushes new member onto the front of the deque
*
* @update gess4/18/98
* @param ptr to object to store
* @return *this
*/
nsDeque& PushFront(void* anItem);
/**
* Remove and return the first item in the container.
*
* @update gess4/18/98
* @param none
* @return ptr to first item in container
*/
void* Pop(void);
/**
* Remove and return the first item in the container.
*
* @update gess4/18/98
* @param none
* @return ptr to first item in container
*/
void* PopFront(void);
/**
* Return topmost item without removing it.
*
* @update gess4/18/98
* @param none
* @return ptr to first item in container
*/
void* Peek(void);
/**
* method used to retrieve ptr to
* ith member in container. DOesn't remove
* that item.
*
* @update gess4/18/98
* @param index of desired item
* @return ptr to ith element in list
*/
void* ObjectAt(int anIndex) const;
/**
* Remove all items from container without destroying them
*
* @update gess4/18/98
* @param
* @return
*/
nsDeque& Empty();
/**
* Remove and delete all items from container
*
* @update gess4/18/98
* @param
* @return
*/
nsDeque& Erase();
/**
* Creates a new iterator, init'ed to start of container
*
* @update gess4/18/98
* @return new dequeIterator
*/
nsDequeIterator Begin() const;
/**
* Creates a new iterator, init'ed to end of container
*
* @update gess4/18/98
* @return new dequeIterator
*/
nsDequeIterator End() const;
/**
* Call this method when you wanto to iterate all the
* members of the container, passing a functor along
* to call your code.
*
* @update gess4/20/98
* @param aFunctor object to call for each member
* @return *this
*/
void ForEach(nsDequeFunctor& aFunctor) const;
/**
* Call this method when you wanto to iterate all the
* members of the container, passing a functor along
* to call your code. This process will interupt if
* your function returns a null to this iterator.
*
* @update gess4/20/98
* @param aFunctor object to call for each member
* @return *this
*/
const void* FirstThat(nsDequeFunctor& aFunctor) const;
void SetDeallocator(nsDequeFunctor* aDeallocator);
/**
* Perform automated selftest on the deque
*
* @update gess4/18/98
* @param
* @return
*/
static void SelfTest();
protected:
PRInt32 mSize;
PRInt32 mCapacity;
PRInt32 mOrigin;
nsDequeFunctor* mDeallocator;
void** mData;
private:
enum {eGrowthDelta=64};
/**
* Simple default constructor (PRIVATE)
*
* @update gess4/18/98
* @param
* @return
*/
nsDeque();
/**
* Copy constructor (PRIVATE)
*
* @update gess4/18/98
* @param
* @return
*/
nsDeque(const nsDeque& other);
/**
* Deque assignment operator (PRIVATE)
*
* @update gess4/18/98
* @param another deque
* @return *this
*/
nsDeque& operator=(const nsDeque& anOther);
};
/******************************************************
* Here comes the nsDequeIterator class...
******************************************************/
class NS_BASE nsDequeIterator {
public:
/**
* DequeIterator is an object that knows how to iterate (forward and backward)
* a Deque. Normally, you don't need to do this, but there are some special
* cases where it is pretty handy, so here you go.
*
* @update gess4/18/98
* @param aQueue is the deque object to be iterated
* @param anIndex is the starting position for your iteration
*/
nsDequeIterator(const nsDeque& aQueue,int anIndex=0);
/**
* DequeIterator is an object that knows how to iterate (forward and backward)
* a Deque. Normally, you don't need to do this, but there are some special
* cases where it is pretty handy, so here you go.
*
* @update gess4/18/98
* @param aQueue is the deque object to be iterated
* @param anIndex is the starting position for your iteration
*/
nsDequeIterator(const nsDequeIterator& aCopy);
/**
* Moves iterator to first element in deque
* @update gess4/18/98
* @return this
*/
nsDequeIterator& First(void);
/**
* Standard assignment operator for deque
* @update gess4/18/98
* @param
* @return
*/
nsDequeIterator& operator=(const nsDequeIterator& aCopy);
/**
* preform ! operation against to iterators to test for equivalence
* (or lack thereof)!
*
* @update gess4/18/98
* @param anIter is the object to be compared to
* @return TRUE if NOT equal.
*/
PRBool operator!=(nsDequeIterator& anIter);
/**
* Compare 2 iterators for equivalence.
*
* @update gess4/18/98
* @param anIter is the other iterator to be compared to
* @return TRUE if EQUAL
*/
PRBool operator<(nsDequeIterator& anIter);
/**
* Compare 2 iterators for equivalence.
*
* @update gess4/18/98
* @param anIter is the other iterator to be compared to
* @return TRUE if EQUAL
*/
PRBool operator==(nsDequeIterator& anIter);
/**
* Compare 2 iterators for equivalence.
*
* @update gess4/18/98
* @param anIter is the other iterator to be compared to
* @return TRUE if EQUAL
*/
PRBool operator>=(nsDequeIterator& anIter);
/**
* Pre-increment operator
*
* @update gess4/18/98
* @return object at preincremented index
*/
void* operator++();
/**
* Post-increment operator
*
* @update gess4/18/98
* @param param is ignored
* @return object at post-incremented index
*/
void* operator++(int);
/**
* Pre-decrement operator
*
* @update gess4/18/98
* @return object at pre-decremented index
*/
void* operator--();
/**
* Post-decrement operator
*
* @update gess4/18/98
* @param param is ignored
* @return object at post-decremented index
*/
void* operator--(int);
/**
* Retrieve the ptr to the iterators notion of current node
*
* @update gess4/18/98
* @return object at ith index
*/
void* GetCurrent(void);
/**
* Call this method when you wanto to iterate all the
* members of the container, passing a functor along
* to call your code.
*
* @update gess4/20/98
* @param aFunctor object to call for each member
* @return *this
*/
void ForEach(nsDequeFunctor& aFunctor) const;
/**
* Call this method when you wanto to iterate all the
* members of the container, passing a functor along
* to call your code.
*
* @update gess4/20/98
* @param aFunctor object to call for each member
* @return *this
*/
const void* FirstThat(nsDequeFunctor& aFunctor) const;
protected:
PRInt32 mIndex;
const nsDeque& mDeque;
};
#endif

View File

@@ -0,0 +1,168 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
// First checked in on 98/12/03 by John R. McMullen, derived from net.h/mkparse.c.
#include "nsEscape.h"
#include "plstr.h"
const int netCharType[256] =
/* Bit 0 xalpha -- the alphas
** Bit 1 xpalpha -- as xalpha but
** converts spaces to plus and plus to %20
** Bit 3 ... path -- as xalphas but doesn't escape '/'
*/
/* 0 1 2 3 4 5 6 7 8 9 A B C D E F */
{ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 0x */
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 1x */
0,0,0,0,0,0,0,0,0,0,7,4,0,7,7,4, /* 2x !"#$%&'()*+,-./ */
7,7,7,7,7,7,7,7,7,7,0,0,0,0,0,0, /* 3x 0123456789:;<=>? */
0,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, /* 4x @ABCDEFGHIJKLMNO */
/* bits for '@' changed from 7 to 0 so '@' can be escaped */
/* in usernames and passwords in publishing. */
7,7,7,7,7,7,7,7,7,7,7,0,0,0,0,7, /* 5X PQRSTUVWXYZ[\]^_ */
0,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, /* 6x `abcdefghijklmno */
7,7,7,7,7,7,7,7,7,7,7,0,0,0,0,0, /* 7X pqrstuvwxyz{\}~ DEL */
0, };
/* decode % escaped hex codes into character values
*/
#define UNHEX(C) \
((C >= '0' && C <= '9') ? C - '0' : \
((C >= 'A' && C <= 'F') ? C - 'A' + 10 : \
((C >= 'a' && C <= 'f') ? C - 'a' + 10 : 0)))
#define IS_OK(C) (netCharType[((unsigned int) (C))] & (mask))
#define HEX_ESCAPE '%'
//----------------------------------------------------------------------------------------
NS_BASE char* nsEscape(const char * str, nsEscapeMask mask)
//----------------------------------------------------------------------------------------
{
if(!str)
return NULL;
return nsEscapeCount(str, (PRInt32)PL_strlen(str), mask, NULL);
}
//----------------------------------------------------------------------------------------
NS_BASE char* nsEscapeCount(
const char * str,
PRInt32 len,
nsEscapeMask mask,
PRInt32* out_len)
//----------------------------------------------------------------------------------------
{
if (!str)
return 0;
int i, extra = 0;
char* hexChars = "0123456789ABCDEF";
register const unsigned char* src = (const unsigned char *) str;
for (i = 0; i < len; i++)
{
if (!IS_OK(*src++))
extra += 2; /* the escape, plus an extra byte for each nibble */
}
char* result = new char[len + extra + 1];
if (!result)
return 0;
register unsigned char* dst = (unsigned char *) result;
src = (const unsigned char *) str;
if (mask == url_XPAlphas)
{
for (i = 0; i < len; i++)
{
unsigned char c = *src++;
if (IS_OK(c))
*dst++ = c;
else if (c == ' ')
*dst++ = '+'; /* convert spaces to pluses */
else
{
*dst++ = HEX_ESCAPE;
*dst++ = hexChars[c >> 4]; /* high nibble */
*dst++ = hexChars[c & 0x0f]; /* low nibble */
}
}
}
else
{
for (i = 0; i < len; i++)
{
unsigned char c = *src++;
if (IS_OK(c))
*dst++ = c;
else
{
*dst++ = HEX_ESCAPE;
*dst++ = hexChars[c >> 4]; /* high nibble */
*dst++ = hexChars[c & 0x0f]; /* low nibble */
}
}
}
*dst = '\0'; /* tack on eos */
if(out_len)
*out_len = dst - (unsigned char *) result;
return result;
}
//----------------------------------------------------------------------------------------
NS_BASE char* nsUnescape(char * str)
//----------------------------------------------------------------------------------------
{
nsUnescapeCount(str);
return str;
}
//----------------------------------------------------------------------------------------
NS_BASE PRInt32 nsUnescapeCount(char * str)
//----------------------------------------------------------------------------------------
{
register char *src = str;
register char *dst = str;
while (*src)
if (*src != HEX_ESCAPE)
*dst++ = *src++;
else
{
src++; /* walk over escape */
if (*src)
{
*dst = UNHEX(*src) << 4;
src++;
}
if (*src)
{
*dst = (*dst + UNHEX(*src));
src++;
}
dst++;
}
*dst = 0;
return (int)(dst - str);
} /* NET_UnEscapeCnt */

View File

@@ -0,0 +1,975 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#include "nsFileSpec.h"
#include "nsFileStream.h"
#include "nsDebug.h"
#include "nsEscape.h"
#include "prtypes.h"
#include "plstr.h"
#include "plbase64.h"
#include "prmem.h"
#include <string.h>
#include <stdio.h>
//========================================================================================
NS_NAMESPACE nsFileSpecHelpers
//========================================================================================
{
enum
{ kMaxFilenameLength = 31 // should work on Macintosh, Unix, and Win32.
, kMaxAltDigitLength = 5
, kMaxCoreLeafNameLength = (kMaxFilenameLength - (kMaxAltDigitLength + 1))
};
NS_NAMESPACE_PROTOTYPE void LeafReplace(
char*& ioPath,
char inSeparator,
const char* inLeafName);
#ifndef XP_MAC
NS_NAMESPACE_PROTOTYPE void Canonify(char*& ioPath, PRBool inMakeDirs);
NS_NAMESPACE_PROTOTYPE void MakeAllDirectories(const char* inPath, int mode);
#endif
NS_NAMESPACE_PROTOTYPE char* GetLeaf(const char* inPath, char inSeparator); // allocated
NS_NAMESPACE_PROTOTYPE char* StringDup(const char* inString, int allocLength = 0);
NS_NAMESPACE_PROTOTYPE char* AllocCat(const char* inString1, const char* inString2);
NS_NAMESPACE_PROTOTYPE char* StringAssign(char*& ioString, const char* inOther);
NS_NAMESPACE_PROTOTYPE char* ReallocCat(char*& ioString, const char* inString1);
#ifdef XP_PC
NS_NAMESPACE_PROTOTYPE void NativeToUnix(char*& ioPath);
NS_NAMESPACE_PROTOTYPE void UnixToNative(char*& ioPath);
#endif
} NS_NAMESPACE_END
//----------------------------------------------------------------------------------------
nsresult ns_file_convert_result(PRInt32 nativeErr)
//----------------------------------------------------------------------------------------
{
return nativeErr ?
NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES,((nativeErr)&0xFFFF))
: NS_OK;
}
//----------------------------------------------------------------------------------------
char* nsFileSpecHelpers::StringDup(
const char* inString,
int allocLength)
//----------------------------------------------------------------------------------------
{
if (!allocLength && inString)
allocLength = strlen(inString);
char* newPath = inString || allocLength ? new char[allocLength + 1] : nsnull;
if (!newPath)
return nsnull;
strcpy(newPath, inString);
return newPath;
} // nsFileSpecHelpers::StringDup
//----------------------------------------------------------------------------------------
char* nsFileSpecHelpers::AllocCat(
const char* inString1,
const char* inString2)
//----------------------------------------------------------------------------------------
{
if (!inString1)
return inString2 ? StringDup(inString2) : (char*)nsnull;
if (!inString2)
return StringDup(inString1);
char* outString = StringDup(inString1, strlen(inString1) + strlen(inString2));
if (outString)
strcat(outString, inString2);
return outString;
} // nsFileSpecHelpers::StringDup
//----------------------------------------------------------------------------------------
char* nsFileSpecHelpers::StringAssign(
char*& ioString,
const char* inString2)
//----------------------------------------------------------------------------------------
{
if (!inString2)
{
delete [] ioString;
ioString = (char*)nsnull;
return ioString;
}
if (!ioString || (strlen(inString2) > strlen(ioString)))
{
delete [] ioString;
ioString = StringDup(inString2);
return ioString;
}
strcpy(ioString, inString2);
return ioString;
} // nsFileSpecHelpers::StringAssign
//----------------------------------------------------------------------------------------
void nsFileSpecHelpers::LeafReplace(
char*& ioPath,
char inSeparator,
const char* inLeafName)
//----------------------------------------------------------------------------------------
{
// Find the existing leaf name
if (!ioPath)
return;
if (!inLeafName)
{
*ioPath = '\0';
return;
}
char* lastSeparator = strrchr(ioPath, inSeparator);
int oldLength = strlen(ioPath);
PRBool trailingSeparator = (lastSeparator + 1 == ioPath + oldLength);
if (trailingSeparator)
{
*lastSeparator = '\0';
lastSeparator = strrchr(ioPath, inSeparator);
}
if (lastSeparator)
lastSeparator++; // point at the trailing string
else
lastSeparator = ioPath; // the full monty
*lastSeparator = '\0'; // strip the current leaf name
int newLength = (lastSeparator - ioPath) + strlen(inLeafName) + int(trailingSeparator);
if (newLength > oldLength)
{
char* newPath = StringDup(ioPath, newLength + 1);
delete [] ioPath;
ioPath = newPath;
}
strcat(ioPath, inLeafName);
if (trailingSeparator)
{
// If the original ended in a slash, then the new one should, too.
char sepStr[2] = "/";
*sepStr = inSeparator;
strcat(ioPath, sepStr);
}
} // nsFileSpecHelpers::LeafReplace
//----------------------------------------------------------------------------------------
char* nsFileSpecHelpers::GetLeaf(const char* inPath, char inSeparator)
// Returns a pointer to an allocated string representing the leaf.
//----------------------------------------------------------------------------------------
{
if (!inPath)
return nsnull;
const char* lastSeparator = strrchr(inPath, inSeparator);
// If there was no separator, then return a copy of the caller's path.
if (!lastSeparator)
return StringDup(inPath);
// So there's at least one separator. What's just after it?
// If the separator was not the last character, return the trailing string.
const char* leafPointer = lastSeparator + 1;
if (*leafPointer)
return StringDup(leafPointer);
// So now, separator was the last character. Poke in a null instead.
*(char*)lastSeparator = '\0'; // Should use const_cast, but Unix has old compiler.
leafPointer = strrchr(inPath, inSeparator);
char* result = leafPointer ? StringDup(++leafPointer) : StringDup(inPath);
// Restore the poked null before returning.
*(char*)lastSeparator = inSeparator;
#ifdef XP_PC
// If it's a drive letter use the colon notation.
if (!leafPointer && strlen(result) == 2 && result[1] == '|')
result[1] = ':';
#endif
return result;
} // nsFileSpecHelpers::GetLeaf
#if defined(XP_UNIX) || defined(XP_PC)
//----------------------------------------------------------------------------------------
void nsFileSpecHelpers::MakeAllDirectories(const char* inPath, int mode)
// Make the path a valid one by creating all the intermediate directories. Does NOT
// make the leaf into a directory. This should be a unix path.
//----------------------------------------------------------------------------------------
{
if (!inPath)
return;
char* pathCopy = nsFileSpecHelpers::StringDup( inPath );
if (!pathCopy)
return;
const char kSeparator = '/'; // I repeat: this should be a unix-style path.
const int kSkipFirst = 1;
#ifdef XP_PC
// Either this is a relative path, or we ensure that it has
// a drive letter specifier.
NS_ASSERTION( pathCopy[0] != '/' || pathCopy[2] == '|', "No drive letter!" );
#endif
char* currentStart = pathCopy;
char* currentEnd = strchr(currentStart + kSkipFirst, kSeparator);
if (currentEnd)
{
nsFileSpec spec;
*currentEnd = '\0';
#ifdef XP_PC
/*
if we have a drive letter path, we must make sure that the inital path has a '/' on it, or
Canonify will turn "/c|" into a path relative to the running executable.
*/
if (pathCopy[0] == '/' && pathCopy[2] == '|')
{
char* startDir = nsFileSpecHelpers::StringDup( pathCopy, (strlen(pathCopy) + 1) );
strcat(startDir, "/");
spec = nsFilePath(startDir, PR_FALSE);
delete [] startDir;
}
else
{
spec = nsFilePath(pathCopy, PR_FALSE);
}
#else
spec = nsFilePath(pathCopy, PR_FALSE);
#endif
do
{
// If the node doesn't exist, and it is not the initial node in a full path,
// then make a directory (We cannot make the initial (volume) node).
if (!spec.Exists() && *currentStart != kSeparator)
spec.CreateDirectory(mode);
if (!spec.Exists())
{
NS_ASSERTION(spec.Exists(), "Could not create the directory?");
break;
}
currentStart = ++currentEnd;
currentEnd = strchr(currentStart, kSeparator);
if (!currentEnd)
break;
*currentEnd = '\0';
spec += currentStart; // "lengthen" the path, adding the next node.
} while (currentEnd);
}
delete [] pathCopy;
} // nsFileSpecHelpers::MakeAllDirectories
#endif // XP_PC || XP_UNIX
//----------------------------------------------------------------------------------------
char* nsFileSpecHelpers::ReallocCat(char*& ioString, const char* inString1)
//----------------------------------------------------------------------------------------
{
char* newString = AllocCat(ioString, inString1);
delete [] ioString;
ioString = newString;
return ioString;
} // nsFileSpecHelpers::ReallocCat
#if defined(XP_PC)
#include "windows/nsFileSpecWin.cpp" // Windows-specific implementations
#elif defined(XP_MAC)
#include "nsFileSpecMac.cpp" // Macintosh-specific implementations
#elif defined(XP_UNIX)
#include "unix/nsFileSpecUnix.cpp" // Unix-specific implementations
#endif
//========================================================================================
// nsFileURL implementation
//========================================================================================
#ifndef XP_MAC
//----------------------------------------------------------------------------------------
nsFileURL::nsFileURL(const char* inString, PRBool inCreateDirs)
//----------------------------------------------------------------------------------------
: mURL(nsnull)
{
if (!inString)
return;
NS_ASSERTION(strstr(inString, kFileURLPrefix) == inString, "Not a URL!");
// Make canonical and absolute.
nsFilePath path(inString + kFileURLPrefixLength, inCreateDirs);
*this = path;
} // nsFileURL::nsFileURL
#endif
#ifndef XP_MAC
//----------------------------------------------------------------------------------------
nsFileURL::nsFileURL(const nsString& inString, PRBool inCreateDirs)
//----------------------------------------------------------------------------------------
: mURL(nsnull)
{
const nsAutoCString aString(inString);
const char* aCString = (const char*) aString;
if (!inString)
return;
NS_ASSERTION(strstr(aCString, kFileURLPrefix) == aCString, "Not a URL!");
// Make canonical and absolute.
nsFilePath path(aCString + kFileURLPrefixLength, inCreateDirs);
*this = path;
} // nsFileURL::nsFileURL
#endif
//----------------------------------------------------------------------------------------
nsFileURL::nsFileURL(const nsFileURL& inOther)
//----------------------------------------------------------------------------------------
: mURL(nsFileSpecHelpers::StringDup(inOther.mURL))
#ifdef XP_MAC
, mFileSpec(inOther.GetFileSpec())
#endif
{
} // nsFileURL::nsFileURL
#ifndef XP_MAC
//----------------------------------------------------------------------------------------
nsFileURL::nsFileURL(const nsFilePath& inOther)
//----------------------------------------------------------------------------------------
: mURL(nsnull)
{
*this = inOther;
} // nsFileURL::nsFileURL
#endif
#ifndef XP_MAC
//----------------------------------------------------------------------------------------
nsFileURL::nsFileURL(const nsFileSpec& inOther)
: mURL(nsnull)
//----------------------------------------------------------------------------------------
{
*this = inOther;
} // nsFileURL::nsFileURL
#endif
//----------------------------------------------------------------------------------------
nsFileURL::~nsFileURL()
//----------------------------------------------------------------------------------------
{
delete [] mURL;
}
#ifndef XP_MAC
//----------------------------------------------------------------------------------------
void nsFileURL::operator = (const char* inString)
//----------------------------------------------------------------------------------------
{
nsFileSpecHelpers::StringAssign(mURL, inString);
NS_ASSERTION(strstr(inString, kFileURLPrefix) == inString, "Not a URL!");
} // nsFileURL::operator =
#endif
//----------------------------------------------------------------------------------------
void nsFileURL::operator = (const nsFileURL& inOther)
//----------------------------------------------------------------------------------------
{
mURL = nsFileSpecHelpers::StringAssign(mURL, inOther.mURL);
#ifdef XP_MAC
mFileSpec = inOther.GetFileSpec();
#endif
} // nsFileURL::operator =
#ifndef XP_MAC
//----------------------------------------------------------------------------------------
void nsFileURL::operator = (const nsFilePath& inOther)
//----------------------------------------------------------------------------------------
{
delete [] mURL;
char* original = (char*)(const char*)inOther; // we shall modify, but restore.
#ifdef XP_PC
// because we don't want to escape the '|' character, change it to a letter.
NS_ASSERTION(original[2] == '|', "No drive letter part!");
original[2] = 'x';
char* escapedPath = nsEscape(original, url_Path);
original[2] = '|'; // restore it
escapedPath[2] = '|';
#else
char* escapedPath = nsEscape(original, url_Path);
#endif
if (escapedPath)
mURL = nsFileSpecHelpers::AllocCat(kFileURLPrefix, escapedPath);
delete [] escapedPath;
} // nsFileURL::operator =
#endif
#ifndef XP_MAC
//----------------------------------------------------------------------------------------
void nsFileURL::operator = (const nsFileSpec& inOther)
//----------------------------------------------------------------------------------------
{
*this = nsFilePath(inOther);
} // nsFileURL::operator =
#endif
//----------------------------------------------------------------------------------------
nsOutputStream& operator << (nsOutputStream& s, const nsFileURL& url)
//----------------------------------------------------------------------------------------
{
return (s << url.mURL);
}
//========================================================================================
// nsFilePath implementation
//========================================================================================
nsFilePath::nsFilePath(const nsFilePath& inPath)
: mPath(nsFileSpecHelpers::StringDup(inPath.mPath))
#ifdef XP_MAC
, mFileSpec(inPath.mFileSpec)
#endif
{
}
#ifndef XP_MAC
//----------------------------------------------------------------------------------------
nsFilePath::nsFilePath(const char* inString, PRBool inCreateDirs)
//----------------------------------------------------------------------------------------
: mPath(nsFileSpecHelpers::StringDup(inString))
{
NS_ASSERTION(strstr(inString, kFileURLPrefix) != inString, "URL passed as path");
#ifdef XP_PC
nsFileSpecHelpers::UnixToNative(mPath);
#endif
// Make canonical and absolute.
nsFileSpecHelpers::Canonify(mPath, inCreateDirs);
#ifdef XP_PC
NS_ASSERTION( mPath[1] == ':', "unexpected canonical path" );
nsFileSpecHelpers::NativeToUnix(mPath);
#endif
}
#endif
#ifndef XP_MAC
//----------------------------------------------------------------------------------------
nsFilePath::nsFilePath(const nsString& inString, PRBool inCreateDirs)
//----------------------------------------------------------------------------------------
: mPath(inString.ToNewCString())
{
NS_ASSERTION(strstr(mPath, kFileURLPrefix) != mPath, "URL passed as path");
#ifdef XP_PC
nsFileSpecHelpers::UnixToNative(mPath);
#endif
// Make canonical and absolute.
nsFileSpecHelpers::Canonify(mPath, inCreateDirs);
#ifdef XP_PC
NS_ASSERTION( mPath[1] == ':', "unexpected canonical path" );
nsFileSpecHelpers::NativeToUnix(mPath);
#endif
}
#endif
#ifndef XP_MAC
//----------------------------------------------------------------------------------------
nsFilePath::nsFilePath(const nsFileURL& inOther)
//----------------------------------------------------------------------------------------
: mPath(nsFileSpecHelpers::StringDup(inOther.mURL + kFileURLPrefixLength))
{
}
#endif
#ifdef XP_UNIX
//----------------------------------------------------------------------------------------
nsFilePath::nsFilePath(const nsFileSpec& inOther)
//----------------------------------------------------------------------------------------
: mPath(nsFileSpecHelpers::StringDup(inOther.mPath))
{
}
#endif // XP_UNIX
//----------------------------------------------------------------------------------------
nsFilePath::~nsFilePath()
//----------------------------------------------------------------------------------------
{
delete [] mPath;
}
#ifdef XP_UNIX
//----------------------------------------------------------------------------------------
void nsFilePath::operator = (const nsFileSpec& inOther)
//----------------------------------------------------------------------------------------
{
mPath = nsFileSpecHelpers::StringAssign(mPath, inOther.mPath);
}
#endif // XP_UNIX
//----------------------------------------------------------------------------------------
void nsFilePath::operator = (const char* inString)
//----------------------------------------------------------------------------------------
{
NS_ASSERTION(strstr(inString, kFileURLPrefix) != inString, "URL passed as path");
#ifdef XP_MAC
mFileSpec = inString;
nsFileSpecHelpers::StringAssign(mPath, (const char*)nsFilePath(mFileSpec));
#else
nsFileSpecHelpers::StringAssign(mPath, inString);
#ifdef XP_PC
nsFileSpecHelpers::UnixToNative(mPath);
#endif
// Make canonical and absolute.
nsFileSpecHelpers::Canonify(mPath, PR_FALSE /* XXX? */);
#ifdef XP_PC
nsFileSpecHelpers::NativeToUnix(mPath);
#endif
#endif // XP_MAC
}
#ifndef XP_MAC
//----------------------------------------------------------------------------------------
void nsFilePath::operator = (const nsFileURL& inOther)
//----------------------------------------------------------------------------------------
{
nsFileSpecHelpers::StringAssign(mPath, (const char*)nsFilePath(inOther));
}
#endif
//----------------------------------------------------------------------------------------
void nsFilePath::operator = (const nsFilePath& inOther)
//----------------------------------------------------------------------------------------
{
nsFileSpecHelpers::StringAssign(mPath, inOther.mPath);
#ifdef XP_MAC
mFileSpec = inOther.GetFileSpec();
#endif
}
//========================================================================================
// nsFileSpec implementation
//========================================================================================
#ifndef XP_MAC
//----------------------------------------------------------------------------------------
nsFileSpec::nsFileSpec()
//----------------------------------------------------------------------------------------
: mPath(nsnull)
, mError(NS_OK)
{
}
#endif
//----------------------------------------------------------------------------------------
nsFileSpec::nsFileSpec(const nsPersistentFileDescriptor& inDescriptor)
//----------------------------------------------------------------------------------------
: mPath(nsnull)
{
*this = inDescriptor;
}
//----------------------------------------------------------------------------------------
nsFileSpec::nsFileSpec(const nsFileURL& inURL)
//----------------------------------------------------------------------------------------
: mPath(nsnull)
{
*this = nsFilePath(inURL); // convert to unix path first
}
//----------------------------------------------------------------------------------------
void nsFileSpec::MakeUnique(const char* inSuggestedLeafName)
//----------------------------------------------------------------------------------------
{
if (inSuggestedLeafName && *inSuggestedLeafName)
SetLeafName(inSuggestedLeafName);
MakeUnique();
} // nsFileSpec::MakeUnique
//----------------------------------------------------------------------------------------
void nsFileSpec::MakeUnique()
//----------------------------------------------------------------------------------------
{
if (!Exists())
return;
char* leafName = GetLeafName();
if (!leafName)
return;
char* lastDot = strrchr(leafName, '.');
char* suffix = "";
if (lastDot)
{
suffix = nsFileSpecHelpers::StringDup(lastDot); // include '.'
*lastDot = '\0'; // strip suffix and dot.
}
const int kMaxRootLength
= nsFileSpecHelpers::kMaxCoreLeafNameLength - strlen(suffix) - 1;
if ((int)strlen(leafName) > (int)kMaxRootLength)
leafName[kMaxRootLength] = '\0';
for (short index = 1; index < 1000 && Exists(); index++)
{
// start with "Picture-1.jpg" after "Picture.jpg" exists
char newName[nsFileSpecHelpers::kMaxFilenameLength + 1];
sprintf(newName, "%s-%d%s", leafName, index, suffix);
SetLeafName(newName);
}
if (*suffix)
delete [] suffix;
delete [] leafName;
} // nsFileSpec::MakeUnique
//----------------------------------------------------------------------------------------
void nsFileSpec::operator = (const nsFileURL& inURL)
//----------------------------------------------------------------------------------------
{
*this = nsFilePath(inURL); // convert to unix path first
}
//----------------------------------------------------------------------------------------
void nsFileSpec::operator = (const nsPersistentFileDescriptor& inDescriptor)
//----------------------------------------------------------------------------------------
{
void* data;
PRInt32 dataSize;
inDescriptor.GetData(data, dataSize);
#ifdef XP_MAC
char* decodedData = PL_Base64Decode((const char*)data, (int)dataSize, nsnull);
// Cast to an alias record and resolve.
AliasHandle aliasH = nsnull;
mError = NS_FILE_RESULT(PtrToHand(decodedData, &(Handle)aliasH, (dataSize * 3) / 4));
PR_Free(decodedData);
if (NS_SUCCEEDED(mError))
return; // not enough memory?
Boolean changed;
mError = NS_FILE_RESULT(::ResolveAlias(nsnull, aliasH, &mSpec, &changed));
DisposeHandle((Handle) aliasH);
delete [] mPath;
#else
nsFileSpecHelpers::StringAssign(mPath, (char*)data);
mError = NS_OK;
#endif
}
//========================================================================================
// UNIX & WIN nsFileSpec implementation
//========================================================================================
#ifdef XP_UNIX
//----------------------------------------------------------------------------------------
nsFileSpec::nsFileSpec(const nsFilePath& inPath)
//----------------------------------------------------------------------------------------
: mPath(nsFileSpecHelpers::StringDup((const char*)inPath))
, mError(NS_OK)
{
}
#endif // XP_UNIX
#ifdef XP_UNIX
//----------------------------------------------------------------------------------------
void nsFileSpec::operator = (const nsFilePath& inPath)
//----------------------------------------------------------------------------------------
{
nsFileSpecHelpers::StringAssign(mPath, (const char*)inPath);
mError = NS_OK;
}
#endif //XP_UNIX
#if defined(XP_UNIX) || defined(XP_PC)
//----------------------------------------------------------------------------------------
nsFileSpec::nsFileSpec(const nsFileSpec& inSpec)
//----------------------------------------------------------------------------------------
: mPath(nsFileSpecHelpers::StringDup(inSpec.mPath))
, mError(NS_OK)
{
}
#endif //XP_UNIX
#if defined(XP_UNIX) || defined(XP_PC)
//----------------------------------------------------------------------------------------
nsFileSpec::nsFileSpec(const char* inString, PRBool inCreateDirs)
//----------------------------------------------------------------------------------------
: mPath(nsFileSpecHelpers::StringDup(inString))
, mError(NS_OK)
{
// Make canonical and absolute.
nsFileSpecHelpers::Canonify(mPath, inCreateDirs);
}
#endif //XP_UNIX,PC
#if defined(XP_UNIX) || defined(XP_PC)
//----------------------------------------------------------------------------------------
nsFileSpec::nsFileSpec(const nsString& inString, PRBool inCreateDirs)
//----------------------------------------------------------------------------------------
: mPath(inString.ToNewCString())
, mError(NS_OK)
{
// Make canonical and absolute.
nsFileSpecHelpers::Canonify(mPath, inCreateDirs);
}
#endif //XP_UNIX,PC
//----------------------------------------------------------------------------------------
nsFileSpec::~nsFileSpec()
//----------------------------------------------------------------------------------------
{
delete [] mPath;
}
#if defined(XP_UNIX) || defined(XP_PC)
//----------------------------------------------------------------------------------------
void nsFileSpec::operator = (const nsFileSpec& inSpec)
//----------------------------------------------------------------------------------------
{
mPath = nsFileSpecHelpers::StringAssign(mPath, inSpec.mPath);
mError = inSpec.Error();
}
#endif //XP_UNIX
#if defined(XP_UNIX) || defined(XP_PC)
//----------------------------------------------------------------------------------------
void nsFileSpec::operator = (const char* inString)
//----------------------------------------------------------------------------------------
{
mPath = nsFileSpecHelpers::StringAssign(mPath, inString);
// Make canonical and absolute.
nsFileSpecHelpers::Canonify(mPath, PR_FALSE /* XXX? */);
mError = NS_OK;
}
#endif //XP_UNIX
#if (defined(XP_UNIX) || defined(XP_PC))
//----------------------------------------------------------------------------------------
nsOutputStream& operator << (nsOutputStream& s, const nsFileSpec& spec)
//----------------------------------------------------------------------------------------
{
#ifdef NS_DEBUG
static PRBool warnedOnce = PR_FALSE;
if (!warnedOnce)
{
NS_WARNING("This is for debugging only. Do not call this in shipped version!");
warnedOnce = PR_TRUE;
}
#endif // NS_DEBUG
return (s << spec.GetCString());
}
#endif // DEBUG ONLY!
//----------------------------------------------------------------------------------------
nsFileSpec nsFileSpec::operator + (const char* inRelativePath) const
//----------------------------------------------------------------------------------------
{
nsFileSpec result = *this;
result += inRelativePath;
return result;
} // nsFileSpec::operator +
//----------------------------------------------------------------------------------------
PRBool nsFileSpec::operator == (const nsFileSpec& inOther) const
//----------------------------------------------------------------------------------------
{
#ifdef XP_MAC
if ( inOther.mSpec.vRefNum == mSpec.vRefNum &&
inOther.mSpec.parID == mSpec.parID &&
EqualString(inOther.mSpec.name, mSpec.name, false, true))
return PR_TRUE;
#else
PRBool amEmpty = !mPath || !*mPath;
PRBool heEmpty = !inOther.mPath || !*inOther.mPath;
if (amEmpty) // we're the same if he's empty...
return heEmpty;
if (heEmpty) // ('cuz I'm not...)
return PR_FALSE;
#if defined(XP_PC)
// windows does not care about case.
if (_stricmp(mPath, inOther.mPath ) == 0)
return PR_TRUE;
#else
if (strcmp(mPath, inOther.mPath ) == 0)
return PR_TRUE;
#endif
#endif
return PR_FALSE;
}
//----------------------------------------------------------------------------------------
PRBool nsFileSpec::operator != (const nsFileSpec& inOther) const
//----------------------------------------------------------------------------------------
{
return (! (*this == inOther) );
}
#ifndef XP_MAC
//----------------------------------------------------------------------------------------
const char* nsFileSpec::GetCString() const
// This is the only automatic conversion to const char*
// that is provided, and it allows the
// path to be "passed" to NSPR file routines. This practice
// is VERY EVIL and should only be used to support legacy
// code. Using it guarantees bugs on Macintosh. The path is NOT allocated, so do
// not even think of deleting (or freeing) it.
//----------------------------------------------------------------------------------------
{
return mPath;
}
#endif
//========================================================================================
// class nsPersistentFileDescriptor
//========================================================================================
//----------------------------------------------------------------------------------------
nsPersistentFileDescriptor::nsPersistentFileDescriptor(const nsPersistentFileDescriptor& inDesc)
//----------------------------------------------------------------------------------------
: mDescriptorString(nsFileSpecHelpers::StringDup(inDesc.mDescriptorString))
{
} // nsPersistentFileDescriptor::nsPersistentFileDescriptor
//----------------------------------------------------------------------------------------
void nsPersistentFileDescriptor::operator = (const nsPersistentFileDescriptor& inDesc)
//----------------------------------------------------------------------------------------
{
nsFileSpecHelpers::StringAssign(mDescriptorString, inDesc.mDescriptorString);
} // nsPersistentFileDescriptor::operator =
//----------------------------------------------------------------------------------------
nsPersistentFileDescriptor::nsPersistentFileDescriptor(const nsFileSpec& inSpec)
//----------------------------------------------------------------------------------------
: mDescriptorString(nsnull)
{
*this = inSpec;
} // nsPersistentFileDescriptor::nsPersistentFileDescriptor
//----------------------------------------------------------------------------------------
void nsPersistentFileDescriptor::operator = (const nsFileSpec& inSpec)
//----------------------------------------------------------------------------------------
{
#ifdef XP_MAC
if (inSpec.Error())
return;
AliasHandle aliasH;
OSErr err = NewAlias(nil, inSpec.GetFSSpecPtr(), &aliasH);
if (err != noErr)
return;
PRUint32 bytes = GetHandleSize((Handle) aliasH);
HLock((Handle) aliasH);
char* buf = PL_Base64Encode((const char*)*aliasH, bytes, nsnull);
DisposeHandle((Handle) aliasH);
nsFileSpecHelpers::StringAssign(mDescriptorString, buf);
PR_Free(buf);
#else
nsFileSpecHelpers::StringAssign(mDescriptorString, inSpec.GetCString());
#endif // XP_MAC
} // nsPersistentFileDescriptor::operator =
//----------------------------------------------------------------------------------------
nsPersistentFileDescriptor::~nsPersistentFileDescriptor()
//----------------------------------------------------------------------------------------
{
delete [] mDescriptorString;
} // nsPersistentFileDescriptor::~nsPersistentFileDescriptor
//----------------------------------------------------------------------------------------
void nsPersistentFileDescriptor::GetData(void*& outData, PRInt32& outSize) const
//----------------------------------------------------------------------------------------
{
outSize = PL_strlen(mDescriptorString);
outData = mDescriptorString;
}
//----------------------------------------------------------------------------------------
void nsPersistentFileDescriptor::SetData(const void* inData, PRInt32 inSize)
//----------------------------------------------------------------------------------------
{
delete [] mDescriptorString;
mDescriptorString = new char[1 + inSize];
if (!mDescriptorString)
return;
memcpy(mDescriptorString, inData, inSize);
mDescriptorString[inSize] = '\0';
}
#define MAX_PERSISTENT_DATA_SIZE 1000
//----------------------------------------------------------------------------------------
nsresult nsPersistentFileDescriptor::Read(nsIInputStream* aStream)
//----------------------------------------------------------------------------------------
{
nsInputStream inputStream(aStream);
inputStream >> *this;
return NS_OK;
}
//----------------------------------------------------------------------------------------
nsresult nsPersistentFileDescriptor::Write(nsIOutputStream* aStream)
//----------------------------------------------------------------------------------------
{
nsOutputStream outputStream(aStream);
outputStream << *this;
return NS_OK;
}
//----------------------------------------------------------------------------------------
nsInputStream& operator >> (nsInputStream& s, nsPersistentFileDescriptor& d)
// reads the data from a file
//----------------------------------------------------------------------------------------
{
char bigBuffer[MAX_PERSISTENT_DATA_SIZE + 1];
// The first 8 bytes of the data should be a hex version of the data size to follow.
PRInt32 bytesRead = 8;
bytesRead = s.read(bigBuffer, bytesRead);
if (bytesRead != 8)
return s;
bigBuffer[8] = '\0';
sscanf(bigBuffer, "%lx", (PRUint32*)&bytesRead);
if (bytesRead > MAX_PERSISTENT_DATA_SIZE)
return s; // preposterous.
// Now we know how many bytes to read, do it.
s.read(bigBuffer, bytesRead);
d.SetData(bigBuffer, bytesRead);
return s;
}
//----------------------------------------------------------------------------------------
nsOutputStream& operator << (nsOutputStream& s, const nsPersistentFileDescriptor& d)
// writes the data to a file
//----------------------------------------------------------------------------------------
{
char littleBuf[9];
PRInt32 dataSize;
void* data;
d.GetData(data, dataSize);
// First write (in hex) the length of the data to follow. Exactly 8 bytes
sprintf(littleBuf, "%0.8x", dataSize);
s << littleBuf;
// Now write the data itself
s << d.mDescriptorString;
return s;
}
//========================================================================================
// class nsAutoCString
//========================================================================================
//----------------------------------------------------------------------------------------
nsAutoCString::~nsAutoCString()
//----------------------------------------------------------------------------------------
{
delete [] (char*)mCString;
}

View File

@@ -0,0 +1,321 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
// First checked in on 98/12/08 by John R. McMullen.
// Since nsFileStream.h is entirely templates, common code (such as open())
// which does not actually depend on the charT, can be placed here.
#include "nsFileStream.h"
#include "nsIStringStream.h"
#include <string.h>
#include <stdio.h>
//========================================================================================
// nsInputStream
//========================================================================================
//----------------------------------------------------------------------------------------
nsInputStream::~nsInputStream()
//----------------------------------------------------------------------------------------
{
}
//----------------------------------------------------------------------------------------
char nsInputStream::get()
//----------------------------------------------------------------------------------------
{
char c;
read(&c, sizeof(c));
return c;
}
//----------------------------------------------------------------------------------------
PRInt32 nsInputStream::read(void* s, PRInt32 n)
//----------------------------------------------------------------------------------------
{
if (!mInputStream)
return 0;
PRInt32 result = 0;
mInputStream->Read((char*)s, n, (PRUint32*)&result);
if (result < n)
set_at_eof(PR_TRUE);
return result;
} // nsInputStream::read
//----------------------------------------------------------------------------------------
static void TidyEndOfLine(char*& cp)
// Assumes that cp is pointing at \n or \r. Nulls out the character, checks for
// a second terminator (of the opposite persuasion), and returns cp pointing past the
// entire eol construct (one or two characters).
//----------------------------------------------------------------------------------------
{
char ch = *cp;
*cp++ = '\0'; // terminate at the newline, then skip past it
if ((ch == '\n' && *cp == '\r') || (ch == '\r' && *cp == '\n'))
cp++; // possibly a pair.
}
//----------------------------------------------------------------------------------------
nsInputStream& nsInputStream::operator >> (char& c)
//----------------------------------------------------------------------------------------
{
c = get();
return *this;
}
//========================================================================================
// nsOutputStream
//========================================================================================
//----------------------------------------------------------------------------------------
nsOutputStream::~nsOutputStream()
//----------------------------------------------------------------------------------------
{
}
//----------------------------------------------------------------------------------------
void nsOutputStream::put(char c)
//----------------------------------------------------------------------------------------
{
write(&c, sizeof(c));
}
//----------------------------------------------------------------------------------------
PRInt32 nsOutputStream::write(const void* s, PRInt32 n)
//----------------------------------------------------------------------------------------
{
if (!mOutputStream)
return 0;
PRInt32 result = 0;
mOutputStream->Write((char*)s, n, (PRUint32*)&result);
return result;
} // nsOutputStream::write
//----------------------------------------------------------------------------------------
void nsOutputStream::flush()
//----------------------------------------------------------------------------------------
{
}
//----------------------------------------------------------------------------------------
nsOutputStream& nsOutputStream::operator << (char c)
//----------------------------------------------------------------------------------------
{
put(c);
return *this;
}
//----------------------------------------------------------------------------------------
nsOutputStream& nsOutputStream::operator << (const char* s)
//----------------------------------------------------------------------------------------
{
write(s, strlen(s));
return *this;
}
//----------------------------------------------------------------------------------------
nsOutputStream& nsOutputStream::operator << (short val)
//----------------------------------------------------------------------------------------
{
char buf[30];
sprintf(buf, "%hd", val);
return (*this << buf);
}
//----------------------------------------------------------------------------------------
nsOutputStream& nsOutputStream::operator << (unsigned short val)
//----------------------------------------------------------------------------------------
{
char buf[30];
sprintf(buf, "%hu", val);
return (*this << buf);
}
//----------------------------------------------------------------------------------------
nsOutputStream& nsOutputStream::operator << (long val)
//----------------------------------------------------------------------------------------
{
char buf[30];
sprintf(buf, "%ld", val);
return (*this << buf);
}
//----------------------------------------------------------------------------------------
nsOutputStream& nsOutputStream::operator << (unsigned long val)
//----------------------------------------------------------------------------------------
{
char buf[30];
sprintf(buf, "%lu", val);
return (*this << buf);
}
//----------------------------------------------------------------------------------------
nsOutputStream& nsOutputStream::operator << (int val)
//----------------------------------------------------------------------------------------
{
char buf[30];
sprintf(buf, "%d", val);
return (*this << buf);
}
//----------------------------------------------------------------------------------------
nsOutputStream& nsOutputStream::operator << (unsigned int val)
//----------------------------------------------------------------------------------------
{
char buf[30];
sprintf(buf, "%u", val);
return (*this << buf);
}
//========================================================================================
// nsRandomAccessInputStream
//========================================================================================
//----------------------------------------------------------------------------------------
PRBool nsRandomAccessInputStream::readline(char* s, PRInt32 n)
// This will truncate if the buffer is too small. Result will always be null-terminated.
//----------------------------------------------------------------------------------------
{
PRBool bufferLargeEnough = PR_TRUE; // result
if (!s || !n)
return PR_TRUE;
PRIntn position = tell();
if (position < 0)
return PR_FALSE;
PRInt32 bytesRead = read(s, n - 1);
if (failed())
return PR_FALSE;
s[bytesRead] = '\0'; // always terminate at the end of the buffer
char* tp = strpbrk(s, "\n\r");
if (tp)
{
TidyEndOfLine(tp);
bytesRead = (tp - s);
}
else if (!eof())
bufferLargeEnough = PR_FALSE;
position += bytesRead;
seek(position);
return bufferLargeEnough;
} // nsRandomAccessInputStream::readline
//========================================================================================
// nsInputStringStream
//========================================================================================
//----------------------------------------------------------------------------------------
nsInputStringStream::nsInputStringStream(const char* stringToRead)
//----------------------------------------------------------------------------------------
{
nsISupports* stream;
if (NS_FAILED(NS_NewCharInputStream(&stream, stringToRead)))
return;
mInputStream = nsQueryInterface(stream);
mStore = nsQueryInterface(stream);
NS_RELEASE(stream);
}
//----------------------------------------------------------------------------------------
nsInputStringStream::nsInputStringStream(const nsString& stringToRead)
//----------------------------------------------------------------------------------------
{
nsISupports* stream;
if (NS_FAILED(NS_NewStringInputStream(&stream, stringToRead)))
return;
mInputStream = nsQueryInterface(stream);
mStore = nsQueryInterface(stream);
NS_RELEASE(stream);
}
//========================================================================================
// nsOutputStringStream
//========================================================================================
//----------------------------------------------------------------------------------------
nsOutputStringStream::nsOutputStringStream(char*& stringToChange)
//----------------------------------------------------------------------------------------
{
nsISupports* stream;
if (NS_FAILED(NS_NewCharOutputStream(&stream, &stringToChange)))
return;
mOutputStream = nsQueryInterface(stream);
mStore = nsQueryInterface(stream);
NS_RELEASE(stream);
}
//----------------------------------------------------------------------------------------
nsOutputStringStream::nsOutputStringStream(nsString& stringToChange)
//----------------------------------------------------------------------------------------
{
nsISupports* stream;
if (NS_FAILED(NS_NewStringOutputStream(&stream, stringToChange)))
return;
mOutputStream = nsQueryInterface(stream);
mStore = nsQueryInterface(stream);
NS_RELEASE(stream);
}
//========================================================================================
// nsInputFileStream
//========================================================================================
//----------------------------------------------------------------------------------------
nsInputFileStream::nsInputFileStream(
const nsFileSpec& inFile,
int nsprMode,
PRIntn accessMode)
//----------------------------------------------------------------------------------------
{
nsISupports* stream;
if (NS_FAILED(NS_NewIOFileStream(&stream, inFile, nsprMode, accessMode)))
return;
mFile = nsQueryInterface(stream);
mInputStream = nsQueryInterface(stream);
mStore = nsQueryInterface(stream);
mFileInputStream = nsQueryInterface(stream);
NS_RELEASE(stream);
} // nsInputFileStream::nsInputFileStream
//========================================================================================
// nsOutputFileStream
//========================================================================================
//----------------------------------------------------------------------------------------
void nsOutputFileStream::flush()
//----------------------------------------------------------------------------------------
{
if (mFileOutputStream)
mFileOutputStream->Flush();
}
//========================================================================================
// Manipulators
//========================================================================================
//----------------------------------------------------------------------------------------
nsOutputStream& nsEndl(nsOutputStream& os)
//----------------------------------------------------------------------------------------
{
os.put('\n');
os.flush();
return os;
} // nsEndl

View File

@@ -0,0 +1,22 @@
#include "nscore.h"
#include "nsCaretProperties.h"
//-----------------------------------------------------------------------------
nsCaretProperties::nsCaretProperties()
: mCaretWidth(eDefaultCaretWidth)
, mBlinkRate(eDefaulBlinkRate)
{
// in your platform-specific class, get data from the OS in your constructor
}
//-----------------------------------------------------------------------------
nsCaretProperties* NewCaretProperties()
{
return new nsCaretProperties();
}

View File

@@ -0,0 +1,51 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#ifndef nsIArena_h___
#define nsIArena_h___
#include "nscore.h"
#include "nsISupports.h"
#define NS_MIN_ARENA_BLOCK_SIZE 64
#define NS_DEFAULT_ARENA_BLOCK_SIZE 4096
/// Interface IID for nsIArena
#define NS_IARENA_IID \
{ 0xa24fdad0, 0x93b4, 0x11d1, \
{0x89, 0x5b, 0x00, 0x60, 0x08, 0x91, 0x1b, 0x81} }
/** Interface to a memory arena abstraction. Arena's use large blocks
* of memory to allocate smaller objects. Arena's provide no free
* operator; instead, all of the objects in the arena are deallocated
* by deallocating the arena (e.g. when it's reference count goes to
* zero)
*/
class nsIArena : public nsISupports {
public:
virtual void* Alloc(PRInt32 size) = 0;
};
/**
* Create a new arena using the desired block size for allocating the
* underlying memory blocks. The underlying memory blocks are allocated
* using the PR heap.
*/
extern NS_BASE nsresult NS_NewHeapArena(nsIArena** aInstancePtrResult,
PRInt32 aArenaBlockSize = 0);
#endif /* nsIArena_h___ */

View File

@@ -0,0 +1,79 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#ifndef nsIAtom_h___
#define nsIAtom_h___
#include "nscore.h"
#include "nsISupports.h"
class nsString;
class nsISizeOfHandler;
#define NS_IATOM_IID \
{ 0x3d1b15b0, 0x93b4, 0x11d1, \
{0x89, 0x5b, 0x00, 0x60, 0x08, 0x91, 0x1b, 0x81} }
/**
* A globally unique identfier. nsIAtom's can be compared for
* equality by using operator '=='. These objects are reference
* counted like other nsISupports objects. When you are done with
* the atom, NS_RELEASE it.
*/
class nsIAtom : public nsISupports {
public:
static const nsIID& GetIID() { static nsIID iid = NS_IATOM_IID; return iid; }
/**
* Translate the unicode string into the stringbuf.
*/
virtual void ToString(nsString& aString) const = 0;
/**
* Return a pointer to a zero terminated unicode string.
*/
virtual const PRUnichar* GetUnicode() const = 0;
/**
* Add the size, in bytes, of the atom to the handler.
*/
NS_IMETHOD SizeOf(nsISizeOfHandler* aHandler) const = 0;
};
/**
* Find an atom that matches the given iso-latin1 C string. The
* C string is translated into it's unicode equivalent.
*/
extern NS_BASE nsIAtom* NS_NewAtom(const char* isolatin1);
/**
* Find an atom that matches the given unicode string. The string is assumed
* to be zero terminated.
*/
extern NS_BASE nsIAtom* NS_NewAtom(const PRUnichar* unicode);
/**
* Find an atom that matches the given string.
*/
extern NS_BASE nsIAtom* NS_NewAtom(const nsString& aString);
/**
* Return a count of the total number of atoms currently
* alive in the system.
*/
extern NS_BASE nsrefcnt NS_GetNumberOfAtoms(void);
#endif /* nsIAtom_h___ */

View File

@@ -0,0 +1,58 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#ifndef nsIBaseStream_h___
#define nsIBaseStream_h___
#include "nscore.h"
#include "nsISupports.h"
/* 6ccb17a0-e95e-11d1-beae-00805f8a66dc */
#define NS_IBASESTREAM_IID \
{ 0x6ccb17a0, 0xe95e, 0x11d1, \
{0xbe, 0xae, 0x00, 0x80, 0x5f, 0x8a, 0x66, 0xdc} }
/** Abstract stream */
class nsIBaseStream : public nsISupports {
public:
static const nsIID& GetIID() { static nsIID iid = NS_IBASESTREAM_IID; return iid; }
/** Close the stream. */
NS_IMETHOD
Close(void) = 0;
};
/** Error codes */
//@{
/// End of file
#define NS_BASE_STREAM_EOF NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_BASE, 1)
/// Stream closed
#define NS_BASE_STREAM_CLOSED NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_BASE, 2)
/// Error from the operating system
#define NS_BASE_STREAM_OSERROR NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_BASE, 3)
/// Illegal arguments
#define NS_BASE_STREAM_ILLEGAL_ARGS NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_BASE, 4)
/// For unichar streams
#define NS_BASE_STREAM_NO_CONVERTER NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_BASE, 5)
/// For unichar streams
#define NS_BASE_STREAM_BAD_CONVERSION NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_BASE, 6)
//@}
#endif /* nsInputStream_h___ */

View File

@@ -0,0 +1,57 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#ifndef nsIByteBuffer_h___
#define nsIByteBuffer_h___
#include "nscore.h"
#include "nsISupports.h"
class nsIInputStream;
#define NS_IBYTE_BUFFER_IID \
{ 0xe4a6e4b0, 0x93b4, 0x11d1, \
{0x89, 0x5b, 0x00, 0x60, 0x08, 0x91, 0x1b, 0x81} }
/** Interface to a buffer that holds bytes */
class nsIByteBuffer : public nsISupports {
public:
/** @return length of buffer, i.e. how many bytes are currently in it. */
virtual PRUint32 GetLength(void) const = 0;
/** @return number of bytes allocated in the buffer */
virtual PRUint32 GetBufferSize(void) const = 0;
/** @return the buffer */
virtual char* GetBuffer(void) const = 0;
/** Grow buffer to aNewSize bytes. */
virtual PRBool Grow(PRUint32 aNewSize) = 0;
/** Fill the buffer with data from aStream. Don't grow the buffer, only
* read until length of buffer equals buffer size. */
virtual PRInt32 Fill(nsresult* aErrorCode, nsIInputStream* aStream,
PRUint32 aKeep) = 0;
};
/** Create a new byte buffer using the given buffer size. */
extern NS_BASE nsresult NS_NewByteBuffer(nsIByteBuffer** aInstancePtrResult,
nsISupports* aOuter,
PRUint32 aBufferSize = 0);
#endif /* nsIByteBuffer_h___ */

View File

@@ -0,0 +1,456 @@
#include "nsIFileStream.h"
#include "nsFileSpec.h"
#include "prerror.h"
#ifdef XP_MAC
#include "pprio.h" // To get PR_ImportFile
#else
#include "prio.h"
#endif
#ifdef XP_MAC
#include <Errors.h>
#include <iostream>
#endif
//========================================================================================
class FileImpl
: public nsIRandomAccessStore
, public nsIFileOutputStream
, public nsIFileInputStream
, public nsIFile
//========================================================================================
{
public:
FileImpl(PRFileDesc* inDesc)
: mFileDesc(inDesc)
, mFailed(PR_FALSE)
, mEOF(PR_FALSE)
, mLength(-1)
{
NS_INIT_REFCNT();
}
FileImpl(
const nsFileSpec& inFile,
int nsprMode,
PRIntn accessMode)
: mFileDesc(nsnull)
, mFailed(PR_FALSE)
, mEOF(PR_FALSE)
{
NS_INIT_REFCNT();
Open(inFile, nsprMode, accessMode);
}
virtual ~FileImpl()
{
Close();
}
// nsISupports interface
NS_DECL_ISUPPORTS
// nsIFile interface
NS_IMETHOD Open(
const nsFileSpec& inFile,
int nsprMode,
PRIntn accessMode);
NS_IMETHOD Close();
NS_IMETHOD Seek(PRSeekWhence whence, PRInt32 offset);
NS_IMETHOD GetIsOpen(PRBool* outOpen)
{
*outOpen = (mFileDesc != nsnull);
return NS_OK;
}
NS_IMETHOD Tell(PRIntn* outWhere);
// nsIInputStream interface
NS_IMETHOD GetLength(PRUint32 *aLength)
{
NS_PRECONDITION(aLength != nsnull, "null ptr");
if (!aLength)
return NS_ERROR_NULL_POINTER;
if (mLength < 0)
return NS_FILE_RESULT(NS_ERROR_UNEXPECTED);
*aLength = mLength;
return NS_OK;
}
NS_IMETHOD Read(char* aBuf,
PRUint32 aCount,
PRUint32 *aReadCount)
{
NS_PRECONDITION(aBuf != nsnull, "null ptr");
if (!aBuf)
return NS_ERROR_NULL_POINTER;
NS_PRECONDITION(aReadCount != nsnull, "null ptr");
if (!aReadCount)
return NS_ERROR_NULL_POINTER;
if (!mFileDesc)
return NS_FILE_RESULT(PR_BAD_DESCRIPTOR_ERROR);
if (mFailed)
return NS_ERROR_FAILURE;
PRInt32 bytesRead = PR_Read(mFileDesc, aBuf, aCount);
if (bytesRead < 0)
{
*aReadCount = 0;
mFailed = PR_TRUE;
return NS_FILE_RESULT(PR_GetError());
}
*aReadCount = bytesRead;
return NS_OK;
}
// nsIOutputStream interface
NS_IMETHOD Write(const char* aBuf,
PRUint32 aCount,
PRUint32 *aWriteCount)
{
NS_PRECONDITION(aBuf != nsnull, "null ptr");
NS_PRECONDITION(aWriteCount != nsnull, "null ptr");
#ifdef XP_MAC
// Calling PR_Write on stdout is sure suicide.
if (mFileDesc == PR_STDOUT || mFileDesc == PR_STDERR)
{
cout.write(aBuf, aCount);
*aWriteCount = aCount;
return NS_OK;
}
#endif
if (!mFileDesc)
return NS_FILE_RESULT(PR_BAD_DESCRIPTOR_ERROR);
if (mFailed)
return NS_ERROR_FAILURE;
PRInt32 bytesWrit = PR_Write(mFileDesc, aBuf, aCount);
if (bytesWrit != (PRInt32)aCount)
{
mFailed = PR_TRUE;
*aWriteCount = 0;
return NS_FILE_RESULT(PR_GetError());
}
*aWriteCount = bytesWrit;
return NS_OK;
}
NS_IMETHOD Flush();
NS_IMETHOD GetAtEOF(PRBool* outAtEOF)
{
*outAtEOF = mEOF;
return NS_OK;
}
NS_IMETHOD SetAtEOF(PRBool inAtEOF)
{
mEOF = inAtEOF;
return NS_OK;
}
protected:
PRFileDesc* mFileDesc;
int mNSPRMode;
PRBool mFailed;
PRBool mEOF;
PRInt32 mLength;
}; // class FileImpl
#define SAY_I_IMPLEMENT(classname) \
if (aIID.Equals(classname::GetIID())) \
{ \
*aInstancePtr = (void*)((classname*)this); \
NS_ADDREF_THIS(); \
return NS_OK; \
}
NS_IMPL_RELEASE(FileImpl)
NS_IMPL_ADDREF(FileImpl)
//----------------------------------------------------------------------------------------
NS_IMETHODIMP FileImpl::QueryInterface(REFNSIID aIID, void** aInstancePtr)
//----------------------------------------------------------------------------------------
{
if (!aInstancePtr)
return NS_ERROR_NULL_POINTER;
*aInstancePtr = nsnull;
SAY_I_IMPLEMENT(nsIFile)
SAY_I_IMPLEMENT(nsIRandomAccessStore)
SAY_I_IMPLEMENT(nsIOutputStream)
SAY_I_IMPLEMENT(nsIInputStream)
SAY_I_IMPLEMENT(nsIFileInputStream)
SAY_I_IMPLEMENT(nsIFileOutputStream)
// Note that we derive from two copies of nsIBaseStream (and hence
// of nsISupports), one through
// nsIOutputStream, the other through nsIInputStream. Resolve this
// by giving them a specific one
if (aIID.Equals(((nsIBaseStream*)(nsIOutputStream*)this)->GetIID()))
{
*aInstancePtr = (void*)((nsIBaseStream*)(nsIOutputStream*)this);
NS_ADDREF_THIS();
return NS_OK;
}
if (aIID.Equals(((nsISupports*)(nsIOutputStream*)this)->GetIID()))
{
*aInstancePtr = (void*)((nsISupports*)(nsIOutputStream*)this);
NS_ADDREF_THIS();
return NS_OK;
}
return NS_NOINTERFACE;
} // FileImpl::QueryInterface
//----------------------------------------------------------------------------------------
NS_IMETHODIMP FileImpl::Open(
const nsFileSpec& inFile,
int nsprMode,
PRIntn accessMode)
//----------------------------------------------------------------------------------------
{
if (mFileDesc)
if ((nsprMode & mNSPRMode) == nsprMode)
return NS_OK;
else
return NS_FILE_RESULT(PR_ILLEGAL_ACCESS_ERROR);
const int nspr_modes[]={
PR_WRONLY | PR_CREATE_FILE,
PR_WRONLY | PR_CREATE_FILE | PR_APPEND,
PR_WRONLY | PR_CREATE_FILE | PR_TRUNCATE,
PR_RDONLY,
PR_RDONLY | PR_APPEND,
PR_RDWR | PR_CREATE_FILE,
PR_RDWR | PR_CREATE_FILE | PR_TRUNCATE,
// "wb",
// "ab",
// "wb",
// "rb",
// "r+b",
// "w+b",
0 };
const int* currentLegalMode = nspr_modes;
while (*currentLegalMode && nsprMode != *currentLegalMode)
++currentLegalMode;
if (!*currentLegalMode)
return NS_FILE_RESULT(PR_ILLEGAL_ACCESS_ERROR);
#ifdef XP_MAC
// Use the file spec to open the file, because one path can be common to
// several files on the Macintosh (you can have several volumes with the
// same name, see).
mFileDesc = 0;
if (inFile.Error() != noErr)
return NS_FILE_RESULT(inFile.Error());
OSErr err = noErr;
#if DEBUG
const OSType kCreator = 'CWIE';
#else
const OSType kCreator = 'MOSS';
#endif
// Resolve the alias to the original file.
nsFileSpec original = inFile;
PRBool ignoredResult;
original.ResolveAlias(ignoredResult);
const FSSpec& spec = original.operator const FSSpec&();
if (nsprMode & PR_CREATE_FILE)
err = FSpCreate(&spec, kCreator, 'TEXT', 0);
if (err == dupFNErr)
err = noErr;
if (err != noErr)
return NS_FILE_RESULT(err);
SInt8 perm;
if (nsprMode & PR_RDWR)
perm = fsRdWrPerm;
else if (nsprMode & PR_WRONLY)
perm = fsWrPerm;
else
perm = fsRdPerm;
short refnum;
err = FSpOpenDF(&spec, perm, &refnum);
if (err == noErr && (nsprMode & PR_TRUNCATE))
err = SetEOF(refnum, 0);
if (err == noErr && (nsprMode & PR_APPEND))
err = SetFPos(refnum, fsFromLEOF, 0);
if (err != noErr)
return NS_FILE_RESULT(err);
if ((mFileDesc = PR_ImportFile(refnum)) == 0)
return NS_FILE_RESULT(PR_GetError());
#else
// Platforms other than Macintosh...
// Another bug in NSPR: Mac PR_Open assumes a unix style path, but Win PR_Open assumes
// a windows path.
if ((mFileDesc = PR_Open((const char*)nsFileSpec(inFile), nsprMode, accessMode)) == 0)
return NS_FILE_RESULT(PR_GetError());
#endif
mNSPRMode = nsprMode;
mLength = PR_Available(mFileDesc);
return NS_OK;
} // FileImpl::Open
//----------------------------------------------------------------------------------------
NS_IMETHODIMP FileImpl::Seek(PRSeekWhence whence, PRInt32 offset)
//----------------------------------------------------------------------------------------
{
if (mFileDesc==PR_STDIN || mFileDesc==PR_STDOUT || mFileDesc==PR_STDERR || !mFileDesc)
return NS_FILE_RESULT(PR_BAD_DESCRIPTOR_ERROR);
mFailed = PR_FALSE; // reset on a seek.
mEOF = PR_FALSE; // reset on a seek.
PRInt32 position = PR_Seek(mFileDesc, 0, PR_SEEK_CUR);
PRInt32 available = PR_Available(mFileDesc);
PRInt32 fileSize = position + available;
PRInt32 newPosition = 0;
switch (whence)
{
case PR_SEEK_CUR: newPosition = position + offset; break;
case PR_SEEK_SET: newPosition = offset; break;
case PR_SEEK_END: newPosition = fileSize + offset; break;
}
if (newPosition < 0)
{
newPosition = 0;
mFailed = PR_TRUE;
}
if (newPosition >= fileSize) // nb: not "else if".
{
newPosition = fileSize;
mEOF = PR_TRUE;
}
if (PR_Seek(mFileDesc, newPosition, PR_SEEK_SET) < 0)
mFailed = PR_TRUE;
return NS_OK;
} // FileImpl::Seek
//----------------------------------------------------------------------------------------
NS_IMETHODIMP FileImpl::Tell(PRIntn* outWhere)
//----------------------------------------------------------------------------------------
{
if (mFileDesc==PR_STDIN || mFileDesc==PR_STDOUT || mFileDesc==PR_STDERR || !mFileDesc)
return NS_FILE_RESULT(PR_BAD_DESCRIPTOR_ERROR);
*outWhere = PR_Seek(mFileDesc, 0, PR_SEEK_CUR);
return NS_OK;
} // FileImpl::Tell
//----------------------------------------------------------------------------------------
NS_IMETHODIMP FileImpl::Close()
//----------------------------------------------------------------------------------------
{
if (mFileDesc==PR_STDIN || mFileDesc==PR_STDOUT || mFileDesc==PR_STDERR || !mFileDesc)
return NS_OK;
if (PR_Close(mFileDesc) == PR_SUCCESS)
mFileDesc = 0;
else
return NS_FILE_RESULT(PR_GetError());
return NS_OK;
} // FileImpl::close
//----------------------------------------------------------------------------------------
NS_IMETHODIMP FileImpl::Flush()
//----------------------------------------------------------------------------------------
{
#ifdef XP_MAC
if (mFileDesc == PR_STDOUT || mFileDesc == PR_STDERR)
{
cout.flush();
return NS_OK;
}
#endif
if (!mFileDesc)
return NS_FILE_RESULT(PR_BAD_DESCRIPTOR_ERROR);
PRBool itFailed = PR_Sync(mFileDesc) != PR_SUCCESS;
#ifdef XP_MAC
// On unix, it seems to fail always.
if (itFailed)
mFailed = PR_TRUE;
#endif
return NS_OK;
} // FileImpl::flush
//----------------------------------------------------------------------------------------
NS_BASE nsresult NS_NewTypicalInputFileStream(
nsISupports** aResult,
const nsFileSpec& inFile
/*Default nsprMode == PR_RDONLY*/
/*Default accessmode = 0700 (octal)*/)
// Factory method to get an nsInputStream from a file, using most common options
//----------------------------------------------------------------------------------------
{
return NS_NewIOFileStream(aResult, inFile, PR_RDONLY, 0700);
}
//----------------------------------------------------------------------------------------
NS_BASE nsresult NS_NewOutputConsoleStream(
nsISupports** aResult)
// Factory method to get an nsOutputStream to the console.
//----------------------------------------------------------------------------------------
{
NS_PRECONDITION(aResult != nsnull, "null ptr");
if (! aResult)
return NS_ERROR_NULL_POINTER;
FileImpl* stream = new FileImpl(PR_STDOUT);
if (! stream)
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(stream);
*aResult = (nsISupports*)(void*)stream;
return NS_OK;
}
//----------------------------------------------------------------------------------------
NS_BASE nsresult NS_NewTypicalOutputFileStream(
nsISupports** aResult,
const nsFileSpec& inFile
/*default nsprMode= (PR_WRONLY | PR_CREATE_FILE | PR_TRUNCATE)*/
/*Default accessMode= 0700 (octal)*/)
// Factory method to get an nsOutputStream to a file - most common case.
//----------------------------------------------------------------------------------------
{
return NS_NewIOFileStream(
aResult,
inFile,
(PR_WRONLY | PR_CREATE_FILE | PR_TRUNCATE),
0700);
}
//----------------------------------------------------------------------------------------
NS_BASE nsresult NS_NewIOFileStream(
nsISupports** aResult,
const nsFileSpec& inFile,
PRInt32 nsprMode /*default = (PR_WRONLY | PR_CREATE_FILE | PR_TRUNCATE)*/,
PRInt32 accessMode /*Default = 0700 (octal)*/)
// Factory method to get an object that implements both nsIInputStream
// and nsIOutputStream, associated with a file.
//----------------------------------------------------------------------------------------
{
NS_PRECONDITION(aResult != nsnull, "null ptr");
if (!aResult)
return NS_ERROR_NULL_POINTER;
FileImpl* stream = new FileImpl(inFile, nsprMode, accessMode);
if (! stream)
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(stream);
*aResult = (nsISupports*)(void*)stream;
return NS_OK;
}
//----------------------------------------------------------------------------------------
NS_BASE nsresult NS_NewTypicalIOFileStream(
nsISupports** aResult,
const nsFileSpec& inFile
/*default nsprMode= (PR_RDWR | PR_CREATE_FILE)*/
/*Default accessMode= 0700 (octal)*/)
// Factory method to get an object that implements both nsIInputStream
// and nsIOutputStream, associated with a single file.
//----------------------------------------------------------------------------------------
{
return NS_NewIOFileStream(
aResult,
inFile,
(PR_RDWR | PR_CREATE_FILE),
0700);
}

View File

@@ -0,0 +1,55 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#ifndef nsIInputStream_h___
#define nsIInputStream_h___
#include "nsIBaseStream.h"
#define NS_IINPUTSTREAM_IID \
{ 0x022396f0, 0x93b5, 0x11d1, \
{0x89, 0x5b, 0x00, 0x60, 0x08, 0x91, 0x1b, 0x81} }
/** Abstract byte input stream */
class nsIInputStream : public nsIBaseStream {
public:
static const nsIID& GetIID() { static nsIID iid = NS_IINPUTSTREAM_IID; return iid; }
/** Return the number of bytes in the stream
* @param aLength out parameter to hold the length
* of the stream. if an error occurs, the length
* will be undefined
* @return error status
*/
NS_IMETHOD
GetLength(PRUint32 *aLength) = 0;
/** Read data from the stream.
* @param aErrorCode the error code if an error occurs
* @param aBuf the buffer into which the data is read
* @param aCount the maximum number of bytes to read
* @param aReadCount out parameter to hold the number of
* bytes read, eof if 0. if an error occurs, the
* read count will be undefined
* @return error status
*/
NS_IMETHOD
Read(char* aBuf, PRUint32 aCount, PRUint32 *aReadCount) = 0;
};
#endif /* nsInputStream_h___ */

View File

@@ -0,0 +1,47 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#ifndef nsIOutputStream_h___
#define nsIOutputStream_h___
#include "nsIBaseStream.h"
/* 7f13b870-e95f-11d1-beae-00805f8a66dc */
#define NS_IOUTPUTSTREAM_IID \
{ 0x7f13b870, 0xe95f, 0x11d1, \
{0xbe, 0xae, 0x00, 0x80, 0x5f, 0x8a, 0x66, 0xdc} }
/** Abstract byte output stream */
class nsIOutputStream : public nsIBaseStream {
public:
static const nsIID& GetIID() { static nsIID iid = NS_IOUTPUTSTREAM_IID; return iid; }
/** Write data into the stream.
* @param aBuf the buffer into which the data is read
* @param aCount the maximum number of bytes to read
* @param aWriteCount out parameter to hold the number of
* bytes written. if an error occurs, the writecount
* is undefined
* @return error status
*/
NS_IMETHOD
Write(const char* aBuf, PRUint32 aCount, PRUint32 *aWriteCount) = 0;
};
#endif /* nsOutputStream_h___ */

View File

@@ -0,0 +1,463 @@
#include "nsIStringStream.h"
#include "nsIFileStream.h"
#include "prerror.h"
#include "nsFileSpec.h"
#include "plstr.h"
//========================================================================================
class BasicStringImpl
: public nsIOutputStream
, public nsIInputStream
, public nsIRandomAccessStore
//========================================================================================
{
public:
BasicStringImpl()
: mResult(NS_OK)
, mEOF(PR_FALSE)
, mOffset(0)
{
NS_INIT_REFCNT();
}
virtual ~BasicStringImpl()
{
}
NS_IMETHOD Seek(PRSeekWhence whence, PRInt32 offset);
NS_IMETHOD Tell(PRIntn* outWhere)
{
*outWhere = mOffset;
return NS_OK;
}
NS_IMETHOD GetAtEOF(PRBool* outAtEOF)
{
*outAtEOF = mEOF;
return NS_OK;
}
NS_IMETHOD SetAtEOF(PRBool inAtEOF)
{
mEOF = inAtEOF;
return NS_OK;
}
NS_IMETHOD GetLength(PRUint32 *aLength)
{
NS_PRECONDITION(aLength != nsnull, "null ptr");
if (!aLength)
return NS_ERROR_NULL_POINTER;
*aLength = length();
return NS_OK;
}
NS_IMETHOD Read(char* aBuf,
PRUint32 aCount,
PRUint32 *aReadCount)
{
NS_PRECONDITION(aBuf != nsnull, "null ptr");
if (!aBuf)
return NS_ERROR_NULL_POINTER;
NS_PRECONDITION(aReadCount != nsnull, "null ptr");
if (!aReadCount)
return NS_ERROR_NULL_POINTER;
if (NS_FAILED(mResult))
return mResult;
PRInt32 bytesRead = read(aBuf, aCount);
if (NS_FAILED(mResult))
{
*aReadCount = 0;
return mResult;
}
*aReadCount = bytesRead;
if (bytesRead < aCount)
SetAtEOF(PR_TRUE);
return NS_OK;
}
// nsIOutputStream interface
NS_IMETHOD Write(const char* aBuf,
PRUint32 aCount,
PRUint32 *aWriteCount)
{
NS_PRECONDITION(aBuf != nsnull, "null ptr");
NS_PRECONDITION(aWriteCount != nsnull, "null ptr");
if (NS_FAILED(mResult))
return mResult;
PRInt32 bytesWrit = write(aBuf, aCount);
if (NS_FAILED(mResult))
{
*aWriteCount = 0;
return mResult;
}
*aWriteCount = bytesWrit;
return NS_OK;
}
public:
// nsISupports interface
NS_DECL_ISUPPORTS
NS_IMETHOD Close() { return NS_OK; }
// nsIInputStream interface
NS_IMETHOD Flush() { return NS_OK; }
public:
nsresult get_result() const { return mResult; }
protected:
virtual PRInt32 length() const = 0;
virtual PRInt32 read(char* buf, PRUint32 count) = 0;
virtual PRInt32 write(const char*, PRUint32)
{
NS_ASSERTION(PR_FALSE, "Write to a const string");
mResult = NS_FILE_RESULT(PR_ILLEGAL_ACCESS_ERROR);
return -1;
}
protected:
PRUint32 mOffset;
nsresult mResult;
PRBool mEOF;
}; // class BasicStringImpl
//========================================================================================
class ConstCharImpl
: public BasicStringImpl
//========================================================================================
{
public:
ConstCharImpl(const char* inString)
: mConstString(inString)
, mLength(inString ? strlen(inString) : 0)
{
}
protected:
virtual PRInt32 length() const
{
return mLength;
}
virtual PRInt32 read(char* buf, PRUint32 aCount)
{
PRInt32 maxCount = mLength - mOffset;
if (aCount > maxCount)
aCount = maxCount;
memcpy(buf, mConstString + mOffset, aCount);
mOffset += aCount;
return aCount;
}
protected:
const char* mConstString;
size_t mLength;
}; // class ConstCharImpl
//========================================================================================
class CharImpl
: public ConstCharImpl
//========================================================================================
{
enum { kAllocQuantum = 256 };
public:
CharImpl(char** inString)
: ConstCharImpl(*inString)
, mString(*inString)
, mAllocLength(mLength + 1)
, mOriginalLength(mLength)
{
if (!mString)
{
mAllocLength += kAllocQuantum;
mString = new char[mAllocLength];
if (!mString)
{
mResult = NS_ERROR_OUT_OF_MEMORY;
return;
}
mConstString = mString;
*mString = '\0';
}
}
virtual PRInt32 write(const char* buf, PRUint32 aCount)
{
PRInt32 maxCount = mAllocLength - 1 - mOffset;
if (aCount > maxCount)
{
do {
maxCount += kAllocQuantum;
} while (aCount > maxCount);
mAllocLength = maxCount + 1 + mOffset;
char* newString = new char[mAllocLength];
if (!newString)
{
mResult = NS_ERROR_OUT_OF_MEMORY;
return 0;
}
strcpy(newString, mString);
delete [] mString;
mString = newString;
mConstString = newString;
}
memcpy(mString + mOffset, buf, aCount);
mOffset += aCount;
if (mOffset > mOriginalLength)
mString[mOffset] = 0;
return aCount;
}
protected:
char*& mString;
size_t mOriginalLength;
size_t mAllocLength;
}; // class CharImpl
//========================================================================================
class ConstStringImpl
: public ConstCharImpl
//========================================================================================
{
public:
ConstStringImpl(const nsString& inString)
: ConstCharImpl(inString.ToNewCString())
{
}
~ConstStringImpl()
{
delete [] (char*)mConstString;
}
protected:
protected:
}; // class ConstStringImpl
//========================================================================================
class StringImpl
: public ConstStringImpl
//========================================================================================
{
public:
StringImpl(nsString& inString)
: ConstStringImpl(inString)
, mString(inString)
{
}
protected:
virtual PRInt32 write(const char* buf, PRUint32 count)
{
// Clone our string as chars
char* cstring = mString.ToNewCString();
// Make a CharImpl and do the write
CharImpl chars(&cstring);
chars.Seek(PR_SEEK_SET, mOffset);
// Get the bytecount and result from the CharImpl
PRInt32 result = chars.write(buf,count);
mResult = chars.get_result();
// Set our string to match the new chars
mString = cstring;
// Set our const string also...
delete [] (char*)mConstString;
mConstString = cstring;
return result;
}
protected:
nsString& mString;
}; // class StringImpl
#define SAY_I_IMPLEMENT(classname) \
if (aIID.Equals(classname::GetIID())) \
{ \
*aInstancePtr = (void*)((classname*)this); \
NS_ADDREF_THIS(); \
return NS_OK; \
}
NS_IMPL_RELEASE(BasicStringImpl)
NS_IMPL_ADDREF(BasicStringImpl)
//----------------------------------------------------------------------------------------
NS_IMETHODIMP BasicStringImpl::QueryInterface(REFNSIID aIID, void** aInstancePtr)
//----------------------------------------------------------------------------------------
{
if (!aInstancePtr)
return NS_ERROR_NULL_POINTER;
*aInstancePtr = nsnull;
SAY_I_IMPLEMENT(nsIRandomAccessStore)
SAY_I_IMPLEMENT(nsIOutputStream)
SAY_I_IMPLEMENT(nsIInputStream)
// Note that we derive from two copies of nsIBaseStream (and hence
// of nsISupports), one through
// nsIOutputStream, the other through nsIInputStream. Resolve this
// by giving them a specific one
if (aIID.Equals(((nsIBaseStream*)(nsIOutputStream*)this)->GetIID()))
{
*aInstancePtr = (void*)((nsIBaseStream*)(nsIOutputStream*)this);
NS_ADDREF_THIS();
return NS_OK;
}
if (aIID.Equals(((nsISupports*)(nsIOutputStream*)this)->GetIID()))
{
*aInstancePtr = (void*)((nsISupports*)(nsIOutputStream*)this);
NS_ADDREF_THIS();
return NS_OK;
}
return NS_NOINTERFACE;
} // StringImpl::QueryInterface
//----------------------------------------------------------------------------------------
NS_IMETHODIMP BasicStringImpl::Seek(PRSeekWhence whence, PRInt32 offset)
//----------------------------------------------------------------------------------------
{
mResult = NS_OK; // reset on a seek.
mEOF = PR_FALSE; // reset on a seek.
PRInt32 fileSize = length();
PRInt32 newPosition;
switch (whence)
{
case PR_SEEK_CUR: newPosition = mOffset + offset; break;
case PR_SEEK_SET: newPosition = offset; break;
case PR_SEEK_END: newPosition = fileSize + offset; break;
}
if (newPosition < 0)
{
newPosition = 0;
mResult = NS_FILE_RESULT(PR_FILE_SEEK_ERROR);
}
if (newPosition >= fileSize)
{
newPosition = fileSize;
mEOF = PR_TRUE;
}
mOffset = newPosition;
return NS_OK;
} // StringImpl::Seek
//----------------------------------------------------------------------------------------
extern "C" NS_BASE nsresult NS_NewStringInputStream(
nsISupports** aStreamResult,
const nsString& aStringToRead)
// Factory method to get an nsInputStream from a string. Result will implement all the
// file stream interfaces in nsIFileStream.h
//----------------------------------------------------------------------------------------
{
NS_PRECONDITION(aStreamResult != nsnull, "null ptr");
if (! aStreamResult)
return NS_ERROR_NULL_POINTER;
ConstStringImpl* stream = new ConstStringImpl(aStringToRead);
if (! stream)
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(stream);
*aStreamResult = (nsISupports*)(void*)stream;
return NS_OK;
}
//----------------------------------------------------------------------------------------
extern "C" NS_BASE nsresult NS_NewStringOutputStream(
nsISupports** aStreamResult,
nsString& aStringToChange)
// Factory method to get an nsOutputStream from a string. Result will implement all the
// file stream interfaces in nsIFileStream.h
//----------------------------------------------------------------------------------------
{
NS_PRECONDITION(aStreamResult != nsnull, "null ptr");
if (! aStreamResult)
return NS_ERROR_NULL_POINTER;
StringImpl* stream = new StringImpl(aStringToChange);
if (! stream)
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(stream);
*aStreamResult = (nsISupports*)(void*)stream;
return NS_OK;
}
//----------------------------------------------------------------------------------------
extern "C" NS_BASE nsresult NS_NewCharInputStream(
nsISupports** aStreamResult,
const char* aStringToRead)
// Factory method to get an nsInputStream from a string. Result will implement all the
// file stream interfaces in nsIFileStream.h
//----------------------------------------------------------------------------------------
{
NS_PRECONDITION(aStreamResult != nsnull, "null ptr");
if (! aStreamResult)
return NS_ERROR_NULL_POINTER;
ConstCharImpl* stream = new ConstCharImpl(aStringToRead);
if (! stream)
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(stream);
*aStreamResult = (nsISupports*)(void*)stream;
return NS_OK;
}
//----------------------------------------------------------------------------------------
extern "C" NS_BASE nsresult NS_NewCharOutputStream(
nsISupports** aStreamResult,
char** aStringToChange)
// Factory method to get an nsOutputStream to a string. Result will implement all the
// file stream interfaces in nsIFileStream.h
//----------------------------------------------------------------------------------------
{
NS_PRECONDITION(aStreamResult != nsnull, "null ptr");
NS_PRECONDITION(aStringToChange != nsnull, "null ptr");
if (!aStreamResult || !aStringToChange)
return NS_ERROR_NULL_POINTER;
CharImpl* stream = new CharImpl(aStringToChange);
if (! stream)
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(stream);
*aStreamResult = (nsISupports*)(void*)stream;
return NS_OK;
}
//----------------------------------------------------------------------------------------
extern "C" NS_BASE nsresult NS_NewStringIOStream(
nsISupports** aStreamResult,
nsString& aStringToChange)
// Factory method to get an nsOutputStream to a string. Result will implement all the
// file stream interfaces in nsIFileStream.h
//----------------------------------------------------------------------------------------
{
return NS_NewStringOutputStream(aStreamResult, aStringToChange);
}
//----------------------------------------------------------------------------------------
extern "C" NS_BASE nsresult NS_NewCharIOStream(
nsISupports** aStreamResult,
char** aStringToChange)
// Factory method to get an nsOutputStream to a string. Result will implement all the
// file stream interfaces in nsIFileStream.h
//----------------------------------------------------------------------------------------
{
return NS_NewCharOutputStream(aStreamResult, aStringToChange);
}

View File

@@ -0,0 +1,96 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#ifndef nsITimer_h___
#define nsITimer_h___
#include "nscore.h"
#include "nsISupports.h"
class nsITimer;
class nsITimerCallback;
// Implementations of nsITimer should be written such that there are no limitations
// on what can be called by the TimerCallbackFunc. On platforms like the Macintosh this
// means that callback functions must be called from the main event loop NOT from
// an interrupt.
/// Signature of timer callback function
typedef void
(*nsTimerCallbackFunc) (nsITimer *aTimer, void *aClosure);
/// Interface IID for nsITimer
#define NS_ITIMER_IID \
{ 0x497eed20, 0xb740, 0x11d1, \
{ 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } }
/**
* Timer class, used to invoke a function or method after a fixed
* millisecond interval. <B>Note that this interface is subject to
* change!</B>
*/
class nsITimer : public nsISupports {
public:
NS_DEFINE_STATIC_IID_ACCESSOR(NS_ITIMER_IID)
/**
* Initialize a timer to fire after the given millisecond interval.
* This version takes a function to call and a closure to pass to
* that function.
*
* @param aFunc - The function to invoke
* @param aClosure - an opaque pointer to pass to that function
* @param aRepeat - (Not yet implemented) One-shot or repeating
* @param aDelay - The millisecond interval
* @result - NS_OK if this operation was successful
*/
virtual nsresult Init(nsTimerCallbackFunc aFunc,
void *aClosure,
// PRBool aRepeat,
PRUint32 aDelay)=0;
/**
* Initialize a timer to fire after the given millisecond interval.
* This version takes an interface of type <code>nsITimerCallback</code>.
* The <code>Notify</code> method of this method is invoked.
*
* @param aCallback - The interface to notify
* @param aRepeat - (Not yet implemented) One-shot or repeating
* @param aDelay - The millisecond interval
* @result - NS_OK if this operation was successful
*/
virtual nsresult Init(nsITimerCallback *aCallback,
// PRBool aRepeat,
PRUint32 aDelay)=0;
/// Cancels the timeout
virtual void Cancel()=0;
/// @return the millisecond delay of the timeout
virtual PRUint32 GetDelay()=0;
/// Change the millisecond interval for the timeout
virtual void SetDelay(PRUint32 aDelay)=0;
/// @return the opaque pointer
virtual void* GetClosure()=0;
};
/** Factory method for creating an nsITimer */
extern NS_BASE nsresult NS_NewTimer(nsITimer** aInstancePtrResult);
#endif

View File

@@ -0,0 +1,43 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#ifndef nsITimerCallback_h___
#define nsITimerCallback_h___
#include "nscore.h"
#include "nsISupports.h"
class nsITimer;
/// Interface IID for nsITimerCallback
#define NS_ITIMERCALLBACK_IID \
{ 0x5079b3a0, 0xb743, 0x11d1, \
{ 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } }
/**
* Interface implemented by users of the nsITimer class. An instance
* of this interface is passed in when creating a timer. The Notify()
* method of that instance is invoked after the specified delay.
*/
class nsITimerCallback : public nsISupports {
public:
NS_DEFINE_STATIC_IID_ACCESSOR(NS_ITIMERCALLBACK_IID)
virtual void Notify(nsITimer *timer) = 0;
};
#endif

View File

@@ -0,0 +1,46 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#ifndef nsIUnicharBuffer_h___
#define nsIUnicharBuffer_h___
#include "nscore.h"
#include "nsISupports.h"
class nsIUnicharInputStream;
#define NS_IUNICHAR_BUFFER_IID \
{ 0x14cf6970, 0x93b5, 0x11d1, \
{0x89, 0x5b, 0x00, 0x60, 0x08, 0x91, 0x1b, 0x81} }
/// Interface to a buffer that holds unicode characters
class nsIUnicharBuffer : public nsISupports {
public:
virtual PRInt32 GetLength() const = 0;
virtual PRInt32 GetBufferSize() const = 0;
virtual PRUnichar* GetBuffer() const = 0;
virtual PRBool Grow(PRInt32 aNewSize) = 0;
virtual PRInt32 Fill(nsresult* aErrorCode, nsIUnicharInputStream* aStream,
PRInt32 aKeep) = 0;
};
/// Factory method for nsIUnicharBuffer.
extern NS_BASE nsresult
NS_NewUnicharBuffer(nsIUnicharBuffer** aInstancePtrResult,
nsISupports* aOuter,
PRUint32 aBufferSize = 0);
#endif /* nsIUnicharBuffer_h___ */

View File

@@ -0,0 +1,62 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#ifndef nsIUnicharInputStream_h___
#define nsIUnicharInputStream_h___
#include "nsIInputStream.h"
class nsString;
#define NS_IUNICHAR_INPUT_STREAM_IID \
{ 0x2d97fbf0, 0x93b5, 0x11d1, \
{0x89, 0x5b, 0x00, 0x60, 0x08, 0x91, 0x1b, 0x81} }
/** Abstract unicode character input stream
* @see nsIInputStream
*/
class nsIUnicharInputStream : public nsISupports {
public:
NS_IMETHOD Read(PRUnichar* aBuf,
PRUint32 aOffset,
PRUint32 aCount,
PRUint32 *aReadCount) = 0;
NS_IMETHOD Close() = 0;
};
/**
* Create a nsIUnicharInputStream that wraps up a string. Data is fed
* from the string out until the done. When this object is destroyed
* it destroyes the string (so make a copy if you don't want it doing
* that)
*/
extern NS_BASE nsresult
NS_NewStringUnicharInputStream(nsIUnicharInputStream** aInstancePtrResult,
nsString* aString);
/** Create a new nsUnicharInputStream that provides a converter for the
* byte input stream aStreamToWrap. If no converter can be found then
* nsnull is returned and the error code is set to
* NS_INPUTSTREAM_NO_CONVERTER.
*/
extern NS_BASE nsresult
NS_NewConverterStream(nsIUnicharInputStream** aInstancePtrResult,
nsISupports* aOuter,
nsIInputStream* aStreamToWrap,
PRInt32 aBufferSize = 0,
nsString* aCharSet = nsnull);
#endif /* nsUnicharInputStream_h___ */

340
mozilla/base/src/nsInt64.h Normal file
View File

@@ -0,0 +1,340 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#ifndef nsInt64_h__
#define nsInt64_h__
#include "prlong.h"
#include "nscore.h"
/**
* This class encapsulates full 64-bit integer functionality and
* provides simple arithmetic and conversion operations.
*/
// If you ever decide that you need to add a non-inline method to this
// class, be sure to change the class declaration to "class NS_BASE
// nsInt64".
class nsInt64
{
private:
PRInt64 mValue;
public:
/**
* Construct a new 64-bit integer.
*/
nsInt64(void) : mValue(LL_ZERO) {
}
/**
* Construct a new 64-bit integer from a 32-bit signed integer
*/
nsInt64(const PRInt32 aInt32) {
LL_I2L(mValue, aInt32);
}
/**
* Construct a new 64-bit integer from a 32-bit unsigned integer
*/
nsInt64(const PRUint32 aUint32) {
LL_UI2L(mValue, aUint32);
}
/**
* Construct a new 64-bit integer from a floating point value.
*/
nsInt64(const PRFloat64 aFloat64) {
LL_D2L(mValue, aFloat64);
}
/**
* Construct a new 64-bit integer from a native 64-bit integer
*/
nsInt64(const PRInt64 aInt64) : mValue(aInt64) {
}
/**
* Construct a new 64-bit integer from another 64-bit integer
*/
nsInt64(const nsInt64& aObject) : mValue(aObject.mValue) {
}
// ~nsInt64(void) -- XXX destructor unnecessary
/**
* Assign a 64-bit integer to another 64-bit integer
*/
const nsInt64& operator =(const nsInt64& aObject) {
mValue = aObject.mValue;
return *this;
}
/**
* Convert a 64-bit integer to a signed 32-bit value
*/
operator PRInt32(void) const {
PRInt32 result;
LL_L2I(result, mValue);
return result;
}
/**
* Convert a 64-bit integer to an unsigned 32-bit value
*/
operator PRUint32(void) const {
PRUint32 result;
LL_L2UI(result, mValue);
return result;
}
/**
* Convert a 64-bit integer to a floating point value
*/
operator PRFloat64(void) const {
PRFloat64 result;
LL_L2D(result, mValue);
return result;
}
/**
* Convert a 64-bit integer to a native 64-bit integer.
*/
operator PRInt64(void) const {
return mValue;
}
/**
* Perform unary negation on a 64-bit integer.
*/
const nsInt64 operator -(void) {
nsInt64 result;
LL_NEG(result.mValue, mValue);
return result;
}
// Arithmetic operators
friend const nsInt64 operator +(const nsInt64& aObject1, const nsInt64& aObject2);
friend const nsInt64 operator -(const nsInt64& aObject1, const nsInt64& aObject2);
friend const nsInt64 operator *(const nsInt64& aObject1, const nsInt64& aObject2);
friend const nsInt64 operator /(const nsInt64& aObject1, const nsInt64& aObject2);
friend const nsInt64 operator %(const nsInt64& aObject1, const nsInt64& aObject2);
/**
* Increment a 64-bit integer by a 64-bit integer amount.
*/
nsInt64& operator +=(const nsInt64& aObject) {
LL_ADD(mValue, mValue, aObject.mValue);
return *this;
}
/**
* Decrement a 64-bit integer by a 64-bit integer amount.
*/
nsInt64& operator -=(const nsInt64& aObject) {
LL_SUB(mValue, mValue, aObject.mValue);
return *this;
}
/**
* Multiply a 64-bit integer by a 64-bit integer amount.
*/
nsInt64& operator *=(const nsInt64& aObject) {
LL_MUL(mValue, mValue, aObject.mValue);
return *this;
}
/**
* Divide a 64-bit integer by a 64-bit integer amount.
*/
nsInt64& operator /=(const nsInt64& aObject) {
LL_DIV(mValue, mValue, aObject.mValue);
return *this;
}
/**
* Compute the modulus of a 64-bit integer to a 64-bit value.
*/
nsInt64& operator %=(const nsInt64& aObject) {
LL_MOD(mValue, mValue, aObject.mValue);
return *this;
}
// Comparison operators
friend PRBool operator ==(const nsInt64& aObject1, const nsInt64& aObject2);
friend PRBool operator !=(const nsInt64& aObject1, const nsInt64& aObject2);
friend PRBool operator >(const nsInt64& aObject1, const nsInt64& aObject2);
friend PRBool operator >=(const nsInt64& aObject1, const nsInt64& aObject2);
friend PRBool operator <(const nsInt64& aObject1, const nsInt64& aObject2);
friend PRBool operator <=(const nsInt64& aObject1, const nsInt64& aObject2);
// Bitwise operators
friend const nsInt64 operator &(const nsInt64& aObject1, const nsInt64& aObject2);
friend const nsInt64 operator |(const nsInt64& aObject1, const nsInt64& aObject2);
friend const nsInt64 operator ^(const nsInt64& aObject1, const nsInt64& aObject2);
/**
* Compute the bitwise NOT of a 64-bit integer
*/
const nsInt64 operator ~(void) {
nsInt64 result;
LL_NOT(result.mValue, mValue);
return result;
}
/**
* Compute the bitwise AND with another 64-bit integer
*/
nsInt64& operator &=(const nsInt64& aObject) {
LL_AND(mValue, mValue, aObject.mValue);
return *this;
}
/**
* Compute the bitwise OR with another 64-bit integer
*/
nsInt64& operator |=(const nsInt64& aObject) {
LL_OR(mValue, mValue, aObject.mValue);
return *this;
}
/**
* Compute the bitwise XOR with another 64-bit integer
*/
nsInt64& operator ^=(const nsInt64& aObject) {
LL_XOR(mValue, mValue, aObject.mValue);
return *this;
}
};
/**
* Add two 64-bit integers.
*/
inline const nsInt64
operator +(const nsInt64& aObject1, const nsInt64& aObject2) {
return nsInt64(aObject1) += aObject2;
}
/**
* Subtract one 64-bit integer from another.
*/
inline const nsInt64
operator -(const nsInt64& aObject1, const nsInt64& aObject2) {
return nsInt64(aObject1) -= aObject2;
}
/**
* Multiply two 64-bit integers
*/
inline const nsInt64
operator *(const nsInt64& aObject1, const nsInt64& aObject2) {
return nsInt64(aObject1) *= aObject2;
}
/**
* Divide one 64-bit integer by another
*/
inline const nsInt64
operator /(const nsInt64& aObject1, const nsInt64& aObject2) {
return nsInt64(aObject1) /= aObject2;
}
/**
* Compute the modulus of two 64-bit integers
*/
inline const nsInt64
operator %(const nsInt64& aObject1, const nsInt64& aObject2) {
return nsInt64(aObject1) %= aObject2;
}
/**
* Determine if two 64-bit integers are equal
*/
inline PRBool
operator ==(const nsInt64& aObject1, const nsInt64& aObject2) {
return LL_EQ(aObject1.mValue, aObject2.mValue);
}
/**
* Determine if two 64-bit integers are not equal
*/
inline PRBool
operator !=(const nsInt64& aObject1, const nsInt64& aObject2) {
return LL_NE(aObject1.mValue, aObject2.mValue);
}
/**
* Determine if one 64-bit integer is strictly greater than another, using signed values
*/
inline PRBool
operator >(const nsInt64& aObject1, const nsInt64& aObject2) {
return LL_CMP(aObject1.mValue, >, aObject2.mValue);
}
/**
* Determine if one 64-bit integer is greater than or equal to another, using signed values
*/
inline PRBool
operator >=(const nsInt64& aObject1, const nsInt64& aObject2) {
return LL_CMP(aObject1.mValue, >=, aObject2.mValue);
}
/**
* Determine if one 64-bit integer is strictly less than another, using signed values
*/
inline PRBool
operator <(const nsInt64& aObject1, const nsInt64& aObject2) {
return LL_CMP(aObject1.mValue, <, aObject2.mValue);
}
/**
* Determine if one 64-bit integers is less than or equal to another, using signed values
*/
inline PRBool
operator <=(const nsInt64& aObject1, const nsInt64& aObject2) {
return LL_CMP(aObject1.mValue, <=, aObject2.mValue);
}
/**
* Perform a bitwise AND of two 64-bit integers
*/
inline const nsInt64
operator &(const nsInt64& aObject1, const nsInt64& aObject2) {
return nsInt64(aObject1) &= aObject2;
}
/**
* Perform a bitwise OR of two 64-bit integers
*/
inline const nsInt64
operator |(const nsInt64& aObject1, const nsInt64& aObject2) {
return nsInt64(aObject1) |= aObject2;
}
/**
* Perform a bitwise XOR of two 64-bit integers
*/
inline const nsInt64
operator ^(const nsInt64& aObject1, const nsInt64& aObject2) {
return nsInt64(aObject1) ^= aObject2;
}
#endif // nsInt64_h__

View File

@@ -0,0 +1,312 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#define NS_IMPL_IDS
#include "nsID.h"
#include "nsBaseDLL.h"
#include "nsCRT.h"
#include "nsIInputStream.h"
#include "nsIProperties.h"
#include "nsIUnicharInputStream.h"
#include "nsProperties.h"
#include "plhash.h"
#include "pratom.h"
class nsProperties : public nsIProperties
{
public:
nsProperties();
virtual ~nsProperties();
NS_DECL_ISUPPORTS
NS_IMETHOD Load(nsIInputStream* aIn);
NS_IMETHOD GetProperty(const nsString& aKey, nsString& aValue);
NS_IMETHOD SetProperty(const nsString& aKey, nsString& aNewValue,
nsString& aOldValue);
NS_IMETHOD Save(nsIOutputStream* aOut, const nsString& aHeader);
NS_IMETHOD Subclass(nsIProperties* aSubclass);
PRInt32 Read();
PRInt32 SkipLine(PRInt32 c);
PRInt32 SkipWhiteSpace(PRInt32 c);
nsIUnicharInputStream* mIn;
nsIProperties* mSubclass;
struct PLHashTable* mTable;
};
nsProperties::nsProperties()
{
NS_INIT_REFCNT();
mIn = nsnull;
mSubclass = NS_STATIC_CAST(nsIProperties*, this);
mTable = nsnull;
}
PR_STATIC_CALLBACK(PRIntn)
FreeHashEntries(PLHashEntry* he, PRIntn i, void* arg)
{
delete[] (PRUnichar*)he->key;
delete[] (PRUnichar*)he->value;
return HT_ENUMERATE_REMOVE;
}
nsProperties::~nsProperties()
{
if (mTable) {
// Free the PRUnicode* pointers contained in the hash table entries
PL_HashTableEnumerateEntries(mTable, FreeHashEntries, 0);
PL_HashTableDestroy(mTable);
mTable = nsnull;
}
}
NS_DEFINE_IID(kIPropertiesIID, NS_IPROPERTIES_IID);
NS_IMPL_ISUPPORTS(nsProperties, kIPropertiesIID)
NS_IMETHODIMP
nsProperties::Load(nsIInputStream *aIn)
{
PRInt32 c;
nsresult ret;
ret = NS_NewConverterStream(&mIn, nsnull, aIn);
if (ret != NS_OK) {
cout << "NS_NewConverterStream failed" << endl;
return NS_ERROR_FAILURE;
}
c = Read();
while (1) {
c = SkipWhiteSpace(c);
if (c < 0) {
break;
}
else if ((c == '#') || (c == '!')) {
c = SkipLine(c);
continue;
}
else {
nsAutoString key("");
while ((c >= 0) && (c != '=') && (c != ':')) {
key.Append((PRUnichar) c);
c = Read();
}
if (c < 0) {
break;
}
char *trimThese = " \t";
key.Trim(trimThese, PR_FALSE, PR_TRUE);
c = Read();
nsAutoString value("");
while ((c >= 0) && (c != '\r') && (c != '\n')) {
if (c == '\\') {
c = Read();
if ((c == '\r') || (c == '\n')) {
c = SkipWhiteSpace(c);
}
else {
value.Append('\\');
}
}
value.Append((PRUnichar) c);
c = Read();
}
value.Trim(trimThese, PR_TRUE, PR_TRUE);
nsAutoString oldValue("");
mSubclass->SetProperty(key, value, oldValue);
}
}
mIn->Close();
NS_RELEASE(mIn);
NS_ASSERTION(!mIn, "unexpected remaining reference");
return NS_OK;
}
static PLHashNumber
HashKey(const PRUnichar *aString)
{
return (PLHashNumber) nsCRT::HashValue(aString);
}
static PRIntn
CompareKeys(const PRUnichar *aStr1, const PRUnichar *aStr2)
{
return nsCRT::strcmp(aStr1, aStr2) == 0;
}
NS_IMETHODIMP
nsProperties::SetProperty(const nsString& aKey, nsString& aNewValue,
nsString& aOldValue)
{
// XXX The ToNewCString() calls allocate memory using "new" so this code
// causes a memory leak...
#if 0
cout << "will add " << aKey.ToNewCString() << "=" << aNewValue.ToNewCString() << endl;
#endif
if (!mTable) {
mTable = PL_NewHashTable(8, (PLHashFunction) HashKey,
(PLHashComparator) CompareKeys,
(PLHashComparator) nsnull, nsnull, nsnull);
if (!mTable) {
return NS_ERROR_OUT_OF_MEMORY;
}
}
const PRUnichar *key = aKey.GetUnicode(); // returns internal pointer (not a copy)
PRUint32 len;
PRUint32 hashValue = nsCRT::HashValue(key, &len);
PLHashEntry **hep = PL_HashTableRawLookup(mTable, hashValue, key);
PLHashEntry *he = *hep;
if (he && aOldValue) {
// XXX fix me
}
PL_HashTableRawAdd(mTable, hep, hashValue, aKey.ToNewUnicode(),
aNewValue.ToNewUnicode());
return NS_OK;
}
NS_IMETHODIMP
nsProperties::Save(nsIOutputStream* aOut, const nsString& aHeader)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsProperties::Subclass(nsIProperties* aSubclass)
{
if (aSubclass) {
mSubclass = aSubclass;
}
return NS_OK;
}
NS_IMETHODIMP
nsProperties::GetProperty(const nsString& aKey, nsString& aValue)
{
const PRUnichar *key = aKey;
PRUint32 len;
PRUint32 hashValue = nsCRT::HashValue(key, &len);
PLHashEntry **hep = PL_HashTableRawLookup(mTable, hashValue, key);
PLHashEntry *he = *hep;
if (he) {
aValue = (const PRUnichar*)he->value;
return NS_OK;
}
return NS_ERROR_FAILURE;
}
PRInt32
nsProperties::Read()
{
PRUnichar c;
PRUint32 nRead;
nsresult ret;
ret = mIn->Read(&c, 0, 1, &nRead);
if (ret == NS_OK) {
return c;
}
return -1;
}
#define IS_WHITE_SPACE(c) \
(((c) == ' ') || ((c) == '\t') || ((c) == '\r') || ((c) == '\n'))
PRInt32
nsProperties::SkipWhiteSpace(PRInt32 c)
{
while ((c >= 0) && IS_WHITE_SPACE(c)) {
c = Read();
}
return c;
}
PRInt32
nsProperties::SkipLine(PRInt32 c)
{
while ((c >= 0) && (c != '\r') && (c != '\n')) {
c = Read();
}
if (c == '\r') {
c = Read();
}
if (c == '\n') {
c = Read();
}
return c;
}
nsPropertiesFactory::nsPropertiesFactory()
{
NS_INIT_REFCNT();
}
nsPropertiesFactory::~nsPropertiesFactory()
{
}
NS_DEFINE_IID(kIFactoryIID, NS_IFACTORY_IID);
NS_IMPL_ISUPPORTS(nsPropertiesFactory, kIFactoryIID);
NS_IMETHODIMP
nsPropertiesFactory::CreateInstance(nsISupports* aOuter, REFNSIID aIID,
void** aResult)
{
if (aOuter) {
return NS_ERROR_NO_AGGREGATION;
}
if (!aResult) {
return NS_ERROR_NULL_POINTER;
}
*aResult = nsnull;
nsProperties* props = new nsProperties();
if (!props) {
return NS_ERROR_OUT_OF_MEMORY;
}
nsresult ret = props->QueryInterface(aIID, aResult);
if (NS_FAILED(ret)) {
delete props;
}
return ret;
}
NS_IMETHODIMP
nsPropertiesFactory::LockFactory(PRBool aLock)
{
if (aLock) {
PR_AtomicIncrement(&gLockCount);
}
else {
PR_AtomicDecrement(&gLockCount);
}
return NS_OK;
}

View File

@@ -0,0 +1,37 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#ifndef nsProperties_h___
#define nsProperties_h___
#include "nsIFactory.h"
class nsPropertiesFactory : public nsIFactory
{
public:
nsPropertiesFactory();
virtual ~nsPropertiesFactory();
NS_DECL_ISUPPORTS
NS_IMETHOD CreateInstance(nsISupports* aOuter, REFNSIID aIID,
void** aResult);
NS_IMETHOD LockFactory(PRBool aLock);
};
#endif /* nsProperties_h___ */

View File

@@ -0,0 +1,423 @@
/**
* This file defines the binary tree class and it
* nsNode child class.
*
* This simple version stores nodes, and the
* nodes store void* ptrs.
*
* @update gess 4/11/98
* @param
* @return
*/
#include "nsRBTree.h"
/**************************************************
Here comes the nsRBTree class...
*************************************************/
/**
* nsRBTree constructor
*
* @update gess 4/11/98
*/
nsRBTree::nsRBTree() : nsBTree() {
mRoot=0;
}
/**
* nsRBTree constructor
*
* @update gess 4/11/98
*/
nsRBTree::nsRBTree(const nsRBTree& aCopy) : nsBTree(aCopy) {
mRoot=aCopy.mRoot;
}
/**
* nsRBTree destructor
*
* @update gess 4/11/98
* @param
* @return
*/
nsRBTree::~nsRBTree(){
if(mRoot){
//walk the tree and destroy the children.
}
}
/**
* Given a node, we're supposed to add it into
* our tree.
*
* @update gess 4/11/98
* @param
* @return
*/
nsNode* nsRBTree::Add(nsNode& aNode){
nsBTree::Add(aNode);
nsNode* node1=&aNode;
nsNode* node2=0;
node1->mColor=nsNode::eRed;
while((node1!=mRoot) && (node1->mParent->mColor==nsNode::eRed)) {
if(node1->mParent==node1->mParent->mParent->mLeft) {
node2=node1->mParent->mParent->mLeft;
if(node2->mColor==nsNode::eRed) {
node1->mParent->mColor=nsNode::eBlack;
node2->mColor=nsNode::eBlack;
node1->mParent->mParent->mColor=nsNode::eRed;
node1=node1->mParent->mParent;
}
else {
if(node1==node1->mParent->mRight) {
node1=node1->mParent;
ShiftLeft(*node1);
}
node1->mParent->mColor=nsNode::eBlack;
node1->mParent->mParent->mColor=nsNode::eRed;
ShiftRight(*node1->mParent->mParent);
}
}
else {
node2=node1->mParent->mParent->mRight;
if (node2->mColor==nsNode::eRed){
node1->mParent->mColor=nsNode::eBlack;
node2->mColor=nsNode::eBlack;
node1->mParent->mParent->mColor=nsNode::eRed;
node1=node1->mParent->mParent;
}
else {
if (node1==node1->mParent->mLeft) {
node1=node1->mParent;
ShiftRight(*node1);
}
node1->mParent->mColor=nsNode::eBlack;
node1->mParent->mParent->mColor=nsNode::eRed;
ShiftLeft(*node1->mParent->mParent);
}
}
}
mRoot->mColor=nsNode::eBlack;
return &aNode;
}
/**
* Retrive the first node in the tree
*
* @update gess 4/11/98
* @param
* @return
*/
nsNode* nsRBTree::First(){
nsNode* result=First(*mRoot);
return result;
}
/**
* Retrieve the first node given a starting node
*
* @update gess 4/11/98
* @param aNode --
* @return node ptr or null
*/
nsNode* nsRBTree::First(nsNode& aNode){
nsNode* result=0;
if(mRoot) {
result=mRoot;
while(result->GetLeftNode()) {
result=result->GetLeftNode();
}
}
return result;
}
/**
* Find the last node in the tree
*
* @update gess 4/11/98
* @param
* @return node ptr or null
*/
nsNode* nsRBTree::Last(){
nsNode* result=Last(*mRoot);
return result;
}
/**
* Find the last node from a given node
*
* @update gess 4/11/98
* @param aNode -- node ptr to start from
* @return node ptr or null
*/
nsNode* nsRBTree::Last(nsNode& aNode){
nsNode* result=0;
if(mRoot) {
result=mRoot;
while(result->GetRightNode()) {
result=result->GetRightNode();
}
}
return result;
}
/**
* Retrieve the node that preceeds the given node
*
* @update gess 4/11/98
* @param aNode -- node to find precedent of
* @return preceeding node ptr, or null
*/
nsNode* nsRBTree::Before(nsNode& aNode){
if(aNode.GetLeftNode())
return Last(*aNode.GetLeftNode());
//otherwise...
nsNode* node1=&aNode;
nsNode* node2=aNode.GetParentNode();
while((node2) && (node1==node2->GetLeftNode())) {
node1=node2;
node2=node2->GetParentNode();
}
return node2;
}
/**
* Retrieve a ptr to the node following the given node
*
* @update gess 4/11/98
* @param aNode -- node to find successor node from
* @return node ptr or null
*/
nsNode* nsRBTree::After(nsNode& aNode){
if(aNode.GetRightNode())
return First(*aNode.GetRightNode());
//otherwise...
nsNode* node1=&aNode;
nsNode* node2=aNode.GetParentNode();
while((node2) && (node1==node2->GetRightNode())) {
node1=node2;
node2=node2->GetParentNode();
}
return node2;
}
/**
* Find a (given) node in the tree
*
* @update gess 4/11/98
* @param node to find in the tree
* @return node ptr (if found) or null
*/
nsNode* nsRBTree::Find(nsNode& aNode){
nsNode* result=mRoot;
while((result) && (!((*result)==aNode))) {
if(aNode<*result)
result=result->mLeft;
else result=result->mRight;
}
return result;
}
/**
* Causes a shift to the left, to keep the
* underlying RB data in balance
*
* @update gess 4/11/98
* @param
* @return this
*/
nsRBTree& nsRBTree::ShiftLeft(nsNode& aNode){
nsNode* temp= aNode.mRight;
aNode.mRight=temp->mLeft;
if(temp->mLeft)
temp->mRight->mParent=&aNode;
temp->mParent= aNode.mParent;
if (aNode.mParent) {
if (&aNode==aNode.mParent->mLeft)
aNode.mParent->mLeft=temp;
else aNode.mParent->mRight=temp;
}
else mRoot=temp;
temp->mLeft=&aNode;;
aNode.mParent=temp;
return *this;
}
/**
* Causes a shift right to occur, to keep the
* underlying RB data in balance
*
* @update gess 4/11/98
* @param aNode -- node at which to perform shift
* @return this
*/
nsRBTree& nsRBTree::ShiftRight(nsNode& aNode){
nsNode* temp=aNode.mLeft;
aNode.mLeft=temp->mRight;
if(temp->mRight)
temp->mRight->mParent=&aNode;
temp->mParent=aNode.mParent;
if(aNode.mParent){
if(&aNode==aNode.mParent->mRight)
aNode.mParent->mRight=temp;
else aNode.mParent->mLeft=temp;
}
else mRoot=temp;
temp->mRight=&aNode;
aNode.mParent=temp;
return *this;
}
/**
* Rebalances tree around the given node. This only
* needs to be called after a node is deleted.
*
* @update gess 4/11/98
* @param aNode -- node to balance around
* @return this
*/
nsBTree& nsRBTree::ReBalance(nsNode& aNode){
nsNode* node1=&aNode;
nsNode* node2=0;
while ((node1!=mRoot) && (node1->mColor==nsNode::eBlack)) {
if(node1==node1->mParent->mLeft) {
node2=node1->mParent->mRight;
if(node2->mColor==nsNode::eRed) {
node2->mColor=nsNode::eBlack;
node1->mParent->mColor=nsNode::eRed;
ShiftLeft(*node1->mParent);
node2=node1->mParent->mRight;
}
if((node2->mLeft->mColor == nsNode::eBlack) &&
(node2->mRight->mColor == nsNode::eBlack)) {
node2->mColor=nsNode::eRed;
node1=node1->mParent;
}
else {
if(node2->mRight->mColor == nsNode::eBlack) {
node2->mLeft->mColor=nsNode::eBlack;
node2->mColor=nsNode::eRed;
ShiftRight(*node2);
node2=node1->mParent->mRight;
}
node2->mColor=node1->mParent->mColor;
node1->mParent->mColor=nsNode::eBlack;
node2->mRight->mColor=nsNode::eBlack;
ShiftLeft(*node1->mParent);
node1=mRoot;
} //else
}
else {
node2=node1->mParent->mLeft;
if(node2->mColor==nsNode::eRed) {
node2->mColor=nsNode::eBlack;
node1->mParent->mColor=nsNode::eRed;
ShiftRight(*node1->mParent);
node2=node1->mParent->mLeft;
}
if((node2->mRight->mColor == nsNode::eBlack) &&
(node2->mLeft->mColor == nsNode::eBlack)) {
node2->mColor=nsNode::eRed;
node1=node1->mParent;
}
else {
if(node2->mLeft->mColor == nsNode::eBlack){
node2->mRight->mColor=nsNode::eBlack;
node2->mColor=nsNode::eRed;
ShiftLeft(*node2);
node2=node1->mParent->mLeft;
}
node2->mColor=node1->mParent->mColor;
node1->mParent->mColor=nsNode::eBlack;
node2->mLeft->mColor=nsNode::eBlack;
ShiftRight(*node1->mParent);
node1=mRoot;
} //else
} //if
} //while
node1->mColor=nsNode::eBlack;
return *this;
}
/**************************************************
Here comes the nsRBTreeIterator class...
*************************************************/
/**
*
*
* @update gess 4/11/98
* @param
* @return
*/
nsRBTreeIterator::nsRBTreeIterator(const nsRBTree& aTree) : mTree(aTree) {
}
/**
* copy constructor
*
* @update gess 4/11/98
* @param aCopy is the object you want to copy from
* @return newly constructed object
*/
nsRBTreeIterator::nsRBTreeIterator(const nsRBTreeIterator& aCopy) : mTree(aCopy.mTree) {
}
/**
* Destructor method
*
* @update gess 4/11/98
*/
nsRBTreeIterator::~nsRBTreeIterator(){
}
/**
* This method iterates over the tree, calling
* aFunctor for each node.
*
* @update gess 4/11/98
* @param aFunctor -- object to call for each node
* @param aNode -- node at which to start iteration
* @return this
*/
const nsRBTreeIterator& nsRBTreeIterator::ForEach(nsNodeFunctor& aFunctor) const{
mTree.ForEach(aFunctor);
return *this;
}

223
mozilla/base/src/nsRBTree.h Normal file
View File

@@ -0,0 +1,223 @@
/**
* This file defines the binary tree class and its
* nsNode child class.
*
* This simple version stores nodes, and the
* nodes store void* ptrs.
*
* @update gess 4/11/98
* @param
* @return
*/
/**
* MODULE NOTES
* @update gess 4/11/98
*
* This file declares the nsRBTree (red/black tree).
* Red/black trees are auto-balancing binary trees.
*
* To use this class, define a subclass of nsNode
* which stores your data type. It's important that
* you overload the following methods:
*
* virtual PRBool operator<()
* virtual PRBool operator==()
*
*/
#ifndef _nsRBTree
#define _nsRBTree
#include "nsBTree.h"
/**
* Here comes the main event: our nsRBTree (red/black tree).
* Red/Black trees are autobalancing binary trees.
*
* @update gess4/20/98
*/
class NS_BASE nsRBTree : public nsBTree {
public:
friend class NS_BASE nsRBTreeIterator;
/**
* nsRBTree constructor
*
* @update gess 4/11/98
*/
nsRBTree();
/**
* nsRBTree constructor
*
* @update gess 4/11/98
*/
nsRBTree(const nsRBTree& aCopy);
/**
* nsRBTree destructor
*
* @update gess 4/11/98
*/
virtual ~nsRBTree();
/**
* Given a node, we're supposed to add it into
* our tree.
*
* @update gess 4/11/98
* @param
* @return
*/
nsNode* Add(nsNode& aNode);
/**
* Retrive the first node in the tree
*
* @update gess 4/11/98
* @param
* @return
*/
nsNode* First(void);
/**
* Retrieve the first node given a starting node
*
* @update gess 4/11/98
* @param aNode --
* @return node ptr or null
*/
nsNode* First(nsNode& aNode);
/**
* Find the last node in the tree
*
* @update gess 4/11/98
* @param
* @return node ptr or null
*/
nsNode* Last(void);
/**
* Find the last node from a given node
*
* @update gess 4/11/98
* @param aNode -- node ptr to start from
* @return node ptr or null
*/
nsNode* Last(nsNode& aNode);
/**
* Retrieve the node that preceeds the given node
*
* @update gess 4/11/98
* @param aNode -- node to find precedent of
* @return preceeding node ptr, or null
*/
nsNode* Before(nsNode& aNode);
/**
* Retrieve a ptr to the node following the given node
*
* @update gess 4/11/98
* @param aNode -- node to find successor node from
* @return node ptr or null
*/
nsNode* After(nsNode& aNode);
/**
* Find a (given) node in the tree
*
* @update gess 4/11/98
* @param node to find in the tree
* @return node ptr (if found) or null
*/
nsNode* Find(nsNode& aNode);
private:
/**
* Causes a shift to the left, to keep the
* underlying RB data in balance
*
* @update gess 4/11/98
* @param
* @return this
*/
nsRBTree& ShiftLeft(nsNode& aNode);
/**
* Causes a shift right to occur, to keep the
* underlying RB data in balance
*
* @update gess 4/11/98
* @param aNode -- node at which to perform shift
* @return this
*/
nsRBTree& ShiftRight(nsNode& aNode);
/**
* Rebalances tree around the given node. This only
* needs to be called after a node is deleted.
*
* @update gess 4/11/98
* @param aNode -- node to balance around
* @return this
*/
virtual nsBTree& ReBalance(nsNode& aNode);
};
class NS_BASE nsRBTreeIterator {
public:
/**
* TreeIterator constructor
*
* @update gess 4/11/98
* @param
* @return
*/
nsRBTreeIterator(const nsRBTree& aTree);
/**
* TreeIterator constructor
*
* @update gess 4/11/98
* @param
* @return
*/
nsRBTreeIterator(const nsRBTreeIterator& aCopy);
/**
* tree iterator destructor
*
* @update gess 4/11/98
* @param
* @return
*/
~nsRBTreeIterator();
/**
* This method iterates over the tree, calling
* aFunctor for each node.
*
* @update gess 4/11/98
* @param aFunctor -- object to call for each node
* @param aNode -- node at which to start iteration
* @return this
*/
const nsRBTreeIterator& ForEach(nsNodeFunctor& aFunctor) const;
protected:
const nsRBTree& mTree;
};
#endif

View File

@@ -0,0 +1,121 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#include "nsISizeOfHandler.h"
#include "plhash.h"
static NS_DEFINE_IID(kISizeOfHandlerIID, NS_ISIZEOF_HANDLER_IID);
class nsSizeOfHandler : public nsISizeOfHandler {
public:
nsSizeOfHandler();
~nsSizeOfHandler();
// nsISupports
NS_DECL_ISUPPORTS
// nsISizeOfHandler
NS_IMETHOD Add(size_t aSize);
virtual PRBool HaveSeen(void* anObject);
NS_IMETHOD GetSize(PRUint32& aResult);
protected:
PRUint32 mTotalSize;
PLHashTable* mTable;
};
static PLHashNumber
HashKey(void* key)
{
return (PLHashNumber) key;
}
static PRIntn
CompareKeys(void* key1, void* key2)
{
return key1 == key2;
}
nsSizeOfHandler::nsSizeOfHandler()
{
NS_INIT_REFCNT();
mTotalSize = 0;
mTable = PL_NewHashTable(8, (PLHashFunction) HashKey,
(PLHashComparator) CompareKeys,
(PLHashComparator) nsnull,
nsnull, nsnull);
}
nsSizeOfHandler::~nsSizeOfHandler()
{
if (nsnull != mTable) {
PL_HashTableDestroy(mTable);
}
}
NS_IMPL_ISUPPORTS(nsSizeOfHandler, kISizeOfHandlerIID)
NS_IMETHODIMP
nsSizeOfHandler::Add(size_t aSize)
{
mTotalSize += aSize;
return NS_OK;
}
PRBool
nsSizeOfHandler::HaveSeen(void* anObject)
{
if (nsnull == mTable) {
// When we run out of memory, HaveSeen returns PR_TRUE to stop
// wasting time.
return PR_TRUE;
}
if (nsnull != anObject) {
PRInt32 hashCode = (PRInt32) anObject;
PLHashEntry** hep = PL_HashTableRawLookup(mTable, hashCode, anObject);
PLHashEntry* he = *hep;
if (nsnull != he) {
return PR_TRUE;
}
he = PL_HashTableRawAdd(mTable, hep, hashCode, anObject, anObject);
if (nsnull == he) {
// When we run out of memory, HaveSeen returns PR_TRUE to stop
// wasting time.
return PR_TRUE;
}
return PR_FALSE;
}
return PR_TRUE;
}
NS_IMETHODIMP
nsSizeOfHandler::GetSize(PRUint32& aResult)
{
aResult = mTotalSize;
return NS_OK;
}
NS_BASE nsresult
NS_NewSizeOfHandler(nsISizeOfHandler** aInstancePtrResult)
{
nsISizeOfHandler *it = new nsSizeOfHandler();
if (it == nsnull) {
return NS_ERROR_OUT_OF_MEMORY;
}
return it->QueryInterface(kISizeOfHandlerIID, (void **) aInstancePtrResult);
}

View File

@@ -0,0 +1,369 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Mozilla Communicator client code,
* released March 31, 1998.
*
* The Initial Developer of the Original Code is Netscape Communications
* Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*
* Contributors:
* Doug Turner <dougt@netscape.com>
*/
#include "nsSpecialSystemDirectory.h"
#include "nsDebug.h"
#ifdef XP_MAC
#include <Folders.h>
#include <Files.h>
#include <Memory.h>
#include <Processes.h>
#elif defined(XP_PC)
#include <windows.h>
#include <stdlib.h>
#include <stdio.h>
#elif defined(XP_UNIX)
#include <unistd.h>
#include <stdlib.h>
#include <sys/param.h>
#endif
#include "plstr.h"
#if XP_PC
//----------------------------------------------------------------------------------------
static char* MakeUpperCase(char* aPath)
//----------------------------------------------------------------------------------------
{
// windows does not care about case. push to uppercase:
int length = strlen(aPath);
for (int i = 0; i < length; i++)
if (islower(aPath[i]))
aPath[i] = _toupper(aPath[i]);
return aPath;
}
#endif
//----------------------------------------------------------------------------------------
static void GetCurrentProcessDirectory(nsFileSpec& aFileSpec)
//----------------------------------------------------------------------------------------
{
#ifdef XP_PC
char buf[MAX_PATH];
if ( ::GetModuleFileName(0, buf, sizeof(buf)) ) {
// chop of the executable name by finding the rightmost backslash
char* lastSlash = PL_strrchr(buf, '\\');
if (lastSlash)
*(lastSlash + 1) = '\0';
aFileSpec = buf;
return;
}
#elif defined(XP_MAC)
// get info for the the current process to determine the directory
// its located in
OSErr err;
ProcessSerialNumber psn;
if (!(err = GetCurrentProcess(&psn)))
{
ProcessInfoRec pInfo;
FSSpec tempSpec;
// initialize ProcessInfoRec before calling
// GetProcessInformation() or die horribly.
pInfo.processName = nil;
pInfo.processAppSpec = &tempSpec;
pInfo.processInfoLength = sizeof(ProcessInfoRec);
if (!(err = GetProcessInformation(&psn, &pInfo)))
{
FSSpec appFSSpec = *(pInfo.processAppSpec);
long theDirID = appFSSpec.parID;
Str255 name;
CInfoPBRec catInfo;
catInfo.dirInfo.ioCompletion = NULL;
catInfo.dirInfo.ioNamePtr = (StringPtr)&name;
catInfo.dirInfo.ioVRefNum = appFSSpec.vRefNum;
catInfo.dirInfo.ioDrDirID = theDirID;
catInfo.dirInfo.ioFDirIndex = -1; // -1 = query dir in ioDrDirID
if (!(err = PBGetCatInfoSync(&catInfo)))
{
aFileSpec = nsFileSpec(appFSSpec.vRefNum,
catInfo.dirInfo.ioDrParID,
name);
return;
}
}
}
#elif defined(XP_UNIX)
// In the absence of a good way to get the executable directory let
// us try this for unix:
// - if MOZILLA_FIVE_HOME is defined, that is it
// - else give the current directory
char buf[MAXPATHLEN];
char *moz5 = getenv("MOZILLA_FIVE_HOME");
if (moz5)
{
aFileSpec = moz5;
return;
}
else
{
if (getcwd(buf, sizeof(buf)))
{
aFileSpec = buf;
return;
}
}
#endif
NS_ERROR("unable to get current process directory");
}
//nsSpecialSystemDirectory::nsSpecialSystemDirectory()
//: nsFileSpec(nsnull)
//{
//}
//----------------------------------------------------------------------------------------
nsSpecialSystemDirectory::nsSpecialSystemDirectory(SystemDirectories aSystemSystemDirectory)
//----------------------------------------------------------------------------------------
: nsFileSpec(nsnull)
{
*this = aSystemSystemDirectory;
}
//----------------------------------------------------------------------------------------
nsSpecialSystemDirectory::~nsSpecialSystemDirectory()
//----------------------------------------------------------------------------------------
{
}
//----------------------------------------------------------------------------------------
void nsSpecialSystemDirectory::operator = (SystemDirectories aSystemSystemDirectory)
//----------------------------------------------------------------------------------------
{
*this = (const char*)nsnull;
switch (aSystemSystemDirectory)
{
case OS_DriveDirectory:
#ifdef XP_PC
{
char path[_MAX_PATH];
PRInt32 len = GetWindowsDirectory( path, _MAX_PATH );
if (len)
{
if ( path[1] == ':' && path[2] == '\\' )
path[3] = 0;
}
*this = MakeUpperCase(path);
}
#elif defined(XP_MAC)
{
*this = kVolumeRootFolderType;
}
#else
*this = "/";
#endif
break;
case OS_TemporaryDirectory:
#ifdef XP_PC
char path[_MAX_PATH];
if ( GetEnvironmentVariable(TEXT("TMP"), path, _MAX_PATH) == 0 )
if (GetEnvironmentVariable(TEXT("TEMP"), path, _MAX_PATH))
{
// still not set!
PRInt32 len = GetWindowsDirectory( path, _MAX_PATH );
if (len)
{
strcat( path, "temp" );
}
}
strcat( path, "\\" );
*this = MakeUpperCase(path);
#elif defined(XP_MAC)
*this = kTemporaryFolderType;
#elif defined(XP_UNIX)
*this = "/tmp/";
#endif
break;
case OS_CurrentProcessDirectory:
GetCurrentProcessDirectory(*this);
break;
#ifdef XP_MAC
case Mac_SystemDirectory:
*this = kSystemFolderType;
break;
case Mac_DesktopDirectory:
*this = kDesktopFolderType;
break;
case Mac_TrashDirectory:
*this = kTrashFolderType;
break;
case Mac_StartupDirectory:
*this = kStartupFolderType;
break;
case Mac_ShutdownDirectory:
*this = kShutdownFolderType;
break;
case Mac_AppleMenuDirectory:
*this = kAppleMenuFolderType;
break;
case Mac_ControlPanelDirectory:
*this = kControlPanelFolderType;
break;
case Mac_ExtensionDirectory:
*this = kExtensionFolderType;
break;
case Mac_FontsDirectory:
*this = kFontsFolderType;
break;
case Mac_PreferencesDirectory:
*this = kPreferencesFolderType;
break;
case Mac_DocumentsDirectory:
*this = kDocumentsFolderType;
break;
#endif
#ifdef XP_PC
case Win_SystemDirectory:
{
char path[_MAX_PATH];
PRInt32 len = GetSystemDirectory( path, _MAX_PATH );
// Need enough space to add the trailing backslash
if (len > _MAX_PATH-2)
break;
path[len] = '\\';
path[len+1] = '\0';
*this = MakeUpperCase(path);
break;
}
case Win_WindowsDirectory:
{
char path[_MAX_PATH];
PRInt32 len = GetWindowsDirectory( path, _MAX_PATH );
// Need enough space to add the trailing backslash
if (len > _MAX_PATH-2)
break;
path[len] = '\\';
path[len+1] = '\0';
*this = MakeUpperCase(path);
break;
}
#endif
#ifdef XP_UNIX
case Unix_LocalDirectory:
*this = "/usr/local/netscape/";
break;
case Unix_LibDirectory:
*this = "/usr/local/lib/netscape/";
break;
#endif
default:
break;
}
}
#ifdef XP_MAC
//----------------------------------------------------------------------------------------
nsSpecialSystemDirectory::nsSpecialSystemDirectory(OSType folderType)
//----------------------------------------------------------------------------------------
{
*this = folderType;
}
//----------------------------------------------------------------------------------------
void nsSpecialSystemDirectory::operator = (OSType folderType)
//----------------------------------------------------------------------------------------
{
CInfoPBRec cinfo;
DirInfo *dipb=(DirInfo *)&cinfo;
// Call FindFolder to fill in the vrefnum and dirid
for (int attempts = 0; attempts < 2; attempts++)
{
mError = NS_FILE_RESULT(
FindFolder(
kOnSystemDisk,
folderType,
true,
&dipb->ioVRefNum,
&dipb->ioDrDirID));
if (NS_SUCCEEDED(mError))
break;
if (attempts > 0)
return;
switch (folderType)
{
case kDocumentsFolderType:
// Find folder will find this, as long as it exists.
// The "create" parameter, however, is sadly ignored.
// How do we internationalize this?
*this = kVolumeRootFolderType;
*this += "Documents";
CreateDirectory();
break;
} // switch
} // for
StrFileName filename;
filename[0] = '\0';
dipb->ioNamePtr = (StringPtr)&filename;
dipb->ioFDirIndex = -1;
mError = NS_FILE_RESULT(PBGetCatInfoSync(&cinfo));
if (NS_SUCCEEDED(mError))
{
mError = NS_FILE_RESULT(FSMakeFSSpec(dipb->ioVRefNum, dipb->ioDrParID, filename, &mSpec));
}
}
#endif // XP_MAC

View File

@@ -0,0 +1,133 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
// First checked in on 98/12/08 by John R. McMullen.
// Since nsFileStream.h is entirely templates, common code (such as open())
// which does not actually depend on the charT, can be placed here.
#ifdef XP_UNIX
// Compile the un-inlined functions in this file only.
#define DEFINING_FILE_STREAM
#endif
#include "nsStdFileStream.h"
#ifdef XP_MAC
#include <Errors.h>
#endif
//----------------------------------------------------------------------------------------
PRFileDesc* nsFileStreamHelpers::open(
const nsFilePath& inFile,
IOS_BASE::openmode mode,
PRIntn accessMode)
//----------------------------------------------------------------------------------------
{
PRFileDesc* descriptor = 0;
const IOS_BASE::openmode valid_modes[]=
{
IOS_BASE::out,
IOS_BASE::out | IOS_BASE::app,
IOS_BASE::out | IOS_BASE::trunc,
IOS_BASE::in,
IOS_BASE::in | IOS_BASE::out,
IOS_BASE::in | IOS_BASE::out | IOS_BASE::trunc,
// IOS_BASE::out | IOS_BASE::binary,
// IOS_BASE::out | IOS_BASE::app | IOS_BASE::binary,
// IOS_BASE::out | IOS_BASE::trunc | IOS_BASE::binary,
// IOS_BASE::in | IOS_BASE::binary,
// IOS_BASE::in | IOS_BASE::out | IOS_BASE::binary,
// IOS_BASE::in | IOS_BASE::out | IOS_BASE::trunc | IOS_BASE::binary,
0
};
const int nspr_modes[]={
PR_WRONLY | PR_CREATE_FILE,
PR_WRONLY | PR_CREATE_FILE | PR_APPEND,
PR_WRONLY | PR_CREATE_FILE | PR_TRUNCATE,
PR_RDONLY,
PR_RDONLY | PR_APPEND,
PR_RDWR | PR_CREATE_FILE,
PR_RDWR | PR_CREATE_FILE | PR_TRUNCATE,
// "wb",
// "ab",
// "wb",
// "rb",
// "r+b",
// "w+b",
0 };
int ind=0;
while (valid_modes[ind] && valid_modes[ind] != (mode&~IOS_BASE::ate))
++ind;
if (!nspr_modes[ind])
return 0;
#ifdef XP_MAC
// Use the file spec to open the file, because one path can be common to
// several files on the Macintosh (you can have several volumes with the
// same name, see).
descriptor = 0;
if (inFile.GetNativeSpec().Error() != noErr)
return 0;
OSErr err = noErr;
#if DEBUG
const OSType kCreator = 'CWIE';
#else
const OSType kCreator = 'MOSS';
#endif
nsNativeFileSpec nativeSpec = inFile.GetNativeSpec();
FSSpec* spec = (FSSpec*)nativeSpec;
if (nspr_modes[ind] & PR_CREATE_FILE)
err = FSpCreate(spec, kCreator, 'TEXT', 0);
if (err == dupFNErr)
err = noErr;
if (err != noErr)
return 0;
SInt8 perm;
if (nspr_modes[ind] & PR_RDWR)
perm = fsRdWrPerm;
else if (nspr_modes[ind] & PR_WRONLY)
perm = fsWrPerm;
else
perm = fsRdPerm;
short refnum;
err = FSpOpenDF(spec, perm, &refnum);
if (err == noErr && (nspr_modes[ind] & PR_TRUNCATE))
err = SetEOF(refnum, 0);
if (err == noErr && (nspr_modes[ind] & PR_APPEND))
err = SetFPos(refnum, fsFromLEOF, 0);
if (err != noErr)
return 0;
if ((descriptor = PR_ImportFile(refnum)) == 0)
return 0;
#else
// Platforms other than Macintosh...
if ((descriptor = PR_Open(inFile, nspr_modes[ind], accessMode)) != 0)
#endif
if (mode&IOS_BASE::ate && PR_Seek(descriptor, 0, PR_SEEK_END) >= 0)
{
PR_Close(descriptor);
descriptor = 0;
return 0;
}
return descriptor;
} // nsFileStreamHelpers::open

File diff suppressed because it is too large Load Diff

808
mozilla/base/src/nsString.h Normal file
View File

@@ -0,0 +1,808 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
/***********************************************************************
MODULE NOTES:
A. There are two philosophies to building string classes:
1. Hide the underlying buffer & offer API's allow indirect iteration
2. Reveal underlying buffer, risk corruption, but gain performance
We chose the second option for performance reasons.
B Our internal buffer always holds capacity+1 bytes.
***********************************************************************/
#ifndef _NSSTRING
#define _NSSTRING
#include "prtypes.h"
#include "nscore.h"
#include "nsIAtom.h"
#include <iostream.h>
#include <stdio.h>
class nsISizeOfHandler;
class NS_BASE nsString {
public:
/**
* Default constructor. Note that we actually allocate a small buffer
* to begin with. This is because the "philosophy" of the string class
* was to allow developers direct access to the underlying buffer for
* performance reasons.
*/
nsString();
/**
* This constructor accepts an isolatin string
* @param an ascii is a ptr to a 1-byte cstr
*/
nsString(const char* aCString);
/**
* This is our copy constructor
* @param reference to another nsString
*/
nsString(const nsString&);
/**
* Constructor from a unicode string
* @param anicodestr pts to a unicode string
*/
nsString(const PRUnichar* aUnicode);
/**
* Virtual Destructor
*/
virtual ~nsString();
/**
* Retrieve the length of this string
* @return string length
*/
PRInt32 Length() const { return mLength; }
/**
* Sets the new length of the string.
* @param aLength is new string length.
* @return nada
*/
void SetLength(PRInt32 aLength);
/**
* This method truncates this string to given length.
*
* @param anIndex -- new length of string
* @return nada
*/
void Truncate(PRInt32 anIndex=0);
/**
* This method gets called when the internal buffer needs
* to grow to a given size.
* @param aNewLength -- new capacity of string
* @return void
*/
virtual void EnsureCapacityFor(PRInt32 aNewLength);
/**
*
* @param
*/
virtual void SizeOf(nsISizeOfHandler* aHandler) const;
/**
* Determine whether or not the characters in this
* string are in sorted order.
*
* @return TRUE if ordered.
*/
PRBool IsOrdered(void) const;
/**********************************************************************
Accessor methods...
*********************************************************************/
/**
* Retrieve pointer to internal string value
* @return PRUnichar* to internal string
*/
const PRUnichar* GetUnicode(void) const;
/**
*
* @param
* @return
*/
operator const PRUnichar*() const;
/**
* Retrieve unicode char at given index
* @param offset into string
* @return PRUnichar* to internal string
*/
PRUnichar operator()(PRInt32 anIndex) const;
/**
* Retrieve reference to unicode char at given index
* @param offset into string
* @return PRUnichar& from internal string
*/
PRUnichar& operator[](PRInt32 anIndex) const;
/**
* Retrieve reference to unicode char at given index
* @param offset into string
* @return PRUnichar& from internal string
*/
PRUnichar& CharAt(PRInt32 anIndex) const;
/**
* Retrieve reference to first unicode char in string
* @return PRUnichar from internal string
*/
PRUnichar& First() const;
/**
* Retrieve reference to last unicode char in string
* @return PRUnichar from internal string
*/
PRUnichar& Last() const;
/**********************************************************************
String creation methods...
*********************************************************************/
/**
* Create a new string by appending given string to this
* @param aString -- 2nd string to be appended
* @return new string
*/
nsString operator+(const nsString& aString);
/**
* create a new string by adding this to the given buffer.
* @param aCString is a ptr to cstring to be added to this
* @return newly created string
*/
nsString operator+(const char* aCString);
/**
* create a new string by adding this to the given char.
* @param aChar is a char to be added to this
* @return newly created string
*/
nsString operator+(char aChar);
/**
* create a new string by adding this to the given buffer.
* @param aStr unichar buffer to be added to this
* @return newly created string
*/
nsString operator+(const PRUnichar* aBuffer);
/**
* create a new string by adding this to the given char.
* @param aChar is a unichar to be added to this
* @return newly created string
*/
nsString operator+(PRUnichar aChar);
/**
* Converts all chars in internal string to lower
*/
void ToLowerCase();
/**
* Converts all chars in given string to lower
*/
void ToLowerCase(nsString& aString) const;
/**
* Converts all chars in given string to upper
*/
void ToUpperCase();
/**
* Converts all chars in given string to UCS2
* which ensure that the lower 256 chars are correct.
*/
void ToUCS2(PRInt32 aStartOffset);
/**
* Converts all chars in internal string to upper
*/
void ToUpperCase(nsString& aString) const;
/**
* Creates a duplicate clone (ptr) of this string.
* @return ptr to clone of this string
*/
nsString* ToNewString() const;
/**
* Creates an ascii clone of this string
* NOTE: This string is allocated with new; YOU MUST deallocate with delete[]!
* @return ptr to new c-String string
*/
char* ToNewCString() const;
/**
* Copies data from internal buffer onto given char* buffer
* @param aBuf is the buffer where data is stored
* @param aBuflength is the max # of chars to move to buffer
* @return ptr to given buffer
*/
char* ToCString(char* aBuf,PRInt32 aBufLength) const;
/**
* Copies contents of this onto given string.
* @param aString to hold copy of this
* @return nada.
*/
void Copy(nsString& aString) const;
/**
* Creates an unichar clone of this string
* @return ptr to new unichar string
*/
PRUnichar* ToNewUnicode() const;
/**
* Perform string to float conversion.
* @param aErrorCode will contain error if one occurs
* @return float rep of string value
*/
float ToFloat(PRInt32* aErrorCode) const;
/**
* Perform string to int conversion.
* @param aErrorCode will contain error if one occurs
* @return int rep of string value
*/
PRInt32 ToInteger(PRInt32* aErrorCode,PRInt32 aRadix=10) const;
/**********************************************************************
String manipulation methods...
*********************************************************************/
/**
* assign given PRUnichar* to this string
* @param aStr: buffer to be assigned to this
* @param alength is the length of the given str (or -1)
if you want me to determine its length
* @return this
*/
nsString& SetString(const PRUnichar* aStr,PRInt32 aLength=-1);
/**
* assign given char* to this string
* @param aCString: buffer to be assigned to this
* @param alength is the length of the given str (or -1)
if you want me to determine its length
* @return this
*/
nsString& SetString(const char* aCString,PRInt32 aLength=-1);
/**
* assign given string to this one
* @param aString: string to be added to this
* @return this
*/
nsString& operator=(const nsString& aString);
/**
* assign given char* to this string
* @param aCString: buffer to be assigned to this
* @return this
*/
nsString& operator=(const char* aCString);
/**
* assign given char to this string
* @param aChar: char to be assignd to this
* @return this
*/
nsString& operator=(char aChar);
/**
* assign given unichar* to this string
* @param aBuffer: unichar buffer to be assigned to this
* @return this
*/
nsString& operator=(const PRUnichar* aBuffer);
/**
* assign given char to this string
* @param aChar: char to be assignd to this
* @return this
*/
nsString& operator=(PRUnichar aChar);
/**
* append given string to this string
* @param aString : string to be appended to this
* @return this
*/
nsString& operator+=(const nsString& aString);
/**
* append given buffer to this string
* @param aCString: buffer to be appended to this
* @return this
*/
nsString& operator+=(const char* aCString);
/**
* append given buffer to this string
* @param aBuffer: buffer to be appended to this
* @return this
*/
nsString& operator+=(const PRUnichar* aBuffer);
/**
* append given char to this string
* @param aChar: char to be appended to this
* @return this
*/
nsString& operator+=(PRUnichar aChar);
/**
* append given string to this string
* @param aString : string to be appended to this
* @param alength is the length of the given str (or -1)
if you want me to determine its length
* @return this
*/
nsString& Append(const nsString& aString,PRInt32 aLength=-1);
/**
* append given string to this string
* @param aString : string to be appended to this
* @param alength is the length of the given str (or -1)
if you want me to determine its length
* @return this
*/
nsString& Append(const char* aCString,PRInt32 aLength=-1);
/**
* append given string to this string
* @param aString : string to be appended to this
* @return this
*/
nsString& Append(char aChar);
/**
* append given unichar buffer to this string
* @param aString : string to be appended to this
* @param alength is the length of the given str (or -1)
if you want me to determine its length
* @return this
*/
nsString& Append(const PRUnichar* aBuffer,PRInt32 aLength=-1);
/**
* append given unichar character to this string
* @param aChar is the char to be appended to this
* @return this
*/
nsString& Append(PRUnichar aChar);
/**
* Append an integer onto this string
* @param aInteger is the int to be appended
* @param aRadix specifies 8,10,16
* @return this
*/
nsString& Append(PRInt32 aInteger,PRInt32 aRadix); //radix=8,10 or 16
/**
* Append a float value onto this string
* @param aFloat is the float to be appended
* @return this
*/
nsString& Append(float aFloat);
/*
* Copies n characters from this string to given string,
* starting at the leftmost offset.
*
*
* @param aCopy -- Receiving string
* @param aCount -- number of chars to copy
* @return number of chars copied
*/
PRInt32 Left(nsString& aCopy,PRInt32 aCount) const;
/*
* Copies n characters from this string to given string,
* starting at the given offset.
*
*
* @param aCopy -- Receiving string
* @param aCount -- number of chars to copy
* @param anOffset -- position where copying begins
* @return number of chars copied
*/
PRInt32 Mid(nsString& aCopy,PRInt32 anOffset,PRInt32 aCount) const;
/*
* Copies n characters from this string to given string,
* starting at rightmost char.
*
*
* @param aCopy -- Receiving string
* @param aCount -- number of chars to copy
* @return number of chars copied
*/
PRInt32 Right(nsString& aCopy,PRInt32 aCount) const;
/*
* This method inserts n chars from given string into this
* string at str[anOffset].
*
* @param aCopy -- String to be inserted into this
* @param anOffset -- insertion position within this str
* @param aCount -- number of chars to be copied from aCopy
* @return number of chars inserted into this.
*/
PRInt32 Insert(const nsString& aCopy,PRInt32 anOffset,PRInt32 aCount=-1);
/**
* Insert a single unicode char into this string at
* a specified offset.
*
* @param aChar char to be inserted into this string
* @param anOffset is insert pos in str
* @return the number of chars inserted into this string
*/
PRInt32 Insert(PRUnichar aChar,PRInt32 anOffset);
/*
* This method is used to cut characters in this string
* starting at anOffset, continuing for aCount chars.
*
* @param anOffset -- start pos for cut operation
* @param aCount -- number of chars to be cut
* @return *this
*/
nsString& Cut(PRInt32 anOffset,PRInt32 aCount);
/**
* This method is used to remove all occurances of the
* characters found in aSet from this string.
*
* @param aSet -- characters to be cut from this
* @return *this
*/
nsString& StripChars(const char* aSet);
/**
* This method is used to replace all occurances of the
* given source char with the given dest char
*
* @param
* @return *this
*/
nsString& ReplaceChar(PRUnichar aSourceChar, PRUnichar aDestChar);
/**
* This method strips whitespace throughout the string
*
* @return this
*/
nsString& StripWhitespace();
/**
* This method trims characters found in aTrimSet from
* either end of the underlying string.
*
* @param aTrimSet -- contains chars to be trimmed from
* both ends
* @return this
*/
nsString& Trim(const char* aSet,
PRBool aEliminateLeading=PR_TRUE,
PRBool aEliminateTrailing=PR_TRUE);
/**
* This method strips whitespace from string.
* You can control whether whitespace is yanked from
* start and end of string as well.
*
* @param aEliminateLeading controls stripping of leading ws
* @param aEliminateTrailing controls stripping of trailing ws
* @return this
*/
nsString& CompressWhitespace( PRBool aEliminateLeading=PR_TRUE,
PRBool aEliminateTrailing=PR_TRUE);
/**
* Determine if given char is a valid space character
*
* @param aChar is character to be tested
* @return TRUE if is valid space char
*/
static PRBool IsSpace(PRUnichar ch);
/**
* Determine if given char in valid alpha range
*
* @param aChar is character to be tested
* @return TRUE if in alpha range
*/
static PRBool IsAlpha(PRUnichar ch);
/**
* Determine if given char is valid digit
*
* @param aChar is character to be tested
* @return TRUE if char is a valid digit
*/
static PRBool IsDigit(PRUnichar ch);
/**********************************************************************
Searching methods...
*********************************************************************/
/**
* Search for given character within this string.
* This method does so by using a binary search,
* so your string HAD BETTER BE ORDERED!
*
* @param aChar is the unicode char to be found
* @return offset in string, or -1 (kNotFound)
*/
PRInt32 BinarySearch(PRUnichar aChar) const;
/**
* Search for given substring within this string
*
* @param aString is substring to be sought in this
* @return offset in string, or -1 (kNotFound)
*/
PRInt32 Find(const char* aString) const;
PRInt32 Find(const PRUnichar* aString) const;
PRInt32 Find(const nsString& aString) const;
/**
* Search for given char within this string
*
* @param aChar - char to be found
* @return offset in string, or -1 (kNotFound)
*/
PRInt32 Find(PRUnichar aChar,PRInt32 offset=0) const;
/**
* This method searches this string for the first character
* found in the given string
* @param aString contains set of chars to be found
* @param anOffset tells us where to start searching in this
* @return -1 if not found, else the offset in this
*/
PRInt32 FindCharInSet(const char* aString,PRInt32 anOffset=0) const;
PRInt32 FindCharInSet(nsString& aString,PRInt32 anOffset=0) const;
/**
* This method searches this string for the last character
* found in the given string
* @param aString contains set of chars to be found
* @param anOffset tells us where to start searching in this
* @return -1 if not found, else the offset in this
*/
PRInt32 RFindCharInSet(const char* aString,PRInt32 anOffset=0) const;
PRInt32 RFindCharInSet(nsString& aString,PRInt32 anOffset=0) const;
/**
* This methods scans the string backwards, looking for the given string
* @param aString is substring to be sought in this
* @param aIgnoreCase tells us whether or not to do caseless compare
* @return offset in string, or -1 (kNotFound)
*/
PRInt32 RFind(const char* aCString,PRBool aIgnoreCase=PR_FALSE) const;
PRInt32 RFind(const PRUnichar* aString,PRBool aIgnoreCase=PR_FALSE) const;
PRInt32 RFind(const nsString& aString,PRBool aIgnoreCase=PR_FALSE) const;
/**
* This methods scans the string backwards, looking for the given char
* @param char is the char to be sought in this
* @param aIgnoreCase tells us whether or not to do caseless compare
* @return offset in string, or -1 (kNotFound)
*/
PRInt32 RFind(PRUnichar aChar,PRBool aIgnoreCase=PR_FALSE) const;
/**********************************************************************
Comparison methods...
*********************************************************************/
/**
* Compares a given string type to this string.
* @update gess 7/27/98
* @param S is the string to be compared
* @param aIgnoreCase tells us how to treat case
* @return -1,0,1
*/
virtual PRInt32 Compare(const nsString &aString,PRBool aIgnoreCase=PR_FALSE) const;
virtual PRInt32 Compare(const char *aString,PRBool aIgnoreCase=PR_FALSE,PRInt32 aLength=-1) const;
virtual PRInt32 Compare(const PRUnichar *aString,PRBool aIgnoreCase=PR_FALSE,PRInt32 aLength=-1) const;
/**
* These methods compare a given string type to this one
* @param aString is the string to be compared to this
* @return TRUE or FALSE
*/
PRBool operator==(const nsString &aString) const;
PRBool operator==(const char *aString) const;
PRBool operator==(const PRUnichar* aString) const;
PRBool operator==(PRUnichar* aString) const;
/**
* These methods perform a !compare of a given string type to this
* @param aString is the string to be compared to this
* @return TRUE
*/
PRBool operator!=(const nsString &aString) const;
PRBool operator!=(const char *aString) const;
PRBool operator!=(const PRUnichar* aString) const;
/**
* These methods test if a given string is < than this
* @param aString is the string to be compared to this
* @return TRUE or FALSE
*/
PRBool operator<(const nsString &aString) const;
PRBool operator<(const char *aString) const;
PRBool operator<(const PRUnichar* aString) const;
/**
* These methods test if a given string is > than this
* @param aString is the string to be compared to this
* @return TRUE or FALSE
*/
PRBool operator>(const nsString &S) const;
PRBool operator>(const char *aCString) const;
PRBool operator>(const PRUnichar* aString) const;
/**
* These methods test if a given string is <= than this
* @param aString is the string to be compared to this
* @return TRUE or FALSE
*/
PRBool operator<=(const nsString &S) const;
PRBool operator<=(const char *aCString) const;
PRBool operator<=(const PRUnichar* aString) const;
/**
* These methods test if a given string is >= than this
* @param aString is the string to be compared to this
* @return TRUE or FALSE
*/
PRBool operator>=(const nsString &S) const;
PRBool operator>=(const char* aCString) const;
PRBool operator>=(const PRUnichar* aString) const;
/**
* Compare this to given string; note that we compare full strings here.
* The optional length argument just lets us know how long the given string is.
* If you provide a length, it is compared to length of this string as an
* optimization.
*
* @param aString -- the string to compare to this
* @param aLength -- optional length of given string.
* @return TRUE if equal
*/
PRBool Equals(const nsString& aString) const;
PRBool Equals(const char* aString,PRInt32 aLength=-1) const;
PRBool Equals(const nsIAtom *aAtom) const;
/**
* Compares to unichar string ptrs to each other
* @param s1 is a ptr to a unichar buffer
* @param s2 is a ptr to a unichar buffer
* @return TRUE if they match
*/
PRBool Equals(const PRUnichar* s1, const PRUnichar* s2) const;
/**
* Compare this to given string; note that we compare full strings here.
* The optional length argument just lets us know how long the given string is.
* If you provide a length, it is compared to length of this string as an
* optimization.
*
* @param aString -- the string to compare to this
* @param aLength -- optional length of given string.
* @return TRUE if equal
*/
PRBool EqualsIgnoreCase(const nsString& aString) const;
PRBool EqualsIgnoreCase(const char* aString,PRInt32 aLength=-1) const;
PRBool EqualsIgnoreCase(const nsIAtom *aAtom) const;
/**
* Compares to unichar string ptrs to each other without respect to case
* @param s1 is a ptr to a unichar buffer
* @param s2 is a ptr to a unichar buffer
* @return TRUE if they match
*/
PRBool EqualsIgnoreCase(const PRUnichar* s1, const PRUnichar* s2) const;
static void SelfTest();
virtual void DebugDump(ostream& aStream) const;
protected:
typedef PRUnichar chartype;
chartype* mStr;
PRInt32 mLength;
PRInt32 mCapacity;
static PRBool mSelfTested;
};
ostream& operator<<(ostream& os,nsString& aString);
extern NS_BASE int fputs(const nsString& aString, FILE* out);
//----------------------------------------------------------------------
/**
* A version of nsString which is designed to be used as an automatic
* variable. It attempts to operate out of a fixed size internal
* buffer until too much data is added; then a dynamic buffer is
* allocated and grown as necessary.
*/
// XXX template this with a parameter for the size of the buffer?
class NS_BASE nsAutoString : public nsString {
public:
nsAutoString();
nsAutoString(const nsString& other);
nsAutoString(const nsAutoString& other);
nsAutoString(PRUnichar aChar);
nsAutoString(const char* aCString);
nsAutoString(const PRUnichar* us, PRInt32 uslen = -1);
virtual ~nsAutoString();
nsAutoString& operator=(const nsString& aString) {nsString::operator=(aString); return *this;}
nsAutoString& operator=(const nsAutoString& aString) {nsString::operator=(aString); return *this;}
nsAutoString& operator=(const char* aCString) {nsString::operator=(aCString); return *this;}
nsAutoString& operator=(char aChar) {nsString::operator=(aChar); return *this;}
nsAutoString& operator=(const PRUnichar* aBuffer) {nsString::operator=(aBuffer); return *this;}
nsAutoString& operator=(PRUnichar aChar) {nsString::operator=(aChar); return *this;}
virtual void SizeOf(nsISizeOfHandler* aHandler) const;
static void SelfTest();
protected:
virtual void EnsureCapacityFor(PRInt32 aNewLength);
chartype mBuf[32];
};
ostream& operator<<(ostream& os,nsAutoString& aString);
#endif

196
mozilla/base/src/nsTime.h Normal file
View File

@@ -0,0 +1,196 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#ifndef nsTime_h__
#define nsTime_h__
#include "prtime.h"
#include "nsInt64.h"
#include "nscore.h"
/**
* This class encapsulates full 64-bit time functionality and
* provides simple arithmetic and conversion operations.
*/
// If you ever decide that you need to add a non-inline method to this
// class, be sure to change the class declaration to "class NS_BASE
// nsTime".
class nsTime
{
private:
nsInt64 mValue;
public:
/**
* Construct the current time.
*/
nsTime(void) : mValue(PR_Now()) {
}
/**
* Construct the time from a string.
*/
nsTime(const char* dateStr, PRBool defaultToGMT) {
PRInt64 time;
PRStatus status = PR_ParseTimeString(dateStr, defaultToGMT, &time);
if (status == PR_SUCCESS)
mValue = time;
else
mValue = LL_ZERO;
}
/**
* Construct a time from a PRTime.
*/
nsTime(const PRTime aTime) : mValue(aTime) {
}
/**
* Construct a time from a 64-bit value.
*/
nsTime(const nsInt64& aTime) : mValue(aTime) {
}
/**
* Construct a time from another time.
*/
nsTime(const nsTime& aTime) : mValue(aTime.mValue) {
}
// ~nsTime(void) -- XXX destructor unnecessary
/**
* Assign one time to another.
*/
const nsTime& operator =(const nsTime& aTime) {
mValue = aTime.mValue;
return *this;
}
/**
* Convert a nsTime object to a PRTime
*/
operator PRTime(void) const {
return mValue;
}
/**
* Subtract a 64-bit interval from a time.
*/
nsTime& operator -=(const nsInt64& aInterval) {
mValue -= aInterval;
return *this;
}
/**
* Add a 64-bit interval to a time.
*/
nsTime& operator +=(const nsInt64& aInterval) {
mValue += aInterval;
return *this;
}
// Arithmetic operators
friend const nsTime operator +(const nsTime& aTime, const nsInt64& aInterval);
friend const nsTime operator -(const nsTime& aTime, const nsInt64& aInterval);
friend const nsInt64 operator -(const nsTime& aTime1, const nsTime& aTime2);
// Comparison operators
friend const PRBool operator ==(const nsTime& aTime1, const nsTime& aTime2);
friend const PRBool operator !=(const nsTime& aTime1, const nsTime& aTime2);
friend const PRBool operator <(const nsTime& aTime1, const nsTime& aTime2);
friend const PRBool operator <=(const nsTime& aTime1, const nsTime& aTime2);
friend const PRBool operator >(const nsTime& aTime1, const nsTime& aTime2);
friend const PRBool operator >=(const nsTime& aTime1, const nsTime& aTime2);
};
/**
* Binary addition to add a 64-bit interval to a time.
*/
inline const nsTime
operator +(const nsTime& aTime, const nsInt64& aInterval) {
return nsTime(aTime.mValue + aInterval);
}
/**
* Binary subtraction to subtract a 64-bit interval to a time.
*/
inline const nsTime
operator -(const nsTime& aTime, const nsInt64& aInterval) {
return nsTime(aTime.mValue - aInterval);
}
/**
* Binary subtraction to compute an interval from the difference of two times.
*/
inline const nsInt64
operator -(const nsTime& aTime1, const nsTime& aTime2) {
return aTime1.mValue - aTime2.mValue;
}
/**
* Determine if two times are equal
*/
inline const PRBool
operator ==(const nsTime& aTime1, const nsTime& aTime2) {
return aTime1.mValue == aTime2.mValue;
}
/**
* Determine if two times are different
*/
inline const PRBool
operator !=(const nsTime& aTime1, const nsTime& aTime2) {
return aTime1.mValue != aTime2.mValue;
}
/**
* Determine if one time is strictly less than another
*/
inline const PRBool
operator <(const nsTime& aTime1, const nsTime& aTime2) {
return aTime1.mValue < aTime2.mValue;
}
/**
* Determine if one time is less than or equal to another
*/
inline const PRBool
operator <=(const nsTime& aTime1, const nsTime& aTime2) {
return aTime1.mValue <= aTime2.mValue;
}
/**
* Determine if one time is strictly greater than another
*/
inline const PRBool
operator >(const nsTime& aTime1, const nsTime& aTime2) {
return aTime1.mValue > aTime2.mValue;
}
/**
* Determine if one time is greater than or equal to another
*/
inline const PRBool
operator >=(const nsTime& aTime1, const nsTime& aTime2) {
return aTime1.mValue >= aTime2.mValue;
}
#endif // nsTime_h__

View File

@@ -0,0 +1,142 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#include "nsIUnicharBuffer.h"
#include "nsIUnicharInputStream.h"
#include "nsCRT.h"
#define MIN_BUFFER_SIZE 32
class UnicharBufferImpl : public nsIUnicharBuffer {
public:
UnicharBufferImpl(PRUint32 aBufferSize);
~UnicharBufferImpl();
NS_DECL_ISUPPORTS
virtual PRInt32 GetLength() const;
virtual PRInt32 GetBufferSize() const;
virtual PRUnichar* GetBuffer() const;
virtual PRBool Grow(PRInt32 aNewSize);
virtual PRInt32 Fill(nsresult* aErrorCode, nsIUnicharInputStream* aStream,
PRInt32 aKeep);
PRUnichar* mBuffer;
PRUint32 mSpace;
PRUint32 mLength;
};
UnicharBufferImpl::UnicharBufferImpl(PRUint32 aBufferSize)
{
if (aBufferSize < MIN_BUFFER_SIZE) {
aBufferSize = MIN_BUFFER_SIZE;
}
mSpace = aBufferSize;
mBuffer = new PRUnichar[aBufferSize];
mLength = 0;
NS_INIT_REFCNT();
}
NS_DEFINE_IID(kUnicharBufferIID, NS_IUNICHAR_BUFFER_IID);
NS_IMPL_ISUPPORTS(UnicharBufferImpl,kUnicharBufferIID)
UnicharBufferImpl::~UnicharBufferImpl()
{
if (nsnull != mBuffer) {
delete[] mBuffer;
mBuffer = nsnull;
}
mLength = 0;
}
PRInt32 UnicharBufferImpl::GetLength() const
{
return mLength;
}
PRInt32 UnicharBufferImpl::GetBufferSize() const
{
return mSpace;
}
PRUnichar* UnicharBufferImpl::GetBuffer() const
{
return mBuffer;
}
PRBool UnicharBufferImpl::Grow(PRInt32 aNewSize)
{
if (PRUint32(aNewSize) < MIN_BUFFER_SIZE) {
aNewSize = MIN_BUFFER_SIZE;
}
PRUnichar* newbuf = new PRUnichar[aNewSize];
if (nsnull != newbuf) {
if (0 != mLength) {
nsCRT::memcpy(newbuf, mBuffer, mLength * sizeof(PRUnichar));
}
delete[] mBuffer;
mBuffer = newbuf;
return PR_TRUE;
}
return PR_FALSE;
}
PRInt32 UnicharBufferImpl::Fill(nsresult* aErrorCode,
nsIUnicharInputStream* aStream,
PRInt32 aKeep)
{
NS_PRECONDITION(nsnull != aStream, "null stream");
NS_PRECONDITION(PRUint32(aKeep) < PRUint32(mLength), "illegal keep count");
if ((nsnull == aStream) || (PRUint32(aKeep) >= PRUint32(mLength))) {
// whoops
*aErrorCode = NS_BASE_STREAM_ILLEGAL_ARGS;
return -1;
}
if (0 != aKeep) {
// Slide over kept data
nsCRT::memmove(mBuffer, mBuffer + (mLength - aKeep),
aKeep * sizeof(PRUnichar));
}
// Read in some new data
mLength = aKeep;
PRInt32 amount = mSpace - aKeep;
PRUint32 nb;
NS_ASSERTION(aKeep >= 0, "unsigned madness");
NS_ASSERTION(amount >= 0, "unsigned madness");
*aErrorCode = aStream->Read(mBuffer, (PRUint32)aKeep, (PRUint32)amount, &nb);
if (NS_SUCCEEDED(*aErrorCode)) {
mLength += nb;
}
else
nb = 0;
return nb;
}
NS_BASE nsresult NS_NewUnicharBuffer(nsIUnicharBuffer** aInstancePtrResult,
nsISupports* aOuter,
PRUint32 aBufferSize)
{
if (nsnull != aOuter) {
return NS_ERROR_NO_AGGREGATION;
}
UnicharBufferImpl* it = new UnicharBufferImpl(aBufferSize);
if (nsnull == it) {
return NS_ERROR_OUT_OF_MEMORY;
}
return it->QueryInterface(kUnicharBufferIID, (void **) aInstancePtrResult);
}

View File

@@ -0,0 +1,316 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#define NS_IMPL_IDS
#include "nsIUnicharInputStream.h"
#include "nsIByteBuffer.h"
#include "nsIUnicharBuffer.h"
#include "nsIServiceManager.h"
#include "nsICharsetConverterManager.h"
#include "nsIUnicodeDecoder.h"
#include "nsString.h"
#include "nsCRT.h"
#include <fcntl.h>
#ifdef NS_WIN32
#include <io.h>
#else
#include <unistd.h>
#endif
static NS_DEFINE_IID(kIUnicharInputStreamIID, NS_IUNICHAR_INPUT_STREAM_IID);
class StringUnicharInputStream : public nsIUnicharInputStream {
public:
StringUnicharInputStream(nsString* aString);
~StringUnicharInputStream();
NS_DECL_ISUPPORTS
NS_IMETHOD Read(PRUnichar* aBuf,
PRUint32 aOffset,
PRUint32 aCount,
PRUint32 *aReadCount);
NS_IMETHOD Close();
nsString* mString;
PRUint32 mPos;
PRUint32 mLen;
};
StringUnicharInputStream::StringUnicharInputStream(nsString* aString)
{
NS_INIT_REFCNT();
mString = aString;
mPos = 0;
mLen = aString->Length();
}
StringUnicharInputStream::~StringUnicharInputStream()
{
if (nsnull != mString) {
delete mString;
}
}
nsresult StringUnicharInputStream::Read(PRUnichar* aBuf,
PRUint32 aOffset,
PRUint32 aCount,
PRUint32 *aReadCount)
{
if (mPos >= mLen) {
*aReadCount = 0;
return (nsresult)-1;
}
const PRUnichar* us = mString->GetUnicode();
NS_ASSERTION(mLen >= mPos, "unsigned madness");
PRUint32 amount = mLen - mPos;
if (amount > aCount) {
amount = aCount;
}
nsCRT::memcpy(aBuf + aOffset, us + mPos, sizeof(PRUnichar) * amount);
mPos += amount;
*aReadCount = amount;
return NS_OK;
}
nsresult StringUnicharInputStream::Close()
{
mPos = mLen;
if (nsnull != mString) {
delete mString;
}
return NS_OK;
}
NS_IMPL_ISUPPORTS(StringUnicharInputStream, kIUnicharInputStreamIID);
NS_BASE nsresult
NS_NewStringUnicharInputStream(nsIUnicharInputStream** aInstancePtrResult,
nsString* aString)
{
NS_PRECONDITION(nsnull != aString, "null ptr");
NS_PRECONDITION(nsnull != aInstancePtrResult, "null ptr");
if ((nsnull == aString) || (nsnull == aInstancePtrResult)) {
return NS_ERROR_NULL_POINTER;
}
StringUnicharInputStream* it = new StringUnicharInputStream(aString);
if (nsnull == it) {
return NS_ERROR_OUT_OF_MEMORY;
}
return it->QueryInterface(kIUnicharInputStreamIID,
(void**) aInstancePtrResult);
}
//----------------------------------------------------------------------
/**
* This function used to be public, with the NS_BASE declaration. I am
* changing it right now into a module private visibility because there are
* better and more xpcom-like ways to get a Converter.
*/
nsresult NS_NewB2UConverter(nsIUnicodeDecoder** aInstancePtrResult, nsISupports* aOuter, nsString* aCharSet);
nsresult
NS_NewB2UConverter(nsIUnicodeDecoder** aInstancePtrResult,
nsISupports* aOuter,
nsString* aCharSet)
{
if (nsnull != aOuter) {
return NS_ERROR_NO_AGGREGATION;
}
// Create converter
nsresult res;
nsICharsetConverterManager * ccm;
nsAutoString defaultCharset("ISO-8859-1");
if (aCharSet == nsnull) aCharSet = &defaultCharset;
res = nsServiceManager::GetService(kCharsetConverterManagerCID,
kICharsetConverterManagerIID, (nsISupports**)&ccm);
if (NS_FAILED(res)) return res;
res = ccm->GetUnicodeDecoder(aCharSet, aInstancePtrResult);
nsServiceManager::ReleaseService(kCharsetConverterManagerCID, ccm);
return res;
}
//----------------------------------------------------------------------
class ConverterInputStream : public nsIUnicharInputStream {
public:
ConverterInputStream(nsIInputStream* aStream,
nsIUnicodeDecoder* aConverter,
PRUint32 aBufSize);
~ConverterInputStream();
NS_DECL_ISUPPORTS
NS_IMETHOD Read(PRUnichar* aBuf,
PRUint32 aOffset,
PRUint32 aCount,
PRUint32 *aReadCount);
NS_IMETHOD Close();
protected:
PRInt32 Fill(nsresult * aErrorCode);
nsIInputStream* mInput;
nsIUnicodeDecoder* mConverter;
nsIByteBuffer* mByteData;
PRUint32 mByteDataOffset;
nsIUnicharBuffer* mUnicharData;
PRUint32 mUnicharDataOffset;
PRUint32 mUnicharDataLength;
};
ConverterInputStream::ConverterInputStream(nsIInputStream* aStream,
nsIUnicodeDecoder* aConverter,
PRUint32 aBufferSize)
{
NS_INIT_REFCNT();
mInput = aStream; aStream->AddRef();
mConverter = aConverter; aConverter->AddRef();
if (aBufferSize == 0) {
aBufferSize = 8192;
}
nsresult rv1 = NS_NewByteBuffer(&mByteData, nsnull, aBufferSize);
nsresult rv2 = NS_NewUnicharBuffer(&mUnicharData, nsnull, aBufferSize);
mByteDataOffset = 0;
mUnicharDataOffset = 0;
mUnicharDataLength = 0;
}
NS_IMPL_ISUPPORTS(ConverterInputStream,kIUnicharInputStreamIID);
ConverterInputStream::~ConverterInputStream()
{
Close();
}
nsresult ConverterInputStream::Close()
{
if (nsnull != mInput) {
mInput->Release();
mInput = nsnull;
}
if (nsnull != mConverter) {
mConverter->Release();
mConverter = nsnull;
}
if (nsnull != mByteData) {
mByteData->Release();
mByteData = nsnull;
}
if (nsnull != mUnicharData) {
mUnicharData->Release();
mUnicharData = nsnull;
}
return NS_OK;
}
nsresult ConverterInputStream::Read(PRUnichar* aBuf,
PRUint32 aOffset,
PRUint32 aCount,
PRUint32 *aReadCount)
{
NS_ASSERTION(mUnicharDataLength >= mUnicharDataOffset, "unsigned madness");
PRUint32 rv = mUnicharDataLength - mUnicharDataOffset;
nsresult errorCode;
if (0 == rv) {
// Fill the unichar buffer
rv = Fill(&errorCode);
if (rv <= 0) {
*aReadCount = 0;
return errorCode;
}
}
if (rv > aCount) {
rv = aCount;
}
nsCRT::memcpy(aBuf + aOffset, mUnicharData->GetBuffer() + mUnicharDataOffset,
rv * sizeof(PRUnichar));
mUnicharDataOffset += rv;
*aReadCount = rv;
return NS_OK;
}
PRInt32 ConverterInputStream::Fill(nsresult * aErrorCode)
{
if (nsnull == mInput) {
// We already closed the stream!
*aErrorCode = NS_BASE_STREAM_CLOSED;
return -1;
}
NS_ASSERTION(mByteData->GetLength() >= mByteDataOffset, "unsigned madness");
PRUint32 remainder = mByteData->GetLength() - mByteDataOffset;
mByteDataOffset = remainder;
PRInt32 nb = mByteData->Fill(aErrorCode, mInput, remainder);
if (nb <= 0) {
// Because we assume a many to one conversion, the lingering data
// in the byte buffer must be a partial conversion
// fragment. Because we know that we have recieved no more new
// data to add to it, we can't convert it. Therefore, we discard
// it.
return nb;
}
NS_ASSERTION(remainder + nb == mByteData->GetLength(), "bad nb");
// Now convert as much of the byte buffer to unicode as possible
PRInt32 dstLen = mUnicharData->GetBufferSize();
PRInt32 srcLen = remainder + nb;
*aErrorCode = mConverter->Convert(mUnicharData->GetBuffer(), 0, &dstLen,
mByteData->GetBuffer(), 0, &srcLen);
mUnicharDataOffset = 0;
mUnicharDataLength = dstLen;
mByteDataOffset += srcLen;
return dstLen;
}
// XXX hook up auto-detect here (do we need more info, like the url?)
NS_BASE nsresult
NS_NewConverterStream(nsIUnicharInputStream** aInstancePtrResult,
nsISupports* aOuter,
nsIInputStream* aStreamToWrap,
PRInt32 aBufferSize,
nsString* aCharSet)
{
if (nsnull != aOuter) {
return NS_ERROR_NO_AGGREGATION;
}
// Create converter
nsIUnicodeDecoder* converter;
nsresult rv = NS_NewB2UConverter(&converter, nsnull, aCharSet);
if (NS_OK != rv) {
return rv;
}
// Create converter input stream
ConverterInputStream* it =
new ConverterInputStream(aStreamToWrap, converter, aBufferSize);
NS_RELEASE(converter);
if (nsnull == it) {
return NS_ERROR_OUT_OF_MEMORY;
}
return it->QueryInterface(kIUnicharInputStreamIID,
(void **) aInstancePtrResult);
}

View File

@@ -0,0 +1,182 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#ifndef nsUnitConversion_h__
#define nsUnitConversion_h__
#include "nscore.h"
#include <math.h>
/// handy constants
#define TWIPS_PER_POINT_INT 20
#define TWIPS_PER_POINT_FLOAT 20.0f
#define ROUND_EXCLUSIVE_CONST_FLOAT 0.4999999999999999f // XXX this should be derived from platform FLOAT_MIN
#define ROUND_CONST_FLOAT 0.5f
#define CEIL_CONST_FLOAT 0.9999999999999999f // XXX this should be derived from platform FLOAT_MIN
/*
* Coord Rounding Functions
*/
inline nscoord NSToCoordFloor(float aValue)
{
return ((0.0f <= aValue) ? nscoord(aValue) : nscoord(aValue - CEIL_CONST_FLOAT));
}
inline nscoord NSToCoordCeil(float aValue)
{
return ((0.0f <= aValue) ? nscoord(aValue + CEIL_CONST_FLOAT) : nscoord(aValue));
}
inline nscoord NSToCoordRound(float aValue)
{
return ((0.0f <= aValue) ? nscoord(aValue + ROUND_CONST_FLOAT) : nscoord(aValue - ROUND_CONST_FLOAT));
}
inline nscoord NSToCoordRoundExclusive(float aValue)
{
return ((0.0f <= aValue) ? nscoord(aValue + ROUND_EXCLUSIVE_CONST_FLOAT) :
nscoord(aValue - ROUND_EXCLUSIVE_CONST_FLOAT));
}
/*
* Int Rounding Functions
*/
inline PRInt32 NSToIntFloor(float aValue)
{
return ((0.0f <= aValue) ? PRInt32(aValue) : PRInt32(aValue - CEIL_CONST_FLOAT));
}
inline PRInt32 NSToIntCeil(float aValue)
{
return ((0.0f <= aValue) ? PRInt32(aValue + CEIL_CONST_FLOAT) : PRInt32(aValue));
}
inline PRInt32 NSToIntRound(float aValue)
{
return ((0.0f <= aValue) ? PRInt32(aValue + ROUND_CONST_FLOAT) : PRInt32(aValue - ROUND_CONST_FLOAT));
}
inline PRInt32 NSToIntRoundExclusive(float aValue)
{
return ((0.0f <= aValue) ? PRInt32(aValue + ROUND_EXCLUSIVE_CONST_FLOAT) :
PRInt32(aValue - ROUND_EXCLUSIVE_CONST_FLOAT));
}
/*
* Twips/Points conversions
*/
inline nscoord NSFloatPointsToTwips(float aPoints)
{
return NSToCoordRound(aPoints * TWIPS_PER_POINT_FLOAT);
}
inline nscoord NSIntPointsToTwips(PRInt32 aPoints)
{
return nscoord(aPoints * TWIPS_PER_POINT_INT);
}
inline PRInt32 NSTwipsToIntPoints(nscoord aTwips)
{
return NSToIntRound(aTwips / TWIPS_PER_POINT_FLOAT);
}
inline PRInt32 NSTwipsToFloorIntPoints(nscoord aTwips)
{
return NSToIntFloor(aTwips / TWIPS_PER_POINT_FLOAT);
}
inline PRInt32 NSTwipsToCeilIntPoints(nscoord aTwips)
{
return NSToIntCeil(aTwips / TWIPS_PER_POINT_FLOAT);
}
inline float NSTwipsToFloatPoints(nscoord aTwips)
{
return (float(aTwips) / TWIPS_PER_POINT_FLOAT);
}
/*
* Twips/Pixel conversions
*/
inline nscoord NSFloatPixelsToTwips(float aPixels, float aTwipsPerPixel)
{
return NSToCoordRound(aPixels * aTwipsPerPixel);
}
inline nscoord NSIntPixelsToTwips(PRInt32 aPixels, float aTwipsPerPixel)
{
return NSToCoordRound(float(aPixels) * aTwipsPerPixel);
}
inline float NSTwipsToFloatPixels(nscoord aTwips, float aPixelsPerTwip)
{
return (float(aTwips) * aPixelsPerTwip);
}
inline PRInt32 NSTwipsToIntPixels(nscoord aTwips, float aPixelsPerTwip)
{
return NSToIntRound(float(aTwips) * aPixelsPerTwip);
}
/*
* Twips/unit conversions
*/
inline nscoord NSUnitsToTwips(float aValue, float aPointsPerUnit)
{
return NSToCoordRound(aValue * aPointsPerUnit * TWIPS_PER_POINT_FLOAT);
}
inline float NSTwipsToUnits(nscoord aTwips, float aUnitsPerPoint)
{
return (aTwips * (aUnitsPerPoint / TWIPS_PER_POINT_FLOAT));
}
/// Unit conversion macros
//@{
#define NS_INCHES_TO_TWIPS(x) NSUnitsToTwips((x), 72.0f) // 72 points per inch
#define NS_FEET_TO_TWIPS(x) NSUnitsToTwips((x), (72.0f * 12.0f)) // 12 inches per foot
#define NS_MILES_TO_TWIPS(x) NSUnitsToTwips((x), (72.0f * 12.0f * 5280.0f)) // 5280 feet per mile
#define NS_MILLIMETERS_TO_TWIPS(x) NSUnitsToTwips((x), (72.0f * 0.03937f))
#define NS_CENTIMETERS_TO_TWIPS(x) NSUnitsToTwips((x), (72.0f * 0.3937f))
#define NS_METERS_TO_TWIPS(x) NSUnitsToTwips((x), (72.0f * 39.37f))
#define NS_KILOMETERS_TO_TWIPS(x) NSUnitsToTwips((x), (72.0f * 39370.0f))
#define NS_PICAS_TO_TWIPS(x) NSUnitsToTwips((x), 12.0f) // 12 points per pica
#define NS_DIDOTS_TO_TWIPS(x) NSUnitsToTwips((x), (16.0f / 15.0f)) // 15 didots per 16 points
#define NS_CICEROS_TO_TWIPS(x) NSUnitsToTwips((x), (12.0f * (16.0f / 15.0f))) // 12 didots per cicero
#define NS_TWIPS_TO_INCHES(x) NSTwipsToUnits((x), 1.0f / 72.0f)
#define NS_TWIPS_TO_FEET(x) NSTwipsToUnits((x), 1.0f / (72.0f * 12.0f))
#define NS_TWIPS_TO_MILES(x) NSTwipsToUnits((x), 1.0f / (72.0f * 12.0f * 5280.0f))
#define NS_TWIPS_TO_MILLIMETERS(x) NSTwipsToUnits((x), 1.0f / (72.0f * 0.03937f))
#define NS_TWIPS_TO_CENTIMETERS(x) NSTwipsToUnits((x), 1.0f / (72.0f * 0.3937f))
#define NS_TWIPS_TO_METERS(x) NSTwipsToUnits((x), 1.0f / (72.0f * 39.37f))
#define NS_TWIPS_TO_KILOMETERS(x) NSTwipsToUnits((x), 1.0f / (72.0f * 39370.0f))
#define NS_TWIPS_TO_PICAS(x) NSTwipsToUnits((x), 1.0f / 12.0f)
#define NS_TWIPS_TO_DIDOTS(x) NSTwipsToUnits((x), 1.0f / (16.0f / 15.0f))
#define NS_TWIPS_TO_CICEROS(x) NSTwipsToUnits((x), 1.0f / (12.0f * (16.0f / 15.0f)))
//@}
#endif

View File

@@ -0,0 +1,411 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#include "nsVoidArray.h"
#include "nsCRT.h"
#include "nsISizeOfHandler.h"
#include "nsString.h"
static PRInt32 kGrowArrayBy = 8;
nsVoidArray::nsVoidArray()
{
mArray = nsnull;
mArraySize = 0;
mCount = 0;
}
nsVoidArray::nsVoidArray(PRInt32 aCount)
{
NS_PRECONDITION(aCount > 0, "bad count");
mCount = mArraySize = aCount;
mArray = new void*[mCount];
nsCRT::memset(mArray, 0, mCount * sizeof(void*));
}
nsVoidArray& nsVoidArray::operator=(const nsVoidArray& other)
{
if (nsnull != mArray) {
delete mArray;
}
PRInt32 otherCount = other.mCount;
mArraySize = otherCount;
mCount = otherCount;
if (otherCount != 0) {
mArray = new void*[otherCount];
nsCRT::memcpy(mArray, other.mArray, otherCount * sizeof(void*));
} else {
mArray = nsnull;
}
return *this;
}
nsVoidArray::~nsVoidArray()
{
if (nsnull != mArray) {
delete [] mArray;
}
}
void
nsVoidArray::SizeOf(nsISizeOfHandler* aHandler) const
{
aHandler->Add(sizeof(*this));
aHandler->Add(sizeof(void*) * mArraySize);
}
void* nsVoidArray::ElementAt(PRInt32 aIndex) const
{
if (PRUint32(aIndex) >= PRUint32(mCount)) {
return nsnull;
}
return mArray[aIndex];
}
PRInt32 nsVoidArray::IndexOf(void* aPossibleElement) const
{
void** ap = mArray;
void** end = ap + mCount;
while (ap < end) {
if (*ap == aPossibleElement) {
return ap - mArray;
}
ap++;
}
return -1;
}
PRBool nsVoidArray::InsertElementAt(void* aElement, PRInt32 aIndex)
{
PRInt32 oldCount = mCount;
if (PRUint32(aIndex) > PRUint32(oldCount)) {
// An invalid index causes the insertion to fail
return PR_FALSE;
}
if (oldCount + 1 > mArraySize) {
// We have to grow the array
PRInt32 newCount = oldCount + kGrowArrayBy;
void** newArray = new void*[newCount];
if (mArray != nsnull && aIndex != 0)
nsCRT::memcpy(newArray, mArray, aIndex * sizeof(void*));
PRInt32 slide = oldCount - aIndex;
if (0 != slide) {
// Slide data over to make room for the insertion
nsCRT::memcpy(newArray + aIndex + 1, mArray + aIndex,
slide * sizeof(void*));
}
if (mArray != nsnull)
delete [] mArray;
mArray = newArray;
mArraySize = newCount;
} else {
// The array is already large enough
PRInt32 slide = oldCount - aIndex;
if (0 != slide) {
// Slide data over to make room for the insertion
nsCRT::memmove(mArray + aIndex + 1, mArray + aIndex,
slide * sizeof(void*));
}
}
mArray[aIndex] = aElement;
mCount++;
return PR_TRUE;
}
PRBool nsVoidArray::ReplaceElementAt(void* aElement, PRInt32 aIndex)
{
if (PRUint32(aIndex) >= PRUint32(mArraySize)) {
PRInt32 requestedCount = aIndex + 1;
PRInt32 growDelta = requestedCount - mCount;
PRInt32 newCount = mCount + (growDelta > kGrowArrayBy ? growDelta : kGrowArrayBy);
void** newArray = new void*[newCount];
nsCRT::memset(newArray, 0, newCount * sizeof(void*));
if (newArray==nsnull)
return PR_FALSE;
if (mArray != nsnull && aIndex != 0) {
nsCRT::memcpy(newArray, mArray, mCount * sizeof(void*));
if (mArray != nsnull)
delete [] mArray;
}
mArray = newArray;
mArraySize = newCount;
}
mArray[aIndex] = aElement;
if (aIndex >= mCount)
mCount = aIndex+1;
return PR_TRUE;
}
PRBool nsVoidArray::RemoveElementAt(PRInt32 aIndex)
{
PRInt32 oldCount = mCount;
if (PRUint32(aIndex) >= PRUint32(oldCount)) {
// An invalid index causes the replace to fail
return PR_FALSE;
}
// We don't need to move any elements if we're removing the
// last element in the array
if (aIndex < (oldCount - 1)) {
nsCRT::memmove(mArray + aIndex, mArray + aIndex + 1,
(oldCount - 1 - aIndex) * sizeof(void*));
}
mCount--;
return PR_TRUE;
}
PRBool nsVoidArray::RemoveElement(void* aElement)
{
void** ep = mArray;
void** end = ep + mCount;
while (ep < end) {
void* e = *ep++;
if (e == aElement) {
ep--;
return RemoveElementAt(PRInt32(ep - mArray));
}
}
return PR_FALSE;
}
void nsVoidArray::Clear()
{
mCount = 0;
}
void nsVoidArray::Compact()
{
PRInt32 count = mCount;
if (mArraySize != count) {
void** newArray = new void*[count];
if (nsnull != newArray) {
nsCRT::memcpy(newArray, mArray, count * sizeof(void*));
delete [] mArray;
mArray = newArray;
mArraySize = count;
}
}
}
PRBool nsVoidArray::EnumerateForwards(nsVoidArrayEnumFunc aFunc, void* aData)
{
PRInt32 index = -1;
PRBool running = PR_TRUE;
while (running && (++index < mCount)) {
running = (*aFunc)(mArray[index], aData);
}
return running;
}
PRBool nsVoidArray::EnumerateBackwards(nsVoidArrayEnumFunc aFunc, void* aData)
{
PRInt32 index = mCount;
PRBool running = PR_TRUE;
while (running && (0 <= --index)) {
running = (*aFunc)(mArray[index], aData);
}
return running;
}
//----------------------------------------------------------------
// nsStringArray
nsStringArray::nsStringArray(void)
: nsVoidArray()
{
}
nsStringArray::~nsStringArray(void)
{
Clear();
}
nsStringArray&
nsStringArray::operator=(const nsStringArray& other)
{
if (nsnull != mArray) {
delete mArray;
}
PRInt32 otherCount = other.mCount;
mArraySize = otherCount;
mCount = otherCount;
if (0 < otherCount) {
mArray = new void*[otherCount];
while (0 <= --otherCount) {
nsString* otherString = (nsString*)(other.mArray[otherCount]);
mArray[otherCount] = new nsString(*otherString);
}
} else {
mArray = nsnull;
}
return *this;
}
void
nsStringArray::SizeOf(nsISizeOfHandler* aHandler) const
{
nsVoidArray::SizeOf(aHandler);
PRInt32 index = mCount;
while (0 <= --index) {
nsString* string = (nsString*)mArray[index];
string->SizeOf(aHandler);
}
}
void
nsStringArray::StringAt(PRInt32 aIndex, nsString& aString) const
{
nsString* string = (nsString*)nsVoidArray::ElementAt(aIndex);
if (nsnull != string) {
aString = *string;
}
else {
aString.Truncate();
}
}
nsString*
nsStringArray::StringAt(PRInt32 aIndex) const
{
return (nsString*)nsVoidArray::ElementAt(aIndex);
}
PRInt32
nsStringArray::IndexOf(const nsString& aPossibleString) const
{
void** ap = mArray;
void** end = ap + mCount;
while (ap < end) {
nsString* string = (nsString*)*ap;
if (string->Equals(aPossibleString)) {
return ap - mArray;
}
ap++;
}
return -1;
}
PRInt32
nsStringArray::IndexOfIgnoreCase(const nsString& aPossibleString) const
{
void** ap = mArray;
void** end = ap + mCount;
while (ap < end) {
nsString* string = (nsString*)*ap;
if (string->EqualsIgnoreCase(aPossibleString)) {
return ap - mArray;
}
ap++;
}
return -1;
}
PRBool
nsStringArray::InsertStringAt(const nsString& aString, PRInt32 aIndex)
{
nsString* string = new nsString(aString);
if (nsVoidArray::InsertElementAt(string, aIndex)) {
return PR_TRUE;
}
delete string;
return PR_FALSE;
}
PRBool
nsStringArray::ReplaceStringAt(const nsString& aString, PRInt32 aIndex)
{
nsString* string = (nsString*)nsVoidArray::ElementAt(aIndex);
if (nsnull != string) {
*string = aString;
return PR_TRUE;
}
return PR_FALSE;
}
PRBool
nsStringArray::RemoveString(const nsString& aString)
{
PRInt32 index = IndexOf(aString);
if (-1 < index) {
return RemoveStringAt(index);
}
return PR_FALSE;
}
PRBool
nsStringArray::RemoveStringIgnoreCase(const nsString& aString)
{
PRInt32 index = IndexOfIgnoreCase(aString);
if (-1 < index) {
return RemoveStringAt(index);
}
return PR_FALSE;
}
PRBool nsStringArray::RemoveStringAt(PRInt32 aIndex)
{
nsString* string = StringAt(aIndex);
if (nsnull != string) {
nsVoidArray::RemoveElementAt(aIndex);
delete string;
return PR_TRUE;
}
return PR_FALSE;
}
void
nsStringArray::Clear(void)
{
PRInt32 index = mCount;
while (0 <= --index) {
nsString* string = (nsString*)mArray[index];
delete string;
}
nsVoidArray::Clear();
}
PRBool
nsStringArray::EnumerateForwards(nsStringArrayEnumFunc aFunc, void* aData)
{
PRInt32 index = -1;
PRBool running = PR_TRUE;
while (running && (++index < mCount)) {
running = (*aFunc)(*((nsString*)mArray[index]), aData);
}
return running;
}
PRBool
nsStringArray::EnumerateBackwards(nsStringArrayEnumFunc aFunc, void* aData)
{
PRInt32 index = mCount;
PRBool running = PR_TRUE;
while (running && (0 <= --index)) {
running = (*aFunc)(*((nsString*)mArray[index]), aData);
}
return running;
}

View File

@@ -0,0 +1,125 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#ifndef nsVoidArray_h___
#define nsVoidArray_h___
#include "nscore.h"
class nsISizeOfHandler;
// Enumerator callback function. Return PR_FALSE to stop
typedef PRBool (*nsVoidArrayEnumFunc)(void* aElement, void *aData);
/// A basic zero-based array of void*'s that manages its own memory
class NS_BASE nsVoidArray {
public:
nsVoidArray();
nsVoidArray(PRInt32 aCount); // initial count of aCount elements set to nsnull
~nsVoidArray();
nsVoidArray& operator=(const nsVoidArray& other);
void SizeOf(nsISizeOfHandler* aHandler) const;
PRInt32 Count() const {
return mCount;
}
void* ElementAt(PRInt32 aIndex) const;
void* operator[](PRInt32 aIndex) const { return ElementAt(aIndex); }
PRInt32 IndexOf(void* aPossibleElement) const;
PRBool InsertElementAt(void* aElement, PRInt32 aIndex);
PRBool ReplaceElementAt(void* aElement, PRInt32 aIndex);
PRBool AppendElement(void* aElement) {
return InsertElementAt(aElement, mCount);
}
PRBool RemoveElement(void* aElement);
PRBool RemoveElementAt(PRInt32 aIndex);
void Clear();
void Compact();
PRBool EnumerateForwards(nsVoidArrayEnumFunc aFunc, void* aData);
PRBool EnumerateBackwards(nsVoidArrayEnumFunc aFunc, void* aData);
protected:
void** mArray;
PRInt32 mArraySize;
PRInt32 mCount;
private:
/// Copy constructors are not allowed
nsVoidArray(const nsVoidArray& other);
};
class nsString;
typedef PRBool (*nsStringArrayEnumFunc)(nsString& aElement, void *aData);
class NS_BASE nsStringArray: protected nsVoidArray
{
public:
nsStringArray(void);
~nsStringArray(void);
nsStringArray& operator=(const nsStringArray& other);
void SizeOf(nsISizeOfHandler* aHandler) const;
PRInt32 Count(void) const {
return mCount;
}
void StringAt(PRInt32 aIndex, nsString& aString) const;
nsString* StringAt(PRInt32 aIndex) const;
nsString* operator[](PRInt32 aIndex) const { return StringAt(aIndex); }
PRInt32 IndexOf(const nsString& aPossibleString) const;
PRInt32 IndexOfIgnoreCase(const nsString& aPossibleString) const;
PRBool InsertStringAt(const nsString& aString, PRInt32 aIndex);
PRBool ReplaceStringAt(const nsString& aString, PRInt32 aIndex);
PRBool AppendString(const nsString& aString) {
return InsertStringAt(aString, mCount);
}
PRBool RemoveString(const nsString& aString);
PRBool RemoveStringIgnoreCase(const nsString& aString);
PRBool RemoveStringAt(PRInt32 aIndex);
void Clear(void);
void Compact(void) {
nsVoidArray::Compact();
}
PRBool EnumerateForwards(nsStringArrayEnumFunc aFunc, void* aData);
PRBool EnumerateBackwards(nsStringArrayEnumFunc aFunc, void* aData);
private:
/// Copy constructors are not allowed
nsStringArray(const nsStringArray& other);
};
#endif /* nsVoidArray_h___ */

168
mozilla/base/src/nscore.h Normal file
View File

@@ -0,0 +1,168 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#ifndef nscore_h___
#define nscore_h___
#ifdef _WIN32
#define NS_WIN32 1
#endif
#if defined(__unix)
#define NS_UNIX 1
#endif
#include "prtypes.h"
#include "nsDebug.h"
/** ucs2 datatype for 2 byte unicode characters */
typedef PRUint16 PRUcs2;
/** ucs4 datatype for 4 byte unicode characters */
typedef PRUint32 PRUcs4;
#ifdef NS_UCS4
typedef PRUcs4 PRUnichar;
#else
typedef PRUcs2 PRUnichar;
#endif
/// The preferred symbol for null.
#define nsnull 0
/* Define brackets for protecting C code from C++ */
#ifdef __cplusplus
#define NS_BEGIN_EXTERN_C extern "C" {
#define NS_END_EXTERN_C }
#else
#define NS_BEGIN_EXTERN_C
#define NS_END_EXTERN_C
#endif
/*----------------------------------------------------------------------*/
/* Import/export defines */
#ifdef NS_WIN32
#define NS_IMPORT _declspec(dllimport)
#define NS_IMPORT_(type) type _declspec(dllimport) __stdcall
#define NS_EXPORT _declspec(dllexport)
// XXX NS_EXPORT_ defined in nsCOm.h (xpcom) differs in where the __declspec
// is placed. It needs to be done this way to make the 4.x compiler happy...
#undef NS_EXPORT_
#define NS_EXPORT_(type) type _declspec(dllexport) __stdcall
#elif defined(XP_MAC)
#define NS_IMPORT
#define NS_IMPORT_(type) type
// XXX NS_EXPORT_ defined in nsCom.h actually does an export. Here it's just sugar.
#undef NS_EXPORT
#undef NS_EXPORT_
#define NS_EXPORT __declspec(export)
#define NS_EXPORT_(type) type __declspec(export)
#else
/* XXX do something useful? */
#define NS_IMPORT
#define NS_IMPORT_(type) type
#define NS_EXPORT
#define NS_EXPORT_(type) type
#endif
#ifdef _IMPL_NS_BASE
#define NS_BASE NS_EXPORT
#else
#define NS_BASE NS_IMPORT
#endif
#ifdef _IMPL_NS_NET
#define NS_NET NS_EXPORT
#else
#define NS_NET NS_IMPORT
#endif
#ifdef _IMPL_NS_DOM
#define NS_DOM NS_EXPORT
#else
#define NS_DOM NS_IMPORT
#endif
#ifdef _IMPL_NS_WIDGET
#define NS_WIDGET NS_EXPORT
#else
#define NS_WIDGET NS_IMPORT
#endif
#ifdef _IMPL_NS_VIEW
#define NS_VIEW NS_EXPORT
#else
#define NS_VIEW NS_IMPORT
#endif
#ifdef _IMPL_NS_GFXNONXP
#define NS_GFXNONXP NS_EXPORT
#define NS_GFXNONXP_(type) NS_EXPORT_(type)
#else
#define NS_GFXNONXP NS_IMPORT
#define NS_GFXNONXP_(type) NS_IMPORT_(type)
#endif
#ifdef _IMPL_NS_GFX
#define NS_GFX NS_EXPORT
#define NS_GFX_(type) NS_EXPORT_(type)
#else
#define NS_GFX NS_IMPORT
#define NS_GFX_(type) NS_IMPORT_(type)
#endif
#ifdef _IMPL_NS_PLUGIN
#define NS_PLUGIN NS_EXPORT
#else
#define NS_PLUGIN NS_IMPORT
#endif
#ifdef _IMPL_NS_APPSHELL
#define NS_APPSHELL NS_EXPORT
#else
#define NS_APPSHELL NS_IMPORT
#endif
/* ------------------------------------------------------------------------ */
// Casting macros for hiding C++ features from older compilers
// unix now determines this automatically
#ifndef XP_UNIX
#define HAVE_CPP_NEW_CASTS // we'll be optimistic.
#endif
#if defined(HAVE_CPP_NEW_CASTS)
#define NS_STATIC_CAST(__type, __ptr) static_cast<__type>(__ptr)
#define NS_CONST_CAST(__type, __ptr) const_cast<__type>(__ptr)
#define NS_REINTERPRET_CAST(__type, __ptr) reinterpret_cast<__type>(__ptr)
#else
#define NS_STATIC_CAST(__type, __ptr) ((__type)(__ptr))
#define NS_CONST_CAST(__type, __ptr) ((__type)(__ptr))
#define NS_REINTERPRET_CAST(__type, __ptr) ((__type)(__ptr))
#endif
// No sense in making an NS_DYNAMIC_CAST() macro: you can't duplicate
// the semantics. So if you want to dynamic_cast, then just use it
// "straight", no macro.
#endif /* nscore_h___ */

View File

@@ -0,0 +1,47 @@
#!gmake
#
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL. You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
# Reserved.
DEPTH = ../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
LIBRARY_NAME = gmbaseunix
MODULE=base
REQUIRES=xpcom raptor
DEFINES += -D_IMPL_NS_WIDGET
CPPSRCS= \
nsTimer.cpp
CPP_OBJS= \
./$(OBJDIR)/nsTimer.o \
$(NULL)
include $(topsrcdir)/config/config.mk
TARGETS = $(LIBRARY)
include $(topsrcdir)/config/rules.mk

View File

@@ -0,0 +1,39 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#include "nscore.h"
#include "nsCaretProperties.h"
//-----------------------------------------------------------------------------
nsCaretProperties::nsCaretProperties()
: mCaretWidth(eDefaultCaretWidth)
, mBlinkRate(eDefaulBlinkRate)
{
// in your platform-specific class, get data from the OS in your constructor
}
//-----------------------------------------------------------------------------
nsCaretProperties* NewCaretProperties()
{
return new nsCaretProperties();
}

View File

@@ -0,0 +1,200 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#include "nsITimer.h"
#include "nsITimerCallback.h"
#include "nsCRT.h"
#include "prlog.h"
#include <stdio.h>
#include <limits.h>
//
// Copied from the unix version, Rhapsody needs to
// make this work. Stubs to compile things for now.
//
#if 0
Michael Hanni <mhanni@sprintmail.com> suggests:
I understand that nsTimer.cpp in base/rhapsody/ needs to be completed,
yes? Wouldn't this code just use some NSTimers in the NSRunLoop?
Timer = [NSTimer timerWithTimeInterval:0.02 //seconds
target:self
selector:@selector(doThis:)
userInfo:nil
repeats:YES];
[[NSRunLoop currentRunLoop] addTimer:Timer
forMode:NSDefaultRunLoopMode];
I only looked at nsTimer.cpp briefly, but could something like this work
if imbedded in all that c++? ;-)
#endif
static NS_DEFINE_IID(kITimerIID, NS_ITIMER_IID);
extern void nsTimerExpired(void *aCallData);
class TimerImpl : public nsITimer {
public:
public:
TimerImpl();
virtual ~TimerImpl();
virtual nsresult Init(nsTimerCallbackFunc aFunc,
void *aClosure,
// PRBool aRepeat,
PRUint32 aDelay);
virtual nsresult Init(nsITimerCallback *aCallback,
// PRBool aRepeat,
PRUint32 aDelay);
NS_DECL_ISUPPORTS
virtual void Cancel();
virtual PRUint32 GetDelay() { return mDelay; }
virtual void SetDelay(PRUint32 aDelay) { mDelay=aDelay; };
virtual void* GetClosure() { return mClosure; }
void FireTimeout();
private:
nsresult Init(PRUint32 aDelay);
PRUint32 mDelay;
nsTimerCallbackFunc mFunc;
void *mClosure;
nsITimerCallback *mCallback;
// PRBool mRepeat;
TimerImpl *mNext;
int mTimerId;
};
void TimerImpl::FireTimeout()
{
if (mFunc != NULL) {
(*mFunc)(this, mClosure);
}
else if (mCallback != NULL) {
mCallback->Notify(this); // Fire the timer
}
// Always repeating here
// if (mRepeat)
// mTimerId = XtAppAddTimeOut(gAppContext, GetDelay(),(XtTimerCallbackProc)nsTimerExpired, this);
}
TimerImpl::TimerImpl()
{
NS_INIT_REFCNT();
mFunc = NULL;
mCallback = NULL;
mNext = NULL;
mTimerId = 0;
mDelay = 0;
mClosure = NULL;
}
TimerImpl::~TimerImpl()
{
}
nsresult
TimerImpl::Init(nsTimerCallbackFunc aFunc,
void *aClosure,
// PRBool aRepeat,
PRUint32 aDelay)
{
mFunc = aFunc;
mClosure = aClosure;
// mRepeat = aRepeat;
printf("TimerImpl::Init() not implemented\n");
#ifdef RHAPSODY_NEEDS_TO_IMPLEMENT_THIS
mTimerId = XtAppAddTimeOut(gAppContext, aDelay,(XtTimerCallbackProc)nsTimerExpired, this);
#endif
return Init(aDelay);
}
nsresult
TimerImpl::Init(nsITimerCallback *aCallback,
// PRBool aRepeat,
PRUint32 aDelay)
{
mCallback = aCallback;
// mRepeat = aRepeat;
printf("TimerImpl::Init() not implmented.\n");
#ifdef RHAPSODY_NEEDS_TO_IMPLEMENT_THIS
mTimerId = XtAppAddTimeOut(gAppContext, aDelay, (XtTimerCallbackProc)nsTimerExpired, this);
#endif
return Init(aDelay);
}
nsresult
TimerImpl::Init(PRUint32 aDelay)
{
mDelay = aDelay;
NS_ADDREF(this);
return NS_OK;
}
NS_IMPL_ISUPPORTS(TimerImpl, kITimerIID)
void
TimerImpl::Cancel()
{
printf("TimerImpl::Cancel() not implemented.\n");
#ifdef RHAPSODY_NEEDS_TO_IMPLEMENT_THIS
XtRemoveTimeOut(mTimerId);
#endif
}
NS_BASE nsresult NS_NewTimer(nsITimer** aInstancePtrResult)
{
NS_PRECONDITION(nsnull != aInstancePtrResult, "null ptr");
if (nsnull == aInstancePtrResult) {
return NS_ERROR_NULL_POINTER;
}
TimerImpl *timer = new TimerImpl();
if (nsnull == timer) {
return NS_ERROR_OUT_OF_MEMORY;
}
return timer->QueryInterface(kITimerIID, (void **) aInstancePtrResult);
}
void nsTimerExpired(void *aCallData)
{
TimerImpl* timer = (TimerImpl *)aCallData;
timer->FireTimeout();
}

Some files were not shown because too many files have changed in this diff Show More