Compare commits

..

1489 Commits

Author SHA1 Message Date
fur%netscape.com
1c43d4984f This is a copy of regalloc_code2_BRANCH from Netscape's private repository,
as it existed in January of 1998.


git-svn-id: svn://10.0.0.236/branches/regalloc_code2_BRANCH@22571 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 16:12:08 +00:00
(no author)
cfe021ff88 This commit was manufactured by cvs2svn to create branch
'regalloc_code2_BRANCH'.

git-svn-id: svn://10.0.0.236/branches/regalloc_code2_BRANCH@22567 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 15:57:58 +00:00
fur%netscape.com
9789a62ec6 Change c-basic-offset in header to 4, instead of 2
git-svn-id: svn://10.0.0.236/trunk@22565 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 15:57:56 +00:00
brade%netscape.com
96fb4a86c6 add prototype for NS_NewRDFInMemoryDataSource to reduce Macintosh compiler warnings
git-svn-id: svn://10.0.0.236/trunk@22564 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 15:30:28 +00:00
brade%netscape.com
b77aa3b2d1 add static to reduce compiiler warnings on Macintosh
git-svn-id: svn://10.0.0.236/trunk@22563 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 15:28:46 +00:00
brade%netscape.com
8a821da6c1 add dtd; cleanup
git-svn-id: svn://10.0.0.236/trunk@22562 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 15:26:37 +00:00
brade%netscape.com
e6fbc4c382 add dtd, buttons; cleanup
git-svn-id: svn://10.0.0.236/trunk@22561 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 15:23:57 +00:00
brade%netscape.com
2829351851 add dtd, cleanup
git-svn-id: svn://10.0.0.236/trunk@22560 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 15:23:28 +00:00
brade%netscape.com
b61777731a add dtd
git-svn-id: svn://10.0.0.236/trunk@22559 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 15:20:35 +00:00
brade%netscape.com
3dd995e0ea add dtd, convert to entities, cleanup
git-svn-id: svn://10.0.0.236/trunk@22558 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 15:20:16 +00:00
brade%netscape.com
932a848fb0 add dtd; cleanup
git-svn-id: svn://10.0.0.236/trunk@22557 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 15:19:23 +00:00
brade%netscape.com
79a7510984 *** empty log message ***
git-svn-id: svn://10.0.0.236/trunk@22556 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 15:18:54 +00:00
brade%netscape.com
dc6b22194c add static to LegendHack() to reduce compiler warnings on Macintosh
git-svn-id: svn://10.0.0.236/trunk@22555 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 15:17:35 +00:00
brade%netscape.com
aeb3fcb6d7 add static to reduce compiler warnings on Macintosh
git-svn-id: svn://10.0.0.236/trunk@22554 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 15:17:14 +00:00
brade%netscape.com
90c1429745 reduce Macintosh compiler warnings by making function static
git-svn-id: svn://10.0.0.236/trunk@22553 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 15:15:46 +00:00
brade%netscape.com
de15c96e7b add "static" to reduce compiler warnings on Macintosh
git-svn-id: svn://10.0.0.236/trunk@22552 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 15:13:29 +00:00
cls%seawood.org
043cab15f3 Fixed problem with ondblclick being released w/o being allocated. Appeared to be a copy-n-paste oversight.
git-svn-id: svn://10.0.0.236/trunk@22551 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 10:20:52 +00:00
jband%netscape.com
e8d76f613d added some XPConnect dirs to the list
git-svn-id: svn://10.0.0.236/trunk@22547 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 08:19:10 +00:00
jband%netscape.com
9da670ea9b makefile fixups to get xptinfo working on Win32. Added xptinfo.h for public dll declarations
git-svn-id: svn://10.0.0.236/trunk@22545 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 07:59:53 +00:00
jband%netscape.com
3a268a8dc6 fixed some makefile flags
git-svn-id: svn://10.0.0.236/trunk@22544 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 07:55:42 +00:00
buster%netscape.com
19e607046b implemented GetTextProperty -- only works for bold and italic now,
trivial to add more properties
finished first cut at SetTextProperty.  This triggers lots of crashes in
range/selection code where we're holding onto a stale frame pointer (at
least, that's my best guess.)
synched with Charlie's change-o-rama
added an assert in DeleteTextTxn::Init() checking aNumCharsToDelete vs.
0
  NS_ASSERTION(0!=aNumCharsToDelete, "bad arg, numCharsToDelete");
if the number of chars to delete is 0, we shouldn't be creating a
transaction at all.  I had never seen this condition arise before
Charlie's checkin, I don't know if he introduced it or if it was a
latent bug I just never tripped over before.


git-svn-id: svn://10.0.0.236/trunk@22543 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 07:52:41 +00:00
mcafee%netscape.com
11b75bfd7c cdefs.h and mcom_db.h also exist in mozilla/include, merging some changes over to these versions in anticipation of retiring the mozilla/include versions of these files.
git-svn-id: svn://10.0.0.236/trunk@22542 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 07:47:29 +00:00
waterson%netscape.com
e4c96b1a9c Added code to spy on the xul:open attribute; we now force content construction when a node is opened and release the children when it is closed.
git-svn-id: svn://10.0.0.236/trunk@22541 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 07:34:32 +00:00
waterson%netscape.com
2ea932b826 Create cell children _before_ adding the tree row to the tree. Removed unnecessary calls to FindTreeElement() where just using mRoot would do.
git-svn-id: svn://10.0.0.236/trunk@22540 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 07:33:45 +00:00
cmanske%netscape.com
746fe83415 Fixed mismatched declarations/implementations
git-svn-id: svn://10.0.0.236/trunk@22539 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 07:13:45 +00:00
mccabe%netscape.com
ddf198d345 Not yet part of Seamonkey.
Changed from using malloc to (much less, but still slightly) hacked
nsIAllocator service.


git-svn-id: svn://10.0.0.236/trunk@22538 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 05:38:27 +00:00
cmanske%netscape.com
eafa393b89 added files: mozilla/editor/base/InsertTableTxn.cpp, mozilla/editor/base/InsertTableCellTxn.cpp, mozilla/editor/base/InsertTableColumnTxn.cpp, mozilla/editor/base/InsertTableRowTxn.cpp, mozilla/editor/base/DeleteTableTxn.cpp, mozilla/editor/base/DeleteTableCellTxn.cpp, mozilla/editor/base/DeleteTableColumnTxn.cpp, mozilla/editor/base/DeleteTableRowTxn.cpp, mozilla/editor/base/JoinTableCellsTxn.cpp, mozilla/editor/base/nsHTMLEditor.cpp, mozilla/editor/base/EditTable.cpp, mozilla/editor/base/nsHTMLEditFactory.cpp
git-svn-id: svn://10.0.0.236/trunk@22537 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 05:32:29 +00:00
cmanske%netscape.com
e91953e14c Changed editor AppCore to use nsHTMLEditor instead of nsTextEditor
git-svn-id: svn://10.0.0.236/trunk@22536 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 05:32:25 +00:00
cmanske%netscape.com
1fc7d6718f Changed viewer to use nsHTMLEditor instead of nsTextEditor
git-svn-id: svn://10.0.0.236/trunk@22535 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 05:31:41 +00:00
cmanske%netscape.com
202c5b89dc Implemented nsHTMLEditor. Changed prototypes to be use NS_IMETHOD and NS_IMETHODIMP. Started table editing transactions
git-svn-id: svn://10.0.0.236/trunk@22534 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 05:30:53 +00:00
mccabe%netscape.com
0217662ca2 Not yet part of the seamonkey build.
Moved nsInterfaceInfoManager files from the libxpt directory (where
they would have precipitated an unpleasant circular dependency between
xpidl and nsISupports.h) into a new subdirectory.

Added corresponding entries to allmakefiles.sh.

nsInterfaceInfoManager is intended to abstract the loading and
management of typelib information generated by xpidl, for use by
xpconnect.


git-svn-id: svn://10.0.0.236/trunk@22533 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 05:21:31 +00:00
evaughan%netscape.com
e361d199bf Made the image accessible from CSS via list-style-image.
git-svn-id: svn://10.0.0.236/trunk@22532 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 05:00:51 +00:00
beard%netscape.com
9f8f8bbc42 Added Release to peer's destructor, delaying release of stream until NPP_URLNotify.
git-svn-id: svn://10.0.0.236/trunk@22531 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 04:46:05 +00:00
beard%netscape.com
875193d236 First Checked In.
git-svn-id: svn://10.0.0.236/trunk@22530 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 04:43:30 +00:00
beard%netscape.com
4fb64bc2c7 added async parameter to send().
git-svn-id: svn://10.0.0.236/trunk@22529 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 04:42:38 +00:00
beard%netscape.com
3fa226c57e implements nsIPluginStreamListener, to handle javascript: URLs.
git-svn-id: svn://10.0.0.236/trunk@22528 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 04:42:35 +00:00
beard%netscape.com
0b7b11b462 added setCodeBase().
git-svn-id: svn://10.0.0.236/trunk@22527 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 04:42:31 +00:00
beard%netscape.com
97dca30b56 added setCodeBase(), running showDocument() in Java thread.
git-svn-id: svn://10.0.0.236/trunk@22526 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 04:42:30 +00:00
beard%netscape.com
777eadcf18 turned on C++ compiler for syntax checking header files.
git-svn-id: svn://10.0.0.236/trunk@22525 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 04:42:28 +00:00
beard%netscape.com
813c2f226b Resizes correctly, took out call to codebase(), plugin now computes codebase with JavaScript.
git-svn-id: svn://10.0.0.236/trunk@22524 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 04:38:45 +00:00
sfraser%netscape.com
8eb1658e33 Fix the caret so that it draws on Windows (and UNIX, hopefully), and turn on the #define so that the caret gets created in the pres shell. It gets shown in editor mode.
git-svn-id: svn://10.0.0.236/trunk@22523 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 04:26:49 +00:00
sfraser%netscape.com
2248f68b22 Make the caret width a twips value, instead of pixels.
git-svn-id: svn://10.0.0.236/trunk@22522 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 04:25:11 +00:00
rjc%netscape.com
5d133ee642 ChildAt(0) can return NULL, so check for it!
git-svn-id: svn://10.0.0.236/trunk@22521 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 04:07:10 +00:00
rjc%netscape.com
863a2fb603 Fix array offset.
git-svn-id: svn://10.0.0.236/trunk@22520 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 04:05:10 +00:00
nisheeth%netscape.com
5b60582d89 - Changed the way the expat parser is encapsulated. Now, the expat DTD creates and destroys the expat parser and registers callbacks with the expat parser. The expat tokenizer simply gets the entire buffer contents from the scanner and passes it to ParseXMLBuffer() on the expat DTD. Earlier, the expat tokenizer was encapsulating the expat parser behind its interfaces. This change gets rid of nsIExpatTokenizer because the expat tokenizer no longer needs to expose methods for registering callbacks with the expat parser.
git-svn-id: svn://10.0.0.236/trunk@22519 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 04:02:23 +00:00
jband%netscape.com
b2603c0b11 some fixes pointed out by purify. Tests better verify that wrappers are not leaking
git-svn-id: svn://10.0.0.236/trunk@22518 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 03:32:42 +00:00
pollmann%netscape.com
2aa51a7e02 Cleanup: Use the GetPrimary Frame in nsGenericHTMLElement. Enable fetching selectedIndex before frame creation (using DefaultSelected instead of Selected) Bug #3340
git-svn-id: svn://10.0.0.236/trunk@22517 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 03:31:17 +00:00
pollmann%netscape.com
af6fe42eb6 Enable GetSelected for options inside of option groups. (Fix GetPrimaryFrame)
git-svn-id: svn://10.0.0.236/trunk@22516 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 03:26:29 +00:00
pollmann%netscape.com
95b65d4e20 Cleanup: return NS_NOINTERFACE not NS_OK if getting the primary frame fails.
git-svn-id: svn://10.0.0.236/trunk@22515 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 03:22:45 +00:00
pollmann%netscape.com
4b77b70cb2 Fix change notifications for combo boxes.
git-svn-id: svn://10.0.0.236/trunk@22514 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 03:19:25 +00:00
nisheeth%netscape.com
b045982ba5 nsParser.cpp would not compile if the EXPAT compiler define was set because I had
not included nsExpatDTD.h.  Now, nsExpatDTD.h gets included if EXPAT is set.


git-svn-id: svn://10.0.0.236/trunk@22513 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 03:03:52 +00:00
brendan%netscape.com
da11cc260c Deal with wstring in .idl files correctly, or at least better.
git-svn-id: svn://10.0.0.236/trunk@22512 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 03:01:39 +00:00
nisheeth%netscape.com
a2d8875807 We no longer call RegisterDTD() on nsParser when initiating parsing of XML
documents.


git-svn-id: svn://10.0.0.236/trunk@22511 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 02:58:25 +00:00
brendan%netscape.com
6a4bb56bf2 Use new 'W' format with JS_ConvertArguments to get PRUnichar* out.
git-svn-id: svn://10.0.0.236/trunk@22510 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 02:51:33 +00:00
brendan%netscape.com
e77361e332 - Added 'W' format to JS_ConvertArguments, for conversion to string and return
via a jschar* out parameter.
- Fused common string conversion and argv[i] GC-rooting code in JS_ConvertArgs.
- Added to cvtargs test command, which really needs to stop using a hardwired
  format string!
- Fixed char-typed fgetc-receiving variable to be of int type for correct EOF
  comparison on machines with unsigned chars.


git-svn-id: svn://10.0.0.236/trunk@22509 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 02:38:45 +00:00
mcmullen%netscape.com
340fc37aa3 Took another one for nsIRandomAccessData.
git-svn-id: svn://10.0.0.236/trunk@22508 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 02:24:46 +00:00
rjc%netscape.com
4426076367 Bug fix: Sort on all child nodes.
git-svn-id: svn://10.0.0.236/trunk@22507 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 02:17:16 +00:00
hyatt%netscape.com
f853b0251d Changing the GetAttribute and SetAttribute calls to properly use the namespace
of NONE (instead of XUL).


git-svn-id: svn://10.0.0.236/trunk@22506 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 02:04:45 +00:00
terry%netscape.com
0834acefe2 Got rid of the "bonsai-hook@warp" nonsense. Added an optional "cchookmail"
entry in the config file, to allow us to set people who always get
CC'd on mail to the hook.


git-svn-id: svn://10.0.0.236/trunk@22505 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 01:55:49 +00:00
waterson%netscape.com
9ed6ac1dab Fixed sloppiness with nsCOMPtr's that Win32 compiler didn't pick up.
git-svn-id: svn://10.0.0.236/trunk@22504 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 01:47:18 +00:00
briano%netscape.com
0363f883d4 Automated update
git-svn-id: svn://10.0.0.236/trunk@22503 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 01:45:38 +00:00
alecf%netscape.com
1640345a6b fix AIX bustage - explicitly refer to parent constructor even though it's within
the scope of this constructor..


git-svn-id: svn://10.0.0.236/trunk@22502 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 01:44:07 +00:00
waterson%netscape.com
19d034434e Modified so that resource implementation registers _self_, rather than relying on the RDF service to do it. Also, added global static reference to RDF service.
git-svn-id: svn://10.0.0.236/trunk@22501 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 01:44:01 +00:00
ftang%netscape.com
b6b33c230f check in prototype code for orderid formater
git-svn-id: svn://10.0.0.236/trunk@22500 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 01:43:00 +00:00
alecf%netscape.com
2a1e455f1f fix linux -pedantic build - compiler confused by too much casting
git-svn-id: svn://10.0.0.236/trunk@22499 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 01:41:45 +00:00
alecf%netscape.com
dc213e6802 fix AIX bustage - compiler confused by too much casting
git-svn-id: svn://10.0.0.236/trunk@22498 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 01:40:52 +00:00
waterson%netscape.com
92c5a832b4 Whoops. Fixed a misnamed header file that Unix case-sensitiveness busts on.
git-svn-id: svn://10.0.0.236/trunk@22497 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 01:40:41 +00:00
alecf%netscape.com
f1139651d9 fix const-ness problem that was plaguing AIX and Linux -pedantic
git-svn-id: svn://10.0.0.236/trunk@22496 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 01:39:23 +00:00
waterson%netscape.com
ac51e62513 General clean-up. Use RDF containers instead of multi-attributes.
git-svn-id: svn://10.0.0.236/trunk@22495 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 01:38:34 +00:00
waterson%netscape.com
08eb228c3d Added DOM observer stubs. Modified tree property lookup (now called 'containment') to look up the tree for a special tag. Modified generation code to only produce children for 'open' nodes.
git-svn-id: svn://10.0.0.236/trunk@22494 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 01:37:10 +00:00
briano%netscape.com
576290b04d Fixes for the SunOS 4 build.
git-svn-id: svn://10.0.0.236/trunk@22493 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 01:36:48 +00:00
waterson%netscape.com
77dee61cf8 Removed spurious comment.
git-svn-id: svn://10.0.0.236/trunk@22492 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 01:33:49 +00:00
slamm%netscape.com
9855b242ca -mput back the 'who' link too. So much for my byte savings. Need to find a way to test for JavaScript.
git-svn-id: svn://10.0.0.236/trunk@22491 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 01:30:24 +00:00
evaughan%netscape.com
a29ac956d2 Fixed button to respond to the list-style-image property on CSS
git-svn-id: svn://10.0.0.236/trunk@22490 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 01:25:33 +00:00
slamm%netscape.com
2fdb50250d Don't rely on 'onclick' handler and pay the price for people who might not use javascript.
git-svn-id: svn://10.0.0.236/trunk@22489 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 01:14:21 +00:00
terry%netscape.com
d2a92c7e70 Changed qa contact for NGLayout's "Layout" component to be peterson.
git-svn-id: svn://10.0.0.236/trunk@22488 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 01:07:31 +00:00
hyatt%netscape.com
7c82f53dcb Modified ContentInserted (for XUL only) to support the tree widget's
wacky frame construction code.


git-svn-id: svn://10.0.0.236/trunk@22487 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 01:07:28 +00:00
briano%netscape.com
f8260c7b52 Added support for QNX.
git-svn-id: svn://10.0.0.236/trunk@22486 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 01:05:04 +00:00
waterson%netscape.com
dd0b409fce Removed code that was #if 0-ed.
git-svn-id: svn://10.0.0.236/trunk@22485 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 01:01:52 +00:00
waterson%netscape.com
cb5103544a Got rid of PrefixMap(), which was obsoleted by Warren's changes to use the repository. Added some assertions to ease debugging. Altered GetResource() and GetDataSource() to _not_ automatically register the resource/datasource; rather, the resource/datasource's Init() method should do that. ClGot rid of PR_smptrinf() calls in favor of nsAutoString stuff.
git-svn-id: svn://10.0.0.236/trunk@22484 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 01:00:45 +00:00
waterson%netscape.com
02c6b594e8 Updated documentation on ReigsterDataSource() && RegisterResource().
git-svn-id: svn://10.0.0.236/trunk@22483 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 00:59:03 +00:00
wtc%netscape.com
48cd560372 Another update from the internal CVS repository /m/src to mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@22482 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 00:58:34 +00:00
cls%seawood.org
c7bff4d0a0 Moved optimization filtering so that OS_CFLAGS doesn't get evaluated prematurely.
git-svn-id: svn://10.0.0.236/trunk@22481 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 00:54:31 +00:00
pollmann%netscape.com
1780b536cd Allow windows text widgets to update readonly state on the fly, as gtk already does.
git-svn-id: svn://10.0.0.236/trunk@22480 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 00:48:22 +00:00
akkana%netscape.com
48e5972c0f Fix potential leak of content sink
git-svn-id: svn://10.0.0.236/trunk@22479 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 00:47:43 +00:00
slamm%netscape.com
13a1bc9b8f Reduce the number of bytes returned.
git-svn-id: svn://10.0.0.236/trunk@22478 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 00:41:31 +00:00
cyeh%netscape.com
85f0f03d2a knod of the head to sfraser, for reminding me that you need to also initialize processInfoRec with the size of the process record.
git-svn-id: svn://10.0.0.236/trunk@22477 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 00:34:49 +00:00
terry%netscape.com
0f85dc8978 Wasn't quoting the "%" correctly in people's e-mail addresses.
git-svn-id: svn://10.0.0.236/trunk@22476 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 00:06:06 +00:00
cyeh%netscape.com
51f89d1297 (really cyeh) fix crashing bug in optimized builds of viewer, but i'm really suprised that this didn't crash more often.
per Inside Macintosh: Processes: you must initialize the ProcessInfoRec with the address to a valid FSSpec and at least 32 bytes of memory if you want the name of the process. if you do not want the name of the process, pass in nil into ProcessInfoRec.processName. We were crashing because the value of PIR.processName was uninitialized, and we were copying the name of the application into random memory.


git-svn-id: svn://10.0.0.236/trunk@22475 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 00:03:30 +00:00
despotdaemon%netscape.com
58cd3e91d0 Pseudo-automatic update of changes made by dhiren@nuvomedia.com.
git-svn-id: svn://10.0.0.236/trunk@22474 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 00:01:14 +00:00
bienvenu%netscape.com
8e4e9ef6d5 add version number to msg database
git-svn-id: svn://10.0.0.236/trunk@22473 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-01 23:34:30 +00:00
alecf%netscape.com
c0859e41c3 make unix build the entire base directory into one .so
git-svn-id: svn://10.0.0.236/trunk@22472 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-01 23:23:35 +00:00
pnunn%netscape.com
b7491db3cc created. -pnunn
git-svn-id: svn://10.0.0.236/trunk@22471 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-01 22:40:55 +00:00
mscott%netscape.com
a58a435800 Correctly build the toolbar and menu items for the mail 3-pane. They used to be expressed in msgbar.xul but it doesn't seem to like it when they are defined that way. I also assumed that xul was the default name space and removed all "xul:" tags. Forced hard coded height and width values for each of the panes. These values are actually from a patch that Candice sent me.
git-svn-id: svn://10.0.0.236/trunk@22470 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-01 22:13:14 +00:00
mscott%netscape.com
d4cbf311f7 Export delmsg.gif because we don't have an icon for this yet...
git-svn-id: svn://10.0.0.236/trunk@22469 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-01 22:11:56 +00:00
alecf%netscape.com
7b51871d6a move old nsIMessenger interface and move into base/
git-svn-id: svn://10.0.0.236/trunk@22468 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-01 21:54:40 +00:00
dougt%netscape.com
dd3f8247a9 massive changes.
git-svn-id: svn://10.0.0.236/trunk@22467 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-01 21:35:13 +00:00
akkana%netscape.com
e39b4ff154 include the parser library too
git-svn-id: svn://10.0.0.236/trunk@22466 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-01 20:46:08 +00:00
leaf%mozilla.org
9e46ea97c1 Fixing the dependency on mozilla/config (yanked the include, removed the $(NMAKE)
references. Approved: sar


git-svn-id: svn://10.0.0.236/trunk@22465 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-01 20:16:01 +00:00
cmanske%netscape.com
e5de2ef497 Added exported header file for nsHTMLEditor
git-svn-id: svn://10.0.0.236/trunk@22464 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-01 19:55:43 +00:00
cmanske%netscape.com
e768f77e73 New files for nsHTMLEditor and table editing transactions (not working yet)
git-svn-id: svn://10.0.0.236/trunk@22463 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-01 19:54:47 +00:00
karnaze%netscape.com
3837aaafce bug 3347
git-svn-id: svn://10.0.0.236/trunk@22462 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-01 19:25:47 +00:00
pinkerton%netscape.com
0a518ff5d3 some hacks (and ifdefs) for macOS until NSPR gets fixed. This at least allows us to test out libReg and find bugs.
git-svn-id: svn://10.0.0.236/trunk@22461 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-01 19:24:27 +00:00
akkana%netscape.com
303a2467a4 Move bulk of DoCopy code from nsBrowserWindow.cpp into nsPresShell
git-svn-id: svn://10.0.0.236/trunk@22460 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-01 19:21:01 +00:00
mscott%netscape.com
03988b3d6a Experimenting with my first idl file. This interface will allow us to have the application (or the code that wants to run a url) to be a listener on that url. we'd like to see something like this get pushed into netlib.
git-svn-id: svn://10.0.0.236/trunk@22459 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-01 19:16:31 +00:00
law%netscape.com
fd87815682 Fix recursion problem
git-svn-id: svn://10.0.0.236/trunk@22458 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-01 19:06:27 +00:00
harishd%netscape.com
113dd31506 Enabling P tag autoclosuer at HR
git-svn-id: svn://10.0.0.236/trunk@22457 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-01 18:56:20 +00:00
bienvenu%netscape.com
e0ded8d07f rename mk_TraceMsg to ns_mkTraceMsg to fix link error
git-svn-id: svn://10.0.0.236/trunk@22456 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-01 18:38:26 +00:00
beard%netscape.com
af5f1235c4 registering GenericFactory component
git-svn-id: svn://10.0.0.236/trunk@22455 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-01 18:09:13 +00:00
putterman%netscape.com
c3e3b1e67e added threadPane.css
git-svn-id: svn://10.0.0.236/trunk@22454 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-01 18:07:22 +00:00
putterman%netscape.com
031a23772b Added threadPane.css
git-svn-id: svn://10.0.0.236/trunk@22453 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-01 18:06:58 +00:00
rods%netscape.com
9ae1a51751 Added method
git-svn-id: svn://10.0.0.236/trunk@22452 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-01 17:52:22 +00:00
pinkerton%netscape.com
d8b06455af make the hack for macos to not use libreg easier to turn on and off to make it easier to work on a fix.
git-svn-id: svn://10.0.0.236/trunk@22451 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-01 17:47:28 +00:00
pinkerton%netscape.com
b3427e2a63 correctly implement nsIMenuListener.
git-svn-id: svn://10.0.0.236/trunk@22450 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-01 17:30:14 +00:00
rods%netscape.com
5a1bf02774 Added forward decl
git-svn-id: svn://10.0.0.236/trunk@22449 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-01 17:08:13 +00:00
rods%netscape.com
f9ff0cab61 Added new method
git-svn-id: svn://10.0.0.236/trunk@22448 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-01 17:03:21 +00:00
vidur%netscape.com
a01e1fe820 Temp fix to allow SCRIPT elements in SELECT elements.
git-svn-id: svn://10.0.0.236/trunk@22447 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-01 17:00:51 +00:00
rods%netscape.com
d756a36bab Added arible
git-svn-id: svn://10.0.0.236/trunk@22446 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-01 17:00:24 +00:00
vidur%netscape.com
83118f458a Fixed MAP elements to conform to HTML 4.0. Hooked up attribute changes for MAP, AREA and ANCHOR elements. Added RECONSTRUCT_ALL as a style hint for attribute changes. Modified nsCSSFrameConstructor's ReconstructFrame to only reconstruct the document element hierarchy.
git-svn-id: svn://10.0.0.236/trunk@22445 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-01 16:57:35 +00:00
rods%netscape.com
b443d2b304 ifdef'ed out some menu code that does work yet.
git-svn-id: svn://10.0.0.236/trunk@22444 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-01 16:48:45 +00:00
rods%netscape.com
8cf03a78ef Added methods to header.
git-svn-id: svn://10.0.0.236/trunk@22443 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-01 16:48:19 +00:00
dcone%netscape.com
7ff8c2a247 Fixed up postscript stuff, now prints on Unix
git-svn-id: svn://10.0.0.236/trunk@22442 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-01 16:23:36 +00:00
rods%netscape.com
98d535f887 Added MenuDeselect to nsIMenuListener
git-svn-id: svn://10.0.0.236/trunk@22441 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-01 16:22:40 +00:00
rods%netscape.com
7313babfcb Change it to do a QueryInterface, is this right?
git-svn-id: svn://10.0.0.236/trunk@22440 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-01 15:27:55 +00:00
ramiro%netscape.com
1e7bef47df Here is patch to add font-styles to gtk-widgets. It adds styles
to widgets on creation, and uses that style to change fonts.
Thanks to Tomi Leppikangas <Tomi.Leppikangas@oulu.fi>


git-svn-id: svn://10.0.0.236/trunk@22439 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-01 13:30:54 +00:00
ramiro%netscape.com
164e781dbc Do the exception thing only if HAVE_CPP_EXCEPTIONS is defined.
git-svn-id: svn://10.0.0.236/trunk@22438 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-01 12:54:16 +00:00
ramiro%netscape.com
511fa6c14c gcc 2.7.x portability fixes.
git-svn-id: svn://10.0.0.236/trunk@22437 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-01 12:25:24 +00:00
briano%netscape.com
d5e75c7d94 Automated update
git-svn-id: svn://10.0.0.236/trunk@22436 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-01 12:15:39 +00:00
ramiro%netscape.com
3dd33ad63b Add test for exceptions. Exceptions are illegal, but somebody (whose name
I dont want to say, but it rhymes with "fcc") is using them in a test program.


git-svn-id: svn://10.0.0.236/trunk@22435 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-01 12:01:32 +00:00
edwin%woudt.nl
9d515e0513 Patches from Thomas Down <thomas.down@tri.ox.ac.uk> to get some working attachments. Also added the X-Mailer header.
git-svn-id: svn://10.0.0.236/trunk@22434 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-01 11:05:10 +00:00
mcafee%netscape.com
d98dcab829 Backing out my last change, breaks Win32 & Mac.
git-svn-id: svn://10.0.0.236/trunk@22433 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-01 10:57:20 +00:00
mcafee%netscape.com
72cb40d845 Adding do_QueryInterface() wrapper for nsCOMPtr/Solaris.
git-svn-id: svn://10.0.0.236/trunk@22432 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-01 10:32:14 +00:00
mcafee%netscape.com
4780230a1d Adding comparisons to autoconf results.
git-svn-id: svn://10.0.0.236/trunk@22431 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-01 10:13:18 +00:00
mcafee%netscape.com
5592159ebd Adding ED_Redo.gif
git-svn-id: svn://10.0.0.236/trunk@22430 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-01 08:33:32 +00:00
jfrancis%netscape.com
9239ed95dd made iterators bidirectional; lots of bug fixes; finished subtree iterator impl.
git-svn-id: svn://10.0.0.236/trunk@22429 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-01 08:17:18 +00:00
grail%cafebabe.org
4736f6084f Fixed a few constant references to their values.
git-svn-id: svn://10.0.0.236/trunk@22428 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-01 07:12:55 +00:00
buster%netscape.com
c661625f46 fixed IsNested to account for outer table frame
removed obsolete debug code


git-svn-id: svn://10.0.0.236/trunk@22427 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-01 06:40:24 +00:00
ramiro%netscape.com
026fef7a70 AIX portability fixes. (Waqar Malik <waqar@netscape.com>)
git-svn-id: svn://10.0.0.236/trunk@22426 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-01 06:29:14 +00:00
briano%netscape.com
67096e4b06 Automated update
git-svn-id: svn://10.0.0.236/trunk@22425 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-01 06:15:39 +00:00
ramiro%netscape.com
fe443b1dbc AIX portability fixes. (Waqar Malik <waqar@netscape.com>)
git-svn-id: svn://10.0.0.236/trunk@22424 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-01 06:10:54 +00:00
waterson%netscape.com
a3003dd0a7 Don't automatically register every data source; instead, the data source can register itself during Init().
git-svn-id: svn://10.0.0.236/trunk@22423 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-01 05:55:18 +00:00
grail%cafebabe.org
74b2238e29 Fixed my own lameness.
git-svn-id: svn://10.0.0.236/trunk@22422 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-01 05:28:18 +00:00
grail%cafebabe.org
9a4012c5b8 Last commit broke local storage viewing. Local store never quite "connect"
so ViewedStoreBase now checks isLocal() if isConnected() fails. Assumption
is that you're always connected if it's a local berkeley store.


git-svn-id: svn://10.0.0.236/trunk@22421 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-01 05:20:27 +00:00
cls%seawood.org
7bc46690b0 Moved previous filter-out section after DSO_CFLAGS is set.
git-svn-id: svn://10.0.0.236/trunk@22420 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-01 03:14:23 +00:00
briano%netscape.com
79123cdd98 Automated update
git-svn-id: svn://10.0.0.236/trunk@22419 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-01 02:00:39 +00:00
cls%seawood.org
5b16286cc0 Removed OPTIMIZE_CFLAGS. If CFLAGS isn't set in the enviornment, set it to -O. If MOZ_DEBUG is set, filter-out the optimization options in autoconf.mk.
git-svn-id: svn://10.0.0.236/trunk@22418 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-01 01:54:00 +00:00
grail%cafebabe.org
3b2c55c209 Fixed situation where UI thread gets wedged when a dialog of any sort
is popped up. A new bug is created where after you authenticate, you
have to deselect, and reselect the item for it to show. It's a
temporary fix.


git-svn-id: svn://10.0.0.236/trunk@22417 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-01 01:04:19 +00:00
edwin%woudt.nl
38897658fa Remove this ugly registration. This is the way to do it right!
git-svn-id: svn://10.0.0.236/trunk@22416 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-01 00:33:01 +00:00
wtc%netscape.com
46f41b71a8 New test file vercheck.c.
git-svn-id: svn://10.0.0.236/trunk@22415 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-01 00:23:34 +00:00
grail%cafebabe.org
2aec37a819 XML Tech Release API changes, take 2.
git-svn-id: svn://10.0.0.236/trunk@22414 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-01 00:09:16 +00:00
grail%cafebabe.org
fb21fe920d Changes to fit with API differences in XML Technology Release.
git-svn-id: svn://10.0.0.236/trunk@22413 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-28 23:53:40 +00:00
fur%netscape.com
9190e73493 Use a Quiet NaN, not a Signalling NaN
git-svn-id: svn://10.0.0.236/trunk@22412 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-28 23:01:29 +00:00
beard%netscape.com
83439792ed First Checked In.
git-svn-id: svn://10.0.0.236/trunk@22411 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-28 22:15:48 +00:00
beard%netscape.com
b4f129401a added IID() accessor.
git-svn-id: svn://10.0.0.236/trunk@22410 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-28 22:14:30 +00:00
beard%netscape.com
232c2ffdce Added NS_PLUGIN_CID, and IID() accessor.
git-svn-id: svn://10.0.0.236/trunk@22409 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-28 22:12:50 +00:00
beard%netscape.com
2b5bea4428 CPluginManager now implements nsIServiceManager and nsIAllocator interfaces, for better Gecko compatibility.
git-svn-id: svn://10.0.0.236/trunk@22408 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-28 22:10:26 +00:00
beard%netscape.com
7f108b671e updated NSGetFactory signature.
git-svn-id: svn://10.0.0.236/trunk@22407 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-28 22:08:26 +00:00
bienvenu%netscape.com
5223ba1452 use registerComponent instead of registerfactory to fix build bustage
git-svn-id: svn://10.0.0.236/trunk@22406 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-28 22:03:19 +00:00
bienvenu%netscape.com
9fe16eb6c4 set recipients and cc list as an array of addresses
git-svn-id: svn://10.0.0.236/trunk@22405 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-28 22:02:20 +00:00
bienvenu%netscape.com
af30301e84 add ability to import msf files
git-svn-id: svn://10.0.0.236/trunk@22404 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-28 22:00:50 +00:00
beard%netscape.com
2e0ae08fae SetDestructor
git-svn-id: svn://10.0.0.236/trunk@22403 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-28 19:04:47 +00:00
toshok%hungry.com
6cc33f9350 implement sm_InitPages/sm_FiniPages for unix. someone with more of an eye for this sort of code should tell me if what i've done here makes sense. it seems to make the tests go....
git-svn-id: svn://10.0.0.236/trunk@22402 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-28 15:20:34 +00:00
toshok%hungry.com
af29355e8a include config.mk before rules.mk
git-svn-id: svn://10.0.0.236/trunk@22401 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-28 15:17:15 +00:00
toshok%hungry.com
b23e6b922a convert C++ to C comment
git-svn-id: svn://10.0.0.236/trunk@22400 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-28 14:03:43 +00:00
toshok%hungry.com
de9ca81516 convert C++ to C comment
git-svn-id: svn://10.0.0.236/trunk@22399 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-28 14:03:21 +00:00
toshok%hungry.com
9213603d11 include config.mk before rules.mk so that we pick up the definition for NSINSTALL.
git-svn-id: svn://10.0.0.236/trunk@22398 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-28 13:51:07 +00:00
toshok%hungry.com
bb4b081b1b quiet gmake
git-svn-id: svn://10.0.0.236/trunk@22397 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-28 13:44:06 +00:00
saari%netscape.com
dc6c858162 make LoadMenus() less nsWebShellWindow specific
git-svn-id: svn://10.0.0.236/trunk@22396 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-28 11:14:34 +00:00
leaf%mozilla.org
827abf76bc fixed smoketest to invoke grendel with 'java grendel.Main' and also
exit the child process after running the binary (can't write to the same
logfile twice, now can we?)


git-svn-id: svn://10.0.0.236/trunk@22395 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-28 08:46:34 +00:00
leaf%mozilla.org
14b924f8e0 moving the client build into client.mak and toplevel makefile.win
leaving nglayout.mak for cleanup by anyone who wants to do it.


git-svn-id: svn://10.0.0.236/trunk@22394 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-28 07:51:10 +00:00
leaf%mozilla.org
ccf6efce70 readding makefile.win to SeaMonkeyCore (yeah, i know, we should have
SeaMonkeyWin/Unix/Mac ... cycles, anyone?)


git-svn-id: svn://10.0.0.236/trunk@22393 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-28 07:36:52 +00:00
grail%cafebabe.org
59d44590bd Labels and such for signature file in preference dialog UI.
git-svn-id: svn://10.0.0.236/trunk@22392 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-28 05:09:58 +00:00
jband%netscape.com
d52ad49e78 catch JS exceptions when calling a wrapped JSObject and reflect as an nsresult error code to the calling xpcom object - with test
git-svn-id: svn://10.0.0.236/trunk@22391 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-28 04:57:13 +00:00
grail%cafebabe.org
7adb2960f6 Added signature file selection.
git-svn-id: svn://10.0.0.236/trunk@22390 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-28 04:53:24 +00:00
despotdaemon%netscape.com
1818e38ea9 Pseudo-automatic update of changes made by wtc@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@22389 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-28 04:45:22 +00:00
jband%netscape.com
5ef8989937 using JS exception thrower (with tests)
git-svn-id: svn://10.0.0.236/trunk@22388 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-28 04:16:20 +00:00
mcmullen%netscape.com
9436817838 Fix Windows build errors
git-svn-id: svn://10.0.0.236/trunk@22387 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-28 02:51:53 +00:00
mcmullen%netscape.com
0a2a335945 Fix unix build errors
git-svn-id: svn://10.0.0.236/trunk@22386 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-28 02:17:55 +00:00
mcmullen%netscape.com
b2cfd19d76 Fix const problem.
git-svn-id: svn://10.0.0.236/trunk@22385 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-28 01:55:23 +00:00
jband%netscape.com
fba67216e8 adding code to throw exceptions into JS with customizable messages
git-svn-id: svn://10.0.0.236/trunk@22384 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-28 01:41:20 +00:00
mcmullen%netscape.com
9e4dad31a3 Fix seek again so it resets eof. Allow ns*FileStream stack-based classes to be closed explicitly. Fix refcounting. Remove "close on destroy" kludge.
git-svn-id: svn://10.0.0.236/trunk@22383 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-28 01:36:48 +00:00
mcmullen%netscape.com
612f1b91bb Make the FilesTest project build again.
git-svn-id: svn://10.0.0.236/trunk@22382 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-28 01:30:41 +00:00
fur%netscape.com
c7088fcd96 Changed many cpp conditionals that used ifdef LINUX or FREEBSD,
but which guarded gcc-specific code, not OS-specific code.  These
were changed to be ifdef __GNUC__.


git-svn-id: svn://10.0.0.236/trunk@22381 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-28 01:10:00 +00:00
fur%netscape.com
f72fba19b7 Reduced gratuitous file duplication between FreeBSD and Linux.
git-svn-id: svn://10.0.0.236/trunk@22380 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-28 00:29:39 +00:00
fur%netscape.com
4a8b00ac6d Eliminated gratuitous file duplication between FreeBSD and Linux
git-svn-id: svn://10.0.0.236/trunk@22379 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-28 00:28:26 +00:00
mcmullen%netscape.com
a4d010ff01 REALLY add libreg and nsRegistry to the Macintosh build.
git-svn-id: svn://10.0.0.236/trunk@22378 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-28 00:26:24 +00:00
mcmullen%netscape.com
1ef728f3b2 REALLY add nsRegistry and libreg to the Mac build.
git-svn-id: svn://10.0.0.236/trunk@22377 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-28 00:24:53 +00:00
fur%netscape.com
20e2e66622 Eliminate warning
git-svn-id: svn://10.0.0.236/trunk@22376 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-28 00:24:21 +00:00
fur%netscape.com
d2cc526401 Ignore generated files
git-svn-id: svn://10.0.0.236/trunk@22375 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-28 00:22:25 +00:00
fur%netscape.com
6d580baadb Renamed to x86Stub_gas.s
git-svn-id: svn://10.0.0.236/trunk@22374 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-28 00:20:52 +00:00
fur%netscape.com
00b6a4565e A bunch of grunge work to reduce the amount of OS-dependent code in
ElectricalFire sources.  The end result eliminated nearly all of the
differences between FreeBSD and Linux in the source code.  It also
increased the amount of sharing between Win32 and unix code.

+   Renamed files and classes that were inappropriately named, i.e. the
    names started with 'x86Win32', but the code was for generic x86, not
    specific to Win32.

+   Eliminated several gratuitous duplicated files, e.g. x86Linux.s and
    x86FreeBSD.s were essentially identical.

+   Shared code that had been duplicated in x86Win32_Support.cpp,
    x86Linux_Support.cpp and x86FreeBSD_Support.cpp.  Created
    x86GenStub.cpp, which contains only XP code, to replace them all.


git-svn-id: svn://10.0.0.236/trunk@22373 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-28 00:18:23 +00:00
despotdaemon%netscape.com
43ffe46441 Pseudo-automatic update of changes made by wtc@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@22372 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 23:50:01 +00:00
dp%netscape.com
b4b583d080 Adding nsRegistry to unix.
git-svn-id: svn://10.0.0.236/trunk@22371 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 21:49:34 +00:00
mcmullen%netscape.com
9375f1534d Call delete [] when new [] was used for allocation.
git-svn-id: svn://10.0.0.236/trunk@22370 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 20:39:07 +00:00
wtc%netscape.com
54957da9be On SUNOS4, include "md/sunos4.h" to get the macro definition of strtoul.
(contributed by Brian Ostrom <briano@netscape.com>)


git-svn-id: svn://10.0.0.236/trunk@22368 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 19:47:35 +00:00
wtc%netscape.com
692fd40e64 On SUNOS4, include "md/sunos4.h" to get the macro definition of strerror.
(contributed by Brian Ostrom <briano@netscape.com>)


git-svn-id: svn://10.0.0.236/trunk@22367 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 19:46:10 +00:00
wtc%netscape.com
07854ec1b1 Check NO_MDUPDATE. (contributed by Brian Ostrom <briano@netscape.com>)
git-svn-id: svn://10.0.0.236/trunk@22366 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 19:36:57 +00:00
karnaze%netscape.com
f1b7db0183 fixed assert when <col> is placed inside of <table>
git-svn-id: svn://10.0.0.236/trunk@22365 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 19:02:48 +00:00
mcafee%netscape.com
ae57673853 Adding expat. a=nisheeth
git-svn-id: svn://10.0.0.236/trunk@22364 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 10:40:40 +00:00
mcafee%netscape.com
0919f76f35 Ignore generated files.
git-svn-id: svn://10.0.0.236/trunk@22363 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 10:16:19 +00:00
dp%netscape.com
5c7abd2ef9 Code cleanup. Added comments. PR_LOG() cleanup. I think I will do my haircut too...
git-svn-id: svn://10.0.0.236/trunk@22362 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 09:50:19 +00:00
saari%netscape.com
b7b8376c6f First Checked In.
git-svn-id: svn://10.0.0.236/trunk@22361 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 09:44:28 +00:00
saari%netscape.com
a7a0e613b0 add mozilla/expat/xmlparse/MANIFEST to export xmlparse.h
git-svn-id: svn://10.0.0.236/trunk@22360 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 09:42:52 +00:00
mcafee%netscape.com
93a813dc24 export nsIExpatTokenizer.h, a=nisheeth
git-svn-id: svn://10.0.0.236/trunk@22359 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 09:26:27 +00:00
mcafee%netscape.com
406b124f2f Adding expat to Mozilla. a=nisheeth@netscape.com
git-svn-id: svn://10.0.0.236/trunk@22358 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 09:16:17 +00:00
mcafee%netscape.com
a3439ca560 First checkin
git-svn-id: svn://10.0.0.236/trunk@22357 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 09:12:52 +00:00
saari%netscape.com
7b2d482943 export new expat files
git-svn-id: svn://10.0.0.236/trunk@22356 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 09:11:40 +00:00
dp%netscape.com
a6760a0dec Clode cleanup. Abstracted registry access code that does ProgID into functions platformProgIDToCLSID() and platformCLSIDToProgID()
git-svn-id: svn://10.0.0.236/trunk@22355 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 08:58:11 +00:00
mcafee%netscape.com
357801b38b Don't build xmlwf yet.
git-svn-id: svn://10.0.0.236/trunk@22354 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 08:56:37 +00:00
grail%cafebabe.org
e9ec617591 Layout used to break if you switched between different layouts. It seems
to be behaving now.


git-svn-id: svn://10.0.0.236/trunk@22353 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 08:56:33 +00:00
dp%netscape.com
2d630f0db3 Changed comment to indicate that Quick Registration via the quick register data structure isn't for prime time yet.
git-svn-id: svn://10.0.0.236/trunk@22352 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 08:56:21 +00:00
nisheeth%netscape.com
f3a1187961 Fix Windows build bustage. expat.lib wasn't getting copied out to dist on
a newly pulled build.


git-svn-id: svn://10.0.0.236/trunk@22351 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 08:51:45 +00:00
mcafee%netscape.com
a6e67ce7c6 Adding expat. a=nisheeth@netscape.com
git-svn-id: svn://10.0.0.236/trunk@22350 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 08:51:03 +00:00
mcafee%netscape.com
922cde30d3 Adding nsExpatDTD.h to EXPORTS. a=nisheeth
git-svn-id: svn://10.0.0.236/trunk@22349 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 08:44:05 +00:00
peterl%netscape.com
0f5602af49 added content state change
git-svn-id: svn://10.0.0.236/trunk@22348 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 08:34:06 +00:00
saari%netscape.com
e4a8d65787 Making Mac menus work a little better again.
git-svn-id: svn://10.0.0.236/trunk@22347 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 08:30:32 +00:00
nisheeth%netscape.com
98631882f9 - Add expat to the windows build only...
- Changed nsParser such that nsExpatDTD gets added to the doubly ended queue
  of DTDs instead of nsWellFormedDTD if EXPAT is #define'd.


git-svn-id: svn://10.0.0.236/trunk@22346 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 08:04:46 +00:00
nisheeth%netscape.com
7a7332eebd Creating nsIExpatTokenizer, an interface that adds methods for setting
callbacks on the expat tokenizer, a wrapper around the expat XML parser.


git-svn-id: svn://10.0.0.236/trunk@22345 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 08:03:36 +00:00
nisheeth%netscape.com
fde3db03f4 - Add expat to the windows build only...
- Changed nsXMLDocument such that expat gets used for XML parsing if
  EXPAT is #define'd


git-svn-id: svn://10.0.0.236/trunk@22344 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 08:02:15 +00:00
nisheeth%netscape.com
ea7fabcacf Add expat to the windows build only...
git-svn-id: svn://10.0.0.236/trunk@22343 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 07:59:22 +00:00
putterman%netscape.com
10fef5a529 Pass in pointer to mServiceManager.
git-svn-id: svn://10.0.0.236/trunk@22342 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 07:27:45 +00:00
peterl%netscape.com
a15d906398 fixed active link rule support
git-svn-id: svn://10.0.0.236/trunk@22341 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 07:18:21 +00:00
peterl%netscape.com
42e0f0d865 added support for dynamic pseudo classes
added support for child & sibling selectors


git-svn-id: svn://10.0.0.236/trunk@22340 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 07:17:52 +00:00
putterman%netscape.com
fd08ec9642 ListNext returns NULL when no more messages.
git-svn-id: svn://10.0.0.236/trunk@22339 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 07:17:35 +00:00
putterman%netscape.com
1d6337aad3 Start writing GetMessages and make folder pane work again.
git-svn-id: svn://10.0.0.236/trunk@22338 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 07:16:58 +00:00
peterl%netscape.com
031f64cd45 added child & sibling selector support
git-svn-id: svn://10.0.0.236/trunk@22337 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 07:16:57 +00:00
peterl%netscape.com
9a50248463 tweaked style hint for overflow
git-svn-id: svn://10.0.0.236/trunk@22336 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 07:16:27 +00:00
peterl%netscape.com
03d4988d0b added child & sibling selectors
git-svn-id: svn://10.0.0.236/trunk@22335 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 07:15:59 +00:00
putterman%netscape.com
1b29b161a4 Works with RegisterComponent
git-svn-id: svn://10.0.0.236/trunk@22334 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 07:15:41 +00:00
peterl%netscape.com
46ee5bae96 added content state changed
git-svn-id: svn://10.0.0.236/trunk@22333 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 07:15:09 +00:00
peterl%netscape.com
99235ba41d added CSS3 pseudo classes
git-svn-id: svn://10.0.0.236/trunk@22332 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 07:14:33 +00:00
peterl%netscape.com
186b6ff87a added CSS3 UI pseudo classes
git-svn-id: svn://10.0.0.236/trunk@22331 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 07:14:13 +00:00
peterl%netscape.com
c75df5584b set document before adding attributes
git-svn-id: svn://10.0.0.236/trunk@22330 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 07:13:48 +00:00
peterl%netscape.com
172680187e switched state change notifications to use ContentStateChanged
git-svn-id: svn://10.0.0.236/trunk@22329 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 07:12:38 +00:00
fur%netscape.com
300d98c6fa Remove unused function
git-svn-id: svn://10.0.0.236/trunk@22328 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 07:12:27 +00:00
peterl%netscape.com
f1421ae8d2 added == operator to style sides
git-svn-id: svn://10.0.0.236/trunk@22327 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 07:11:57 +00:00
peterl%netscape.com
9b0f1dbc06 added CalcStyleDifference
git-svn-id: svn://10.0.0.236/trunk@22326 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 07:11:42 +00:00
putterman%netscape.com
bd2671513e Compiles with RegisterComponent
git-svn-id: svn://10.0.0.236/trunk@22325 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 07:11:28 +00:00
peterl%netscape.com
694566ce25 added content state changed
removed ua sheet from dump style


git-svn-id: svn://10.0.0.236/trunk@22324 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 07:11:04 +00:00
peterl%netscape.com
5ae2774317 added == operator for style sides
git-svn-id: svn://10.0.0.236/trunk@22323 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 07:09:40 +00:00
peterl%netscape.com
e18d387533 added style hint max
git-svn-id: svn://10.0.0.236/trunk@22322 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 07:09:23 +00:00
fur%netscape.com
fef280bf65 Patches from Amancio Hasty for FreeBSD. Until we can figure out otherwise,
use NSPR user-threads rather than pthreads.


git-svn-id: svn://10.0.0.236/trunk@22321 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 07:00:12 +00:00
grail%cafebabe.org
1062153d54 Images from chrisn to replace the existing ugly signature icon.
git-svn-id: svn://10.0.0.236/trunk@22320 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 06:47:08 +00:00
jband%netscape.com
a66a8179b4 catch
git-svn-id: svn://10.0.0.236/trunk@22319 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 06:38:24 +00:00
jband%netscape.com
d3c05dfd48 added .cvsignore files
git-svn-id: svn://10.0.0.236/trunk@22318 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 06:31:04 +00:00
jband%netscape.com
9835083454 got rid of allocator hack since the nsAllocator is now alive
git-svn-id: svn://10.0.0.236/trunk@22317 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 06:26:32 +00:00
alecf%netscape.com
d9c1423d1e fix AIX bustage - we were dereferencing the function before checking if it was NULL
git-svn-id: svn://10.0.0.236/trunk@22316 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 06:22:43 +00:00
briano%netscape.com
f94fca5d21 Automated update
git-svn-id: svn://10.0.0.236/trunk@22315 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 06:15:40 +00:00
mcafee%netscape.com
da12888a42 Add check for bool, might need this in 3rd-party code. Mozilla code should use PRBool.
git-svn-id: svn://10.0.0.236/trunk@22314 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 06:06:59 +00:00
nisheeth%netscape.com
334560b897 Enough code to get expat callbacks firing inside nsExpatDTD. Next step is
to pass on the callbacks to the XML content sink.  These files are not part
of the build system yet.


git-svn-id: svn://10.0.0.236/trunk@22313 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 06:04:02 +00:00
alecf%netscape.com
13d995b822 start using new HAVE_CPP_NEW_CASTS macro on unix
git-svn-id: svn://10.0.0.236/trunk@22312 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 05:58:25 +00:00
briano%netscape.com
b9dbb43f34 Mostly just support for SunOS 4.x
git-svn-id: svn://10.0.0.236/trunk@22311 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 04:55:44 +00:00
alecf%netscape.com
534160d16b AIX can't do static casts either
git-svn-id: svn://10.0.0.236/trunk@22310 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 04:29:44 +00:00
alecf%netscape.com
3dcbcaa251 fix HPUX bustage - nspr.h is still giving problems
git-svn-id: svn://10.0.0.236/trunk@22309 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 04:18:55 +00:00
briano%netscape.com
cec2fe742e Automated update
git-svn-id: svn://10.0.0.236/trunk@22308 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 04:15:38 +00:00
alecf%netscape.com
1bb4856df5 add new tests from scc@netscape.com
git-svn-id: svn://10.0.0.236/trunk@22307 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 04:08:24 +00:00
karnaze%netscape.com
975ac58a63 correctly set max element size on checkbox, radio. Other cleanup.
git-svn-id: svn://10.0.0.236/trunk@22306 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 03:59:19 +00:00
mscott%netscape.com
abf578071d Stop building nntptest until I fix the factory problems and come up with a progID...
git-svn-id: svn://10.0.0.236/trunk@22305 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 03:48:15 +00:00
alecf%netscape.com
f6fa0eaa90 put #ifdef's around the interface stub implementation output so that generated files can still
be part of the build system.


git-svn-id: svn://10.0.0.236/trunk@22304 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 03:34:39 +00:00
mscott%netscape.com
877afbbea8 There is no DLL in the resource directory so don't try to clobber one...
git-svn-id: svn://10.0.0.236/trunk@22303 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 03:24:00 +00:00
leaf%mozilla.org
b74eeab8e0 adding james clark's xml parser.
git-svn-id: svn://10.0.0.236/trunk@22302 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 03:19:35 +00:00
alecf%netscape.com
8dfc6228f7 add IID() method
git-svn-id: svn://10.0.0.236/trunk@22301 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 03:16:56 +00:00
alecf%netscape.com
c25d436614 implement nsMessenger class
git-svn-id: svn://10.0.0.236/trunk@22300 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 03:14:40 +00:00
mscott%netscape.com
7375193b56 Add code to define XPIDL_JS_STUBS if it is defined in the environment for alecf.
git-svn-id: svn://10.0.0.236/trunk@22299 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 03:12:38 +00:00
grail%cafebabe.org
02eb7be6cb Fixed OptionsPanel breakage. Everything is laid out all nice like.
git-svn-id: svn://10.0.0.236/trunk@22298 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 03:10:41 +00:00
mscott%netscape.com
d4a9bfe19f mailnews base requires DOM.
git-svn-id: svn://10.0.0.236/trunk@22297 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 03:09:16 +00:00
grail%cafebabe.org
5ffaf359cb Removed references to non-existence crytpo capability. This breaks
OptionsPanel for now.


git-svn-id: svn://10.0.0.236/trunk@22296 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 03:09:15 +00:00
mcafee%netscape.com
f8cf8b500f Fixing solaris bustage. a/r=akkana,simon
git-svn-id: svn://10.0.0.236/trunk@22295 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 02:55:13 +00:00
vidur%netscape.com
862dafa27c map and area attribute tests
git-svn-id: svn://10.0.0.236/trunk@22294 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 02:52:44 +00:00
saari%netscape.com
6f6025f993 First Checked In.
git-svn-id: svn://10.0.0.236/trunk@22293 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 02:48:31 +00:00
alecf%netscape.com
28ead7db61 add Interface implementation for JS stubs in messenger
git-svn-id: svn://10.0.0.236/trunk@22292 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 02:47:53 +00:00
putterman%netscape.com
4796874851 Parses datasource string correctly.
git-svn-id: svn://10.0.0.236/trunk@22291 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 02:42:57 +00:00
alecf%netscape.com
f6b3edfc94 remove bogus headers
git-svn-id: svn://10.0.0.236/trunk@22290 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 02:42:26 +00:00
alecf%netscape.com
3724c2ae4d implement new nsIMessenger interface, and make it accessable from JavaScript
git-svn-id: svn://10.0.0.236/trunk@22289 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 02:33:21 +00:00
alecf%netscape.com
16845338f6 update to new RegisterComponent APIs
git-svn-id: svn://10.0.0.236/trunk@22288 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 02:25:02 +00:00
alecf%netscape.com
6f7747af12 update to new RegisterFactory/Component APIs
git-svn-id: svn://10.0.0.236/trunk@22287 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 02:24:29 +00:00
waterson%netscape.com
5ecec240af Change '=' to '#' to circumvent registry bustage for now.
git-svn-id: svn://10.0.0.236/trunk@22286 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 02:19:47 +00:00
slamm%netscape.com
05f05cbc5c Add status.xul
git-svn-id: svn://10.0.0.236/trunk@22285 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 02:12:47 +00:00
ebina%netscape.com
4a5bfcecf4 Reflect changes to API in nsRepository.h to the Mac.
git-svn-id: svn://10.0.0.236/trunk@22284 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 02:08:50 +00:00
ebina%netscape.com
acfa7037f5 Remove support for the old RegisterFactory API.
git-svn-id: svn://10.0.0.236/trunk@22283 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 02:06:54 +00:00
alecf%netscape.com
83f13a4b98 moving this file to base
git-svn-id: svn://10.0.0.236/trunk@22282 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 02:04:53 +00:00
ebina%netscape.com
bde6ee5483 Change RegisterFactory to the new API.
git-svn-id: svn://10.0.0.236/trunk@22281 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 02:02:32 +00:00
despotdaemon%netscape.com
56f2a19d6e Pseudo-automatic update of changes made by lindes@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@22280 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 02:00:07 +00:00
fur%netscape.com
1a261f0163 Separated x86Win32_Support.cpp into an OS-independent part x86GenStub.cpp and
x86Stub.cpp which is Win32-only.


git-svn-id: svn://10.0.0.236/trunk@22279 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 01:53:18 +00:00
sfraser%netscape.com
698034ee52 First Checked In.
git-svn-id: svn://10.0.0.236/trunk@22278 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 01:46:07 +00:00
sfraser%netscape.com
ffd655ab4a Add Redo to the editor appshell toolbar
git-svn-id: svn://10.0.0.236/trunk@22277 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 01:46:00 +00:00
nisheeth%netscape.com
74e10ba6d1 Integrating Expat with raptor...
git-svn-id: svn://10.0.0.236/trunk@22276 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 01:41:01 +00:00
alecf%netscape.com
668fa3d44c nspr.h was causing problems on HPUX
git-svn-id: svn://10.0.0.236/trunk@22275 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 01:37:44 +00:00
hyatt%netscape.com
6d1d5f3315 Modified HTML content's QueryInterface macro to supported nsIStyledContent.
git-svn-id: svn://10.0.0.236/trunk@22274 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 01:36:41 +00:00
hyatt%netscape.com
c75a33adec Changed GetID, HasClass, and GetClasses so that they are invoked on styledContent
instead of htmlContent.


git-svn-id: svn://10.0.0.236/trunk@22273 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 01:35:51 +00:00
hyatt%netscape.com
0e1f8526be Changed GetInlineStyleRule so that it is invoked on styledContent instead
of htmlContent.


git-svn-id: svn://10.0.0.236/trunk@22272 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 01:35:25 +00:00
law%netscape.com
165659caa3 Add status.xul to $(DIST)/bin/res/samples
git-svn-id: svn://10.0.0.236/trunk@22271 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 01:35:05 +00:00
hyatt%netscape.com
818ef5f99b Changed GetContentStyleRule so that it is invoked on styledContent instead
of htmlContent.


git-svn-id: svn://10.0.0.236/trunk@22270 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 01:34:55 +00:00
hyatt%netscape.com
03ccb229ff Changing GetStyleHintForAttributeChanged so that it is invoked on styledContent
instead of htmlContent.


git-svn-id: svn://10.0.0.236/trunk@22269 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 01:34:32 +00:00
hyatt%netscape.com
6a355cdc1f Adding the NS_ISTYLEDCONTENT_IID to the nsHTMLIID files, so that HTML content
can see it (makes the QueryInterface macro work).


git-svn-id: svn://10.0.0.236/trunk@22268 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 01:33:25 +00:00
hyatt%netscape.com
1e383b5280 Removing the CLASS, ID, and STYLE-specific methods. They are now in
nsIStyledContent (from which nsIHTMLContent now derives).


git-svn-id: svn://10.0.0.236/trunk@22267 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 01:32:49 +00:00
nisheeth%netscape.com
875f6e8d4d Integrating Expat with raptor...
git-svn-id: svn://10.0.0.236/trunk@22266 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 01:31:49 +00:00
hyatt%netscape.com
3eea650eac Making sure that nsIStyledContent.h gets exported.
git-svn-id: svn://10.0.0.236/trunk@22265 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 01:31:42 +00:00
hyatt%netscape.com
4facbaa6b0 Changes to makefiles to ensure that nsIStyledContent.h is exported.
git-svn-id: svn://10.0.0.236/trunk@22264 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 01:31:16 +00:00
hyatt%netscape.com
36c680cad0 The nsIStyledContent interface. Removes CLASS, ID, and STYLE support (as well
as the ability to supply style hints) from nsIHTMLContent.


git-svn-id: svn://10.0.0.236/trunk@22263 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 01:31:01 +00:00
hyatt%netscape.com
0f7ea6b1c9 Changes to tree frame construction code.
git-svn-id: svn://10.0.0.236/trunk@22262 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 01:28:19 +00:00
ducarroz%netscape.com
49f460ef71 add missing parameter to SendMessage
git-svn-id: svn://10.0.0.236/trunk@22261 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 01:26:01 +00:00
peterl%netscape.com
32bebb7ee2 Fixed leak of token recycler
git-svn-id: svn://10.0.0.236/trunk@22260 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 01:11:51 +00:00
mscott%netscape.com
efcc286270 Remove no shared library field
git-svn-id: svn://10.0.0.236/trunk@22259 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 01:03:26 +00:00
av%netscape.com
40af69629d *** empty log message ***
git-svn-id: svn://10.0.0.236/trunk@22258 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 00:57:04 +00:00
mscott%netscape.com
cfdfa76120 Add mdbstubs.cpp to the build.
git-svn-id: svn://10.0.0.236/trunk@22257 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 00:56:41 +00:00
mscott%netscape.com
ba94b65a25 Link with nntpTest library.
git-svn-id: svn://10.0.0.236/trunk@22256 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 00:43:54 +00:00
mscott%netscape.com
c1635e9bde Name of the compose library changed. Update the Makefile.
git-svn-id: svn://10.0.0.236/trunk@22255 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 00:29:19 +00:00
mscott%netscape.com
938159a86b Hmm somehow we got a bunch of duplicate file names getting built. Cleaning up the Makefile
git-svn-id: svn://10.0.0.236/trunk@22254 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 00:21:42 +00:00
mscott%netscape.com
25ba927616 Fix Unix breakage. XP_AppVersion is a const char * not a char * for unix.
git-svn-id: svn://10.0.0.236/trunk@22253 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 00:16:52 +00:00
despotdaemon%netscape.com
140e5d6e81 Pseudo-automatic update of changes made by kristian@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@22252 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-27 00:01:18 +00:00
mscott%netscape.com
7952f9448e I'm not sure why this was changed from m_host to "", in any case, change it back to m_host
which is the host to use...


git-svn-id: svn://10.0.0.236/trunk@22251 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 23:56:56 +00:00
scc%netscape.com
6cb22ba536 for VC++5.0, no member using declarations (to prevent internal compiler error); to make this compile fixed type of AddRef and Release in nsDerivedSafe
git-svn-id: svn://10.0.0.236/trunk@22250 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 23:43:40 +00:00
ducarroz%netscape.com
94b36f91ee receive an URL during the creation of a new message instance. Add new parameter in SendMessage (from, cc, bcc, smtp)
git-svn-id: svn://10.0.0.236/trunk@22249 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 23:42:54 +00:00
ducarroz%netscape.com
cd28986280 fix build problem with missing parameter when call SendMailMessage. Add an empty host name
git-svn-id: svn://10.0.0.236/trunk@22248 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 23:40:42 +00:00
mscott%netscape.com
b437323e2c Fix build breakage. NS_InitMsgAppCoreClass returns an nsresult.
git-svn-id: svn://10.0.0.236/trunk@22247 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 23:38:32 +00:00
ducarroz%netscape.com
e19e9c8f66 carry smtp server over the send process
git-svn-id: svn://10.0.0.236/trunk@22246 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 23:38:20 +00:00
pinkerton%netscape.com
921aee5459 warren's hack-o-rama to get rdf working w/out libreg on mac. permission to check into closed tree by sar.
git-svn-id: svn://10.0.0.236/trunk@22245 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 23:28:14 +00:00
pinkerton%netscape.com
b984626b52 added GetGlobalServiceManager for warren. permission to checkin to closed tree granted by sar.
git-svn-id: svn://10.0.0.236/trunk@22244 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 23:26:17 +00:00
ducarroz%netscape.com
eab23107de carry smtp server over the send process
git-svn-id: svn://10.0.0.236/trunk@22243 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 23:25:46 +00:00
ducarroz%netscape.com
8b3a885953 carry smtp server name over the send message process
git-svn-id: svn://10.0.0.236/trunk@22242 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 23:23:32 +00:00
fur%netscape.com
7831e45af4 Changed factoring of function declaration macros to be based on choice of
compiler rather than OS


git-svn-id: svn://10.0.0.236/trunk@22241 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 23:18:37 +00:00
fur%netscape.com
5fdbb98c39 Add /D GENERATE_FOR_X86
git-svn-id: svn://10.0.0.236/trunk@22240 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 23:14:31 +00:00
ducarroz%netscape.com
8c2d5cd165 clobber tag was missing causing a nmake error
git-svn-id: svn://10.0.0.236/trunk@22239 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 23:13:36 +00:00
fur%netscape.com
41d9c2de41 A bunch of grunge work to reduce OS-dependent code in ElectricalFire
sources:

+ Renamed files and classes that were inappropriately named, i.e. the
  names started with 'x86Win32', but the code was for generic x86, not
  specific to Win32.

+ Segregated the 64-bit arithmetic code into an OS-independent
  x86Arith64.{cpp,h}


git-svn-id: svn://10.0.0.236/trunk@22238 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 23:12:06 +00:00
fur%netscape.com
580523708d Squawk if target architecture is unknown
git-svn-id: svn://10.0.0.236/trunk@22237 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 23:06:34 +00:00
fur%netscape.com
0521e3acbc x86-win32.nad ==> x86.nad
git-svn-id: svn://10.0.0.236/trunk@22236 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 23:05:58 +00:00
fur%netscape.com
b06c567c1f x86Win32Cpu.h ==> x86Cpu.h
git-svn-id: svn://10.0.0.236/trunk@22234 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 23:01:40 +00:00
fur%netscape.com
4aa850fa93 x86Win32Cpu.h ==> x86Cpu.h
git-svn-id: svn://10.0.0.236/trunk@22233 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 23:00:45 +00:00
ducarroz%netscape.com
2df4cc81ab updated to export new resources files
git-svn-id: svn://10.0.0.236/trunk@22231 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 22:46:33 +00:00
ducarroz%netscape.com
0bdff758b4 remove address and subject fields, they are now in the toolbar describe in compose.xul
git-svn-id: svn://10.0.0.236/trunk@22230 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 22:45:12 +00:00
fur%netscape.com
ad09d80ac6 A bunch of grunge work to reduce OS-dependent code in ElectricalFire
sources.

Here's a detailed list of the changes:

Renamed files and classes that were inappropriately named, i.e. the
names started with 'x86Win32', but the code was for generic x86, not
specific to Win32.

Segregated the 64-bit arithmetic code into an OS-independent
x86Arith64.{cpp,h}


git-svn-id: svn://10.0.0.236/trunk@22229 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 22:45:11 +00:00
ducarroz%netscape.com
0fbfef36f1 Initial check in
git-svn-id: svn://10.0.0.236/trunk@22228 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 22:43:41 +00:00
ducarroz%netscape.com
07f73341a3 replaced by compose.xul
git-svn-id: svn://10.0.0.236/trunk@22227 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 22:42:36 +00:00
despotdaemon%netscape.com
51c655ad3d Pseudo-automatic update of changes made by wtc@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@22226 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 22:30:54 +00:00
ducarroz%netscape.com
cf3b82883c no comment
git-svn-id: svn://10.0.0.236/trunk@22225 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 22:28:50 +00:00
ducarroz%netscape.com
d68531d744 did some reformating of the code
git-svn-id: svn://10.0.0.236/trunk@22224 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 22:23:24 +00:00
ducarroz%netscape.com
ceb2e8dc2c change hard coded version of messenger
git-svn-id: svn://10.0.0.236/trunk@22223 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 22:21:45 +00:00
terry%netscape.com
3417923ada Removed "Platform: Rhapsody" component.
git-svn-id: svn://10.0.0.236/trunk@22222 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 22:05:52 +00:00
cyeh%netscape.com
634f978ce3 fix analysis.html generation by fixing ostype checks
git-svn-id: svn://10.0.0.236/trunk@22221 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 21:30:38 +00:00
wtc%netscape.com
12c0262a82 added files on behalf of wtc: prerr.c, prerrortable.c, and prrwlock.c.
git-svn-id: svn://10.0.0.236/trunk@22220 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 20:49:06 +00:00
wtc%netscape.com
9c1f05fdd8 Temporary depend:clean hack.
git-svn-id: svn://10.0.0.236/trunk@22219 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 20:47:41 +00:00
wtc%netscape.com
1091f97f61 Landing of miscellaneous changes, including the new error code to
string function contributed by John Myers <jgmyers@netscape.com>.


git-svn-id: svn://10.0.0.236/trunk@22218 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 20:41:06 +00:00
wtc%netscape.com
6b142d43cd New test file acceptread.c.
git-svn-id: svn://10.0.0.236/trunk@22217 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 20:38:30 +00:00
michaelp%netscape.com
3c0d098a85 added fix for GetRects(). not currently called by anything but the new
compositor which is not yet enabled. approved by sar.


git-svn-id: svn://10.0.0.236/trunk@22216 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 20:16:50 +00:00
cyeh%netscape.com
0f787fde0e added blat url to usage output
git-svn-id: svn://10.0.0.236/trunk@22215 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 20:15:03 +00:00
cyeh%netscape.com
eb05521c3f *** empty log message ***
git-svn-id: svn://10.0.0.236/trunk@22214 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 20:13:06 +00:00
alecf%netscape.com
6fed0e740d remove duplicate definition (whoops!)
git-svn-id: svn://10.0.0.236/trunk@22213 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 20:06:18 +00:00
alecf%netscape.com
947a1ef4ff bring NS_InitMsgAppCoreClass back from the dead
git-svn-id: svn://10.0.0.236/trunk@22212 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 20:04:39 +00:00
kmcclusk%netscape.com
b127777cde Added support to read Adobe Font Metric files to get the correct font metrics
for printing.


git-svn-id: svn://10.0.0.236/trunk@22211 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 20:03:35 +00:00
mscott%netscape.com
26da731489 Export NS_InitMsgAppCoreClass to fix build. Alec is going to make the correct change and add this to the idl file so we won't lose it the next time we rev the idl files. This was part of the hack stuff we had to add to get msgappcore running in apprunner..
git-svn-id: svn://10.0.0.236/trunk@22210 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 20:03:26 +00:00
cyeh%netscape.com
54234965d5 make simple makefile for mtbf, but this time a working one
git-svn-id: svn://10.0.0.236/trunk@22209 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 20:02:37 +00:00
kipp%netscape.com
8334239104 fixed up operator new usage
git-svn-id: svn://10.0.0.236/trunk@22208 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 20:02:06 +00:00
pollmann%netscape.com
9c4f03aa39 Enable dynamic changing of the readonly attribute.
Works on Linux now.  Win will come on-line later today.


git-svn-id: svn://10.0.0.236/trunk@22207 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 20:01:48 +00:00
slamm%netscape.com
02a2298c97 Add bookmarks window.
git-svn-id: svn://10.0.0.236/trunk@22206 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 20:01:27 +00:00
slamm%netscape.com
7c483bbac7 Add 'Edit Bookmarks...' menu item.
git-svn-id: svn://10.0.0.236/trunk@22205 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 19:59:00 +00:00
slamm%netscape.com
0b7a662327 Add bookmarks window
git-svn-id: svn://10.0.0.236/trunk@22204 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 19:58:17 +00:00
kipp%netscape.com
31f557d779 use macro to get operator new correct
git-svn-id: svn://10.0.0.236/trunk@22203 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 19:57:18 +00:00
brade%netscape.com
2e06c0f14a First Checked In.
git-svn-id: svn://10.0.0.236/trunk@22202 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 19:51:49 +00:00
scc%netscape.com
99bd38652f deprecated |dont_AddRef|, added a new form of |getter_AddRefs| to take its place. Removed all nothing of bool from the headers (should help gcc)
git-svn-id: svn://10.0.0.236/trunk@22201 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 19:50:46 +00:00
cyeh%netscape.com
5e7a30bb73 add makefile to build mtbf
git-svn-id: svn://10.0.0.236/trunk@22200 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 19:48:06 +00:00
mcafee%netscape.com
9f2b58f6b6 Switching false/true over to PR_FALSE/PR_TRUE
git-svn-id: svn://10.0.0.236/trunk@22199 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 19:47:48 +00:00
cyeh%netscape.com
98ab554353 make command line options work under win32
git-svn-id: svn://10.0.0.236/trunk@22198 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 19:47:38 +00:00
ebina%netscape.com
1e98ec7746 Changing RegisterFactory to use the new API.
git-svn-id: svn://10.0.0.236/trunk@22197 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 19:45:10 +00:00
kipp%netscape.com
b8608d2815 Cleaned up all of the operator new/delete usage
git-svn-id: svn://10.0.0.236/trunk@22196 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 19:40:22 +00:00
akkana%netscape.com
0ed15da9fd windows has NS_IMETHOD != virtual nsresult
git-svn-id: svn://10.0.0.236/trunk@22195 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 19:39:14 +00:00
kipp%netscape.com
4b24555ced Defined some operator new/delete macros to help us get it right
git-svn-id: svn://10.0.0.236/trunk@22194 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 19:38:53 +00:00
brade%netscape.com
3ed23f5c9e add "static" to reduce compiler warnings on Macintosh
git-svn-id: svn://10.0.0.236/trunk@22193 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 19:36:36 +00:00
dp%netscape.com
61bf5c1e54 Adding platformVersionCheck() into USE_REG ifdef
git-svn-id: svn://10.0.0.236/trunk@22192 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 19:28:42 +00:00
pinkerton%netscape.com
009b854b1f changing mac name of default registry file to "mozilla registry" in order to not conflict with old nscp versions and not have the name "netscape" in any of our code.
git-svn-id: svn://10.0.0.236/trunk@22191 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 19:26:45 +00:00
kipp%netscape.com
8ca53a41da Fixed remaining issues with operator new/delete
git-svn-id: svn://10.0.0.236/trunk@22190 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 19:26:29 +00:00
mcafee%netscape.com
376d73af3c Switching one last bool to PRBool. a=mcmullen
git-svn-id: svn://10.0.0.236/trunk@22189 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 19:22:43 +00:00
kipp%netscape.com
b677533b37 Removed ifdef'd out code
git-svn-id: svn://10.0.0.236/trunk@22188 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 19:22:20 +00:00
mscott%netscape.com
0c96e67ebc nsISmtpService->SendMessage now takes the host.
git-svn-id: svn://10.0.0.236/trunk@22187 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 19:18:31 +00:00
mscott%netscape.com
e9c17590b1 Sending a message now takes a host. Use it.
git-svn-id: svn://10.0.0.236/trunk@22186 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 19:17:42 +00:00
mscott%netscape.com
8d609e47e6 Add host as paramater to send send message method.
git-svn-id: svn://10.0.0.236/trunk@22185 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 19:17:13 +00:00
fur%netscape.com
e5d87f9498 No CPU_ARCH_TAG for FreeBSD
git-svn-id: svn://10.0.0.236/trunk@22184 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 19:12:26 +00:00
cyeh%netscape.com
0d29461854 added command line arguments, autoconfig LD_LIBRARY_PATH on unix, added
testing of command line arguments


git-svn-id: svn://10.0.0.236/trunk@22183 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 19:09:48 +00:00
ebina%netscape.com
1d63004b5d Changing RegisterFactory to use the new API.
git-svn-id: svn://10.0.0.236/trunk@22182 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 19:08:57 +00:00
akkana%netscape.com
ee25e1ce6d Turn on nsSelectionMgr for windows
git-svn-id: svn://10.0.0.236/trunk@22181 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 19:01:15 +00:00
akkana%netscape.com
59eb4ba094 Turn on nsSelectionMgr class for copy/paste
git-svn-id: svn://10.0.0.236/trunk@22180 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 19:00:17 +00:00
sfraser%netscape.com
31a5c6eedb Add nsSelectionMgr.cpp for akkana
git-svn-id: svn://10.0.0.236/trunk@22179 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 18:59:33 +00:00
kin%netscape.com
97bb438dc7 Fixed javascript syntax error.
git-svn-id: svn://10.0.0.236/trunk@22178 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 18:59:25 +00:00
alecf%netscape.com
5840b03d44 fix AIX bustage
git-svn-id: svn://10.0.0.236/trunk@22177 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 18:58:08 +00:00
cyeh%netscape.com
9e2cad2894 add static library targets to allow overriding of functions in an external project
git-svn-id: svn://10.0.0.236/trunk@22176 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 18:51:32 +00:00
dp%netscape.com
d4b13c8710 Implemented versioning of the repository hieararchy under the registry. Also changed storing longlongs to ints into the registry.
git-svn-id: svn://10.0.0.236/trunk@22175 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 18:41:37 +00:00
pinkerton%netscape.com
9746b4d5c5 add libreg to list of linked libraries to try to get autoregistration working correctly.
git-svn-id: svn://10.0.0.236/trunk@22174 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 18:38:39 +00:00
racham%netscape.com
6cf0f5a6ad Modified buffer sizes in define constants
git-svn-id: svn://10.0.0.236/trunk@22173 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 18:36:56 +00:00
racham%netscape.com
cf0ce80158 increased buffer size for holding value field
git-svn-id: svn://10.0.0.236/trunk@22172 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 18:36:04 +00:00
wtc%netscape.com
02764ab1c7 print thread scope.
git-svn-id: svn://10.0.0.236/trunk@22171 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 18:34:31 +00:00
wtc%netscape.com
4b610a857a print elapsed and expected times.
git-svn-id: svn://10.0.0.236/trunk@22170 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 18:33:19 +00:00
cyeh%netscape.com
6878c5e4eb remove MOZ_PROF compiler option. it's redundant with MOZ_DEBUGOPT, and
it doesn't work to boot. it also has an annoying ifdef structure that is hard
to follow.
if you want to build optimized with debug symbols, use MOZ_DEBUGOPT=1


git-svn-id: svn://10.0.0.236/trunk@22169 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 18:32:39 +00:00
wtc%netscape.com
f1fc5a9fec Make the number of atomic locks configurable by setting the environment
variable NSPR_ATOMIC_HASH_LOCKS.


git-svn-id: svn://10.0.0.236/trunk@22168 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 18:32:14 +00:00
alecf%netscape.com
672bae1c57 fix unix bustage - can't construct objects and pass them as & parameters at the same time
git-svn-id: svn://10.0.0.236/trunk@22167 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 18:25:57 +00:00
alecf%netscape.com
32dc9597e9 fix call to CreateInstance, now that you can create one with a ProgID
git-svn-id: svn://10.0.0.236/trunk@22166 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 18:17:41 +00:00
alecf%netscape.com
d259eb2aad don't use old XFE icon data-related functions
git-svn-id: svn://10.0.0.236/trunk@22165 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 18:00:28 +00:00
alecf%netscape.com
058584fccd fix uninitialize variable and fix various signed/unsigned warnings
git-svn-id: svn://10.0.0.236/trunk@22164 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 17:59:16 +00:00
alecf%netscape.com
97806affe4 add nsIEnumerator interface, and fix nsICollection interface to use long not int
git-svn-id: svn://10.0.0.236/trunk@22163 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 17:57:34 +00:00
alecf%netscape.com
8600e20f0e fix -pedantic bustage - Delete isn't const, so re-cast "this"
git-svn-id: svn://10.0.0.236/trunk@22162 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 17:56:44 +00:00
alecf%netscape.com
9a5ad5ba18 add static IID() method
git-svn-id: svn://10.0.0.236/trunk@22161 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 17:50:59 +00:00
alecf%netscape.com
b8e8e7578e fix -pedantic bustage on Unix
git-svn-id: svn://10.0.0.236/trunk@22160 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 17:49:41 +00:00
alecf%netscape.com
c693124762 add temporary hack to instantiate Messenger in the JS namespace
git-svn-id: svn://10.0.0.236/trunk@22159 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 17:47:35 +00:00
alecf%netscape.com
91fa5c9384 no need to export non-existant IDL files
git-svn-id: svn://10.0.0.236/trunk@22158 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 17:45:29 +00:00
alecf%netscape.com
815d6d9c4c fix HPUX/AIX/OSF bustage - most unices need stdlib.h to get abort()
git-svn-id: svn://10.0.0.236/trunk@22157 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 17:41:47 +00:00
troy%netscape.com
64a3061b36 Per Kipp's request, added patch from Mark Harvey (Mark.Harvey@wireplay.bt.co.uk) so we
don't have an imagehlp.dll dependency unless MOZ_TRACE_XPCOM_REFCNT is defined


git-svn-id: svn://10.0.0.236/trunk@22156 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 17:39:55 +00:00
alecf%netscape.com
da118a4713 fix HPUX bustage - can't have const user-defined (typedefed) variables inside structures without initializing them inside that structure
git-svn-id: svn://10.0.0.236/trunk@22155 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 17:39:28 +00:00
pinkerton%netscape.com
75e89e602f titlebuttons are not block frames!
git-svn-id: svn://10.0.0.236/trunk@22154 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 17:38:40 +00:00
alecf%netscape.com
8720c2952d fix HPUX bustage - now that we're using PR_FREEIF, you can't put (void*)
casts inside it.


git-svn-id: svn://10.0.0.236/trunk@22153 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 17:36:57 +00:00
alecf%netscape.com
fef17484d9 BandRect needs to be public to be visible outside the class definition (HPUX bustage)
git-svn-id: svn://10.0.0.236/trunk@22152 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 17:36:00 +00:00
ftang%netscape.com
b421dc5509 fix some unix warning
git-svn-id: svn://10.0.0.236/trunk@22151 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 17:34:58 +00:00
alecf%netscape.com
ab3c25a5f2 fix HPUX bustage - HP already has MIN, MAX, TRUE, and FALSE defined
git-svn-id: svn://10.0.0.236/trunk@22150 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 17:27:02 +00:00
alecf%netscape.com
c729288dab fix HPUX bustage: font should be const
git-svn-id: svn://10.0.0.236/trunk@22149 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 17:26:25 +00:00
alecf%netscape.com
9cb5576e4d fix HPUX bustage - don't declare classnames inside class definitition
git-svn-id: svn://10.0.0.236/trunk@22148 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 17:25:31 +00:00
pinkerton%netscape.com
44c442417e added new CreateInstance for warren to fix build bustage that never showed up on tinderbox.
git-svn-id: svn://10.0.0.236/trunk@22147 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 17:25:24 +00:00
ftang%netscape.com
ae6440bd59 fix some unix warning
git-svn-id: svn://10.0.0.236/trunk@22146 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 17:24:47 +00:00
ebina%netscape.com
13608a9e24 Changing RegisterFactory to use the new API.
git-svn-id: svn://10.0.0.236/trunk@22145 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 17:19:00 +00:00
kipp%netscape.com
369110d90c Support sized images
git-svn-id: svn://10.0.0.236/trunk@22144 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 17:15:15 +00:00
kipp%netscape.com
b68d985292 Support entities (bug #3112)
git-svn-id: svn://10.0.0.236/trunk@22143 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 17:13:51 +00:00
kipp%netscape.com
e914323594 Use our own null value
git-svn-id: svn://10.0.0.236/trunk@22142 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 17:13:30 +00:00
kipp%netscape.com
6a553dabe3 Cleaned up operator new and delete
git-svn-id: svn://10.0.0.236/trunk@22141 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 17:13:10 +00:00
kipp%netscape.com
55ffab420a Removed dependency on static constructors
git-svn-id: svn://10.0.0.236/trunk@22140 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 17:12:16 +00:00
kipp%netscape.com
c8fe8ac18f Pass in default image size when loading image
git-svn-id: svn://10.0.0.236/trunk@22139 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 17:12:05 +00:00
kipp%netscape.com
774bcbcaf4 Whacked to handle moving floaters out of the flow
git-svn-id: svn://10.0.0.236/trunk@22138 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 17:11:54 +00:00
ftang%netscape.com
4b07ef7da1 fix some unix warnning
git-svn-id: svn://10.0.0.236/trunk@22137 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 17:11:43 +00:00
kipp%netscape.com
c9321630b1 Fixed up operator new and delete
git-svn-id: svn://10.0.0.236/trunk@22136 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 17:09:35 +00:00
kipp%netscape.com
7948faf8e8 Removed dependency on static constructors; implement operatore delete
git-svn-id: svn://10.0.0.236/trunk@22135 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 17:08:48 +00:00
kipp%netscape.com
f2ab10bb59 Removed move-out-of-flow code now that frame construction code does it; added code to avoid reflows when removing a placeholder frame
git-svn-id: svn://10.0.0.236/trunk@22134 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 17:08:20 +00:00
kipp%netscape.com
afb7fb16b8 Avoid purify noise by initializing all member variables
git-svn-id: svn://10.0.0.236/trunk@22133 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 17:07:49 +00:00
kipp%netscape.com
b8539e233b Support limited scaling of images on unix
git-svn-id: svn://10.0.0.236/trunk@22132 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 17:07:28 +00:00
kipp%netscape.com
d2550f1dbb Removed MoveOutOfFlow
git-svn-id: svn://10.0.0.236/trunk@22131 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 17:07:01 +00:00
kipp%netscape.com
f58eac9104 Implement operator delete; get rid of static constructor
git-svn-id: svn://10.0.0.236/trunk@22130 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 17:05:20 +00:00
kipp%netscape.com
c306aa9bfe Find text runs more often (bug #3278, 3265); floaters are now handled mostly by the frame construction code
git-svn-id: svn://10.0.0.236/trunk@22129 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 17:04:44 +00:00
kipp%netscape.com
ad6702e668 Removed dependency on static constructor
git-svn-id: svn://10.0.0.236/trunk@22128 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 17:03:45 +00:00
kipp%netscape.com
7469bb9bcb Implement operator delete properly; removed dependency on static constructor
git-svn-id: svn://10.0.0.236/trunk@22127 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 17:03:18 +00:00
kipp%netscape.com
83f6d724e1 Support desired image size during loading
git-svn-id: svn://10.0.0.236/trunk@22126 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 17:02:37 +00:00
kipp%netscape.com
2a60d6d88b Added IsFloating inline
git-svn-id: svn://10.0.0.236/trunk@22125 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 17:02:05 +00:00
kipp%netscape.com
507f449b32 Added in desired-size to image loading request
git-svn-id: svn://10.0.0.236/trunk@22124 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 17:01:34 +00:00
kipp%netscape.com
8782ec3985 Removed global gLogModule
git-svn-id: svn://10.0.0.236/trunk@22123 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 16:59:57 +00:00
kipp%netscape.com
cbae90a7c1 Cache alpha-clip pixmap across rendering calls so that transparent gifs render faster; flush cache when bits are updated so that transparent animated gifs don't break
git-svn-id: svn://10.0.0.236/trunk@22122 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 16:59:18 +00:00
ftang%netscape.com
bb66c75305 fix some unix warnning
git-svn-id: svn://10.0.0.236/trunk@22121 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 16:58:33 +00:00
kipp%netscape.com
58c03f58da Removed inline virtuals - a no-no
git-svn-id: svn://10.0.0.236/trunk@22120 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 16:58:18 +00:00
kipp%netscape.com
30a79fc6fa Get alpha line stride so that we don't produce the wrong alpha mask
git-svn-id: svn://10.0.0.236/trunk@22119 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 16:57:54 +00:00
ftang%netscape.com
1ec712e1e8 fix some unix warnning
git-svn-id: svn://10.0.0.236/trunk@22118 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 16:52:34 +00:00
pinkerton%netscape.com
056c27083c add a new RegisterFactory method for ebina.
git-svn-id: svn://10.0.0.236/trunk@22117 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 16:50:27 +00:00
ftang%netscape.com
9fa4a5ec6a fix a log of unix warnning- 1) make sure all XPCOM class destructor are virtual and fix warnning in new file
git-svn-id: svn://10.0.0.236/trunk@22115 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 16:32:08 +00:00
ebina%netscape.com
a859c35703 Changing RegisterFactory to use the new API.
git-svn-id: svn://10.0.0.236/trunk@22114 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 16:18:23 +00:00
fur%netscape.com
c2065b1017 Remove C++ comment in C file.
git-svn-id: svn://10.0.0.236/trunk@22113 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 16:11:37 +00:00
ebina%netscape.com
836781ca39 Changing RegisterFactory to use the new API.
git-svn-id: svn://10.0.0.236/trunk@22112 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 16:07:38 +00:00
ebina%netscape.com
f3c0c2ca83 Changing RegisterFactory to use the new API.
git-svn-id: svn://10.0.0.236/trunk@22111 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 15:59:52 +00:00
kipp%netscape.com
daf4dfbb67 new
git-svn-id: svn://10.0.0.236/trunk@22110 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 15:54:00 +00:00
ftang%netscape.com
9d10b06a0d first check in.This should fix the bustage
git-svn-id: svn://10.0.0.236/trunk@22109 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 15:36:02 +00:00
pavlov%pavlov.net
01824ed107 began work on nsDrawingSurfaceGTK.cpp. it isn't built yet, as it doens't
compile though.  renamed the nsDrawingSurfaceGTK.h to nsOldDrawingSurfaceGTK.h
to avoid name conflicts for now.


git-svn-id: svn://10.0.0.236/trunk@22108 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 15:26:02 +00:00
ftang%netscape.com
36edc1c253 add CharsetAlias factory
git-svn-id: svn://10.0.0.236/trunk@22107 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 15:24:56 +00:00
ftang%netscape.com
be55e2c69d check in hack implementation
git-svn-id: svn://10.0.0.236/trunk@22106 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 15:16:56 +00:00
ftang%netscape.com
55c46dac15 fix some interface probelm
git-svn-id: svn://10.0.0.236/trunk@22105 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 15:15:57 +00:00
edwin%woudt.nl
23789a3a1a You can't rename A to B if B exists. So we need to delete B first.
git-svn-id: svn://10.0.0.236/trunk@22104 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 15:12:09 +00:00
warren%netscape.com
bda4005b55 Making it build with new RDF registration mechanism.
git-svn-id: svn://10.0.0.236/trunk@22103 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 12:24:22 +00:00
warren%netscape.com
5ac2a1d765 Fixed XXXNeverCalled
git-svn-id: svn://10.0.0.236/trunk@22102 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 12:18:19 +00:00
edwin%woudt.nl
ea68125765 Fix to let the Dialog show up.
git-svn-id: svn://10.0.0.236/trunk@22101 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 12:12:13 +00:00
warren%netscape.com
8b314ccb43 Added missing argument.
git-svn-id: svn://10.0.0.236/trunk@22100 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 11:46:42 +00:00
warren%netscape.com
d05d7032e1 Fixed leak when Init fails.
git-svn-id: svn://10.0.0.236/trunk@22099 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 11:42:05 +00:00
warren%netscape.com
2500e9edaf Fixed NSRegisterSelf signature.
git-svn-id: svn://10.0.0.236/trunk@22098 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 11:32:51 +00:00
warren%netscape.com
ba84994876 Fixed variable name.
git-svn-id: svn://10.0.0.236/trunk@22097 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 11:31:04 +00:00
warren%netscape.com
789849f8bf Renamed variable.
git-svn-id: svn://10.0.0.236/trunk@22096 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 10:58:32 +00:00
warren%netscape.com
513a79704b Fixed #endif for non-registry builds.
git-svn-id: svn://10.0.0.236/trunk@22095 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 10:55:07 +00:00
warren%netscape.com
49ed8e046f Changes for RDF component registration using nsRepository. Also changed args to NSGetFactory and friends.
git-svn-id: svn://10.0.0.236/trunk@22094 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 10:17:14 +00:00
karnaze%netscape.com
bf7aa2f2f9 fixed bug where anonymous table frame is constructed inside table related frame.
simplified table frame construction.


git-svn-id: svn://10.0.0.236/trunk@22093 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 09:15:03 +00:00
fur%netscape.com
047bf73e83 Added x86 disassembly to HTML output, courtesy of free code from CMU's
Mach project.


git-svn-id: svn://10.0.0.236/trunk@22092 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 09:10:34 +00:00
fur%netscape.com
74ccfa71b1 Fix OBJDIR naming convention to be simpler
git-svn-id: svn://10.0.0.236/trunk@22091 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 08:48:53 +00:00
evaughan%netscape.com
a39632b9af Removed state info from button renderer.
git-svn-id: svn://10.0.0.236/trunk@22090 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 08:48:24 +00:00
fur%netscape.com
b364ac0639 libpthread must come before libnspr on the link line
git-svn-id: svn://10.0.0.236/trunk@22089 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 08:47:18 +00:00
fur%netscape.com
b02c4ab54d Don't use enums with bitfield widths when running with gcc, since egcs
generates buggy code for this case and there is no way to
differentiate gcc and egcs.


git-svn-id: svn://10.0.0.236/trunk@22088 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 08:45:45 +00:00
mcafee%netscape.com
290b452307 Better ifdef logic for last checkin
git-svn-id: svn://10.0.0.236/trunk@22087 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 08:44:50 +00:00
fur%netscape.com
241ef884c8 Fix syntax error
git-svn-id: svn://10.0.0.236/trunk@22086 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 08:44:40 +00:00
fur%netscape.com
11526464c8 Add libm
git-svn-id: svn://10.0.0.236/trunk@22085 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 08:42:30 +00:00
fur%netscape.com
b968d57b64 Restore building of java.security native libraries
git-svn-id: svn://10.0.0.236/trunk@22084 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 08:41:28 +00:00
mcafee%netscape.com
a61404126a Solaris/CC refused to compile part of this file, giving up for now. a=scc
git-svn-id: svn://10.0.0.236/trunk@22083 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 08:41:15 +00:00
fur%netscape.com
afd136e6bf + Remove dead code
+ Make class initialization slightly more efficient


git-svn-id: svn://10.0.0.236/trunk@22082 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 08:40:13 +00:00
fur%netscape.com
fd8160d7bd Improve comment
git-svn-id: svn://10.0.0.236/trunk@22081 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 08:39:24 +00:00
fur%netscape.com
eaba928492 Fix library ordering problem so that pthreads appears before NSPR on
the link line.


git-svn-id: svn://10.0.0.236/trunk@22080 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 08:38:38 +00:00
fur%netscape.com
ef607fb50d Fix problems in which functions had 'inline' keyword in definition
but not in the corresponding declaration.


git-svn-id: svn://10.0.0.236/trunk@22079 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 08:18:38 +00:00
fur%netscape.com
579b075cdf Make the Linux compile-and-backpatch stub code generation be just like
Win32's, so that method-tracing works.


git-svn-id: svn://10.0.0.236/trunk@22078 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 08:17:06 +00:00
fur%netscape.com
1d244214d1 Under some circumstances, the monitor around the compiler was being
released even though it was not held.


git-svn-id: svn://10.0.0.236/trunk@22077 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 08:15:03 +00:00
rickg%netscape.com
89a3d20da2 fix build crash caused by deque API change
git-svn-id: svn://10.0.0.236/trunk@22076 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 07:37:27 +00:00
rickg%netscape.com
bfceba3989 attempt to fix build
git-svn-id: svn://10.0.0.236/trunk@22075 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 07:24:27 +00:00
rickg%netscape.com
51458a6c52 new API on deque to set deallocator
git-svn-id: svn://10.0.0.236/trunk@22074 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 07:23:56 +00:00
evaughan%netscape.com
e84b411850 Fixed up titled button so hover, focus, active, states work.
git-svn-id: svn://10.0.0.236/trunk@22073 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 06:41:10 +00:00
rickg%netscape.com
5012f4e582 small bug fixes and removal of global statics
git-svn-id: svn://10.0.0.236/trunk@22072 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 06:33:54 +00:00
mcafee%netscape.com
b0e3a4ac8c Adding __SVR4 to check for SunOS 4.1.3, wrapping this check into MOZ_MAY_HAVE_DNS. a=spence
git-svn-id: svn://10.0.0.236/trunk@22071 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 06:20:48 +00:00
bienvenu%netscape.com
38fb01af30 add new hdrs to db and turn on notification by default
git-svn-id: svn://10.0.0.236/trunk@22070 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 06:01:26 +00:00
beard%netscape.com
1a8100e0c5 Fixing callback typedef, using new NS_CALLBACK macro which will be moved to nsCom.h when it proves itself.
git-svn-id: svn://10.0.0.236/trunk@22069 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 04:30:17 +00:00
mscott%netscape.com
7ed5bbeb0c fix clobber rules to correctly clobber resources.
git-svn-id: svn://10.0.0.236/trunk@22068 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 04:22:44 +00:00
mscott%netscape.com
175f212fe3 Fix build breakage. Change OpenURL signature to take a char * instead of an AutoString because the interface was changed that way.
git-svn-id: svn://10.0.0.236/trunk@22067 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 04:16:59 +00:00
mscott%netscape.com
f12953d001 Fix build breakage remove nsIID.h and nsISupportUtils.h from all interfaces until we can figure out where these files come from. I know this is the wrong long term solution so I'm not even changing the idl files.
git-svn-id: svn://10.0.0.236/trunk@22066 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 04:10:24 +00:00
beard%netscape.com
a3a56d921c Now uses nsGenericFactory to provide factories for NS_ALLOCATOR_CID and NS_GENERICFACTORY_CID.
git-svn-id: svn://10.0.0.236/trunk@22065 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 04:09:51 +00:00
mscott%netscape.com
6f69698824 nsFileSpec update.
git-svn-id: svn://10.0.0.236/trunk@22064 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 04:09:39 +00:00
mscott%netscape.com
70f43902ac Fix build breakage. Many of these interfaces had the constness of arguments removed from them. We need to remove the const char *s and change them to char *s in all of the classes that implement those interfaces....This had a carry over effect of forcing several pieces of code to cast const char *s as char *s. Hopefully we can undo all of these changes when the IDL compiler allows you to have const arguments...
git-svn-id: svn://10.0.0.236/trunk@22063 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 04:09:10 +00:00
beard%netscape.com
9387da18fb Added nsGenericFactory.cpp
git-svn-id: svn://10.0.0.236/trunk@22062 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 04:09:07 +00:00
beard%netscape.com
fe425b96af now implements nsIGenericFactory.
git-svn-id: svn://10.0.0.236/trunk@22061 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 04:08:26 +00:00
mscott%netscape.com
9438adee6a nsFileSpec updates...
git-svn-id: svn://10.0.0.236/trunk@22060 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 04:06:37 +00:00
beard%netscape.com
d8af315b9c added nsIGenericFactory.h
git-svn-id: svn://10.0.0.236/trunk@22059 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 04:06:13 +00:00
beard%netscape.com
bf9e88cca3 First Checked In.
git-svn-id: svn://10.0.0.236/trunk@22058 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 04:05:14 +00:00
beard%netscape.com
dc53227e34 Added CID() accessor.
git-svn-id: svn://10.0.0.236/trunk@22057 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 04:04:50 +00:00
mscott%netscape.com
77dda8f63a Add parsing code if the id is part of the urlspec. Use mailbox action enum.
git-svn-id: svn://10.0.0.236/trunk@22056 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 04:04:33 +00:00
beard%netscape.com
17aff0f259 added IID() accessor.
git-svn-id: svn://10.0.0.236/trunk@22055 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 04:04:13 +00:00
mscott%netscape.com
24f4257d53 Fix build breakage. Convert char * to a nsstring before passing it to createNode
git-svn-id: svn://10.0.0.236/trunk@22054 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 04:03:44 +00:00
mscott%netscape.com
2e3a647249 Add enum for mailbox url action type.
git-svn-id: svn://10.0.0.236/trunk@22053 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 04:00:21 +00:00
mscott%netscape.com
e5f5f9cde5 Fix build breakage remove nsIID.h and nsISupportUtils.h from all interfaces until we can figure out where these files come from. I know this is the wrong long term solution so I'm not even changing the idl files.
git-svn-id: svn://10.0.0.236/trunk@22052 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 03:59:33 +00:00
mscott%netscape.com
989ff04df2 nsFileSpec updates.
git-svn-id: svn://10.0.0.236/trunk@22051 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 03:58:26 +00:00
rjc%netscape.com
5394b2a610 Forgot to register/deregister RDFCore factory.
git-svn-id: svn://10.0.0.236/trunk@22050 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 03:55:13 +00:00
mscott%netscape.com
53e276fd09 Fix build by exporting nsIMsg.h
git-svn-id: svn://10.0.0.236/trunk@22049 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 03:54:45 +00:00
leaf%mozilla.org
2a82294f15 adding .deps to ignore the new dependencies directory
git-svn-id: svn://10.0.0.236/trunk@22048 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 03:54:01 +00:00
mcafee%netscape.com
59aa28351c Switching unix to use PR_Abort().
git-svn-id: svn://10.0.0.236/trunk@22047 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 03:52:37 +00:00
mcafee%netscape.com
43188f40b8 Adding do_QueryInterface() to fix Solaris/nxCOMPtr ambiguity.
git-svn-id: svn://10.0.0.236/trunk@22046 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 03:50:37 +00:00
mcafee%netscape.com
42298d96aa readding my fix that buster whomped.
git-svn-id: svn://10.0.0.236/trunk@22045 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 03:46:08 +00:00
troy%netscape.com
5bb51bbb20 Added logic to replicate the caption when splitting the table
git-svn-id: svn://10.0.0.236/trunk@22043 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 03:35:22 +00:00
bienvenu%netscape.com
05158a78f0 more reading and writing of toy db
git-svn-id: svn://10.0.0.236/trunk@22042 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 03:25:16 +00:00
waterson%netscape.com
b3ecd2c6b5 Modified DEFINE_RDF_VOCAB macro so that it doesn't create static constructors on Unix.
git-svn-id: svn://10.0.0.236/trunk@22041 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 03:07:59 +00:00
waterson%netscape.com
22db265958 Bug 3302. Fixed DOM calls to effect (more or less) the right change on the content model, modulo Bug 3275. This was causing asserts to fire whenever you called SetAttribute().
git-svn-id: svn://10.0.0.236/trunk@22040 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 03:02:19 +00:00
jband%netscape.com
d74a10535e removed cruft
git-svn-id: svn://10.0.0.236/trunk@22039 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 02:52:48 +00:00
hyatt%netscape.com
a832e7cd61 Preparing expand/collapse so that it works the right way.
git-svn-id: svn://10.0.0.236/trunk@22038 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 02:50:21 +00:00
saari%netscape.com
4103384808 Comment out SetLabel in LoadMenuItem
SetLabel should be called by the call to Create, to which I added the name back in the call.


git-svn-id: svn://10.0.0.236/trunk@22037 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 02:50:09 +00:00
brendan%netscape.com
a1ab81c5b1 Fix indentation, fiddle to share common fputs string.
git-svn-id: svn://10.0.0.236/trunk@22036 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 02:48:01 +00:00
jband%netscape.com
38b5613680 fixed warnings
git-svn-id: svn://10.0.0.236/trunk@22035 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 02:46:35 +00:00
saari%netscape.com
52083c19e0 Actually do menu creation on the create call.
Commented out SetLabel in nsWebShellWindow::LoadMenuItem


git-svn-id: svn://10.0.0.236/trunk@22034 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 02:45:55 +00:00
rjc%netscape.com
8cd3ac46c2 Small case changes.
git-svn-id: svn://10.0.0.236/trunk@22033 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 02:45:25 +00:00
danm%netscape.com
6a2e3f3bea adding C XUL window construction callback
git-svn-id: svn://10.0.0.236/trunk@22029 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 02:22:42 +00:00
mscott%netscape.com
b4ef1c318a nsFileSpec changes.
git-svn-id: svn://10.0.0.236/trunk@22028 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 02:22:01 +00:00
law%netscape.com
ad76645726 Create reg file if it doesn't exist
git-svn-id: svn://10.0.0.236/trunk@22027 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 02:17:37 +00:00
rjc%netscape.com
56dbfedf7b Modified sidebar.xul regarding sorting.
git-svn-id: svn://10.0.0.236/trunk@22026 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 02:16:56 +00:00
law%netscape.com
9ae1a629b4 New status bar; first draft
git-svn-id: svn://10.0.0.236/trunk@22025 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 02:15:29 +00:00
rjc%netscape.com
282975714f Add in RDFCore.
git-svn-id: svn://10.0.0.236/trunk@22024 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 02:14:51 +00:00
waterson%netscape.com
a411b1387c Improved SplitAttribute() to return kNameSpaceID_None if it finds a tag but can't determine the namespace.
git-svn-id: svn://10.0.0.236/trunk@22023 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 02:09:48 +00:00
rjc%netscape.com
c08b1ae756 Add into RDF Core.
git-svn-id: svn://10.0.0.236/trunk@22022 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 02:08:29 +00:00
rjc%netscape.com
6e30cacd1c Add in RDFCore.idl
git-svn-id: svn://10.0.0.236/trunk@22021 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 02:08:01 +00:00
jband%netscape.com
1740753904 Linux x86 now runs and passes all the same tests as Win32. Added md/test as a place and framework to start ports to other platforms
git-svn-id: svn://10.0.0.236/trunk@22020 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 02:04:33 +00:00
rjc%netscape.com
0629e3a3f0 Add RDF file system datasource into builds.
git-svn-id: svn://10.0.0.236/trunk@22019 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 02:04:28 +00:00
akkana%netscape.com
5aba739fcc Fixes to make the mac build; jfrancis will follow with the project file
git-svn-id: svn://10.0.0.236/trunk@22017 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 01:59:49 +00:00
alecf%netscape.com
29d7191943 rev the XPIDL-generated headers, and update API calls to match
includes dropping "const"ness from parameters
some nsString routines were converted back to char* for the time being.
also added nsIMsg.h, it seemed to be missing

Also many fixes to get Unix building again.


git-svn-id: svn://10.0.0.236/trunk@22016 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 01:56:15 +00:00
sfraser%netscape.com
acb9d031fd Remove MoreFiles.shlb from the optimized target.
git-svn-id: svn://10.0.0.236/trunk@22014 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 01:34:04 +00:00
alecf%netscape.com
7318c8827e add new compose makefiles
git-svn-id: svn://10.0.0.236/trunk@22012 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 01:22:12 +00:00
terry%netscape.com
200d36f911 Removed "Platform: Lesstif on Linux" component.
git-svn-id: svn://10.0.0.236/trunk@22011 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 01:18:25 +00:00
alecf%netscape.com
43704aa51c rev the XPIDL generated headers
git-svn-id: svn://10.0.0.236/trunk@22010 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 01:17:12 +00:00
alecf%netscape.com
087b97ae1f check in unix makefiles/ignore files
git-svn-id: svn://10.0.0.236/trunk@22009 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 01:16:07 +00:00
alecf%netscape.com
2e11906933 update to make compose build on Linux
git-svn-id: svn://10.0.0.236/trunk@22008 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 01:14:57 +00:00
sfraser%netscape.com
1d6c6156b4 File Removed.
git-svn-id: svn://10.0.0.236/trunk@22007 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 01:13:09 +00:00
sfraser%netscape.com
8707f97633 First Checked In.
git-svn-id: svn://10.0.0.236/trunk@22006 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 01:12:49 +00:00
terry%netscape.com
bd8e33797e Patch by Dhiren Patel <dhiren@nuvomedia.com> (tweaked by me) -- add a
link to Enter A Bug when viewing a list of bugs.


git-svn-id: svn://10.0.0.236/trunk@22005 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 01:08:50 +00:00
putterman%netscape.com
8f8b505175 AddRef database in constructor.
git-svn-id: svn://10.0.0.236/trunk@22004 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 01:02:15 +00:00
terry%netscape.com
74c82f07d6 Removed MFC/Win32 component.
git-svn-id: svn://10.0.0.236/trunk@22003 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 01:01:34 +00:00
sfraser%netscape.com
810a288777 Remove ; to fix warnings.
git-svn-id: svn://10.0.0.236/trunk@22002 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 00:55:22 +00:00
sfraser%netscape.com
c74199e668 Mac project changes -- link with MSLDropInRuntime, instead of MSLShLibRuntime, and fix link order.
git-svn-id: svn://10.0.0.236/trunk@22001 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 00:54:57 +00:00
sfraser%netscape.com
08cf89f6dd Mac project changes -- link with MSLDropInRuntime, instead of MSLShLibRuntime, and fix link order. Also clean up the prefix file mess.
git-svn-id: svn://10.0.0.236/trunk@22000 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 00:54:45 +00:00
sfraser%netscape.com
a63f8fa1e1 Mac project changes -- don't generate SYM file.
git-svn-id: svn://10.0.0.236/trunk@21999 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 00:52:23 +00:00
sfraser%netscape.com
f0dd92bf71 Mac project changes -- no longer need to link with some libraries, so remove these from the project (MoreFiles, MemAllcoatorStubs).
git-svn-id: svn://10.0.0.236/trunk@21998 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 00:49:57 +00:00
sfraser%netscape.com
468246c95a Change project build order, and build MoreFiles and MemAllocator as static libs.
git-svn-id: svn://10.0.0.236/trunk@21997 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 00:48:30 +00:00
terry%netscape.com
9fadcb978b Major rewrite by Ry4an Brase <ry4an@ry4an.org>, with some edits by me.
git-svn-id: svn://10.0.0.236/trunk@21996 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 00:47:29 +00:00
despotdaemon%netscape.com
df709ba5ea Pseudo-automatic update of changes made by wtc@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@21995 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 00:45:30 +00:00
sfraser%netscape.com
f59ab36c66 Mac project changes -- convert from using MLSShLibRuntime to MSLDropinRuntime.
git-svn-id: svn://10.0.0.236/trunk@21994 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 00:44:01 +00:00
sfraser%netscape.com
24e96ce5ac Mac project changes -- NSStdlib now includes the memory allocators and MoreFiles as static libraries, and re-exports their symbols.
git-svn-id: svn://10.0.0.236/trunk@21993 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 00:41:00 +00:00
sfraser%netscape.com
067a38fdcb Mac project changes: remove MSL libs from NSRuntime, and don't export new/delete from here
git-svn-id: svn://10.0.0.236/trunk@21992 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 00:40:12 +00:00
sfraser%netscape.com
5776fcaf07 Mac project uptates; build the memory allocators and morefiles as static libraries.
git-svn-id: svn://10.0.0.236/trunk@21991 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 00:39:19 +00:00
dougt%netscape.com
5c3d475c6d Remove #ifdef DEBUG
git-svn-id: svn://10.0.0.236/trunk@21990 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 00:14:57 +00:00
terry%netscape.com
2ef818e612 Wasn't able to mass-change a component before.
git-svn-id: svn://10.0.0.236/trunk@21989 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 23:54:14 +00:00
terry%netscape.com
5f34c3c373 Removed MacOS/PPC component.
git-svn-id: svn://10.0.0.236/trunk@21988 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 23:42:52 +00:00
despotdaemon%netscape.com
8dbe0bf70c Pseudo-automatic update of changes made by terry@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@21987 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 23:36:23 +00:00
briano%netscape.com
3bc1b498bb More cleanup, and now we force the compiler on Solaris x86 to be EGCS.
git-svn-id: svn://10.0.0.236/trunk@21986 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 23:35:52 +00:00
despotdaemon%netscape.com
ce1d1876aa Pseudo-automatic update of changes made by terry@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@21985 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 23:35:48 +00:00
dougt%netscape.com
3f857cbd81 tests are failing on window optimized. I am removing the test dir from the
build path until I can figure it out.


git-svn-id: svn://10.0.0.236/trunk@21984 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 23:19:12 +00:00
edwin%woudt.nl
5ae199533b Status update!
git-svn-id: svn://10.0.0.236/trunk@21983 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 23:09:12 +00:00
michaelp%netscape.com
1e84ef5fb9 bustage with new nsFileSpec.h
git-svn-id: svn://10.0.0.236/trunk@21982 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 23:08:51 +00:00
mccabe%netscape.com
5a91ac81df Initial checkin of typelib loading service.
git-svn-id: svn://10.0.0.236/trunk@21981 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 22:56:43 +00:00
dougt%netscape.com
f3f6d856e0 Another fix to the build bustage.
git-svn-id: svn://10.0.0.236/trunk@21980 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 22:17:25 +00:00
dougt%netscape.com
a28665a754 This should make the tree go green. It, however, makes nsPersistentFileDescriptor broken if you pass an fsspec.
git-svn-id: svn://10.0.0.236/trunk@21979 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 22:04:50 +00:00
dougt%netscape.com
25bcdd1a61 Changed nsNativeFileSpec to nsFileSpec.
git-svn-id: svn://10.0.0.236/trunk@21978 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 20:58:10 +00:00
dougt%netscape.com
451b4db4af Merging branch BASE_19_FEB_99 to tip. These are extensive changes
to nsFileSpec and and nsFileStream.  See dougt@netscape.com or
John McMullen for futher information.


git-svn-id: svn://10.0.0.236/trunk@21977 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 20:49:47 +00:00
ftang%netscape.com
f1b059f18d fix the bustage
git-svn-id: svn://10.0.0.236/trunk@21976 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 20:16:28 +00:00
briano%netscape.com
d6117dc2c9 Automated update
git-svn-id: svn://10.0.0.236/trunk@21975 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 20:00:38 +00:00
ftang%netscape.com
60ba4d7407 add readme.txt file for serveral directory
git-svn-id: svn://10.0.0.236/trunk@21974 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 19:59:47 +00:00
wtc%netscape.com
69eda9d37b Changed NSPR ==> NSPS.
git-svn-id: svn://10.0.0.236/trunk@21973 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 19:58:12 +00:00
ftang%netscape.com
94731511ba First check in
git-svn-id: svn://10.0.0.236/trunk@21972 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 19:57:03 +00:00
buster%netscape.com
a200933a99 added GetStyleContextFor
git-svn-id: svn://10.0.0.236/trunk@21971 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 19:55:06 +00:00
ftang%netscape.com
b7db5d8561 enable ucvja2 . add placeholder for Chinese/Korean/Vietnamese/Thai converters.
git-svn-id: svn://10.0.0.236/trunk@21970 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 19:52:25 +00:00
ftang%netscape.com
9fd58e5604 First Checked In.
git-svn-id: svn://10.0.0.236/trunk@21969 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 19:50:08 +00:00
slamm%netscape.com
60c064de5d Force configure to be regenerated.
git-svn-id: svn://10.0.0.236/trunk@21968 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 19:47:46 +00:00
wtc%netscape.com
c073a85602 Link the tests against $(LIBPLC) $(LIBPLDS) $(LIBPR).
git-svn-id: svn://10.0.0.236/trunk@21967 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 19:46:30 +00:00
alecf%netscape.com
14c4d02ab6 fix HPUX bustage - don't put commas after last element in enum declaration
git-svn-id: svn://10.0.0.236/trunk@21966 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 19:45:44 +00:00
cyeh%netscape.com
162f7e0a0a fixed busted perl script by adding proper quoting. duh.
git-svn-id: svn://10.0.0.236/trunk@21965 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 19:43:40 +00:00
cyeh%netscape.com
e301d8f212 add quick result to stdout
git-svn-id: svn://10.0.0.236/trunk@21964 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 19:40:38 +00:00
edwin%woudt.nl
f0b27c0052 Oops! Some illegal character slipped in.
git-svn-id: svn://10.0.0.236/trunk@21963 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 19:39:15 +00:00
cyeh%netscape.com
1599fcf118 little perl script that searches for global constructors/destructors
in build objects in the tree


git-svn-id: svn://10.0.0.236/trunk@21962 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 19:35:05 +00:00
rods%netscape.com
8c2c134ce5 Fixed name space problems with the xul and changed button to be title buttons
git-svn-id: svn://10.0.0.236/trunk@21961 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 19:34:54 +00:00
ftang%netscape.com
40f3362d92 add nsCharsetAliasImp.cpp
git-svn-id: svn://10.0.0.236/trunk@21960 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 19:32:34 +00:00
ftang%netscape.com
8a3aa58c3e add two cpp file into uconv.toc
git-svn-id: svn://10.0.0.236/trunk@21959 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 19:29:52 +00:00
wtc%netscape.com
51c4060a76 Merged /m/src/ns/nspr20/lib/tests/arena.c, revision 1.2, by larryh.
git-svn-id: svn://10.0.0.236/trunk@21958 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 19:29:46 +00:00
ftang%netscape.com
02544623ab add placeholder for nsCharsetAliasImp.cpp
git-svn-id: svn://10.0.0.236/trunk@21957 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 19:27:18 +00:00
ftang%netscape.com
605cae244e add placehodler for nsCharsetAliasImp.cpp
git-svn-id: svn://10.0.0.236/trunk@21956 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 19:26:33 +00:00
law%netscape.com
4f42dc7317 Fixes for Mac
git-svn-id: svn://10.0.0.236/trunk@21955 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 19:24:18 +00:00
slamm%netscape.com
b9e28d6823 Always use --with-nspr for nspr flag (not MOZ_WITH_NSPR). Change myconfig.sh to mozconfig.sh.
git-svn-id: svn://10.0.0.236/trunk@21954 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 19:22:46 +00:00
law%netscape.com
6033015167 Add DIRS=registry to win32 build
git-svn-id: svn://10.0.0.236/trunk@21953 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 19:22:13 +00:00
slamm%netscape.com
a1f2d080d0 Change myconfig to mozconfig.
git-svn-id: svn://10.0.0.236/trunk@21952 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 19:21:29 +00:00
ftang%netscape.com
6fa93574e6 add nsICharsetAlias.h interface
git-svn-id: svn://10.0.0.236/trunk@21951 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 19:21:25 +00:00
law%netscape.com
771c27f26f Adding nsRegistry to win32 build
git-svn-id: svn://10.0.0.236/trunk@21950 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 19:20:39 +00:00
slamm%netscape.com
9515e42db7 Add run_apprunner target
git-svn-id: svn://10.0.0.236/trunk@21949 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 19:18:59 +00:00
law%netscape.com
a4235416e3 Export nsIRegistry.h
git-svn-id: svn://10.0.0.236/trunk@21948 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 19:16:00 +00:00
vidur%netscape.com
9270605250 Made style reresolution propogate down to the bullet frames for list items. Added list related attribute tests.
git-svn-id: svn://10.0.0.236/trunk@21947 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 19:14:35 +00:00
edwin%woudt.nl
4e807fe46d Reflecting all currently working providers. (Except imap and smtp as they are handled correctly bij javamail itself)
git-svn-id: svn://10.0.0.236/trunk@21946 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 19:13:27 +00:00
alecf%netscape.com
f623a06bc4 fix HPUX bustage - HPUX doesn't do static_cast
git-svn-id: svn://10.0.0.236/trunk@21945 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 19:09:16 +00:00
ftang%netscape.com
0853369702 add newly design interface file
git-svn-id: svn://10.0.0.236/trunk@21944 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 19:08:45 +00:00
pinkerton%netscape.com
d24a730907 Removing obsolete files. These were never really needed.
git-svn-id: svn://10.0.0.236/trunk@21943 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 19:02:31 +00:00
pinkerton%netscape.com
58e86110fe Removing nsThrobberGlue.cpp
git-svn-id: svn://10.0.0.236/trunk@21942 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 19:01:33 +00:00
pinkerton%netscape.com
75f054fa60 removing nsThrobberGlue.cpp
git-svn-id: svn://10.0.0.236/trunk@21941 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 19:01:08 +00:00
michaelp%netscape.com
68e6998fbd added nsIDrawingSurface, a windows specific counterpart and a windows
implementation. cleaned up windows blending code to the point where we
don't really need platform specific blending implementations at all
anymore. added region area return from nsIRegion::GetRects(). unified all
windows bitmap management code under nsDrawingSurfaceWin.cpp.


git-svn-id: svn://10.0.0.236/trunk@21940 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 18:53:31 +00:00
alecf%netscape.com
cb08c3dc10 add nsICollection.idl
git-svn-id: svn://10.0.0.236/trunk@21939 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 18:51:53 +00:00
pinkerton%netscape.com
850fd37ff2 remove nsThrobberGlue.cpp
git-svn-id: svn://10.0.0.236/trunk@21938 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 18:51:00 +00:00
alecf%netscape.com
7458e02ae8 include jsapi.h whenever we're doing stub work
git-svn-id: svn://10.0.0.236/trunk@21937 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 18:47:58 +00:00
michaelp%netscape.com
fe37951134 work in progress for new compositor.
git-svn-id: svn://10.0.0.236/trunk@21936 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 18:44:45 +00:00
ebina%netscape.com
465c926ebe Change old RegisterFactory calls to use the new API.
git-svn-id: svn://10.0.0.236/trunk@21935 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 18:38:45 +00:00
ebina%netscape.com
989ce33bbf Change old RegisterFactory call to use the new API.
git-svn-id: svn://10.0.0.236/trunk@21934 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 18:37:30 +00:00
waterson%netscape.com
8bf6a59a42 Added support for <xul:treebody xul:id=...>
git-svn-id: svn://10.0.0.236/trunk@21933 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 18:37:27 +00:00
jband%netscape.com
a15cd434c9 added unix makesfiles, fixed two bad static casts, invoke code working on Linux, working on stubs code for Linux
git-svn-id: svn://10.0.0.236/trunk@21932 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 18:14:51 +00:00
dp%netscape.com
5cf4630054 Removing strange characters
git-svn-id: svn://10.0.0.236/trunk@21931 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 18:11:58 +00:00
terry%netscape.com
c245556712 Removed OS/2 component.
git-svn-id: svn://10.0.0.236/trunk@21930 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 18:11:20 +00:00
kostello%netscape.com
76bc4c8e27 Modifications to turn on the Editor Appshell Testbed for Windows
git-svn-id: svn://10.0.0.236/trunk@21929 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 18:06:26 +00:00
jfrancis%netscape.com
41cb054736 Adding Editor AppCore to macbuild
git-svn-id: svn://10.0.0.236/trunk@21928 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 18:05:37 +00:00
kin%netscape.com
e8423e91a5 Modifications to turn on EditorAppShell test bed for Linux.
git-svn-id: svn://10.0.0.236/trunk@21927 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 18:04:50 +00:00
terry%netscape.com
efb0274631 Patch from Dhiren Patel <dhiren@nuvomedia.com> -- deal with products
that have spaces or other weird characters in them.


git-svn-id: svn://10.0.0.236/trunk@21926 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 18:01:02 +00:00
alecf%netscape.com
572519680a forgot to capitalize a variable
git-svn-id: svn://10.0.0.236/trunk@21925 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 17:52:33 +00:00
alecf%netscape.com
49eb294d55 include stdlib for HPUX
git-svn-id: svn://10.0.0.236/trunk@21924 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 17:48:25 +00:00
alecf%netscape.com
4b3e627852 fix HPUX bustage - HP's compiler can't do "using" or static casts
git-svn-id: svn://10.0.0.236/trunk@21923 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 17:47:54 +00:00
briano%netscape.com
0032e2e4af Automated update
git-svn-id: svn://10.0.0.236/trunk@21922 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 17:45:40 +00:00
coop%netscape.com
e17dee7c12 NOT YET PART OF SEAMONKEY:
* first pass at typelib linker
* parent_interface modification is untested
* interface offset management is unimplemented
* what to do about annotations?


git-svn-id: svn://10.0.0.236/trunk@21921 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 17:45:11 +00:00
harishd%netscape.com
49c3b93aed Enabling view source window to display title.
git-svn-id: svn://10.0.0.236/trunk@21920 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 17:43:41 +00:00
harishd%netscape.com
a8f3c33c80 Enabling view source window to display title.
Added methods OpenHead() and CloseHead() to
the CViewSourceHTML class.


git-svn-id: svn://10.0.0.236/trunk@21919 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 17:43:16 +00:00
dp%netscape.com
9bd7ffc2b2 Meeting notes added
git-svn-id: svn://10.0.0.236/trunk@21918 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 17:43:02 +00:00
alecf%netscape.com
bd5640928a add C++ compiler checks for namespaces and static_cast (for nsCOMPtr)
git-svn-id: svn://10.0.0.236/trunk@21917 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 17:38:09 +00:00
pavlov%pavlov.net
ef5a9a8f4d remove keyboard accelerators so that editor works on the keys that had accels.
git-svn-id: svn://10.0.0.236/trunk@21916 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 17:33:06 +00:00
kin%netscape.com
faebbc2480 Initial check in of files for EditorAppShell test bed.
git-svn-id: svn://10.0.0.236/trunk@21915 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 17:32:59 +00:00
brade%netscape.com
885ac024e0 reformat (remove tabs; fix spacing/indent to be consistent with other files)
git-svn-id: svn://10.0.0.236/trunk@21914 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 17:32:00 +00:00
kin%netscape.com
ecd35a5e3d Removed gif files. Need to recheck them in using -kb flag to mark them as
binary.


git-svn-id: svn://10.0.0.236/trunk@21913 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 17:30:38 +00:00
alecf%netscape.com
aa43fb61a4 fix for BSD/OS 3.1
git-svn-id: svn://10.0.0.236/trunk@21912 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 17:26:22 +00:00
waterson%netscape.com
206bbf35d4 Improved tag matching so that it doesn't assume XUL namespace. Added nsIXMLContent methods in anticipation of someday getting real namespace scoping right. See http://bugzilla.mozilla.org/show_bug.cgi?id=3275 for more info.
git-svn-id: svn://10.0.0.236/trunk@21911 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 17:15:57 +00:00
brade%netscape.com
6b5c0c05a9 clean up (remove tabs, etc.)
git-svn-id: svn://10.0.0.236/trunk@21910 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 17:01:03 +00:00
edwin%woudt.nl
34b2e9668b Fixed another nasty bug. Possibly also because the JavaMail API changed to first call protocolConnect with a null password and if that fails to lookup the password and call protocolConnect again.
git-svn-id: svn://10.0.0.236/trunk@21909 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 16:48:33 +00:00
brade%netscape.com
f797c7d1e9 First Checked In.
git-svn-id: svn://10.0.0.236/trunk@21908 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 16:46:58 +00:00
kipp%netscape.com
dd3ae803c4 Avoid crashing if the url doesn't have a container
git-svn-id: svn://10.0.0.236/trunk@21907 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 16:43:17 +00:00
kipp%netscape.com
9addc29ade removed
git-svn-id: svn://10.0.0.236/trunk@21906 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 16:42:47 +00:00
kipp%netscape.com
8070a9c09f Added .cvsignores
git-svn-id: svn://10.0.0.236/trunk@21905 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 16:42:19 +00:00
kipp%netscape.com
4b4cf3fd26 Eliminate global constuctor dependency
git-svn-id: svn://10.0.0.236/trunk@21904 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 16:41:54 +00:00
kipp%netscape.com
b4dec93fd1 new
git-svn-id: svn://10.0.0.236/trunk@21903 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 16:41:09 +00:00
brade%netscape.com
c8121e783c First Checked In.
git-svn-id: svn://10.0.0.236/trunk@21902 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 16:35:36 +00:00
kin%netscape.com
2fc00c11bc Initial checkin of file for the EditorAppShell test bed.
git-svn-id: svn://10.0.0.236/trunk@21901 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 16:24:05 +00:00
brade%netscape.com
ec435e7d0a First Checked In.
git-svn-id: svn://10.0.0.236/trunk@21900 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 16:20:55 +00:00
edwin%woudt.nl
5d45d9a695 Now that was a nasty bug. The Javamail API changed. Hmm... now we have two working news stores and maybe even two working POP3 stores.
git-svn-id: svn://10.0.0.236/trunk@21899 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 16:14:45 +00:00
buster%netscape.com
8579381793 minor bug fixes
git-svn-id: svn://10.0.0.236/trunk@21898 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 16:09:18 +00:00
ebina%netscape.com
c80f10297f Stub in the new RegisterFactory API in preparation for removing the old one.
git-svn-id: svn://10.0.0.236/trunk@21897 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 16:07:31 +00:00
brade%netscape.com
06ecb9f0c1 First Checked In.
git-svn-id: svn://10.0.0.236/trunk@21896 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 16:07:25 +00:00
buster%netscape.com
b18e41adc0 edge conditions now supported for SetTextProperty. You now get correct behavior when you select the beginning of a text block, or the end.
You now get correct behavior if the selection spans multiple text blocks, as long as the blocks have the same grandparent.


git-svn-id: svn://10.0.0.236/trunk@21895 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 16:05:43 +00:00
cata%netscape.com
d3c71a6c51 Generic factory used.
git-svn-id: svn://10.0.0.236/trunk@21894 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 15:48:41 +00:00
brade%netscape.com
5f56326130 add "static" to CreateRobotDialog and CreateSizeDialog to reduce compiler warnings on Macintosh
git-svn-id: svn://10.0.0.236/trunk@21893 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 15:40:59 +00:00
brade%netscape.com
d956616cd3 remove extra comma to reduce compiler warnings on Macintosh
git-svn-id: svn://10.0.0.236/trunk@21892 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 15:39:50 +00:00
brade%netscape.com
a64bcb4630 add "static" to GetFrameBorderHelper to reduce compiler warnings on Macintosh
git-svn-id: svn://10.0.0.236/trunk@21891 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 15:38:29 +00:00
cata%netscape.com
f937e91bfd Small output format change.
git-svn-id: svn://10.0.0.236/trunk@21890 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 14:46:46 +00:00
cata%netscape.com
d493860db8 Generic factory used.
git-svn-id: svn://10.0.0.236/trunk@21889 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 14:44:44 +00:00
cata%netscape.com
d937524287 UnicodeToLatin1 component added.
git-svn-id: svn://10.0.0.236/trunk@21888 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 14:22:42 +00:00
cata%netscape.com
34ab284a39 added files: mozilla/intl/uconv/ucvlatin/nsUnicodeToLatin1.cpp, mozilla/intl/uconv/ucvlatin/nsUCvLatinSupport.cpp
git-svn-id: svn://10.0.0.236/trunk@21887 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 14:16:13 +00:00
edwin%woudt.nl
780811338b Needed to get news working.
git-svn-id: svn://10.0.0.236/trunk@21886 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 14:08:14 +00:00
cata%netscape.com
e20153f1e5 added files: mozilla/intl/uconv/src/nsUnicodeEncodeHelper.cpp
git-svn-id: svn://10.0.0.236/trunk@21885 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 13:36:27 +00:00
cata%netscape.com
3f6ecfa919 Generic factory used.
git-svn-id: svn://10.0.0.236/trunk@21884 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 13:15:07 +00:00
mcafee%netscape.com
0ccc2b6075 Reverting purify compiler back to CCC, this doesn't work with egcs/c++ anyways..
git-svn-id: svn://10.0.0.236/trunk@21883 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 11:12:51 +00:00
mcafee%netscape.com
ef156e8b9a Adding do_QueryInterface() wrappers for Solaris/CC
git-svn-id: svn://10.0.0.236/trunk@21882 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 11:08:53 +00:00
hyatt%netscape.com
31cd9ee4dd Implemented rollover feedback.
git-svn-id: svn://10.0.0.236/trunk@21881 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 09:37:17 +00:00
grail%cafebabe.org
ed017fb44b Removed some debugging information.
git-svn-id: svn://10.0.0.236/trunk@21880 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 07:44:57 +00:00
grail%cafebabe.org
7128be3e86 Preference dialog shows up and even saves the info back.
git-svn-id: svn://10.0.0.236/trunk@21879 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 07:44:11 +00:00
akkana%netscape.com
c678ac3e51 Back out previous change
git-svn-id: svn://10.0.0.236/trunk@21878 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 07:25:36 +00:00
akkana%netscape.com
037abd6d71 Backing out my changes
git-svn-id: svn://10.0.0.236/trunk@21877 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 06:54:50 +00:00
beard%netscape.com
ce87f6cb8a backed out my nsAllocator.cpp addition.
git-svn-id: svn://10.0.0.236/trunk@21876 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 06:17:05 +00:00
beard%netscape.com
31b35318b6 added nsAllocator.cpp to build
git-svn-id: svn://10.0.0.236/trunk@21875 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 06:15:01 +00:00
akkana%netscape.com
69c736c565 Add another ifdef to fix build
git-svn-id: svn://10.0.0.236/trunk@21874 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 06:13:48 +00:00
beard%netscape.com
98de55ae05 removing Malloc::create.
git-svn-id: svn://10.0.0.236/trunk@21873 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 06:11:25 +00:00
mcafee%netscape.com
2f0e19c245 Adding nsAllocator.cpp to Unix build
git-svn-id: svn://10.0.0.236/trunk@21872 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 06:08:13 +00:00
wtc%netscape.com
f2c490b3a7 Bugsplat bug #335804: made _MD_IrixIntervalPerSec return the correct
value.  Also some code cleanup for the default UNIX timer case.


git-svn-id: svn://10.0.0.236/trunk@21871 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 06:02:39 +00:00
akkana%netscape.com
e964886b03 turn on selection mgr in app shell; forgot this file in last check-in
git-svn-id: svn://10.0.0.236/trunk@21870 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 05:49:43 +00:00
sfraser%netscape.com
eaab1f6e0a File Removed.
git-svn-id: svn://10.0.0.236/trunk@21869 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 05:45:12 +00:00
troy%netscape.com
51829aa69c Fixed it so we clear the NS_FRAME_SYNC_FRAME_AND_VIEW bit, because the
default is that it's set


git-svn-id: svn://10.0.0.236/trunk@21868 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 05:41:05 +00:00
akkana%netscape.com
a89bc61e71 Use the real nsISelectionMgr for doCopy
git-svn-id: svn://10.0.0.236/trunk@21867 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 05:32:30 +00:00
troy%netscape.com
b51e46e943 Removed nsIFrame::CreateContinuingFrame()
git-svn-id: svn://10.0.0.236/trunk@21866 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 05:31:15 +00:00
sfraser%netscape.com
6028d8ac48 File Removed.
git-svn-id: svn://10.0.0.236/trunk@21865 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 05:09:53 +00:00
beard%netscape.com
98967931ba First Checked In.
git-svn-id: svn://10.0.0.236/trunk@21864 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 04:41:02 +00:00
beard%netscape.com
a0b014ad4f Added nsILiveConnectManager.h.
git-svn-id: svn://10.0.0.236/trunk@21863 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 04:39:20 +00:00
beard%netscape.com
dee44e2cab registering NS_ALLOCATOR_CID, NS_PLUGIN_HOST_CID, fixed some mutually exclusive ifdefs.
git-svn-id: svn://10.0.0.236/trunk@21862 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 04:30:45 +00:00
beard%netscape.com
337f3e2931 LiveConnect initialization.
git-svn-id: svn://10.0.0.236/trunk@21861 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 04:29:08 +00:00
beard%netscape.com
abce4d8cdf Updated to CWPro 4 format.
git-svn-id: svn://10.0.0.236/trunk@21860 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 04:25:04 +00:00
beard%netscape.com
6be1979216 Added nsAllocator.cpp, nsGenericFactory.cpp, removed nsMalloc.cpp.
git-svn-id: svn://10.0.0.236/trunk@21859 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 04:24:21 +00:00
beard%netscape.com
7dffb645fd added nsIAllocator.h
git-svn-id: svn://10.0.0.236/trunk@21858 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 04:21:12 +00:00
beard%netscape.com
c37ed31d31 made nsAllocatorFactory publically inherit from nsIFactory.
git-svn-id: svn://10.0.0.236/trunk@21857 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 04:20:51 +00:00
beard%netscape.com
0d07f4b46c cleaned up factory logic for service manager.
git-svn-id: svn://10.0.0.236/trunk@21856 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 04:20:06 +00:00
beard%netscape.com
b15f9df7b3 removed stray ; from IID macro
git-svn-id: svn://10.0.0.236/trunk@21855 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 04:19:27 +00:00
beard%netscape.com
dfcfe44f77 #include "jni.h" if necessary.
git-svn-id: svn://10.0.0.236/trunk@21854 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 04:18:59 +00:00
beard%netscape.com
1e6fcb2ed1 Renamed CID macro.
git-svn-id: svn://10.0.0.236/trunk@21853 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 04:18:30 +00:00
beard%netscape.com
5b22aebd36 implementing nsILiveConnectManager.
git-svn-id: svn://10.0.0.236/trunk@21852 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 04:18:00 +00:00
beard%netscape.com
0d75747d10 implementing nsILiveConnectManager interface methods.
git-svn-id: svn://10.0.0.236/trunk@21851 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 04:16:50 +00:00
beard%netscape.com
297f27dd8d removed eager loading, implemented GetPluginFactory() for use by OJI.
git-svn-id: svn://10.0.0.236/trunk@21850 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 04:15:39 +00:00
beard%netscape.com
3a07cb34a1 mserviceMgr -> mServiceMgr
git-svn-id: svn://10.0.0.236/trunk@21849 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 04:14:19 +00:00
beard%netscape.com
7aa1b2cbf7 implemented GetPluginInfo.
git-svn-id: svn://10.0.0.236/trunk@21848 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 04:12:55 +00:00
beard%netscape.com
4f0fa8709a Added support for NS_ALLOCATOR_CID.
git-svn-id: svn://10.0.0.236/trunk@21847 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 04:05:50 +00:00
bienvenu%netscape.com
4d7c3e3536 hack up some persistance
git-svn-id: svn://10.0.0.236/trunk@21846 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 04:04:43 +00:00
bienvenu%netscape.com
ddc97e1735 fix default mailbox path- needs leading /
git-svn-id: svn://10.0.0.236/trunk@21845 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 04:03:32 +00:00
mcafee%netscape.com
1afcb664e6 Solaris needs newline at end of file
git-svn-id: svn://10.0.0.236/trunk@21844 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 03:34:39 +00:00
troy%netscape.com
f293c578fd Changed nsIFrame::Init() to take an additional parameter
git-svn-id: svn://10.0.0.236/trunk@21843 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 03:27:57 +00:00
beard%netscape.com
e6d4c23f11 File Removed.
git-svn-id: svn://10.0.0.236/trunk@21842 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 03:13:54 +00:00
beard%netscape.com
e5a01fc93f nsIMalloc -> nsIAllocator
git-svn-id: svn://10.0.0.236/trunk@21841 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 03:12:01 +00:00
beard%netscape.com
60a2cd5124 kIAllocatorIID
git-svn-id: svn://10.0.0.236/trunk@21840 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 03:11:38 +00:00
beard%netscape.com
b0ccd6a5a6 Using service manager for get nsILiveconnect.
git-svn-id: svn://10.0.0.236/trunk@21839 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 03:10:50 +00:00
akkana%netscape.com
ee68fae484 Add nsISelectionMgr
git-svn-id: svn://10.0.0.236/trunk@21838 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 03:08:09 +00:00
putterman%netscape.com
704c541b8d Added cached flag
git-svn-id: svn://10.0.0.236/trunk@21837 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 03:01:22 +00:00
putterman%netscape.com
b924f93b58 Added correct RDF root.
git-svn-id: svn://10.0.0.236/trunk@21836 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 02:59:30 +00:00
putterman%netscape.com
4c6114e6de changed to use msgdb.lib
git-svn-id: svn://10.0.0.236/trunk@21835 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 02:58:35 +00:00
hyatt%netscape.com
234a11f901 Fixes to getElementsByTagName to avoid returning nodes that aren't elements.
git-svn-id: svn://10.0.0.236/trunk@21834 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 02:58:11 +00:00
putterman%netscape.com
4c3b53a019 made folder lists work and added db for message counts.
git-svn-id: svn://10.0.0.236/trunk@21833 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 02:58:04 +00:00
putterman%netscape.com
a55ed63bb2 Fixed clobber
git-svn-id: svn://10.0.0.236/trunk@21832 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 02:57:30 +00:00
putterman%netscape.com
7dcb8cedfa added clobber
git-svn-id: svn://10.0.0.236/trunk@21831 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 02:57:13 +00:00
putterman%netscape.com
577108de78 changed to msgdb.lib
git-svn-id: svn://10.0.0.236/trunk@21830 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 02:56:44 +00:00
putterman%netscape.com
039da3aec3 Added db for message counts
git-svn-id: svn://10.0.0.236/trunk@21829 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 02:56:13 +00:00
akkana%netscape.com
89f9d20598 Build nsSelectionMgr & include in nsAppShell on Unix
git-svn-id: svn://10.0.0.236/trunk@21828 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 02:54:50 +00:00
putterman%netscape.com
8b1332aa21 Add msglocal.lib
git-svn-id: svn://10.0.0.236/trunk@21827 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 02:54:38 +00:00
akkana%netscape.com
42a6f835f9 New SelectionMgr class
git-svn-id: svn://10.0.0.236/trunk@21826 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 02:42:06 +00:00
mscott%netscape.com
d7f5e0eea9 First checked in.
git-svn-id: svn://10.0.0.236/trunk@21825 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 02:41:37 +00:00
vidur%netscape.com
92b4ff5fae XML books test case (not part of the build so don't shoot me).
git-svn-id: svn://10.0.0.236/trunk@21824 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 02:26:53 +00:00
bienvenu%netscape.com
431aa76762 add new constructor from file path to avoid multiple nativization problems
git-svn-id: svn://10.0.0.236/trunk@21823 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 02:09:07 +00:00
bienvenu%netscape.com
474796f73a add call to DoneParsingFolder so we'll commit database
git-svn-id: svn://10.0.0.236/trunk@21822 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 02:00:48 +00:00
waterson%netscape.com
12ef209b44 Added librdfutil_s.a to link.
git-svn-id: svn://10.0.0.236/trunk@21821 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 01:35:53 +00:00
waterson%netscape.com
af5f3e1a05 Added nsRDFResource constructor to dlldeps.cpp to avoid runtime link problems on Linux.
git-svn-id: svn://10.0.0.236/trunk@21820 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 01:35:34 +00:00
ftang%netscape.com
001dc03913 add charset properties file. Currently we do not use it but hard code the mapping inside the nsXXXCharset.cpp, In the future, we will use these properties file so we can have better extensibility
git-svn-id: svn://10.0.0.236/trunk@21816 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 01:29:31 +00:00
sdagley%netscape.com
8b53976170 Fix bugzilla bug #2568
nsHttpUrlImpl::GetContainer was always returning with NS_OK even if the container is nil.  After discussing it with rpotts I've changed it to return NS_ERROR_UNEXPECTED if mContainer is nil which fixes the Mac crash (calling QueryInterface on a nil container is probably bad everywhere though).


git-svn-id: svn://10.0.0.236/trunk@21815 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 01:28:24 +00:00
ftang%netscape.com
cd2d4a3130 fix nsIPlatformCharset factory problem, add test cases for it.
git-svn-id: svn://10.0.0.236/trunk@21814 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 01:28:04 +00:00
mscott%netscape.com
4b0e88b151 Build nsMailboxService.
git-svn-id: svn://10.0.0.236/trunk@21813 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 01:12:03 +00:00
mscott%netscape.com
54e890d546 header file for mailbox service implementation.
git-svn-id: svn://10.0.0.236/trunk@21812 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 01:10:27 +00:00
mscott%netscape.com
0a97170220 Export nsIMailboxService.h
git-svn-id: svn://10.0.0.236/trunk@21811 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 01:08:30 +00:00
mscott%netscape.com
5d7248ac52 Remove dependencies on local.lib. Use the mailbox service for building and running mailbox urls. This allows to just use the dll form of msglocal.
git-svn-id: svn://10.0.0.236/trunk@21810 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 01:05:36 +00:00
mscott%netscape.com
0a330d4fa2 Creating a protocol instance shouldn't require a transport. We should create it ourselves. When running a url, mark it as being processed.
git-svn-id: svn://10.0.0.236/trunk@21809 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 01:03:45 +00:00
mscott%netscape.com
0b45bd759d Build nsMailboxService
git-svn-id: svn://10.0.0.236/trunk@21808 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 01:02:27 +00:00
mscott%netscape.com
1f70c34b61 Implement new nsIMsgMailNewsUrl methods...
git-svn-id: svn://10.0.0.236/trunk@21807 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 01:02:00 +00:00
mscott%netscape.com
54443c3564 Build the resources directory.
git-svn-id: svn://10.0.0.236/trunk@21806 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 01:01:02 +00:00
mscott%netscape.com
b63e8f410d New xul files to express our mail 3-pane UI. I also created a makefile.win which will export the mail news xul files into dist\WIN32_D.OBJ\bin\res\samples.
git-svn-id: svn://10.0.0.236/trunk@21805 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 01:00:19 +00:00
mscott%netscape.com
a689188c23 Removing from the repository. They are getting replaced with new .xul files.
git-svn-id: svn://10.0.0.236/trunk@21804 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 00:59:03 +00:00
sar%netscape.com
56ba0451e4 make pull_and_build_all mean all, not just seamonkey
git-svn-id: svn://10.0.0.236/trunk@21803 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 00:01:13 +00:00
mscott%netscape.com
9cc87ede3a Add msgCore.h at top for pre-compiled headers. Added ability for factory to create mailbox urls and mailbox service.
git-svn-id: svn://10.0.0.236/trunk@21801 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 22:11:10 +00:00
mscott%netscape.com
bbeaa4b069 Remove duplicate include of xpcom32.lib.
git-svn-id: svn://10.0.0.236/trunk@21800 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 22:10:11 +00:00
mscott%netscape.com
25da21813d Add class ID so our local factory can create instances of it. Use the new nsIMsgMailNewsUrl interface instead of inheriting directly from nsIURL.
git-svn-id: svn://10.0.0.236/trunk@21799 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 22:09:24 +00:00
mscott%netscape.com
e3036d288f Export nsIMailboxService.h
git-svn-id: svn://10.0.0.236/trunk@21798 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 22:08:12 +00:00
mscott%netscape.com
4df16c6d4f Service for running mailbox commands. This separates the application from building and running the urls...
git-svn-id: svn://10.0.0.236/trunk@21797 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 22:07:47 +00:00
edwin%woudt.nl
9ec8c72f93 Fixing Windows news.rc filename issues. Windows does not allow files to start with a dot.
git-svn-id: svn://10.0.0.236/trunk@21796 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 22:04:48 +00:00
locka%iol.ie
0d6a2d1184 Added IE browser helper object support
git-svn-id: svn://10.0.0.236/trunk@21794 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 21:49:32 +00:00
locka%iol.ie
6020028e15 Removed some build-breaking lines
git-svn-id: svn://10.0.0.236/trunk@21793 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 21:48:24 +00:00
locka%iol.ie
07627aacd7 Added some more CLSID parameter variants
git-svn-id: svn://10.0.0.236/trunk@21792 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 21:47:32 +00:00
edwin%woudt.nl
a7cc3f833b Reflecting the new nttp-store.
git-svn-id: svn://10.0.0.236/trunk@21791 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 21:43:14 +00:00
edwin%woudt.nl
e795e805ae Now let's see if I can commit it right this time.
git-svn-id: svn://10.0.0.236/trunk@21790 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 21:31:37 +00:00
edwin%woudt.nl
b0f1fd136b Removing this. It goes directly in mozilla/grendel because of classpath problems.
git-svn-id: svn://10.0.0.236/trunk@21789 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 21:11:03 +00:00
edwin%woudt.nl
ed1c44f826 Backed out again as we are going to move stuff a few levels higher so we don't have to mess around with the classpath.
git-svn-id: svn://10.0.0.236/trunk@21788 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 21:07:00 +00:00
edwin%woudt.nl
b14da725b9 Oops, forgot this one.
git-svn-id: svn://10.0.0.236/trunk@21787 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 20:59:56 +00:00
dp%netscape.com
4e6c3bec20 Last updated date changed
git-svn-id: svn://10.0.0.236/trunk@21786 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 20:31:50 +00:00
dp%netscape.com
3d0ff323a1 additional guidelines
git-svn-id: svn://10.0.0.236/trunk@21785 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 20:29:51 +00:00
alecf%netscape.com
20af466edd add namespace registration stuff for bhuvan
git-svn-id: svn://10.0.0.236/trunk@21784 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 20:27:24 +00:00
dp%netscape.com
7b4a09a0bd Added progid spec
git-svn-id: svn://10.0.0.236/trunk@21783 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 20:24:27 +00:00
wtc%netscape.com
f890cfea30 Bugzilla bug #3233: create the pipe in nonblocking mode and have
reads and writes check for the possible EAGAIN/EWOULDBLOCK error.


git-svn-id: svn://10.0.0.236/trunk@21782 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 19:53:48 +00:00
despotdaemon%netscape.com
6d5331d53d Pseudo-automatic update of changes made by bsharma@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@21781 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 19:47:20 +00:00
jband%netscape.com
6b0ce7bcf8 initial checkin of linux invoker - untested. slight changes to platform compile time protection
git-svn-id: svn://10.0.0.236/trunk@21780 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 19:26:51 +00:00
waterson%netscape.com
340f5e3463 Removed the use-tag-namespace-as-default-namespace hack (well, #ifdef'd it out, anyway).
git-svn-id: svn://10.0.0.236/trunk@21779 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 19:25:14 +00:00
larryh%netscape.com
7528dde3af mumble. restore to 3.11
git-svn-id: svn://10.0.0.236/trunk@21777 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 19:19:21 +00:00
waterson%netscape.com
c79993466d Fix build bustage: make sure to include nsIUnicodeEncodeHelper.h for NS_IMPLIDS.
git-svn-id: svn://10.0.0.236/trunk@21776 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 19:12:27 +00:00
alecf%netscape.com
471aaedbd9 fix BSD/OS 3.1 bustage
git-svn-id: svn://10.0.0.236/trunk@21774 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 18:23:26 +00:00
cyeh%netscape.com
218bdde687 we blow past the limit for the echo command on WinNT as well. doing the stupid
thing for now until i can figure out how to generate better status and not
blow up the echo command.


git-svn-id: svn://10.0.0.236/trunk@21773 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 18:21:49 +00:00
ftang%netscape.com
5f7220fa9c change nsTextTransformer to break line by calling nsILineBreak and make nsTextFrame pass the nsILineBreaker to nsTextTransformer
git-svn-id: svn://10.0.0.236/trunk@21772 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 18:21:23 +00:00
nhotta%netscape.com
852cf4e1a5 For nsIUnicodeEncoder change.
git-svn-id: svn://10.0.0.236/trunk@21771 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 18:15:21 +00:00
beard%netscape.com
6e9016d233 nsILiveConnectManager.h
git-svn-id: svn://10.0.0.236/trunk@21770 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 18:00:00 +00:00
kostello%netscape.com
77c015350f Updated save code to match CSS "Selector to String" code.
We now output the selector from CSS style rules again
when we save a document.


git-svn-id: svn://10.0.0.236/trunk@21769 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 17:59:51 +00:00
beard%netscape.com
33f9460019 First Checked In.
git-svn-id: svn://10.0.0.236/trunk@21768 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 17:58:36 +00:00
pinkerton%netscape.com
20242a49ff Add manifest file for xpcom/src
git-svn-id: svn://10.0.0.236/trunk@21767 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 17:36:37 +00:00
pinkerton%netscape.com
4011fdc5cc remove absolute path in opt target to warren's machine.
git-svn-id: svn://10.0.0.236/trunk@21766 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 17:36:17 +00:00
dcone%netscape.com
1c4a72bf86 Added InsertElementTxn.cpp and nsEditProperty.cpp
git-svn-id: svn://10.0.0.236/trunk@21765 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 17:36:12 +00:00
pinkerton%netscape.com
fbafbed27c First Checked In.
git-svn-id: svn://10.0.0.236/trunk@21764 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 17:35:40 +00:00
larryh%netscape.com
ef07af6c0a lost update?
git-svn-id: svn://10.0.0.236/trunk@21762 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 17:33:00 +00:00
buster%netscape.com
8f4fa61d30 minor interface changes
git-svn-id: svn://10.0.0.236/trunk@21761 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 17:31:09 +00:00
buster%netscape.com
7218a4a579 added InsertElementTxn
added nsEditProperty
beginning of implementation for SetTextProperties.  Currently, it only works if the selection is entirely within a single text node.  Currently only
supports bold and italic (mapped to ctrl-b and ctrl-i for testing purposes.)
changed a bunch of interfaces to make things easier, like CreateElement now returns (as an out-param) the element created.


git-svn-id: svn://10.0.0.236/trunk@21760 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 17:24:37 +00:00
bienvenu%netscape.com
d4e6d41577 fix build bustage
git-svn-id: svn://10.0.0.236/trunk@21759 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 17:23:57 +00:00
troy%netscape.com
985c1c5280 Work-in-progress for having frame construction code handle creation
of continuing frames


git-svn-id: svn://10.0.0.236/trunk@21758 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 17:16:04 +00:00
cata%netscape.com
98917fab07 UnicodeToLatin1 added.
git-svn-id: svn://10.0.0.236/trunk@21757 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 17:10:37 +00:00
cata%netscape.com
c16c143ffd nsUnicodeToLatin1 added.
git-svn-id: svn://10.0.0.236/trunk@21756 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 17:10:04 +00:00
cata%netscape.com
fab932bc7a Small fixes.
git-svn-id: svn://10.0.0.236/trunk@21755 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 17:05:23 +00:00
bienvenu%netscape.com
8d92190b49 remove use of XP_ASSERT
git-svn-id: svn://10.0.0.236/trunk@21754 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 16:34:39 +00:00
pinkerton%netscape.com
ece92e2556 add nsUnicodeEncodeHelper.cpp for cata.
git-svn-id: svn://10.0.0.236/trunk@21753 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 16:31:18 +00:00
cata%netscape.com
6c8670469f UnicodeToLatin1 test added.
git-svn-id: svn://10.0.0.236/trunk@21752 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 16:27:30 +00:00
bienvenu%netscape.com
e286af237d remove use of XP_ASSERT
git-svn-id: svn://10.0.0.236/trunk@21751 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 16:27:28 +00:00
cata%netscape.com
f0e1c4eb33 nsUnicodeEncodeHelper added
git-svn-id: svn://10.0.0.236/trunk@21750 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 15:17:40 +00:00
cata%netscape.com
b63f71ab29 nsConverterCID.h not included anymore.
git-svn-id: svn://10.0.0.236/trunk@21749 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 15:05:33 +00:00
cata%netscape.com
052485e37a nsUnicodeEncodeHelper added.
git-svn-id: svn://10.0.0.236/trunk@21748 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 15:02:08 +00:00
cata%netscape.com
6af4884ea6 UnicodeToLatin1 added.
git-svn-id: svn://10.0.0.236/trunk@21747 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 14:47:42 +00:00
cata%netscape.com
262c16f88c Change back in. I hope no bustage this time...
git-svn-id: svn://10.0.0.236/trunk@21746 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 14:41:41 +00:00
cata%netscape.com
d6348edced File removed.
git-svn-id: svn://10.0.0.236/trunk@21745 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 14:39:15 +00:00
cata%netscape.com
36a32fa1d4 nsIUnicodeEncodeHelper added.
git-svn-id: svn://10.0.0.236/trunk@21744 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 14:38:16 +00:00
cata%netscape.com
e6600273c4 Changed to the new nsIUnicodeEncoder.
git-svn-id: svn://10.0.0.236/trunk@21743 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 14:06:45 +00:00
cata%netscape.com
5355e69e73 Interface complete. Cleaned.
git-svn-id: svn://10.0.0.236/trunk@21742 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 14:06:16 +00:00
leaf%mozilla.org
6d94bdf506 some cvs clients barf without the -d option (stupid, stupid win98 shell)
git-svn-id: svn://10.0.0.236/trunk@21741 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 13:56:23 +00:00
pierre%netscape.com
08424e1fe2 added rdf:util:public:MANIFEST to fix a build breakage
git-svn-id: svn://10.0.0.236/trunk@21740 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 12:01:16 +00:00
hyatt%netscape.com
7ce4e24042 Backing out the onItemClick code. I don't think we should be using it,
since event bubbling appears to be working.


git-svn-id: svn://10.0.0.236/trunk@21739 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 11:15:43 +00:00
warren%netscape.com
2d5fa96b77 Removed dead GetRoot code.
git-svn-id: svn://10.0.0.236/trunk@21738 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 10:54:03 +00:00
warren%netscape.com
de5933b23a Obsolete -- now in local/src/nsLocalMailFolder.[h/cpp]
git-svn-id: svn://10.0.0.236/trunk@21737 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 10:50:44 +00:00
warren%netscape.com
d9b9a230b3 Reorganization. Changes for collections, enumerations, generic folders, file paths, etc.
git-svn-id: svn://10.0.0.236/trunk@21736 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 10:39:06 +00:00
hyatt%netscape.com
863be8a643 Landing support for the special onItemClick default event handler that can be
placed on tree views (and executed in the context of tree items).


git-svn-id: svn://10.0.0.236/trunk@21735 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 10:38:56 +00:00
warren%netscape.com
3b7e819f00 Removed assertion (hit by mail code (bad xul?)).
git-svn-id: svn://10.0.0.236/trunk@21734 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 10:23:27 +00:00
warren%netscape.com
1df9ebe984 Added export/import declaration (temporarily).
git-svn-id: svn://10.0.0.236/trunk@21733 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 09:55:44 +00:00
warren%netscape.com
5a70e75547 Added rdf/util makefiles
git-svn-id: svn://10.0.0.236/trunk@21732 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 09:54:36 +00:00
warren%netscape.com
24f7d24bf0 Updated IIDs
git-svn-id: svn://10.0.0.236/trunk@21731 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 09:31:34 +00:00
warren%netscape.com
b618607b4a Made nsISupportsArray inherit from nsICollection.
git-svn-id: svn://10.0.0.236/trunk@21730 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 09:31:15 +00:00
warren%netscape.com
936646de93 Accidental commit (reverted)
git-svn-id: svn://10.0.0.236/trunk@21729 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 09:28:36 +00:00
warren%netscape.com
32312b1594 Accidental commit (reverted)
git-svn-id: svn://10.0.0.236/trunk@21728 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 09:28:09 +00:00
warren%netscape.com
58444076cd reverted (accidently committed)
git-svn-id: svn://10.0.0.236/trunk@21727 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 09:03:54 +00:00
warren%netscape.com
ec5f7517ea reverted (accidently committed)
git-svn-id: svn://10.0.0.236/trunk@21726 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 09:03:04 +00:00
warren%netscape.com
eca64f8a2e Removed link with rdfutil_s until I can get linux help.
git-svn-id: svn://10.0.0.236/trunk@21725 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 09:01:44 +00:00
warren%netscape.com
f4694c48e5 Added idl
git-svn-id: svn://10.0.0.236/trunk@21724 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 08:46:00 +00:00
mcafee%netscape.com
150ffbab68 Removing unused rules, cleaning this up.
git-svn-id: svn://10.0.0.236/trunk@21723 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 08:39:19 +00:00
mcafee%netscape.com
f4ddc0169c Need -lgfxps to link on linux
git-svn-id: svn://10.0.0.236/trunk@21722 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 08:29:11 +00:00
warren%netscape.com
0618fffb2e Added util lib
git-svn-id: svn://10.0.0.236/trunk@21721 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 08:27:52 +00:00
warren%netscape.com
6c5b21f9c3 Moved nsRDFResource to util.
git-svn-id: svn://10.0.0.236/trunk@21720 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 08:26:30 +00:00
warren%netscape.com
ccb39c8662 Added util directory stuff.
git-svn-id: svn://10.0.0.236/trunk@21719 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 08:25:00 +00:00
warren%netscape.com
b604003f29 Removed demo mail code.
git-svn-id: svn://10.0.0.236/trunk@21718 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 08:03:20 +00:00
warren%netscape.com
f22f6c3326 Removed demo mail datasource.
git-svn-id: svn://10.0.0.236/trunk@21717 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 08:02:28 +00:00
warren%netscape.com
420a9f60e8 Added nsConjoiningEnumerator.cpp
git-svn-id: svn://10.0.0.236/trunk@21716 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 08:01:33 +00:00
warren%netscape.com
04ff0b73e3 Added NS_NewConjoiningEnumerator
git-svn-id: svn://10.0.0.236/trunk@21715 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 07:58:06 +00:00
warren%netscape.com
2e1253b46b Got this stuff functioning.
git-svn-id: svn://10.0.0.236/trunk@21714 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 07:56:00 +00:00
jband%netscape.com
003e43159e banishing win32 specific stuff to its own directory before adding any analogous code for other platforms
git-svn-id: svn://10.0.0.236/trunk@21712 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 07:17:27 +00:00
mcafee%netscape.com
27419b6a07 Solaris warning
git-svn-id: svn://10.0.0.236/trunk@21711 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 07:09:42 +00:00
mcafee%netscape.com
148d290f2a Solaris needs newline at end of file.
git-svn-id: svn://10.0.0.236/trunk@21710 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 07:06:01 +00:00
bienvenu%netscape.com
29de5e46ca make GetFlags pure virtual to fix link error
git-svn-id: svn://10.0.0.236/trunk@21709 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 06:05:33 +00:00
troy%netscape.com
70b1ea8e3f Added frame type atoms for several table frame classes
git-svn-id: svn://10.0.0.236/trunk@21708 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 05:54:31 +00:00
troy%netscape.com
cd4ee3debc Added nsLayoutAtoms::textFrame
git-svn-id: svn://10.0.0.236/trunk@21706 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 05:33:40 +00:00
kipp%netscape.com
93a84ec681 Fixed bug #2885 - the linebreaker couldn't handle a special case...
git-svn-id: svn://10.0.0.236/trunk@21705 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 05:24:06 +00:00
waterson%netscape.com
171a394ac1 Use XUL as default namespace. Fixes GetElementByID() bug.
git-svn-id: svn://10.0.0.236/trunk@21704 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 05:23:26 +00:00
troy%netscape.com
cc2323242f Changed GetNextInFlow() and GetPrevInFlow() to be pointer arguments and
not references


git-svn-id: svn://10.0.0.236/trunk@21702 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 04:48:08 +00:00
waterson%netscape.com
52325e43b2 Made default namespaces work.
git-svn-id: svn://10.0.0.236/trunk@21700 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 04:47:19 +00:00
waterson%netscape.com
1462190b0e Fixed some refcounting bugs with atoms.
git-svn-id: svn://10.0.0.236/trunk@21699 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 04:46:47 +00:00
kipp%netscape.com
8698f50196 Build library properly
git-svn-id: svn://10.0.0.236/trunk@21698 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 04:44:41 +00:00
kipp%netscape.com
98e8b1857d Fixed crash bug where unitialized index would sometimes crash; also increment index in loop so that it terminates
git-svn-id: svn://10.0.0.236/trunk@21697 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 04:34:54 +00:00
briano%netscape.com
6a81cd1d49 Some more minor cleanup, and support for Solaris x86 and Linux Netwinders.
git-svn-id: svn://10.0.0.236/trunk@21696 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 04:33:17 +00:00
troy%netscape.com
cbaac14adf Added CreateContinuingFrame() function to frame construction code
git-svn-id: svn://10.0.0.236/trunk@21695 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 04:03:50 +00:00
cata%netscape.com
f9f76ef341 Backed change.
git-svn-id: svn://10.0.0.236/trunk@21694 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 03:40:34 +00:00
cata%netscape.com
9da05deb81 File deprecated.
git-svn-id: svn://10.0.0.236/trunk@21693 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 03:13:43 +00:00
cata%netscape.com
174d5a6ed0 nsIUnicodeEncodeHelper.h included
git-svn-id: svn://10.0.0.236/trunk@21692 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 03:00:30 +00:00
hyatt%netscape.com
4c9e9083ab Fixing the case of the ID atom (it should have been lower case).
git-svn-id: svn://10.0.0.236/trunk@21691 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 02:58:47 +00:00
bienvenu%netscape.com
afc60221b9 start hacking persistance
git-svn-id: svn://10.0.0.236/trunk@21690 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 02:58:43 +00:00
cata%netscape.com
8822bb229d Latin1 encoder CID added.
git-svn-id: svn://10.0.0.236/trunk@21689 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 02:56:41 +00:00
bienvenu%netscape.com
9cfe41ab86 make dbFolderInfo an interface
git-svn-id: svn://10.0.0.236/trunk@21688 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 02:56:11 +00:00
mscott%netscape.com
c95897bc4c Restore the ability to run multiple urls per smtp test session by using new code to determine if a url
is running or not.


git-svn-id: svn://10.0.0.236/trunk@21687 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 02:31:19 +00:00
mscott%netscape.com
9139f00f4b Flag the smtp url when we are running it....
git-svn-id: svn://10.0.0.236/trunk@21686 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 02:30:27 +00:00
mscott%netscape.com
ae089aebad nsIMsgMailNewsUrl base class updates. Keep track of whether the url is running or not...
git-svn-id: svn://10.0.0.236/trunk@21685 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 02:29:54 +00:00
mscott%netscape.com
b560ffbde3 Use mailnews url base class for interface inheritance....
git-svn-id: svn://10.0.0.236/trunk@21684 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 02:28:44 +00:00
mscott%netscape.com
20e1c90198 Export nsIMsgMailNewsUrl.h
git-svn-id: svn://10.0.0.236/trunk@21683 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 02:27:44 +00:00
mscott%netscape.com
d8c488f5c5 we inherit from the nsIURL interface...
git-svn-id: svn://10.0.0.236/trunk@21682 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 02:26:29 +00:00
mscott%netscape.com
401f517f00 Export nsIMsgMailNewsUrl.h
git-svn-id: svn://10.0.0.236/trunk@21681 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 02:22:22 +00:00
mscott%netscape.com
cbc2f0518d A base class for methods common to all of our mail and news protocol url interfaces.
git-svn-id: svn://10.0.0.236/trunk@21680 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 02:21:31 +00:00
cata%netscape.com
b2efd04e97 Space availability check done for 1 byte, too.
git-svn-id: svn://10.0.0.236/trunk@21679 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 02:18:55 +00:00
hyatt%netscape.com
f5c5ddd71c Fixing the multiple observer crash.
git-svn-id: svn://10.0.0.236/trunk@21678 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 02:18:35 +00:00
sar%netscape.com
8ba45f340c perl script to test viewer
git-svn-id: svn://10.0.0.236/trunk@21677 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 02:16:40 +00:00
beard%netscape.com
e38d03b5a7 Added nsPluginsDirMac.cpp
git-svn-id: svn://10.0.0.236/trunk@21676 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 02:15:11 +00:00
sar%netscape.com
3d84d69a90 make the file have more entries per QA request.
git-svn-id: svn://10.0.0.236/trunk@21675 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 02:15:00 +00:00
ftang%netscape.com
a90bec19e0 fix line break bug for halfwidth / fullwidth form
git-svn-id: svn://10.0.0.236/trunk@21674 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 02:14:59 +00:00
beard%netscape.com
157e3b48ce moved nsPluginDir/nsPluginFile classes to nsPluginDirMac.cpp.
git-svn-id: svn://10.0.0.236/trunk@21673 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 02:13:42 +00:00
cata%netscape.com
1d43049387 File created.
git-svn-id: svn://10.0.0.236/trunk@21672 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 02:13:37 +00:00
beard%netscape.com
4b2d255cf8 First Checked In.
git-svn-id: svn://10.0.0.236/trunk@21671 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 02:12:47 +00:00
beard%netscape.com
c07ac849a3 changed bool to PRBool
git-svn-id: svn://10.0.0.236/trunk@21670 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 02:12:37 +00:00
alecf%netscape.com
aa1a54ce38 update to use new nsCID type
git-svn-id: svn://10.0.0.236/trunk@21669 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 02:07:28 +00:00
alecf%netscape.com
5aeeb657be AddRef and Release return nsrefcnt's
git-svn-id: svn://10.0.0.236/trunk@21668 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 02:06:50 +00:00
alecf%netscape.com
75624e97af fix nsID definition (thanks to shaver for the right combination) to use pointers
git-svn-id: svn://10.0.0.236/trunk@21667 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 02:06:27 +00:00
slamm%netscape.com
3c79e6069e Echo LD_LIBRARY_PATH for configure.
git-svn-id: svn://10.0.0.236/trunk@21666 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 01:41:56 +00:00
larryh%netscape.com
a003c214d5 revert to 3.3, fix my mess
git-svn-id: svn://10.0.0.236/trunk@21665 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 00:41:43 +00:00
larryh%netscape.com
60799b32a6 don't do windows on unix
git-svn-id: svn://10.0.0.236/trunk@21664 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 00:09:40 +00:00
waterson%netscape.com
e9c298b2c5 Made sure to add a named reference to the event handlers. a=sar%netscape.com for checkin during closed tree.
git-svn-id: svn://10.0.0.236/trunk@21663 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 00:01:26 +00:00
larryh%netscape.com
02faee3f38 set old (3.0) library names
git-svn-id: svn://10.0.0.236/trunk@21662 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 23:56:05 +00:00
peterl%netscape.com
55e4f7028e Fixed bustage in Clear caused by PRInt32 to PRUint32 conversion
git-svn-id: svn://10.0.0.236/trunk@21659 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 23:31:49 +00:00
despotdaemon%netscape.com
79575e659d Pseudo-automatic update of changes made by phil@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@21658 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 23:12:23 +00:00
larryh%netscape.com
81924850ca add test case for plevent
git-svn-id: svn://10.0.0.236/trunk@21657 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 23:09:54 +00:00
larryh%netscape.com
917b653549 add windows test case for plevent
git-svn-id: svn://10.0.0.236/trunk@21656 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 23:09:10 +00:00
despotdaemon%netscape.com
5f3bc876d1 Pseudo-automatic update of changes made by leaf@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@21654 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 21:32:08 +00:00
despotdaemon%netscape.com
3c43deb793 Pseudo-automatic update of changes made by prusakov@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@21653 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 21:25:58 +00:00
karnaze%netscape.com
6c5308ed49 added printf to flag when a table cell's max element size exceeds its desired size (for bug 3094)
git-svn-id: svn://10.0.0.236/trunk@21652 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 21:03:57 +00:00
law%netscape.com
3e18d9fc97 Turn off USE_NSREG till later - Thanks, John!
git-svn-id: svn://10.0.0.236/trunk@21651 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 20:31:23 +00:00
terry%netscape.com
5738ca12f1 When we do "showall", or ask to rebuild checkin history, then we'll do
a week.  But, more normally, we'll only do two days, since it's much
faster that way, and we need to do this all the time.


git-svn-id: svn://10.0.0.236/trunk@21650 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 20:31:02 +00:00
terry%netscape.com
04d7cc916e Show checkin history up to a week.
git-svn-id: svn://10.0.0.236/trunk@21648 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 20:14:41 +00:00
mscott%netscape.com
7efce2661d Fix build breakage.RemoveElement does not take two arguments....
git-svn-id: svn://10.0.0.236/trunk@21647 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 20:03:33 +00:00
alecf%netscape.com
21d92613ab update to make ns*ID's work
git-svn-id: svn://10.0.0.236/trunk@21646 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 19:58:41 +00:00
law%netscape.com
4825bbf7a6 Landing LIBREG990212_BRANCH to get libreg building on Mac
git-svn-id: svn://10.0.0.236/trunk@21645 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 19:56:57 +00:00
terry%netscape.com
8dc83d3fd1 Added ImageLib component to NGLayout.
git-svn-id: svn://10.0.0.236/trunk@21644 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 19:55:34 +00:00
terry%netscape.com
d1314461d1 Set a few of the missing QAContact fields.
git-svn-id: svn://10.0.0.236/trunk@21643 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 19:48:24 +00:00
kipp%netscape.com
d46d285150 Removed some off by one rendering errors (not a perfect fix!)
git-svn-id: svn://10.0.0.236/trunk@21642 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 19:39:11 +00:00
kipp%netscape.com
a2ce2ee3db Latest snapshot using linux version of the tools
git-svn-id: svn://10.0.0.236/trunk@21641 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 19:38:50 +00:00
kipp%netscape.com
4a4e091470 Removed duplicate closing of the regression data files
git-svn-id: svn://10.0.0.236/trunk@21640 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 19:37:10 +00:00
alecf%netscape.com
2a1ae998ee update uuid's to match real definitions
git-svn-id: svn://10.0.0.236/trunk@21639 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 19:36:23 +00:00
kipp%netscape.com
ed946ccfbf Temporarily mark text and BR frames as replaced elements so that inline reflow will work properly
git-svn-id: svn://10.0.0.236/trunk@21638 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 19:36:14 +00:00
kipp%netscape.com
4585457984 For now text acts like a replaced element
git-svn-id: svn://10.0.0.236/trunk@21637 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 19:35:21 +00:00
kipp%netscape.com
93e88038fa Removed gratuitous destructor
git-svn-id: svn://10.0.0.236/trunk@21636 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 19:34:58 +00:00
kipp%netscape.com
6dfba2e03d Cleanedup vertical alignment support
git-svn-id: svn://10.0.0.236/trunk@21635 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 19:34:37 +00:00
kipp%netscape.com
a65c2103cc Improved vertical alignment correctness; fixed glaring error with box-width and height computation
git-svn-id: svn://10.0.0.236/trunk@21634 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 19:34:17 +00:00
kipp%netscape.com
975a668e6e Removed mLineHeight from the html reflow state; changed the signature of the VerticalAlignFrames method; made DetermineFrameType a callable static method
git-svn-id: svn://10.0.0.236/trunk@21633 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 19:33:34 +00:00
kipp%netscape.com
757ef013b8 Maded DetermineFrameType a callable static method; removed gratuitous line-height calculations
git-svn-id: svn://10.0.0.236/trunk@21632 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 19:33:06 +00:00
kipp%netscape.com
53678f589d Added a warning comment
git-svn-id: svn://10.0.0.236/trunk@21631 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 19:32:33 +00:00
kipp%netscape.com
d314a0492b Revised the signature of the VerticalAlignFrames method
git-svn-id: svn://10.0.0.236/trunk@21630 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 19:32:20 +00:00
kipp%netscape.com
9731c74c2c Compute minimum-line-height and store it into the inline-reflow context
git-svn-id: svn://10.0.0.236/trunk@21629 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 19:32:00 +00:00
alecf%netscape.com
aed185ddf3 fix compilation problem on generated code where we had two variables named "result"
prepare to handle [nonxpcom] object return values


git-svn-id: svn://10.0.0.236/trunk@21628 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 19:30:53 +00:00
slamm%netscape.com
0f7553fa69 Add comment about where nspr tip build gets installed.
git-svn-id: svn://10.0.0.236/trunk@21627 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 19:24:31 +00:00
vidur%netscape.com
2eade89c6f Fixed casing for nsCOMPtr inclusion
git-svn-id: svn://10.0.0.236/trunk@21626 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 19:22:53 +00:00
vidur%netscape.com
64dca5f8b7 Added nsIStyleSheetLinkingElement interface
git-svn-id: svn://10.0.0.236/trunk@21625 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 19:18:34 +00:00
vidur%netscape.com
c1da744044 Added nsIStyleSheetLinkingElement interface and implemented it for LINK and STYLE elements. Got attribute modifications for lists and list items working (including correct renumbering of lists when attribute values change).
git-svn-id: svn://10.0.0.236/trunk@21624 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 19:18:12 +00:00
briano%netscape.com
47d50edee4 Automated update
git-svn-id: svn://10.0.0.236/trunk@21623 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 19:15:42 +00:00
alecf%netscape.com
a17a4eb97b add flag for shaver's XPIDL flag
git-svn-id: svn://10.0.0.236/trunk@21622 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 19:02:27 +00:00
alecf%netscape.com
4011986b23 update now that uuid()s work again
git-svn-id: svn://10.0.0.236/trunk@21621 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 18:51:30 +00:00
pierre%netscape.com
15a6223e7e Put back the code but this time using the newly defined nsIBidirectionalEnumerator
git-svn-id: svn://10.0.0.236/trunk@21620 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 18:49:57 +00:00
mscott%netscape.com
8756b7a3f8 Use correct config\rules.mak file..we were going into the layout one before...
git-svn-id: svn://10.0.0.236/trunk@21619 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 18:31:09 +00:00
edwin%woudt.nl
c8dcf473cc Initial import of Knife's NNTP provider.
git-svn-id: svn://10.0.0.236/trunk@21617 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 18:25:48 +00:00
slamm%netscape.com
4a938e8779 Add threads option. Fix 'NSPR tip build' option.
git-svn-id: svn://10.0.0.236/trunk@21616 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 18:16:11 +00:00
slamm%netscape.com
6ade1d75b8 Add --with-nspr flag to configure when needed.
git-svn-id: svn://10.0.0.236/trunk@21615 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 18:08:52 +00:00
karnaze%netscape.com
3ba813479d added assertion for null peeked frame pointer in Reflow.
git-svn-id: svn://10.0.0.236/trunk@21614 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 18:06:55 +00:00
slamm%netscape.com
0d1074e32a echo the correct name of the included myconfig.sh
git-svn-id: svn://10.0.0.236/trunk@21613 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 17:58:25 +00:00
brade%netscape.com
3a5c59c63f First Checked In.
git-svn-id: svn://10.0.0.236/trunk@21612 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 17:07:25 +00:00
ftang%netscape.com
654b2c2010 add kPlatformCharsetCID
git-svn-id: svn://10.0.0.236/trunk@21611 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 16:52:04 +00:00
ftang%netscape.com
d2ee1b2bf0 add nsMacCharset.cpp
git-svn-id: svn://10.0.0.236/trunk@21610 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 16:51:23 +00:00
ftang%netscape.com
d22f88dc21 fix NS_IMPL_ISUPPORTS problem
git-svn-id: svn://10.0.0.236/trunk@21609 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 16:39:58 +00:00
ftang%netscape.com
01a84af5af add nsUNIXCharset.cpp
git-svn-id: svn://10.0.0.236/trunk@21608 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 16:36:51 +00:00
ftang%netscape.com
cf6417104c fix the NS_IMPL_ISUPPORTS problem
git-svn-id: svn://10.0.0.236/trunk@21607 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 16:36:33 +00:00
pierre%netscape.com
be3111d1b5 Backed out part of the previous checkin to turn Tinderbox green again.
git-svn-id: svn://10.0.0.236/trunk@21606 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 16:30:31 +00:00
ftang%netscape.com
c5f587f69a add nsIPlatformCharset
git-svn-id: svn://10.0.0.236/trunk@21605 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 16:25:25 +00:00
ftang%netscape.com
6d4ef66811 add nsWinCharset.cpp
git-svn-id: svn://10.0.0.236/trunk@21604 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 16:21:56 +00:00
ftang%netscape.com
88f7367de4 chnage the line breaker interface to a simple one
git-svn-id: svn://10.0.0.236/trunk@21603 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 16:20:39 +00:00
coop%netscape.com
239234185f NOT YET PART OF SEAMONKEY:
* fixed casting problem in calls to Do8


git-svn-id: svn://10.0.0.236/trunk@21602 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 16:17:37 +00:00
shaver%netscape.com
8f1e36024b handle new and old libIDL, [notxpcom], #ifdef XPIDL_JS_STUBS
git-svn-id: svn://10.0.0.236/trunk@21601 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 15:28:58 +00:00
pierre%netscape.com
217fe9735b Fixed #3154 "Events don't work with fixed positioning". Fixed "clicks in vScrollBar down arrow are ignored".
git-svn-id: svn://10.0.0.236/trunk@21600 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 12:53:28 +00:00
grail%cafebabe.org
ca7cbb47b1 Oopsie. MailServerPrefsEditor now initializes values.
git-svn-id: svn://10.0.0.236/trunk@21599 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 11:34:59 +00:00
edwin%woudt.nl
dcbc969438 Uhmm... I guess it was late when I updated this file.
git-svn-id: svn://10.0.0.236/trunk@21598 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 10:24:06 +00:00
ftang%netscape.com
c5742c86b2 backout accidential check in
git-svn-id: svn://10.0.0.236/trunk@21597 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 10:06:47 +00:00
ftang%netscape.com
f2eb9ef0cd add two new files
git-svn-id: svn://10.0.0.236/trunk@21596 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 09:55:55 +00:00
ftang%netscape.com
ce5573b51a move class definitation into nsWinCharset.cpp
git-svn-id: svn://10.0.0.236/trunk@21595 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 09:52:48 +00:00
ftang%netscape.com
6b54b5a289 remove nsWinCharset.h
git-svn-id: svn://10.0.0.236/trunk@21594 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 09:52:11 +00:00
ftang%netscape.com
b272b8fc3b add several new files
git-svn-id: svn://10.0.0.236/trunk@21593 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 09:48:43 +00:00
ftang%netscape.com
4d23c88fb4 add nsIPlatformCharset.h
git-svn-id: svn://10.0.0.236/trunk@21592 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 09:46:58 +00:00
pierre%netscape.com
e44999b362 Restored the v1.76 code for the loops through the children (no nsCOMPtr, no RTTI - today's problem was one too many). Updated comments.
git-svn-id: svn://10.0.0.236/trunk@21591 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 09:14:36 +00:00
warren%netscape.com
ddf031a5e8 Added check for null border.
git-svn-id: svn://10.0.0.236/trunk@21590 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 09:01:21 +00:00
pierre%netscape.com
3b20c67e63 added some comments
git-svn-id: svn://10.0.0.236/trunk@21589 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 09:00:16 +00:00
pierre%netscape.com
69306daed4 turned RTTI off
git-svn-id: svn://10.0.0.236/trunk@21588 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 08:59:45 +00:00
warren%netscape.com
80d60a5255 Added nsSupportsArrayEnumerator.cpp
git-svn-id: svn://10.0.0.236/trunk@21587 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 08:11:43 +00:00
warren%netscape.com
cb10d9f3a0 Cleaned up nsICollection and nsIEnumerator. Broke out nsIBidirectionalEnumerator. Added ISupportsArray enumerator. Cleaned nsISupportsArray.
git-svn-id: svn://10.0.0.236/trunk@21585 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 08:10:24 +00:00
warren%netscape.com
a6c9db8b16 Added nsSupportsArrayEnumerator
git-svn-id: svn://10.0.0.236/trunk@21584 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 08:04:28 +00:00
warren%netscape.com
d1e17d4dea Added forgotten initialization.
git-svn-id: svn://10.0.0.236/trunk@21583 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 08:01:02 +00:00
saari%netscape.com
377ff86635 nsWebShellWindow.cpp
nsWebShellWindow.h

Broke up more of menu loading code into functions for readablity and to allow hierarchical menu loading.


git-svn-id: svn://10.0.0.236/trunk@21582 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 07:52:14 +00:00
leaf%mozilla.org
179d712308 cleaned status of illegal references
git-svn-id: svn://10.0.0.236/trunk@21581 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 07:38:26 +00:00
warren%netscape.com
6c2a6c03c0 Added check for forgotten error that caused hang on failure.
git-svn-id: svn://10.0.0.236/trunk@21580 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 07:17:10 +00:00
putterman%netscape.com
4b366d00de These got moved to the build directory.
git-svn-id: svn://10.0.0.236/trunk@21579 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 07:13:38 +00:00
putterman%netscape.com
672de92d3a Create the dll in the build directory, not here.
git-svn-id: svn://10.0.0.236/trunk@21578 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 07:09:34 +00:00
putterman%netscape.com
ea080443e6 Added build directory.
git-svn-id: svn://10.0.0.236/trunk@21577 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 07:08:56 +00:00
putterman%netscape.com
54d6d16add removed nsMsgLocalMailFolder so it can go in local directory.
git-svn-id: svn://10.0.0.236/trunk@21576 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 05:24:52 +00:00
putterman%netscape.com
9b5a363ed9 Added nsLocalMailFolder to local directory.
git-svn-id: svn://10.0.0.236/trunk@21575 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 05:23:06 +00:00
mcafee%netscape.com
d6f61f2865 C++ comments in C file.
git-svn-id: svn://10.0.0.236/trunk@21574 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 05:04:56 +00:00
warren%netscape.com
c49d0d89a8 Fixed NS_INIT_REFCNT problem.
git-svn-id: svn://10.0.0.236/trunk@21573 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 04:37:31 +00:00
troy%netscape.com
596795551c Added include of $(PUBLIC)\unicharutil to fix build bustage
git-svn-id: svn://10.0.0.236/trunk@21572 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 04:28:08 +00:00
briano%netscape.com
ef895ffca9 This version works a bit better, and is much more platform-independent. But it could be better....
git-svn-id: svn://10.0.0.236/trunk@21571 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 03:52:21 +00:00
karnaze%netscape.com
3955f8e7f3 better sizing of form controls, especially percentage based sizes and max element sizes
git-svn-id: svn://10.0.0.236/trunk@21570 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 03:48:01 +00:00
grail%cafebabe.org
bbf9e64a65 First attempt at the preference dialog.
git-svn-id: svn://10.0.0.236/trunk@21569 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 03:44:34 +00:00
ducarroz%netscape.com
fc3f62f474 change composelib to msgcompose.lib
git-svn-id: svn://10.0.0.236/trunk@21568 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 03:40:55 +00:00
ducarroz%netscape.com
dc6c3011ec Define FE_Alert as printf
git-svn-id: svn://10.0.0.236/trunk@21567 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 03:39:38 +00:00
bienvenu%netscape.com
054b6ef66b fix name of exe for clobber target
git-svn-id: svn://10.0.0.236/trunk@21566 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 03:38:32 +00:00
ducarroz%netscape.com
00cd0660e1 change library name
git-svn-id: svn://10.0.0.236/trunk@21565 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 03:38:09 +00:00
bienvenu%netscape.com
3c6fd63262 add new hdr to db to commit it
git-svn-id: svn://10.0.0.236/trunk@21564 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 03:37:21 +00:00
ducarroz%netscape.com
94c3bc55ec did some clean-up and reformating
git-svn-id: svn://10.0.0.236/trunk@21563 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 03:36:56 +00:00
bienvenu%netscape.com
d435333405 add back mdbstubs.obj
git-svn-id: svn://10.0.0.236/trunk@21562 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 03:35:42 +00:00
ducarroz%netscape.com
4877e32e8f Add directory compose
git-svn-id: svn://10.0.0.236/trunk@21561 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 03:34:17 +00:00
bienvenu%netscape.com
eecca19c15 add new notifications, char set as string new method to create hdr and add to db
git-svn-id: svn://10.0.0.236/trunk@21560 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 03:34:02 +00:00
mcmullen%netscape.com
74e9a93bcf Update
git-svn-id: svn://10.0.0.236/trunk@21559 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 03:32:00 +00:00
ftang%netscape.com
0c167bb377 add S/GetLineBreaker to nsIDocument.h. Reviewed by kipp and waterson
git-svn-id: svn://10.0.0.236/trunk@21558 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 03:31:26 +00:00
ducarroz%netscape.com
7db1f7033f Initial check in
git-svn-id: svn://10.0.0.236/trunk@21557 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 03:26:08 +00:00
mscott%netscape.com
d86e09b16b Implement operator= for nsFilePath when given an nsFilePath. a=mcmullen...
git-svn-id: svn://10.0.0.236/trunk@21556 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 03:10:29 +00:00
hyatt%netscape.com
21995bf11c Touched the files auto-generatedb y the IDL. Also implemented getElementByAttribute
for documents and for elements.


git-svn-id: svn://10.0.0.236/trunk@21554 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 02:40:51 +00:00
hyatt%netscape.com
2450c0ee83 Touched the headers that are auto-generated from the IDL.
git-svn-id: svn://10.0.0.236/trunk@21553 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 02:40:26 +00:00
hyatt%netscape.com
b13db84c95 Adding a getElementsByAttribute method.
git-svn-id: svn://10.0.0.236/trunk@21552 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 02:40:06 +00:00
hyatt%netscape.com
23b3de1494 Changing selection in the tree.
git-svn-id: svn://10.0.0.236/trunk@21550 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 02:39:44 +00:00
alecf%netscape.com
e1052d2ede fix cases where native method wasn't being called on XPIDL void functions.
Add cases for methods with and without parameters, and with and without return types.


git-svn-id: svn://10.0.0.236/trunk@21549 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 02:39:31 +00:00
alecf%netscape.com
5126032312 add a space in between the new native type and the old one.
git-svn-id: svn://10.0.0.236/trunk@21548 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 02:38:16 +00:00
cyeh%netscape.com
63a8568ff8 fix stupid bug where clobber_all clobbered everything but mozilla/xpfe.
this should be cleaned up to something more elegant later.


git-svn-id: svn://10.0.0.236/trunk@21543 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 02:29:08 +00:00
ftang%netscape.com
d997998a21 Make Case conversion work for non-Latin1 Unicode. Reviewed by kipp. Perofrmance is the same after changing this.
git-svn-id: svn://10.0.0.236/trunk@21542 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 02:27:54 +00:00
ftang%netscape.com
a558186c75 performance tuning for ToTitle method
git-svn-id: svn://10.0.0.236/trunk@21541 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 02:24:40 +00:00
alecf%netscape.com
0b40ca28ff update IDL interfaces and add some new ones
git-svn-id: svn://10.0.0.236/trunk@21540 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 02:19:53 +00:00
mcmullen%netscape.com
fc3b93ecef Final update - landing our branch.
git-svn-id: svn://10.0.0.236/trunk@21539 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 02:16:21 +00:00
rickg%netscape.com
b080bc7e52 added stubs for expat
git-svn-id: svn://10.0.0.236/trunk@21536 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 01:57:13 +00:00
alecf%netscape.com
04451dc06b we need to export nsMsgSend
git-svn-id: svn://10.0.0.236/trunk@21535 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 01:44:38 +00:00
alecf%netscape.com
1afe34dacc clean up trailing text after #endif's
git-svn-id: svn://10.0.0.236/trunk@21534 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 01:44:14 +00:00
alecf%netscape.com
4a31fd689e remove trailing text after #endif's
git-svn-id: svn://10.0.0.236/trunk@21533 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 01:42:32 +00:00
alecf%netscape.com
213075ad38 don't put text on the end of an #endif
git-svn-id: svn://10.0.0.236/trunk@21532 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 01:41:06 +00:00
alecf%netscape.com
a96513d0cf add this so XPIDL is happy
git-svn-id: svn://10.0.0.236/trunk@21531 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 01:39:55 +00:00
mscott%netscape.com
122438de05 Include msgCore.h at top of the file for pre-compiled headers. added code to hook up msg send to the new smtp service for actually sending the mail message.
git-svn-id: svn://10.0.0.236/trunk@21530 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 01:38:25 +00:00
putterman%netscape.com
d8df0e6b38 Added factory to local directory.
git-svn-id: svn://10.0.0.236/trunk@21529 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 01:32:45 +00:00
pinkerton%netscape.com
d47e32037c Temp fix for RTTI problems that are holding the tree closed. beard and pierre will discuss a real fix later. My comment at the top of this file summarizes the problem.
git-svn-id: svn://10.0.0.236/trunk@21528 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 01:28:25 +00:00
mscott%netscape.com
7b228c1f4a Export nsISmtpService.h
git-svn-id: svn://10.0.0.236/trunk@21527 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 01:17:25 +00:00
radha%netscape.com
ccf25fd2cb Autoregister the RDF library interfaces so that apprunner will display the
toolbar and the default page when invoked with no argument.


git-svn-id: svn://10.0.0.236/trunk@21524 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 01:07:27 +00:00
mscott%netscape.com
ee9864a3b8 Remove dependency on compose.lib because we now use the compose dll which is automatically registered...
git-svn-id: svn://10.0.0.236/trunk@21523 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 01:06:05 +00:00
mscott%netscape.com
b5d4de6f11 Remove all dependencies on compose.lib. Use the new Smtp Service for running urls....Right now the test exe doesn't let you run more than one command...I'll fix this later...
git-svn-id: svn://10.0.0.236/trunk@21522 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 01:05:24 +00:00
mscott%netscape.com
96ae53ec00 Remove commented out dependency on netlib.lib...
git-svn-id: svn://10.0.0.236/trunk@21521 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 01:03:51 +00:00
edwin%woudt.nl
29eb090ce8 Initial import of the status overview. Feel free to change the status on anything you're working on.
git-svn-id: svn://10.0.0.236/trunk@21520 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 01:03:01 +00:00
mscott%netscape.com
e0810a7038 Added DLL self registration code. Ability to create smtp service object. Changed class name to reflect the fact that this is a factory for compose....
git-svn-id: svn://10.0.0.236/trunk@21519 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 01:02:49 +00:00
mscott%netscape.com
b5580a8f97 Interface updates to use nsString and nsFilePath....
git-svn-id: svn://10.0.0.236/trunk@21518 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 01:00:42 +00:00
mscott%netscape.com
9e90f21952 Changes to update new nsISmtpUrl interface...
git-svn-id: svn://10.0.0.236/trunk@21517 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 00:59:57 +00:00
mscott%netscape.com
7275cf4cbd Interface changes to support nsString and nsFilePath. Also, correctly parse out host and port in mailto urls...
git-svn-id: svn://10.0.0.236/trunk@21516 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 00:58:24 +00:00
mscott%netscape.com
2535706e7e built smtp service.....
git-svn-id: svn://10.0.0.236/trunk@21515 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 00:57:14 +00:00
mscott%netscape.com
e027401d35 Smtp service for handling smtp requests in the mail application. This abstracts away the need for the app to know how to create smtp urls and smtp connections...
git-svn-id: svn://10.0.0.236/trunk@21514 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 00:56:39 +00:00
mscott%netscape.com
a077f80db0 Export nsISmtpService.h
git-svn-id: svn://10.0.0.236/trunk@21513 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 00:55:38 +00:00
mscott%netscape.com
792d857087 Service for handling SMTP requests....this abstracts away the process of creating an SMTP url and an SMTP connection to run the url from the application...
git-svn-id: svn://10.0.0.236/trunk@21512 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 00:55:10 +00:00
mscott%netscape.com
a55b21fec4 Adding some more common includes --> including the repository, service manager, nsCRT....
git-svn-id: svn://10.0.0.236/trunk@21511 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 00:54:02 +00:00
putterman%netscape.com
d0cee28db8 Make local its own dll.
git-svn-id: svn://10.0.0.236/trunk@21510 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 00:48:09 +00:00
putterman%netscape.com
54d60ac524 Take tests directory out of the build until we fix exporting issues.
git-svn-id: svn://10.0.0.236/trunk@21508 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 00:31:16 +00:00
bienvenu%netscape.com
9041b188f9 hook up more db folder info members to mdb
git-svn-id: svn://10.0.0.236/trunk@21507 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 00:20:50 +00:00
cyeh%netscape.com
0aa57c8318 this application has mfc dependencies. checking in now to do the stupid
thing and fix people. will have to go back and fix this properly.


git-svn-id: svn://10.0.0.236/trunk@21506 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 00:05:31 +00:00
edwin%woudt.nl
f1bcc872d3 We now have a working POP3 Store. You need to download SUN's POP3 provider for JavaMail for this. We now don't use grendel's POP3 Store anymore.
git-svn-id: svn://10.0.0.236/trunk@21504 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-22 23:33:32 +00:00
bienvenu%netscape.com
58189586c8 use nsNativeFileSpec to construct pop state.dat file name
git-svn-id: svn://10.0.0.236/trunk@21503 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-22 23:28:41 +00:00
despotdaemon%netscape.com
e7438f4393 Pseudo-automatic update of changes made by davidmc@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@21502 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-22 23:25:20 +00:00
rickg%netscape.com
4566c0af09 fixed bug 2946
git-svn-id: svn://10.0.0.236/trunk@21500 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-22 23:18:43 +00:00
rickg%netscape.com
c994bcc637 fixed bug 2946
git-svn-id: svn://10.0.0.236/trunk@21499 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-22 23:17:05 +00:00
slamm%netscape.com
c93c74cddd nope, didn't work. remove it.
git-svn-id: svn://10.0.0.236/trunk@21498 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-22 23:12:39 +00:00
dougt%netscape.com
d4d557e798 Getting closer to milestone 2. More additions to the functionality of
xpinstall.

This is not part of the build process yet.


git-svn-id: svn://10.0.0.236/trunk@21496 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-22 23:10:23 +00:00
slamm%netscape.com
586994c681 Put this back and try again.
git-svn-id: svn://10.0.0.236/trunk@21495 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-22 23:07:24 +00:00
putterman%netscape.com
d20fc9f5e5 added NET_SACopy.
git-svn-id: svn://10.0.0.236/trunk@21494 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-22 23:03:53 +00:00
putterman%netscape.com
0403a01870 Add new parameters for width and height.
git-svn-id: svn://10.0.0.236/trunk@21493 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-22 23:00:36 +00:00
alecf%netscape.com
f999add513 fix XUL to match new command mechanism
git-svn-id: svn://10.0.0.236/trunk@21492 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-22 22:36:29 +00:00
mcmullen%netscape.com
2f12896d48 Remove the illegal semicolon after extern "C" {}
git-svn-id: svn://10.0.0.236/trunk@21489 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-22 22:25:10 +00:00
ftang%netscape.com
14f4b5ee95 fix ToTitle bug- make it compatabile to CSS Capitalize. Comment #ifndef XP_UNIX to make the auto registry work
git-svn-id: svn://10.0.0.236/trunk@21488 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-22 22:20:01 +00:00
despotdaemon%netscape.com
f61b96d0bd Pseudo-automatic update of changes made by leaf@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@21487 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-22 21:57:53 +00:00
rickg%netscape.com
d1023a23b1 fixed autoclose problem that Harish found
git-svn-id: svn://10.0.0.236/trunk@21486 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-22 20:55:15 +00:00
kin%netscape.com
e67967c1c2 Added IID() methods.
git-svn-id: svn://10.0.0.236/trunk@21485 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-22 19:56:57 +00:00
bienvenu%netscape.com
cd81f2b734 fix off by one error in line parsing code
git-svn-id: svn://10.0.0.236/trunk@21483 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-22 19:14:25 +00:00
fur%netscape.com
4dd6cc4ce1 Fix linkage problems on FreeBSD by adding -E linker option when building libPackage.so. Patch contributed by Amancio Hasty <hasty@rah.star-gate.com>.
git-svn-id: svn://10.0.0.236/trunk@21482 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-22 19:10:16 +00:00
saari%netscape.com
2bb1188bc8 tweak to mac menu logic
git-svn-id: svn://10.0.0.236/trunk@21481 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-22 19:10:05 +00:00
mjudge%netscape.com
49a8c115d7 Fixing nsCOMPtr misusage.
git-svn-id: svn://10.0.0.236/trunk@21479 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-22 19:06:48 +00:00
slamm%netscape.com
3838e04036 Server isn't ready for this file.
git-svn-id: svn://10.0.0.236/trunk@21478 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-22 19:06:20 +00:00
saari%netscape.com
0a38ef9c39 MacOS menus can support hierarchical menus now. nsWebShellWindow::LoadMenus() needs to be modified to support this.
git-svn-id: svn://10.0.0.236/trunk@21477 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-22 19:05:48 +00:00
hyatt%netscape.com
adaf4c6828 Re-enabling event handlers.
git-svn-id: svn://10.0.0.236/trunk@21476 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-22 19:05:30 +00:00
rods%netscape.com
819a746c89 Changed display type of titlebutton to inline
git-svn-id: svn://10.0.0.236/trunk@21475 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-22 19:01:13 +00:00
slamm%netscape.com
ac8a85f77d Allow 'SaveAs' to have correct name.
git-svn-id: svn://10.0.0.236/trunk@21474 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-22 18:59:18 +00:00
kmcclusk%netscape.com
62807409da Added support for creating a postscript device context for printing under GTK.
Sanitized the GTK nsDeviceContextSpecFactoryG, nsRenderingContextPS, nsDeviceContextPS,
and nsDeviceContextSpecG by removing WIN32 dependencies.
Added checks for null widgets in nsWidget and nsScrollbar GTK implementations.


git-svn-id: svn://10.0.0.236/trunk@21472 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-22 18:56:54 +00:00
slamm%netscape.com
430639dafc If the tree hasn't been pulled, client.mk needs to checkout build/autoconf/myconfig2defs.sh before it does anything else.
git-svn-id: svn://10.0.0.236/trunk@21471 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-22 18:48:51 +00:00
briano%netscape.com
2399e7a018 Automated update
git-svn-id: svn://10.0.0.236/trunk@21470 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-22 18:31:44 +00:00
slamm%netscape.com
8462c67f4e Little patch for -md dependencies.
git-svn-id: svn://10.0.0.236/trunk@21469 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-22 18:26:12 +00:00
bienvenu%netscape.com
6a966cfe55 hook up more db folder info stuff to mdb
git-svn-id: svn://10.0.0.236/trunk@21468 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-22 18:05:23 +00:00
slamm%netscape.com
27b7ce4ca4 Fix incorrect path for NSPR install dir.
git-svn-id: svn://10.0.0.236/trunk@21467 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-22 17:36:36 +00:00
buster%netscape.com
fb7ad5c58c caught up to new ScrollIntoView changes.
most transactions now properly set selection after modifying content, for Do, Undo, Redo.
lots of cleanup and minor bug fixes.


git-svn-id: svn://10.0.0.236/trunk@21466 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-22 15:53:31 +00:00
dcone%netscape.com
294ccdc501 Added fixes to get it to compile under UNIX
git-svn-id: svn://10.0.0.236/trunk@21465 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-22 15:00:59 +00:00
pierre%netscape.com
32d8cf8e04 don't dispatch cursor keys
git-svn-id: svn://10.0.0.236/trunk@21464 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-22 11:21:23 +00:00
pierre%netscape.com
46dac9a429 don't dispatch cursor keys / minor fixes
git-svn-id: svn://10.0.0.236/trunk@21463 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-22 11:20:57 +00:00
pierre%netscape.com
4c1175e4b0 added combobox (= popup) to the Mac
git-svn-id: svn://10.0.0.236/trunk@21462 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-22 10:22:45 +00:00
pierre%netscape.com
1c8fd37df1 inherits from Repeater
git-svn-id: svn://10.0.0.236/trunk@21461 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-22 10:21:51 +00:00
pierre%netscape.com
276c8cb22e numerous changes
git-svn-id: svn://10.0.0.236/trunk@21460 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-22 10:21:37 +00:00
pierre%netscape.com
c52d2e5834 added GetUniqueMenuID() (needed for popups)
git-svn-id: svn://10.0.0.236/trunk@21459 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-22 10:21:20 +00:00
pierre%netscape.com
45b1a40c7a added mMin/mMax (needed for popups)
git-svn-id: svn://10.0.0.236/trunk@21458 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-22 10:20:59 +00:00
pierre%netscape.com
c5e9e52519 removed outdated comments
git-svn-id: svn://10.0.0.236/trunk@21457 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-22 10:20:39 +00:00
grail%cafebabe.org
20526c39e0 Automagically add a scrollpane whenever a jlist is added.
git-svn-id: svn://10.0.0.236/trunk@21456 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-22 07:54:14 +00:00
mjudge%netscape.com
39c608b459 adding comments to interfaces
git-svn-id: svn://10.0.0.236/trunk@21455 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-22 05:19:06 +00:00
mjudge%netscape.com
22b8399dde Added, jump to prev word, modified INIT of nsTextTransformer to better prepare for a start offset at the end of the mFrags list. added implementation of extra parameter to nsIFrame::PeekOffset to keep state for the next word problem of eating ws. nsTextFrame should be all set on implementation of jumping words.
git-svn-id: svn://10.0.0.236/trunk@21454 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-22 04:59:52 +00:00
mjudge%netscape.com
537c9cb5ea adding parameter to nsIFrame for ::PeekOffset to be aware of the state of jumping a word. eating WS ect. also, nsRangeList sends the proper parameter for above change.
git-svn-id: svn://10.0.0.236/trunk@21453 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-22 04:57:44 +00:00
troy%netscape.com
957c46c254 More work-in-progress for table pagination
git-svn-id: svn://10.0.0.236/trunk@21452 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-22 03:28:00 +00:00
mjudge%netscape.com
465cddb814 gettig word jumping to work, adding GetPrevWord to texttransformer
git-svn-id: svn://10.0.0.236/trunk@21451 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-22 03:20:59 +00:00
mjudge%netscape.com
4589e1e0e1 adding word jumping with CNTRL char down now
git-svn-id: svn://10.0.0.236/trunk@21450 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-22 03:20:18 +00:00
mjudge%netscape.com
58cba90e27 adding NPL
git-svn-id: svn://10.0.0.236/trunk@21449 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-22 03:19:24 +00:00
brendan%netscape.com
b844735e32 - Use write rather than dump consistently (dump has unfortunate connotations).
- Avoid gratuitous extra newlines in foo.h compiled from foo.idl.
- Use do-while, not for or while, guarded by if that tests the loop condition.
- Use NS_EXPORT to qualify static InitJSClass and GetJSObject method.
- Turn enum declarations within interfaces into JS class constant numbers.
- Defend against null return from JS_GetPrivate (prototype and user-constructed
  objects have no private data).


git-svn-id: svn://10.0.0.236/trunk@21446 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-22 00:24:34 +00:00
mcmullen%netscape.com
cd5b595562 Took another one for nsIFile.
git-svn-id: svn://10.0.0.236/trunk@21445 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-22 00:15:46 +00:00
rods%netscape.com
0a40cda128 MOved XULCommand to src and it is now acting like a menu delegate,
all that reminas is to rename it.


git-svn-id: svn://10.0.0.236/trunk@21444 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-21 21:04:21 +00:00
rods%netscape.com
55acfd21d7 Remmoved nsIXULCommand.h
git-svn-id: svn://10.0.0.236/trunk@21443 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-21 20:52:29 +00:00
rods%netscape.com
e05f7ca3cb Added static IID method
git-svn-id: svn://10.0.0.236/trunk@21442 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-21 20:52:04 +00:00
rods%netscape.com
0588c407d6 MOved from public to src, it doesn't need to be exported
git-svn-id: svn://10.0.0.236/trunk@21441 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-21 20:51:12 +00:00
mcafee%netscape.com
1fc62fe57b Optionally include .client-defs.mk, client.mk should still work if you don't have this file.
git-svn-id: svn://10.0.0.236/trunk@21440 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-21 20:18:10 +00:00
troy%netscape.com
16495c746c Changed GetRowIndex() so that for continued cell frames the row index is
that of the cell's first-in-flow


git-svn-id: svn://10.0.0.236/trunk@21439 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-21 19:55:22 +00:00
mjudge%netscape.com
c1304ffecc Needed methods to disable the ScrollFrameIntoView because of resizing causing scrolling to snap selection into view. 3 helper fucs, 1 variable, PRBool mEnableScrolling defaulted to true of course
git-svn-id: svn://10.0.0.236/trunk@21438 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-21 19:43:40 +00:00
troy%netscape.com
0d87e040a3 Changed DeleteChildsNextInFlow() to use the nsFrameList::RemoveFrame() function
instead of what it was doing, because the assumption it was making about "aChild"
and "nextInFlow" sharing the same parent frame is not true for continued table cells


git-svn-id: svn://10.0.0.236/trunk@21437 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-21 18:59:00 +00:00
troy%netscape.com
19cf644cc1 Changed GetEffectiveRowSpan()
git-svn-id: svn://10.0.0.236/trunk@21436 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-21 18:38:41 +00:00
pavlov%pavlov.net
c654edd155 minor code cleanups
git-svn-id: svn://10.0.0.236/trunk@21435 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-21 17:40:00 +00:00
rods%netscape.com
694e9f8145 Added Set/GetEnabled and Set/GetChecked methods
git-svn-id: svn://10.0.0.236/trunk@21434 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-21 14:31:19 +00:00
ramiro%netscape.com
20f6409a0f Fixing the stderr brain damage.
This code is obsolete, but it will server as documentation someday.


git-svn-id: svn://10.0.0.236/trunk@21433 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-21 12:24:46 +00:00
mjudge%netscape.com
f405547ad2 fixing leak with selection. didnt realize that ElementAt caused a refcount. this should fix problem of selection not allowing presshell to go away.
git-svn-id: svn://10.0.0.236/trunk@21432 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-21 05:14:36 +00:00
mjudge%netscape.com
57b5f5c79b adding scrolling depending on selection modification. either by key event, or outside event.
git-svn-id: svn://10.0.0.236/trunk@21431 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-21 03:49:32 +00:00
mjudge%netscape.com
988ca9603d depricating the ScrollIntoView call. dont need it. the selection modification assures us of scrolling to view after batching.
git-svn-id: svn://10.0.0.236/trunk@21430 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-21 03:48:52 +00:00
edwin%woudt.nl
a8b27bf38c This patch is to make sure that Giao can work on the prefs code without problems because I'm messing aroung with the multiple personalities code. So now first everything gets stored in the default identity. If you want more identities you'll have to hack
git-svn-id: svn://10.0.0.236/trunk@21429 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-21 03:00:15 +00:00
pierre%netscape.com
7d87b43f95 made gWindowlessMenuEventHandler a private member variable (#3203: RX: Mac widgets)
git-svn-id: svn://10.0.0.236/trunk@21428 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-21 02:48:02 +00:00
edwin%woudt.nl
67226c1e96 I created a new contrib dir for code/data that should not go into the main tree, but which might be of some interest to developers. The first entry is a Codewarrior project file from Wesley Felter.
git-svn-id: svn://10.0.0.236/trunk@21427 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-21 02:22:51 +00:00
pierre%netscape.com
3e39d64a45 added nsDeleteObserver (#3147: crashes on mouseMoved or closeWindow)
git-svn-id: svn://10.0.0.236/trunk@21426 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-21 02:10:36 +00:00
pierre%netscape.com
e6d0867a28 First Checked In.
git-svn-id: svn://10.0.0.236/trunk@21425 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-21 02:01:46 +00:00
pierre%netscape.com
593668da2a returns eConsumeNoDefault after closing a window
git-svn-id: svn://10.0.0.236/trunk@21424 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-21 02:01:16 +00:00
pierre%netscape.com
a51a1d37cb removed outdated comments
git-svn-id: svn://10.0.0.236/trunk@21423 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-21 01:57:48 +00:00
mjudge%netscape.com
581b55a5ac Shift click to continue selection
git-svn-id: svn://10.0.0.236/trunk@21422 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-21 01:23:40 +00:00
jband%netscape.com
83081501e5 lots of cleanup
git-svn-id: svn://10.0.0.236/trunk@21418 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-21 00:20:40 +00:00
grail%cafebabe.org
f4ebc31945 Enhanced gridwidth/gridheight improvements.
git-svn-id: svn://10.0.0.236/trunk@21417 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-20 23:53:48 +00:00
mjudge%netscape.com
46b7661e5e Extra parameter in nsIFrameSeleciton HandleKeyEvent not necessary. nsRangeList mod now allows SHIFT-Key selection. currently bound directly to VK_LEFT,RIGHT should be changed eventually to something more internationaly friendly
git-svn-id: svn://10.0.0.236/trunk@21416 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-20 23:52:05 +00:00
grail%cafebabe.org
3ab15ad3ae Removed lame columns field for mail directory field.
git-svn-id: svn://10.0.0.236/trunk@21414 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-20 23:39:04 +00:00
grail%cafebabe.org
de35e41c69 UserPrefsEditor loads values from xena.pref.
git-svn-id: svn://10.0.0.236/trunk@21413 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-20 22:55:37 +00:00
grail%cafebabe.org
9e6564f1e1 PageUI now supports initAll() and saveAll().
git-svn-id: svn://10.0.0.236/trunk@21412 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-20 22:53:02 +00:00
edwin%woudt.nl
efde44a684 Fixing small itches with quoting and signatures
git-svn-id: svn://10.0.0.236/trunk@21411 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-20 22:19:32 +00:00
edwin%woudt.nl
cea97c5cae Adding the toolbar button pictures for adding the signature. Somebody should draw better ones.
git-svn-id: svn://10.0.0.236/trunk@21410 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-20 22:08:55 +00:00
edwin%woudt.nl
40c48fa727 Grendel now handels signatures (one can have a different signature for every personality)
git-svn-id: svn://10.0.0.236/trunk@21409 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-20 22:07:12 +00:00
buster%netscape.com
4df8a07f61 beginning work on ScrollToFrame
git-svn-id: svn://10.0.0.236/trunk@21408 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-20 21:29:27 +00:00
buster%netscape.com
8a7091809c the pres shell now respects NS_PRESSHELL_SCROLL_ANYWHERE for vertical scrolling.
this is a hack implementation, to be recoded by the layout team


git-svn-id: svn://10.0.0.236/trunk@21407 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-20 21:27:28 +00:00
edwin%woudt.nl
e712d9c08a When replying the message is quoted automatically now, so you don't have to push that 'quote' button.
git-svn-id: svn://10.0.0.236/trunk@21406 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-20 21:03:09 +00:00
pavlov%pavlov.net
e8c5e7c32c nsAppShell isn't an nsWidget, so don't cast it as so. This fixes the
nsRepository::CreateInstance for nsAppShell from viewer so it doesn't return
with an error for me.


git-svn-id: svn://10.0.0.236/trunk@21405 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-20 19:56:01 +00:00
jband%netscape.com
8281f81e8a compiler warning inspired fixes
git-svn-id: svn://10.0.0.236/trunk@21404 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-20 09:00:55 +00:00
jband%netscape.com
a42acfdfd4 compiler warning inspired fixes
git-svn-id: svn://10.0.0.236/trunk@21403 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-20 08:52:00 +00:00
jband%netscape.com
52667cdf63 added file to Makefile.in and fixed typo
git-svn-id: svn://10.0.0.236/trunk@21402 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-20 08:33:21 +00:00
jband%netscape.com
c7bae7988a jsint was supposed to be jsid
git-svn-id: svn://10.0.0.236/trunk@21401 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-20 08:31:36 +00:00
slamm%netscape.com
2870c0620c Get rid of ^M. Stupid windows editor
git-svn-id: svn://10.0.0.236/trunk@21400 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-20 07:52:15 +00:00
slamm%netscape.com
9cbfd8e4f9 Fix the dependencies for running configure.Have it depend on .client-defs.mk and only update that when the myconfig options change.
git-svn-id: svn://10.0.0.236/trunk@21399 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-20 07:47:04 +00:00
slamm%netscape.com
bd4ac0cddb Cleaner presentation.
git-svn-id: svn://10.0.0.236/trunk@21398 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-20 06:36:03 +00:00
mcafee%netscape.com
069fd4d3db Adding license; added do_QueryInterface() wrappers for nsCOMPtr stuff (Solaris)
git-svn-id: svn://10.0.0.236/trunk@21397 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-20 06:05:15 +00:00
terry%netscape.com
0951ed8dd2 Quote link containing username. Was choking if a username happened
to contain a % followed by two hex digits...


git-svn-id: svn://10.0.0.236/trunk@21396 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-20 06:04:57 +00:00
beard%netscape.com
f0dd8fa466 backed out build bustage change
git-svn-id: svn://10.0.0.236/trunk@21395 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-20 04:43:53 +00:00
beard%netscape.com
a7b513e908 class nsIPlugin not struct.
git-svn-id: svn://10.0.0.236/trunk@21394 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-20 04:26:09 +00:00
troy%netscape.com
986751b140 Fixed build bustage
git-svn-id: svn://10.0.0.236/trunk@21393 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-20 04:20:09 +00:00
beard%netscape.com
e964556c5c include nsFileSpec.h on all platforms.
git-svn-id: svn://10.0.0.236/trunk@21392 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-20 03:59:43 +00:00
rjc%netscape.com
de65e8143f *** empty log message ***
git-svn-id: svn://10.0.0.236/trunk@21391 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-20 03:52:26 +00:00
troy%netscape.com
d73ce78fae Pagination work-in-progress
git-svn-id: svn://10.0.0.236/trunk@21390 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-20 03:15:03 +00:00
alecf%netscape.com
bb5fecbdaf add nsIFactory to IDL export list
git-svn-id: svn://10.0.0.236/trunk@21389 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-20 03:12:19 +00:00
alecf%netscape.com
0b6134db08 update IDL files to be closer to real headers
git-svn-id: svn://10.0.0.236/trunk@21388 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-20 03:11:52 +00:00
slamm%netscape.com
967abbbedc Fix 'save as' link
git-svn-id: svn://10.0.0.236/trunk@21386 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-20 02:42:22 +00:00
slamm%netscape.com
0b94b60ff0 Add a couple comments to the script.
git-svn-id: svn://10.0.0.236/trunk@21385 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-20 02:38:06 +00:00
beard%netscape.com
c4737508c1 First Checked In.
git-svn-id: svn://10.0.0.236/trunk@21384 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-20 02:27:18 +00:00
beard%netscape.com
173a8736bd OJI interface changes.
git-svn-id: svn://10.0.0.236/trunk@21383 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-20 02:26:54 +00:00
beard%netscape.com
d7cf5961f9 OJI interface changes
git-svn-id: svn://10.0.0.236/trunk@21382 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-20 02:24:15 +00:00
slamm%netscape.com
820c132b85 Pull configure.in from the tree and parse it live.
git-svn-id: svn://10.0.0.236/trunk@21381 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-20 02:22:38 +00:00
beard%netscape.com
d41def05db XP_MAC: using __comobject as magic base class for all XPCOM objects.
git-svn-id: svn://10.0.0.236/trunk@21380 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-20 02:22:18 +00:00
slamm%netscape.com
a5e6e33af3 Ready for first release.
git-svn-id: svn://10.0.0.236/trunk@21379 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-20 02:20:59 +00:00
edwin%woudt.nl
7891a2e32d Finally fixed the java.awt.List / java.util.List nameclash
git-svn-id: svn://10.0.0.236/trunk@21378 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-20 02:17:48 +00:00
edwin%woudt.nl
565992401b Sanity (jikes falls over these)
git-svn-id: svn://10.0.0.236/trunk@21377 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-20 02:13:18 +00:00
hyatt%netscape.com
fc49802bdb Adding support for Eric Vaughan's buttons.
git-svn-id: svn://10.0.0.236/trunk@21376 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-20 02:08:08 +00:00
rjc%netscape.com
5fdc8d3672 Export nsIRDFFileSystem.h
git-svn-id: svn://10.0.0.236/trunk@21375 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-20 02:04:24 +00:00
hyatt%netscape.com
dc0cd2a930 Switched over to Eric Vaughan's titled buttons on the toolbar.
git-svn-id: svn://10.0.0.236/trunk@21374 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-20 02:01:01 +00:00
hyatt%netscape.com
6ebe77c7d6 Adding the event listener manager to the registry.
git-svn-id: svn://10.0.0.236/trunk@21373 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-20 02:00:12 +00:00
hyatt%netscape.com
afbfdebf96 Implementing event handlers on XUL nodes.
git-svn-id: svn://10.0.0.236/trunk@21372 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-20 01:59:45 +00:00
ftang%netscape.com
9a33e22c4c add sample code for word break into tests
git-svn-id: svn://10.0.0.236/trunk@21371 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-20 01:45:51 +00:00
mcmullen%netscape.com
ce4de2fba0 Took 2 for nsIFileOutputStream and nsIFileInputStream
git-svn-id: svn://10.0.0.236/trunk@21370 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-20 01:45:30 +00:00
rjc%netscape.com
568775e64c FileSystem data source now uses nsFileSpec (in base)
git-svn-id: svn://10.0.0.236/trunk@21369 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-20 01:38:57 +00:00
jband%netscape.com
8e6c568ef4 graphs of all the important objects can now be dumped for diagnostic purposes
git-svn-id: svn://10.0.0.236/trunk@21368 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-20 01:31:02 +00:00
slamm%netscape.com
6351718a4f Almost ready for first release.
git-svn-id: svn://10.0.0.236/trunk@21367 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-20 01:11:02 +00:00
sfraser%netscape.com
83a34ecac9 Backing out my previous change, to enable AutoRegister again on the Mac. sdagley checked in a change to NSPR which fixes the crash on launch.
git-svn-id: svn://10.0.0.236/trunk@21366 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-20 01:07:31 +00:00
larryh%netscape.com
148843f692 per Steve Dagley
git-svn-id: svn://10.0.0.236/trunk@21365 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-20 00:58:42 +00:00
robinf%netscape.com
626d47873d adding Show Example bitmap for net.ini dialog
git-svn-id: svn://10.0.0.236/trunk@21364 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-20 00:41:54 +00:00
robinf%netscape.com
2a66104b97 updated Netcenter dialog text on this screen
git-svn-id: svn://10.0.0.236/trunk@21363 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-20 00:37:15 +00:00
brendan%netscape.com
bb634b1838 Fix goofs caught by alecf in GetJSObject generation.
git-svn-id: svn://10.0.0.236/trunk@21362 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-20 00:10:22 +00:00
mjudge%netscape.com
b52264a83e nsPresShell now listens to changes in the domselection. (also modified nsIEnumerator to use NS_IMETHOD instead of virtual nsresult). Added batching for selection changes. you can move the selection, do things then turn off batching for an update if necessary. also prevented circular referencing by adding listener removal to PresShell::endDocumentListening(sp)
git-svn-id: svn://10.0.0.236/trunk@21359 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 23:47:36 +00:00
buster%netscape.com
adcc22143f work-in-progress for scrolling frames into view. Not called anywhere in layout yet.
git-svn-id: svn://10.0.0.236/trunk@21357 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 23:43:41 +00:00
mjudge%netscape.com
a811da51ec changing nsIEnumerator to use NS_IMETHOD not virtual nsresult
git-svn-id: svn://10.0.0.236/trunk@21356 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 23:43:20 +00:00
mjudge%netscape.com
25715df9ea adding batching for selection.
git-svn-id: svn://10.0.0.236/trunk@21355 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 23:41:49 +00:00
robinf%netscape.com
46236d416a adding bitmap for folder.ini dialog
git-svn-id: svn://10.0.0.236/trunk@21354 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 23:33:02 +00:00
robinf%netscape.com
949daaf880 adding dialogs for new Show Example buttons
git-svn-id: svn://10.0.0.236/trunk@21353 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 23:31:12 +00:00
sfraser%netscape.com
70f30c1dcc This is a temporary fix for the Mac crash on launch; don't call AutoRegister on Mac. Approved by sar
git-svn-id: svn://10.0.0.236/trunk@21352 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 23:28:49 +00:00
robinf%netscape.com
f8f83ecc27 added Show Example buttons to these dialogs
git-svn-id: svn://10.0.0.236/trunk@21351 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 23:28:27 +00:00
slamm%netscape.com
549bc1175f added
git-svn-id: svn://10.0.0.236/trunk@21350 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 23:11:36 +00:00
slamm%netscape.com
75bc03462a Fix bustage: OBJDIR wasn't defined correctly. (also add webconfig target)
git-svn-id: svn://10.0.0.236/trunk@21349 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 22:55:50 +00:00
michaelp%netscape.com
cfec235502 First Checked In.
git-svn-id: svn://10.0.0.236/trunk@21348 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 22:47:36 +00:00
edwin%woudt.nl
f19a7b51fe Mail sending now works. I also added the multiple peronalities feature.
git-svn-id: svn://10.0.0.236/trunk@21347 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 22:41:38 +00:00
edwin%woudt.nl
9ef011c45f Added the DialogAuthenticator back in to get imap/pop3/nntp working.
git-svn-id: svn://10.0.0.236/trunk@21346 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 22:40:12 +00:00
edwin%woudt.nl
a785970646 Added a mail.host property for sending e-mail. Also add the DialogAuthenticator back in to get imap/pop3/nntp working.
git-svn-id: svn://10.0.0.236/trunk@21345 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 22:39:23 +00:00
despotdaemon%netscape.com
a2542f8261 Pseudo-automatic update of changes made by edwin@woudt.nl.
git-svn-id: svn://10.0.0.236/trunk@21343 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 22:17:38 +00:00
slamm%netscape.com
f641e6118d try checking out configure.in.
git-svn-id: svn://10.0.0.236/trunk@21342 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 22:04:11 +00:00
slamm%netscape.com
4e272a0aa9 m4 not in server path. try full path.
git-svn-id: svn://10.0.0.236/trunk@21341 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 21:45:06 +00:00
slamm%netscape.com
171b74a9bd *** empty log message ***
git-svn-id: svn://10.0.0.236/trunk@21339 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 21:39:47 +00:00
jband%netscape.com
62fe220b56 get xpidl building again on Win32
git-svn-id: svn://10.0.0.236/trunk@21338 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 21:39:41 +00:00
slamm%netscape.com
7b20426c78 *** empty log message ***
git-svn-id: svn://10.0.0.236/trunk@21337 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 21:39:20 +00:00
slamm%netscape.com
029be13fd1 test parts of config.cgi
git-svn-id: svn://10.0.0.236/trunk@21336 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 21:34:59 +00:00
slamm%netscape.com
eb3c0ea15d Tweak license.
git-svn-id: svn://10.0.0.236/trunk@21333 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 20:53:45 +00:00
slamm%netscape.com
6e15814840 Tweak license, add comments
git-svn-id: svn://10.0.0.236/trunk@21332 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 20:53:25 +00:00
slamm%netscape.com
2d91b1e859 Not sure if m4 if present. use preparsed file for now
git-svn-id: svn://10.0.0.236/trunk@21331 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 20:26:29 +00:00
slamm%netscape.com
078a90b74d Another pass at it.
git-svn-id: svn://10.0.0.236/trunk@21330 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 20:17:25 +00:00
evaughan%netscape.com
78b1ccb4a7 Fixed out of scope compile bug.
git-svn-id: svn://10.0.0.236/trunk@21329 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 20:12:08 +00:00
slamm%netscape.com
0b9b69291e Make configure dependent on nspr
git-svn-id: svn://10.0.0.236/trunk@21327 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 20:01:56 +00:00
slamm%netscape.com
40d8febe78 Add .client-defs and myconfig.sh
git-svn-id: svn://10.0.0.236/trunk@21326 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 19:53:50 +00:00
despotdaemon%netscape.com
211ac29371 Pseudo-automatic update of changes made by wtc@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@21325 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 19:51:01 +00:00
slamm%netscape.com
c05bfd575d Look for nspr in /usr/lib. Add nspr check to build target. New documentation.
git-svn-id: svn://10.0.0.236/trunk@21324 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 19:49:15 +00:00
slamm%netscape.com
681bb2f47b Only load myconfig.sh if it can be found.
git-svn-id: svn://10.0.0.236/trunk@21323 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 19:40:41 +00:00
akkana%netscape.com
d3dc0c4391 Turn on Unix cout code for doCopy()
git-svn-id: svn://10.0.0.236/trunk@21322 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 19:21:25 +00:00
slamm%netscape.com
22f48fdd7e Remove unused substitutions for MOZ_NETCAST, MOZ_LDAP, SMART_MAIL
git-svn-id: svn://10.0.0.236/trunk@21321 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 18:42:29 +00:00
evaughan%netscape.com
994add6e25 added files: mozilla/layout/html/forms/src/nsButtonFrameRenderer.cpp, mozilla/layout/xul/base/src/nsTitledButtonFrame.cpp
git-svn-id: svn://10.0.0.236/trunk@21320 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 18:29:56 +00:00
evaughan%netscape.com
ece31da4ba Added TitledButton and ProgressMeter
git-svn-id: svn://10.0.0.236/trunk@21319 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 18:23:32 +00:00
evaughan%netscape.com
9ae8b8c3df Added a new XUL TitledButtonFrame
git-svn-id: svn://10.0.0.236/trunk@21318 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 18:23:02 +00:00
saari%netscape.com
4966836d25 enable menus on mac
git-svn-id: svn://10.0.0.236/trunk@21317 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 18:17:24 +00:00
briano%netscape.com
f142222ea3 Automated update
git-svn-id: svn://10.0.0.236/trunk@21316 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 17:31:47 +00:00
slamm%netscape.com
ae4233f4e1 Reorder/group options. Align comments. Remove dead options.
git-svn-id: svn://10.0.0.236/trunk@21315 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 17:29:51 +00:00
slamm%netscape.com
4c9cc55514 Avoid adding duplicate options (which would happen with config.status --recheck). Skip options for client.mk.
git-svn-id: svn://10.0.0.236/trunk@21314 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 17:27:53 +00:00
slamm%netscape.com
7dbcfada76 Add a macro to label a group of options.
git-svn-id: svn://10.0.0.236/trunk@21313 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 17:25:47 +00:00
slamm%netscape.com
8f7e66a512 Convert myconfig.sh into makefile format for client.mk
git-svn-id: svn://10.0.0.236/trunk@21312 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 17:24:48 +00:00
grail%cafebabe.org
b285b21227 On a slow machine, there's a NullException as getGraphics() returns after
UI disappears.


git-svn-id: svn://10.0.0.236/trunk@21311 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 16:18:41 +00:00
brade%netscape.com
6805ba51ec add prototype to reduce warnings on Macintosh compiler
git-svn-id: svn://10.0.0.236/trunk@21310 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 16:13:47 +00:00
brade%netscape.com
0abc84f688 move local variables into #if block where they are needed (reduces warnings on Macintosh compiler)
git-svn-id: svn://10.0.0.236/trunk@21309 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 16:12:58 +00:00
brade%netscape.com
3c77f58b02 move local variable into comment block to reduce warnings on Macintosh compiler
git-svn-id: svn://10.0.0.236/trunk@21308 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 16:11:23 +00:00
brade%netscape.com
1326f793c9 remove unused local variable to reduce warnings on Macintosh compiler
git-svn-id: svn://10.0.0.236/trunk@21307 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 16:09:37 +00:00
mcafee%netscape.com
02df79470f Yanking fe_GetConfigDir() which is now in prefs.
git-svn-id: svn://10.0.0.236/trunk@21306 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 13:34:20 +00:00
mcafee%netscape.com
d16f99e851 Solaris: adding do_QueryInterface() wrapper per scc's carpool.
git-svn-id: svn://10.0.0.236/trunk@21305 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 13:14:26 +00:00
mcafee%netscape.com
38e4c7c52b Solaris needs a constructor for ConverterInfo().
git-svn-id: svn://10.0.0.236/trunk@21304 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 13:05:19 +00:00
mcafee%netscape.com
6d0cd7820b Solaris: newline at end of file.
git-svn-id: svn://10.0.0.236/trunk@21303 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 12:33:44 +00:00
mcafee%netscape.com
a713afe41e Solaris: newline at end of file
git-svn-id: svn://10.0.0.236/trunk@21302 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 12:32:16 +00:00
mcafee%netscape.com
430ad20c2f Solaris: adding do_QueryInterface() wrapper as part of scc's nsCOMPtr carpool. a=scc
git-svn-id: svn://10.0.0.236/trunk@21301 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 12:27:19 +00:00
mcafee%netscape.com
5f84cd50d5 Adding source files to match Win32; Solaris build was failing with 0 source files for the library creation.
git-svn-id: svn://10.0.0.236/trunk@21300 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 12:21:16 +00:00
mcafee%netscape.com
9865bce5b0 Solaris: changing casts to match PREF_GetIntPref() prototype; We should be using PRBool, XP_Bool needs to go away, cast here until PREF_GetBoolPref() is fixed.
git-svn-id: svn://10.0.0.236/trunk@21299 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 12:20:12 +00:00
mcafee%netscape.com
69142ed84b Adding license file.
git-svn-id: svn://10.0.0.236/trunk@21298 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 12:16:35 +00:00
mcafee%netscape.com
92753a46b3 Solaris: adding do_QueryInterface() wrappers to finish scc's nsCOMPtr carpool. a=scc
git-svn-id: svn://10.0.0.236/trunk@21297 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 11:30:31 +00:00
ramiro%netscape.com
d9d58d2259 Fix the row data problem; it was breaking on aix and probably elsewhere.
Also, unhardcoded the item length.


git-svn-id: svn://10.0.0.236/trunk@21296 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 11:09:25 +00:00
ramiro%netscape.com
b57ce47d93 Use NS_STATIC_CAST instead of static_cast.
git-svn-id: svn://10.0.0.236/trunk@21295 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 11:05:16 +00:00
mcafee%netscape.com
5f03bde36f PRBool: use PR_FALSE, PR_TRUE instead of false, true.
git-svn-id: svn://10.0.0.236/trunk@21294 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 10:57:49 +00:00
mcafee%netscape.com
c76e336302 Solaris needs explicit casts here; NULL -> 0 solved some more cast problems.
git-svn-id: svn://10.0.0.236/trunk@21293 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 10:46:20 +00:00
grail%cafebabe.org
11efe4777c Store layout information in preference file.
git-svn-id: svn://10.0.0.236/trunk@21292 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 09:34:08 +00:00
mcafee%netscape.com
36202c86c7 Fixing function prototypes to match implementation; Solaris didn't like the const mis-matches.
git-svn-id: svn://10.0.0.236/trunk@21291 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 09:12:53 +00:00
grail%cafebabe.org
bd068d2900 Added newly introduced classes to the build.
git-svn-id: svn://10.0.0.236/trunk@21290 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 09:05:39 +00:00
grail%cafebabe.org
3ad3dcddb0 Dialogs that builds out of XML descriptions. Test code to verify that
they do work. Need integration into the main UI.


git-svn-id: svn://10.0.0.236/trunk@21289 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 09:05:00 +00:00
grail%cafebabe.org
9654b55745 PageUI class similar to original PageUI class prior to code
release. Many fixes with respect to structures in regards to widget
builders that read from XML.


git-svn-id: svn://10.0.0.236/trunk@21288 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 09:02:35 +00:00
mcafee%netscape.com
f4c6cbaf8d Solaris needs newline at end of file.
git-svn-id: svn://10.0.0.236/trunk@21287 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 08:45:46 +00:00
rickg%netscape.com
07ace3f11e improved broken quote handling
git-svn-id: svn://10.0.0.236/trunk@21286 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 06:48:25 +00:00
warren%netscape.com
b526be3e85 Used new NS_DECL_ISUPPORTS_INHERITED and NS_IMPL_ISUPPORTS_INHERITED macros.
git-svn-id: svn://10.0.0.236/trunk@21285 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 06:34:23 +00:00
warren%netscape.com
b689b92f0c Added NS_DECL_ISUPPORTS_INHERITED and NS_IMPL_ISUPPORTS_INHERITED.
git-svn-id: svn://10.0.0.236/trunk@21284 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 06:33:33 +00:00
rickg%netscape.com
46c4a16a9e support for hex entities
git-svn-id: svn://10.0.0.236/trunk@21283 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 06:33:06 +00:00
rickg%netscape.com
93cd35c059 small mod to handle hex conversion better
git-svn-id: svn://10.0.0.236/trunk@21282 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 06:32:40 +00:00
jband%netscape.com
e3a664c320 in the middle of adding diagnostics
git-svn-id: svn://10.0.0.236/trunk@21281 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 05:59:59 +00:00
warren%netscape.com
737e598624 A bunch of fixes for cursor stuff.
git-svn-id: svn://10.0.0.236/trunk@21280 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 05:27:22 +00:00
troy%netscape.com
6cd8439821 Removed some old code
git-svn-id: svn://10.0.0.236/trunk@21279 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 05:10:59 +00:00
waldemar%netscape.com
48586c4d0f Added traditional and super and changed [] to allow multiple arguments
git-svn-id: svn://10.0.0.236/trunk@21278 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 04:28:16 +00:00
troy%netscape.com
4073fb069c Added GetBrowserWindow to nsWebCrawler, and changed nsViewerApp to only
call SetBrowserWindow() once and to have CloseWindow() check before
setting the web crawler's browser window to NULL (doing so caused a crash)


git-svn-id: svn://10.0.0.236/trunk@21277 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 04:24:12 +00:00
mcafee%netscape.com
997ffb0991 Solaris: Adding do_QueryInterface() wrapper to finish scc's nsCOMPtr carpool.
git-svn-id: svn://10.0.0.236/trunk@21276 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 03:46:06 +00:00
grail%cafebabe.org
d95127f626 Changed access to setStore(Hashtable) to protected rather than default.
git-svn-id: svn://10.0.0.236/trunk@21275 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 03:28:29 +00:00
rickg%netscape.com
cf681fb5f2 fixed build bustage
git-svn-id: svn://10.0.0.236/trunk@21274 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 03:28:27 +00:00
briano%netscape.com
027bce5cae Automated update
git-svn-id: svn://10.0.0.236/trunk@21273 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 03:15:38 +00:00
grail%cafebabe.org
e1c53a6056 Coexistence patches for Java 2 DND and 1.1 non-existent DND.
git-svn-id: svn://10.0.0.236/trunk@21272 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 03:10:40 +00:00
bienvenu%netscape.com
1dc9778116 start getting nntp hooked up to news database
git-svn-id: svn://10.0.0.236/trunk@21271 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 03:09:39 +00:00
bienvenu%netscape.com
bcd3f56bb8 start adding mork impl
git-svn-id: svn://10.0.0.236/trunk@21270 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 03:08:40 +00:00
alecf%netscape.com
92f8b2f140 check in new .deps based dependancy system
git-svn-id: svn://10.0.0.236/trunk@21269 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 03:06:32 +00:00
scc%netscape.com
0bf24da1ba updated for nsCOMPtr; owners should check my changes to see if they agree with my choices for |do_QueryInterface| vs |dont_QueryInterface|
git-svn-id: svn://10.0.0.236/trunk@21267 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 02:56:00 +00:00
mcafee%netscape.com
b4abca0ff2 Switching over to PRBool, PR_TRUE, and PR_FALSE. Keeps us honest, and Solaris happy. a=pinkerton
git-svn-id: svn://10.0.0.236/trunk@21266 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 02:54:53 +00:00
scc%netscape.com
8d172223d3 updating for nsCOMPtr; owners should check my changes to see if they agree with my choices for |do_QueryInterface| vs |dont_QueryInterface|
git-svn-id: svn://10.0.0.236/trunk@21265 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 02:53:45 +00:00
ramiro%netscape.com
5733b62506 Add xpcom/idl/Makefile to the build.
git-svn-id: svn://10.0.0.236/trunk@21264 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 02:51:57 +00:00
sdagley%netscape.com
19eb0cde55 Mac specific fix. Now that dp's code to walk the shared libs to see what is installed is working we've run into a problem that unloading the libs breaks the app (crash on quit, possible general instability). rjc's fix is to make sure PR_LoadLibrary is loading a unique copy of the lib by changing GetDiskFragment to use the option kPrivateCFragCopy instead of kLoadCFrag.
git-svn-id: svn://10.0.0.236/trunk@21263 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 02:45:54 +00:00
mcafee%netscape.com
1f7994d9de Solaris needs newline at end of file.
git-svn-id: svn://10.0.0.236/trunk@21262 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 02:43:26 +00:00
mscott%netscape.com
0ec3a2d8cf More updates for getting the 3-pane looking correctly...
git-svn-id: svn://10.0.0.236/trunk@21261 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 02:43:11 +00:00
grail%cafebabe.org
da252ac5a7 Added in JList to the builder. Use type attribute as "jlist".
git-svn-id: svn://10.0.0.236/trunk@21260 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 02:39:00 +00:00
kostello%netscape.com
68e65f5b6f Fixing build error -- the instance variables
mComputedCRC32 and mExpectedCRC32 were only being defined
in the DEBUG build although they are used throughout
CNavDTD.cpp and it cannot be built in non-debug mode.


git-svn-id: svn://10.0.0.236/trunk@21259 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 02:35:58 +00:00
mcafee%netscape.com
a8d48b571d Fixing return types and swtich to proper PR_TRUE/PR_FALSE types. r=akkana@netscape.com
git-svn-id: svn://10.0.0.236/trunk@21258 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 02:32:58 +00:00
nisheeth%netscape.com
98f27f7f53 Adding test case for attribute changes on the BR element via the DOM.
git-svn-id: svn://10.0.0.236/trunk@21257 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 02:15:03 +00:00
alecf%netscape.com
42a31ae59a MD5 implementation, thanks to mrsam@geocities.com
git-svn-id: svn://10.0.0.236/trunk@21256 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 02:12:44 +00:00
mjudge%netscape.com
8d5b4d8988 fogot to move files out of this makefile.in
git-svn-id: svn://10.0.0.236/trunk@21255 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 02:12:19 +00:00
troy%netscape.com
467691c69c Removed some XXX code that was temporary, but I forgot to delete
git-svn-id: svn://10.0.0.236/trunk@21254 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 02:05:00 +00:00
alecf%netscape.com
a906c1204e add dummy nsISupports.idl so that other IDL files can compile
(Windows makefile.win still needed - volunteers welcome!)


git-svn-id: svn://10.0.0.236/trunk@21253 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 02:04:21 +00:00
mcafee%netscape.com
d9b8c3370e Fixing return types and swtich to proper PR_TRUE/PR_FALSE types. r=akkana@netscape.com
git-svn-id: svn://10.0.0.236/trunk@21252 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 02:03:23 +00:00
bienvenu%netscape.com
62c02dfd14 link with the dll rdf to get rid of linker warnings
git-svn-id: svn://10.0.0.236/trunk@21251 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 01:42:25 +00:00
mcafee%netscape.com
3fda99d774 Solaris: mIsDone is a PRBool, that means use PR_FALSE or PR_TRUE.
git-svn-id: svn://10.0.0.236/trunk@21250 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 01:41:03 +00:00
nhotta%netscape.com
ec9942b6be Fix for Macintosh test.
git-svn-id: svn://10.0.0.236/trunk@21249 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 01:38:27 +00:00
ftang%netscape.com
e12e6236d8 add implementation for word breaker. Add selftest code for word break. Fix GetClass for line breaker
git-svn-id: svn://10.0.0.236/trunk@21248 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 01:38:12 +00:00
nhotta%netscape.com
6c94cdaf95 Added a new sort test.
git-svn-id: svn://10.0.0.236/trunk@21247 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 00:59:42 +00:00
rickg%netscape.com
84b3dd704b added CRC
git-svn-id: svn://10.0.0.236/trunk@21246 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 00:54:27 +00:00
rickg%netscape.com
51cbc8248b minor improvement to CRC
git-svn-id: svn://10.0.0.236/trunk@21245 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 00:54:01 +00:00
troy%netscape.com
92f8d12843 Added pseudo style for 'page' element
git-svn-id: svn://10.0.0.236/trunk@21244 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 00:53:09 +00:00
wtc%netscape.com
b97395c726 Bugsplat bug #343158: corrected a typo in the comment. Thanks to
John Bandhauer <jband@netscape.com> for the bug report and fix.


git-svn-id: svn://10.0.0.236/trunk@21243 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 00:45:35 +00:00
bienvenu%netscape.com
0b75042f6b switch to new mdb interface naming conventions
git-svn-id: svn://10.0.0.236/trunk@21242 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 00:32:39 +00:00
mjudge%netscape.com
978b778be6 moving nsFrameTraversal.* nsFrameList.* to layout/base also adding selection from keyboard.
git-svn-id: svn://10.0.0.236/trunk@21241 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 00:21:22 +00:00
rjc%netscape.com
0be8d28fa8 Remove nsComPtr usage (due to Unix).
git-svn-id: svn://10.0.0.236/trunk@21240 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 00:19:42 +00:00
wtc%netscape.com
354adef46e Test list for nspr.
git-svn-id: svn://10.0.0.236/trunk@21239 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 00:14:41 +00:00
cyeh%netscape.com
dc574bc583 removing special config.mak and rules.mak. special rules have been rolled
into mozilla/config/config.mak and mozilla/config/rules.mak


git-svn-id: svn://10.0.0.236/trunk@21238 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 00:10:02 +00:00
scc%netscape.com
726c966a08 updated for nsCOMPtr (no implicit construction from raw pointers) owners should check that they agree with my choices for |dont_QueryInterface|, |do_QueryInterface| and |dont_AddRef|
git-svn-id: svn://10.0.0.236/trunk@21237 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 23:55:10 +00:00
rickg%netscape.com
7d4f2c2c76 new primaryDetect code in DTD detection system; fixes XIF
git-svn-id: svn://10.0.0.236/trunk@21236 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 23:45:44 +00:00
cyeh%netscape.com
67e1d76bc2 if makedep.exe doesn't exist, build it, then continue with rest of depend rule.
git-svn-id: svn://10.0.0.236/trunk@21235 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 23:37:43 +00:00
leaf%mozilla.org
2d2fb1c8b7 (really cyeh) fix syntatical lameness.
git-svn-id: svn://10.0.0.236/trunk@21234 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 23:23:17 +00:00
wtc%netscape.com
fcb29be1ad On BSDI, zero a pthread_mutex_t or pthread_cond_t before initializing
it.  This patch is contributed by Bert Driehuis
<bert_driehuis@nl.compuware.com>.


git-svn-id: svn://10.0.0.236/trunk@21233 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 23:20:11 +00:00
mcafee%netscape.com
0434d32b61 Adding do_QueryInterface() wrapper for Solaris, this is the other part of scc's nsCOMPtr carpool
git-svn-id: svn://10.0.0.236/trunk@21232 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 23:18:56 +00:00
cyeh%netscape.com
fee0afd4ba on win95 and win98, we would blow up echo with too long of a line to print.
if we are on NT, this doesn't happen. now we report status of makedep.exe
dependent of the OS we are on.


git-svn-id: svn://10.0.0.236/trunk@21231 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 23:18:40 +00:00
mcafee%netscape.com
7ecd89e7c3 Solaris needs newline at end of file.
git-svn-id: svn://10.0.0.236/trunk@21230 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 23:09:08 +00:00
buster%netscape.com
0a8d990683 work in progress
git-svn-id: svn://10.0.0.236/trunk@21229 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 23:01:06 +00:00
mcafee%netscape.com
a898a253b9 Solaris needs newline at end of file.
git-svn-id: svn://10.0.0.236/trunk@21228 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 23:00:45 +00:00
alecf%netscape.com
e7e0a25231 link xpidl statically against libxpt so that dist/bin doesn't need to be in your LD_LIBRARY_PATH
git-svn-id: svn://10.0.0.236/trunk@21227 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 22:59:17 +00:00
rjc%netscape.com
9f18f7d524 Now call rdf_qsort on all platforms.
git-svn-id: svn://10.0.0.236/trunk@21226 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 22:55:02 +00:00
rjc%netscape.com
b78067ee85 Add rdf_qsort.c to Unix/Win makefiles.
git-svn-id: svn://10.0.0.236/trunk@21225 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 22:54:16 +00:00
waterson%netscape.com
c71132e043 Removed RDF DLLs from SetupRegistry() b/c RDF self-registers.
git-svn-id: svn://10.0.0.236/trunk@21224 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 22:53:51 +00:00
waterson%netscape.com
f276494411 Fixed to get building on Linux.
git-svn-id: svn://10.0.0.236/trunk@21223 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 22:53:19 +00:00
buster%netscape.com
f92429b874 added nsPresShell::ScrollFrameIntoView(), which forces the given frame to be visible in the current view.
git-svn-id: svn://10.0.0.236/trunk@21222 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 22:52:21 +00:00
buster%netscape.com
72dbac31c5 added ScrollFrameIntoView(), which forces the given frame to be visible in the current view.
git-svn-id: svn://10.0.0.236/trunk@21221 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 22:51:46 +00:00
leaf%mozilla.org
628812f080 fixing the perl hardcoding. looks in the hardcoded places, then pulls perl from the
path if not found.


git-svn-id: svn://10.0.0.236/trunk@21220 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 22:51:05 +00:00
leaf%mozilla.org
6049bf947b fixing the 'unix_date' requirement... can be either unix_date or date in the
%MOZ_TOOLS%\bin directory.


git-svn-id: svn://10.0.0.236/trunk@21219 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 22:49:35 +00:00
rjc%netscape.com
7bfa2b0470 Needed to const strings.
git-svn-id: svn://10.0.0.236/trunk@21218 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 22:45:26 +00:00
mcafee%netscape.com
48000fe302 Solaris needs newline at end of file.
git-svn-id: svn://10.0.0.236/trunk@21217 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 22:43:16 +00:00
mcafee%netscape.com
75b0ae409a Adding do_QueryInterface() wrapper to finish scc's nsCOMPtr carpool
git-svn-id: svn://10.0.0.236/trunk@21216 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 22:39:26 +00:00
dp%netscape.com
30a7157140 Hacked to remove ./ when we PR_LoadLibrary() dlls of the type ./library.so
This improves memory a bit.


git-svn-id: svn://10.0.0.236/trunk@21215 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 22:37:35 +00:00
kmcclusk%netscape.com
103dec6b88 changed pseudo styles file-button, file-text to -moz-file-button -moz-file-text in ua.css
Adjusted nsHTMLAtoms to match.


git-svn-id: svn://10.0.0.236/trunk@21214 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 22:36:59 +00:00
waterson%netscape.com
189eb2cd2e rdfutil.cpp
git-svn-id: svn://10.0.0.236/trunk@21213 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 22:36:41 +00:00
alecf%netscape.com
b0cb95cfba make these libraries build during the export phase
git-svn-id: svn://10.0.0.236/trunk@21212 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 22:36:27 +00:00
dcone%netscape.com
461659931d Added the printer support files for GTK
git-svn-id: svn://10.0.0.236/trunk@21211 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 22:35:11 +00:00
rjc%netscape.com
301d4115d1 Comment out error while I investigate.
git-svn-id: svn://10.0.0.236/trunk@21210 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 22:34:25 +00:00
michaelp%netscape.com
90cf0a152e made GetClipRegion comply with new API definition.
git-svn-id: svn://10.0.0.236/trunk@21209 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 22:34:19 +00:00
mcafee%netscape.com
fab9b8fd0d Adding support for Solaris native compiler. a=scc
git-svn-id: svn://10.0.0.236/trunk@21208 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 22:34:15 +00:00
coop%netscape.com
52d9b10a97 NOT YET PART OF SEAMONKEY:
* now close input file in all cases
* warn user about params with no in/out flag information
* more internal error checking


git-svn-id: svn://10.0.0.236/trunk@21207 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 22:29:59 +00:00
rjc%netscape.com
8c9a8dbd6a Add simple, preliminary way of doing sorting. (Note: using our own local version of qsort due to API changes.)
git-svn-id: svn://10.0.0.236/trunk@21206 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 22:29:16 +00:00
rjc%netscape.com
4d94c79d09 First Checked In.
git-svn-id: svn://10.0.0.236/trunk@21205 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 22:28:10 +00:00
cyeh%netscape.com
b5bb8d7250 enable depend builds with client.mak.
git-svn-id: svn://10.0.0.236/trunk@21204 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 22:27:52 +00:00
cyeh%netscape.com
8abc5148a7 enable depend rules in client.mak. build makedep.exe. change rules.mak
to look for makedep.exe in mozilla/config


git-svn-id: svn://10.0.0.236/trunk@21203 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 22:26:31 +00:00
cyeh%netscape.com
9437ab4528 move this from mozilla/cmd/winfe/mkfiles32 to a more proper home in mozilla/config
git-svn-id: svn://10.0.0.236/trunk@21202 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 22:25:06 +00:00
kipp%netscape.com
77737917d9 removed usless includes
git-svn-id: svn://10.0.0.236/trunk@21201 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 22:23:52 +00:00
kipp%netscape.com
6055d14c33 Added missing ctor/dtor
git-svn-id: svn://10.0.0.236/trunk@21200 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 22:23:36 +00:00
kipp%netscape.com
e378675197 Added support methods to make bullet alignment better
git-svn-id: svn://10.0.0.236/trunk@21199 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 22:23:13 +00:00
kipp%netscape.com
f768475e63 Process bullets better so that they are vertically aligned properly
git-svn-id: svn://10.0.0.236/trunk@21198 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 22:22:55 +00:00
kipp%netscape.com
1e1667142a Renamed bullet pseudo style
git-svn-id: svn://10.0.0.236/trunk@21197 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 22:20:19 +00:00
slamm%netscape.com
a3f468be66 Add this until I get if from the mirror properly.
git-svn-id: svn://10.0.0.236/trunk@21196 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 22:07:43 +00:00
kmcclusk%netscape.com
92c173e493 Fixed call to ProbePseudoStyleContext in nsButtonControlFrame so it will compile
when NS_GFX_RENDER_FORM_ELEMENTS is defined.
Added checks to nsFileControlFrame::Reflow to make sure the pseudo styles actually
could be loaded. If they can't be loaded it uses the file upload elements style.
Changed file-buttonstyle to file-button and file-textstyle to file-text in ua.css


git-svn-id: svn://10.0.0.236/trunk@21195 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 22:07:23 +00:00
rods%netscape.com
77cc46acdc Aded default sizes to TopLevelWindowCreate
git-svn-id: svn://10.0.0.236/trunk@21194 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 22:04:34 +00:00
briano%netscape.com
48f2deb8b8 Automated update
git-svn-id: svn://10.0.0.236/trunk@21193 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 22:00:38 +00:00
rods%netscape.com
f1c36c51a2 Added example/experimental code showing how to change icons during runtime
git-svn-id: svn://10.0.0.236/trunk@21192 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 21:59:05 +00:00
rods%netscape.com
d5b8b13d8c Fixed a debug statement
git-svn-id: svn://10.0.0.236/trunk@21191 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 21:58:17 +00:00
rods%netscape.com
687a599bc1 Added some experimental code for printpreview
git-svn-id: svn://10.0.0.236/trunk@21190 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 21:56:21 +00:00
wtc%netscape.com
1c84f21c45 The code should not have actual functions in the assertions.
The patch is contributed by Matthew Zahorik <maz@albany.net>.


git-svn-id: svn://10.0.0.236/trunk@21189 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 21:55:58 +00:00
rods%netscape.com
0078cba183 Completed work on -width and -height
git-svn-id: svn://10.0.0.236/trunk@21188 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 21:53:31 +00:00
slamm%netscape.com
15708cc95f Remove duplicate flags.
git-svn-id: svn://10.0.0.236/trunk@21187 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 21:53:19 +00:00
rods%netscape.com
7f9d9e2cbd Completed work on -width and -height for specifying the initial size of the window
git-svn-id: svn://10.0.0.236/trunk@21186 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 21:52:27 +00:00
slamm%netscape.com
1061e81618 first test
git-svn-id: svn://10.0.0.236/trunk@21185 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 21:52:11 +00:00
hyatt%netscape.com
e6b7c227b8 Improvements to the broadcasting mechanism so that HTML nodes can properly
observe XUL broadcasters.


git-svn-id: svn://10.0.0.236/trunk@21184 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 21:45:06 +00:00
slamm%netscape.com
768e91fc56 Add directory for build tools.
git-svn-id: svn://10.0.0.236/trunk@21183 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 21:27:26 +00:00
slamm%netscape.com
7fc3f9aa6a Take out checkbox for selected build, since it didn't work.
git-svn-id: svn://10.0.0.236/trunk@21181 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 20:13:30 +00:00
pinkerton%netscape.com
930f143f9c adding nsRepository stuff to exports. permission to fix build bustage during closed tree given by leaf.
git-svn-id: svn://10.0.0.236/trunk@21180 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 20:11:07 +00:00
wtc%netscape.com
c6bb8cfa23 Minor editing.
git-svn-id: svn://10.0.0.236/trunk@21179 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 20:03:51 +00:00
brendan%netscape.com
2f93db442f Finish Get and SetProperty, simplify InitJSClass via globalObject.
git-svn-id: svn://10.0.0.236/trunk@21178 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 19:59:11 +00:00
alecf%netscape.com
7374289593 remove md5 from MOZ_MAIL_NEWS build
git-svn-id: svn://10.0.0.236/trunk@21177 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 19:54:54 +00:00
wtc%netscape.com
cb4214dcdf Bugzilla bug #3144: OPENBSD also needs a leading underscore in the
symbol names.  The patch is contributed by kstailey@kstailey.tzo.com.


git-svn-id: svn://10.0.0.236/trunk@21176 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 19:45:32 +00:00
mscott%netscape.com
01f184ec56 Build news/tests/nntp directory...
git-svn-id: svn://10.0.0.236/trunk@21175 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 19:42:59 +00:00
mscott%netscape.com
9596fcc41f Properly set and color toolbar button which will fetch a hard coded news article from the server and display it to the screen.
git-svn-id: svn://10.0.0.236/trunk@21174 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 19:37:32 +00:00
pinkerton%netscape.com
12f6d07701 fix types and remember to initialize the grippy last highlight to none at creation. Fixes a problem where the first grippy in the toolbar was being drawn highlighted at create time.
git-svn-id: svn://10.0.0.236/trunk@21173 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 19:28:00 +00:00
mscott%netscape.com
4716537e45 Our thread pane xml file was not written right. Updated it to use the correct xul and xml tags to display correctly using the tree widget.
git-svn-id: svn://10.0.0.236/trunk@21172 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 19:23:52 +00:00
mscott%netscape.com
352dba47a1 New style sheet for laying out the tree widget....
git-svn-id: svn://10.0.0.236/trunk@21171 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 19:22:33 +00:00
pinkerton%netscape.com
75a9ff8c89 move url bar to top toolbar.
git-svn-id: svn://10.0.0.236/trunk@21170 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 19:18:25 +00:00
mcmullen%netscape.com
2731eecce6 Reserved a range for file i/o errors.
git-svn-id: svn://10.0.0.236/trunk@21169 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 18:58:25 +00:00
slamm%netscape.com
9d53ca188b Look for '.mozmyconfig' in home directory
git-svn-id: svn://10.0.0.236/trunk@21168 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 18:51:02 +00:00
leaf%mozilla.org
3cf01f0b50 adding the Grendel module
git-svn-id: svn://10.0.0.236/trunk@21167 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 18:49:23 +00:00
ebina%netscape.com
75b8d59d5f Remove the magic files from the MANIFEST
git-svn-id: svn://10.0.0.236/trunk@21166 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 18:45:55 +00:00
ebina%netscape.com
67889cd9e7 removed files: mozilla/network/cnvts/magic.cpp
git-svn-id: svn://10.0.0.236/trunk@21165 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 18:45:37 +00:00
slamm%netscape.com
ba2dfae464 Add 'run_viewer' target.
git-svn-id: svn://10.0.0.236/trunk@21164 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 18:44:48 +00:00
ebina%netscape.com
fe3cfd5ead The magic stuff is gone. The real stuff is in XPCOM/repository now.
git-svn-id: svn://10.0.0.236/trunk@21163 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 18:42:35 +00:00
kipp%netscape.com
d1a27c7e27 Fixed bug #3161 - removed bogus assertion
git-svn-id: svn://10.0.0.236/trunk@21161 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 18:25:45 +00:00
grail%cafebabe.org
e2a08bc361 Added EditHostDialog back into the build.
git-svn-id: svn://10.0.0.236/trunk@21160 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 18:24:28 +00:00
cyeh%netscape.com
7d89e840e2 Remove mozilla/layout/config and use mozilla/config instead.
git-svn-id: svn://10.0.0.236/trunk@21159 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 18:16:21 +00:00
cyeh%netscape.com
ef0cd60b00 don't include liteness.mak anymore, all those flags are obsolete.
git-svn-id: svn://10.0.0.236/trunk@21158 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 18:12:10 +00:00
shaver%netscape.com
608be074b9 Add dependency on libxpt and NSPR for typelib generation.
Only output |static const IID()| if we have an IID defined.
Output forward declarations.
Initial -m typelib stuff (handles methods, barely).


git-svn-id: svn://10.0.0.236/trunk@21156 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 17:43:38 +00:00
shaver%netscape.com
e12b558d1f fix InterfaceDescriptorAddMethods to not randomly overwrite memory, and fix
DoMethodDescriptor to not randomly overwrite md->result


git-svn-id: svn://10.0.0.236/trunk@21155 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 17:36:46 +00:00
ebina%netscape.com
c3ed0b23da Forgot to ifdef USE_REGISTRY which was breaking the MAC.
git-svn-id: svn://10.0.0.236/trunk@21154 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 17:18:06 +00:00
ebina%netscape.com
6ec4d9395d Have generic text, image, and application look for plugins in
NET_PluginStream


git-svn-id: svn://10.0.0.236/trunk@21153 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 17:14:25 +00:00
rods%netscape.com
d18115acba Added temporary menu delegate code. This enables menus to invoke JavaScript
BUT it menus can't observe changes or broadcasts


git-svn-id: svn://10.0.0.236/trunk@21152 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 17:13:30 +00:00
rods%netscape.com
ff8024a3aa Changed default page to navigator.xul
git-svn-id: svn://10.0.0.236/trunk@21151 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 17:12:09 +00:00
ebina%netscape.com
1ec564fccc Remove the "magic" hack because we now have the real thing
in XPCOM/repository


git-svn-id: svn://10.0.0.236/trunk@21150 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 17:09:48 +00:00
ebina%netscape.com
2d56d53627 Clean up an nsnull comparison.
git-svn-id: svn://10.0.0.236/trunk@21149 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 17:02:49 +00:00
ebina%netscape.com
de89022e76 Add public functions RegisterComponent, UnregisterComponent, and ProgIDToCLSID
git-svn-id: svn://10.0.0.236/trunk@21148 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 16:58:22 +00:00
troy%netscape.com
597d5a42e5 Fixed a style context problem
git-svn-id: svn://10.0.0.236/trunk@21147 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 16:56:15 +00:00
rods%netscape.com
522f7e6d93 Status bar is now hooked up.
git-svn-id: svn://10.0.0.236/trunk@21146 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 16:39:32 +00:00
rods%netscape.com
08e00e81f7 Fixed up some indentation issues and added fixed position style attributes.
git-svn-id: svn://10.0.0.236/trunk@21144 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 16:33:56 +00:00
rods%netscape.com
ebb56bf41c Added a little code to find the menus and load them.
They aren't hooked up yet.


git-svn-id: svn://10.0.0.236/trunk@21143 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 16:32:44 +00:00
rods%netscape.com
b79dc92650 Removed the InsertItemAt method that takes a string, this was a conveince
method no one was implementing.
Changed The InsertMenuItemAt to nsISupports because either a nsIMenu or nsIMenuItem
can be inserted.


git-svn-id: svn://10.0.0.236/trunk@21142 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 15:17:11 +00:00
mcafee%netscape.com
0ca9f24e74 Adding newline at end of file for Solaris/CC
git-svn-id: svn://10.0.0.236/trunk@21141 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 12:14:59 +00:00
mcafee%netscape.com
e78d2a9f39 Moving egrep -q to redirect to /dev/null to get around egrep portability problem. Thanks to ramiro for this fix.
git-svn-id: svn://10.0.0.236/trunk@21140 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 11:30:29 +00:00
mcafee%netscape.com
ceeeef188b Icons live in AppCores/xul/resources now.
git-svn-id: svn://10.0.0.236/trunk@21139 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 11:10:18 +00:00
mcafee%netscape.com
7af0dcc61e navigator.xul is referencing toolbar, not Toolbar
git-svn-id: svn://10.0.0.236/trunk@21138 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 11:09:06 +00:00
grail%cafebabe.org
25a5525a24 Added in full toggle button functionality into the PageModel.
git-svn-id: svn://10.0.0.236/trunk@21137 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 10:26:42 +00:00
grail%cafebabe.org
d1a2ab5731 Page builder, page model now works. It's ugly. The entire XML widget
building needs help in general.


git-svn-id: svn://10.0.0.236/trunk@21136 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 10:11:44 +00:00
jband%netscape.com
1f0737e036 added macro to ease defining the static const IID() accessor to xpcom interface class declarations
git-svn-id: svn://10.0.0.236/trunk@21135 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 05:37:50 +00:00
jband%netscape.com
8adf363343 changed MAP_IS_NATIVE to allow for objects that have their own jsObjectOps but still use the slots in the 'normal' manner (this is necessary for XPConnect) - same change as made on SpiderMonkey140_BRANCH
git-svn-id: svn://10.0.0.236/trunk@21134 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 05:36:16 +00:00
hyatt%netscape.com
4ab66b66a5 Commented out some code I shouldn't have in the menu code.
git-svn-id: svn://10.0.0.236/trunk@21133 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 05:18:18 +00:00
hyatt%netscape.com
64946e6ea0 Fixing Mac build bustage.
git-svn-id: svn://10.0.0.236/trunk@21132 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 05:14:30 +00:00
hyatt%netscape.com
1098a58b04 Improvements to the document getElementByID method.
git-svn-id: svn://10.0.0.236/trunk@21131 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 05:03:20 +00:00
hyatt%netscape.com
133b081fb6 Inside an INCLUDE_XUL #ifdef, making sure that HTML atoms get addrefed and
released by the frame constructor.


git-svn-id: svn://10.0.0.236/trunk@21130 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 05:02:50 +00:00
hyatt%netscape.com
6369b8df24 Checking in the new appRunner.
git-svn-id: svn://10.0.0.236/trunk@21129 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 05:01:03 +00:00
hyatt%netscape.com
bb3f825862 Changes to the XUL stylesheet file and tweaks to the makefiles to make
sure that the navigator.xul file is properly installed in the res/samples
directory.


git-svn-id: svn://10.0.0.236/trunk@21128 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 05:00:22 +00:00
hyatt%netscape.com
708b1e47f0 This is the true file that will be loaded by the browser.
git-svn-id: svn://10.0.0.236/trunk@21126 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 04:57:21 +00:00
mscott%netscape.com
bd9d731f1d Change default path for writing tempArticle.eml into to c:\temp.
git-svn-id: svn://10.0.0.236/trunk@21124 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 04:46:54 +00:00
troy%netscape.com
44d563da83 Added support for 'width' and 'height' values of 'inherit'
git-svn-id: svn://10.0.0.236/trunk@21123 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 04:40:16 +00:00
mcafee%netscape.com
5bcfc821ca Backing the egrep part of slamm's change out, solaris egrep doesn't know what -q is
git-svn-id: svn://10.0.0.236/trunk@21122 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 04:33:23 +00:00
briano%netscape.com
f011fbd216 Automated update
git-svn-id: svn://10.0.0.236/trunk@21121 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 04:31:38 +00:00
jband%netscape.com
615071e15e more tests
git-svn-id: svn://10.0.0.236/trunk@21120 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 04:30:20 +00:00
ramiro%netscape.com
1bee575a8c Added --{enable,disable}-build-nspr --{enable,disable}-build-xpfe.
git-svn-id: svn://10.0.0.236/trunk@21118 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 04:19:43 +00:00
alecf%netscape.com
4f1c7d9148 fix initialization ordering to match declaration
git-svn-id: svn://10.0.0.236/trunk@21117 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 03:56:24 +00:00
mscott%netscape.com
23d892e5a2 We need to build mime as part of messenger...
git-svn-id: svn://10.0.0.236/trunk@21116 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 03:54:15 +00:00
mscott%netscape.com
51aacb5ee6 Rebuild our 3-pane UI using iframes..the old code was using HTML frames which caused only one nsIWebShell for the whole mail frame....
git-svn-id: svn://10.0.0.236/trunk@21115 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 03:52:40 +00:00
alecf%netscape.com
d47d8e5b07 ignore generated files
git-svn-id: svn://10.0.0.236/trunk@21114 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 03:46:47 +00:00
alecf%netscape.com
05044b0ee8 fix for egcs/gcc compiler bug
git-svn-id: svn://10.0.0.236/trunk@21113 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 03:46:32 +00:00
kipp%netscape.com
01e3829114 Update window-manager hints so that the window is resizable after its shown
git-svn-id: svn://10.0.0.236/trunk@21112 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 03:33:00 +00:00
kipp%netscape.com
85de11e40a Compute subscript/super-script offsets; support (disabled) scalable fonts
git-svn-id: svn://10.0.0.236/trunk@21111 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 03:32:29 +00:00
kipp%netscape.com
696f13970e Made it build and work on linux
git-svn-id: svn://10.0.0.236/trunk@21110 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 03:29:37 +00:00
kipp%netscape.com
598f1d281f updated hash generator
git-svn-id: svn://10.0.0.236/trunk@21109 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 03:29:24 +00:00
kipp%netscape.com
fa4db70f26 Fixed up alignment mappings
git-svn-id: svn://10.0.0.236/trunk@21108 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 03:28:55 +00:00
kipp%netscape.com
d075589210 Added methods for supporting 2 pass vertical align reflow
git-svn-id: svn://10.0.0.236/trunk@21107 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 03:28:00 +00:00
kipp%netscape.com
ff33b16eb8 Support 2 pass vertical-align reflow for top/bottom better
git-svn-id: svn://10.0.0.236/trunk@21106 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 03:27:41 +00:00
kipp%netscape.com
656c1d08ba Eliminated HAVE_ANONYMOUS_BLOCK code; added in implementations of FindTextRuns and VerticalAlignChildren
git-svn-id: svn://10.0.0.236/trunk@21105 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 03:27:23 +00:00
kipp%netscape.com
59a8c9178d Removed a skid mark
git-svn-id: svn://10.0.0.236/trunk@21104 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 03:26:42 +00:00
kipp%netscape.com
1e83ecb886 Detect errors more often by prioritizing its status over size-available
git-svn-id: svn://10.0.0.236/trunk@21103 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 03:26:19 +00:00
ramiro%netscape.com
0e2ed2303f Build tests on if ENABLE_TESTS is defined.
git-svn-id: svn://10.0.0.236/trunk@21102 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 03:26:16 +00:00
kipp%netscape.com
7f83e9ffe2 Added VerticalAlignFrames for 2nd pass vertical align reflow
git-svn-id: svn://10.0.0.236/trunk@21101 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 03:25:48 +00:00
kipp%netscape.com
18469f80d3 Removed GetAutoMarginSize; added VerticalAlignFrames
git-svn-id: svn://10.0.0.236/trunk@21100 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 03:25:23 +00:00
kipp%netscape.com
c597871027 Removed usage of GetAutoMarginSize
git-svn-id: svn://10.0.0.236/trunk@21099 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 03:24:58 +00:00
kipp%netscape.com
3762fd4a73 Used temporary variables to avoid double-casts and make it easier for compilers to do the right thing
git-svn-id: svn://10.0.0.236/trunk@21098 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 03:24:39 +00:00
alecf%netscape.com
2f203b251c moving mailnews makfiles into mailnews directory
git-svn-id: svn://10.0.0.236/trunk@21097 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 03:22:52 +00:00
kipp%netscape.com
65c05b56e0 Removed obsolete GetAutoMarginSize method
git-svn-id: svn://10.0.0.236/trunk@21096 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 03:19:02 +00:00
brendan%netscape.com
a674934ef9 Fixed wrapper management to be self-contained, requiring no extra interfaces.
git-svn-id: svn://10.0.0.236/trunk@21095 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 03:10:40 +00:00
briano%netscape.com
cb8834ef3a Automated update
git-svn-id: svn://10.0.0.236/trunk@21094 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 03:00:39 +00:00
shaver%netscape.com
7f3aa35988 binary files are required (thanks, jband). also fix typo
git-svn-id: svn://10.0.0.236/trunk@21093 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 02:53:08 +00:00
briano%netscape.com
321fc1b1cf Fix DSO_LDOPTS for AIX (4.2 for now).
git-svn-id: svn://10.0.0.236/trunk@21092 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 02:49:42 +00:00
waterson%netscape.com
231408e37d Implemented most of the rest of the DOM observer methods.
git-svn-id: svn://10.0.0.236/trunk@21090 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 02:02:48 +00:00
cyeh%netscape.com
bd900b8256 change from using layout/config/rules.mak to using config/rules.mak
git-svn-id: svn://10.0.0.236/trunk@21087 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 01:52:09 +00:00
rjc%netscape.com
c5b77f467b Small fix for path separators.
git-svn-id: svn://10.0.0.236/trunk@21086 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 01:43:22 +00:00
mscott%netscape.com
ed40070a63 Makefile to build the nntpTest harness
git-svn-id: svn://10.0.0.236/trunk@21085 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 01:16:12 +00:00
mscott%netscape.com
7fd6fb2575 Oops...build the nntp sub directory as well
git-svn-id: svn://10.0.0.236/trunk@21084 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 01:15:40 +00:00
mscott%netscape.com
916c0d316d Build the stub code as a library.
git-svn-id: svn://10.0.0.236/trunk@21083 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 01:14:05 +00:00
cata%netscape.com
3ab85f2050 Test data from files capability added.
git-svn-id: svn://10.0.0.236/trunk@21080 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 00:55:19 +00:00
mscott%netscape.com
66873c869a build nntp sub directory...
git-svn-id: svn://10.0.0.236/trunk@21079 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 00:54:37 +00:00
cata%netscape.com
53b2d57c3c Hacky ASCII encoder elliminated.
git-svn-id: svn://10.0.0.236/trunk@21078 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 00:54:13 +00:00
mscott%netscape.com
2326f2cf1f NNTP test harness. This code was moved here from news\tests.
git-svn-id: svn://10.0.0.236/trunk@21077 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 00:54:06 +00:00
mscott%netscape.com
e9bf3da007 Removing from repository. This file now lives in tests\nntp.
git-svn-id: svn://10.0.0.236/trunk@21076 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 00:53:29 +00:00
cata%netscape.com
6604db1794 Return value name changed.
git-svn-id: svn://10.0.0.236/trunk@21075 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 00:53:27 +00:00
mscott%netscape.com
0471e422bc Remove some ::IID() calls and replace them with NS_DEFINE_IID macros...
git-svn-id: svn://10.0.0.236/trunk@21073 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 00:47:50 +00:00
mscott%netscape.com
df4a08360c initializing base app core no longer happens in the mail app core....this removes our build dependencies on the base app cores.
git-svn-id: svn://10.0.0.236/trunk@21072 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 00:47:09 +00:00
mscott%netscape.com
7258cdddda Link with nntptest library...
git-svn-id: svn://10.0.0.236/trunk@21071 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 00:46:16 +00:00
mscott%netscape.com
6f4d722db2 Updates to our mail core XUL file to get loading of a hard coded news url to run.
git-svn-id: svn://10.0.0.236/trunk@21070 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 00:45:11 +00:00
mcmullen%netscape.com
cfb2941367 Backing out previous change from the trunk, because it was supposed to have gone in on a branch.
git-svn-id: svn://10.0.0.236/trunk@21069 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 00:45:07 +00:00
mscott%netscape.com
29946279d1 mail shell needs a frame for browser.webwindow
git-svn-id: svn://10.0.0.236/trunk@21068 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 00:43:36 +00:00
saari%netscape.com
d1bffb6304 /m/pub/mozilla/widget/src/mac/nsMenu.cpp
- unleash menu separators for mac


git-svn-id: svn://10.0.0.236/trunk@21067 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 00:42:06 +00:00
shaver%netscape.com
9aaaefcbe2 Report read failure and short reads (should handle short reads better! RSN!).
File length is a size_t now, not an int.


git-svn-id: svn://10.0.0.236/trunk@21066 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 00:42:01 +00:00
mscott%netscape.com
6b65c21255 Add ::IID() methods to these interfaces...
git-svn-id: svn://10.0.0.236/trunk@21065 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 00:36:12 +00:00
mcmullen%netscape.com
8d5ad2e84a Updated to match the header changes I've been making. Also, added the declaration of the persistent filespec class.
git-svn-id: svn://10.0.0.236/trunk@21064 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 00:35:41 +00:00
mscott%netscape.com
da7c584bf4 Adding ::IID() methods to these interfaces...
git-svn-id: svn://10.0.0.236/trunk@21063 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 00:34:33 +00:00
mscott%netscape.com
6f23628ee5 For now, disable the nntp test executable. (I'll look into moving this into a separate makefile...)
Build the test stubs as a stand alone library...


git-svn-id: svn://10.0.0.236/trunk@21062 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 00:29:11 +00:00
mscott%netscape.com
bc682708aa Don't use ::IID() function for the webshell interface because it doesn't support it....
git-svn-id: svn://10.0.0.236/trunk@21061 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 00:28:10 +00:00
waterson%netscape.com
1c931da059 Fixed bug where we were generating HTML kids for each attribute that we iterated over.
git-svn-id: svn://10.0.0.236/trunk@21060 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 00:25:06 +00:00
rjc%netscape.com
b1a6ff20f0 Fix XPCom on Mac so that autoregistration of .shlb files work.
git-svn-id: svn://10.0.0.236/trunk@21059 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 00:24:38 +00:00
waterson%netscape.com
75d3092e20 Force all HTML tags to lower case.
git-svn-id: svn://10.0.0.236/trunk@21058 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 00:24:16 +00:00
vidur%netscape.com
78c8a0019e Backed out bogus update to test
git-svn-id: svn://10.0.0.236/trunk@21057 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 00:19:12 +00:00
vidur%netscape.com
1defb4fd38 Supported XML namespace decls as attributes of HTML content embedded in XML
git-svn-id: svn://10.0.0.236/trunk@21056 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 00:18:50 +00:00
kmcclusk%netscape.com
e999bd483b Added pseudo styles for file input element buttons and text fields to control their
appearance during printing.
Now returns value of file upload element in nsHTMLInputElement::GetValue.
Added :file-textstyle and :file-buttonstyle pseudo style's to ua.css.
Modified nsButtonControlFrame::PaintButton to accept a rectangle describing the
position and size of the button to paint.
Modified nsFileControlFrame::Paint to resolve :file-buttonstyle and :file-textstyle to
paint the file upload's button and text field using settings in ua.css
Added nsFileControlFrame::HasWidget utility method.
Added nsFormControlHelper::GetInputElementValue to get the current value of an input element
from the DOM.
Modified nsTextControlFrame::GetProperty to use nsFormControlHelper::GetInputElementValue
Modified nsTextControlFrame::PaintTextControl to accept a rectangle describing the position
and size of the text control to paint.
Modified nsTextControl::PaintTextControlBackground to include a rectangle describing the
position and size of the text control background to paint.


git-svn-id: svn://10.0.0.236/trunk@21055 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 00:13:39 +00:00
warren%netscape.com
564e53e97d Added constructor for strings.
git-svn-id: svn://10.0.0.236/trunk@21054 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 00:12:08 +00:00
waterson%netscape.com
cf0b064285 Added nsRDFResource.
git-svn-id: svn://10.0.0.236/trunk@21053 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 00:11:53 +00:00
sdagley%netscape.com
d4b4c375df Mac specific fix. Checking in rjc's fix to load libraries if file spec was an alias to a library rather than the actual library file spec. Needed so XPCOM will work on Mac.
git-svn-id: svn://10.0.0.236/trunk@21052 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 00:10:46 +00:00
nhotta%netscape.com
ea5ca906ce nsILocale integration.
git-svn-id: svn://10.0.0.236/trunk@21051 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 00:02:03 +00:00
vidur%netscape.com
0556407675 Implemented the correct content model for the TITLE element and allowed for dynamic change.
git-svn-id: svn://10.0.0.236/trunk@21050 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-17 23:56:55 +00:00
warren%netscape.com
d44ee154e4 Moved utilities to util directory.
git-svn-id: svn://10.0.0.236/trunk@21049 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-17 23:42:09 +00:00
waterson%netscape.com
73d0b8257a Added a hack to use the tag's namespace as the default namespace in the lack of any other information. Not sure if this is correct.
git-svn-id: svn://10.0.0.236/trunk@21048 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-17 23:41:23 +00:00
sfraser%netscape.com
efbf2406c3 Add nsCaret.cpp
git-svn-id: svn://10.0.0.236/trunk@21047 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-17 23:37:21 +00:00
sfraser%netscape.com
afdfb1b0d3 Adding nsCaretProperties.cpp to Windows and UNIX builds
git-svn-id: svn://10.0.0.236/trunk@21046 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-17 23:36:54 +00:00
cata%netscape.com
e3dbe4db0b Interface implemented as "public".
git-svn-id: svn://10.0.0.236/trunk@21041 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-17 23:21:22 +00:00
bienvenu%netscape.com
e04293df2c test PrePopulate method
git-svn-id: svn://10.0.0.236/trunk@21039 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-17 23:19:31 +00:00
bienvenu%netscape.com
ba6284a483 add PrePopulate method for testing
git-svn-id: svn://10.0.0.236/trunk@21038 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-17 23:18:46 +00:00
ebina%netscape.com
1501c1cf35 Don't stop looking for converters just because the first one
failed.  This will be necessary for plugin converters.


git-svn-id: svn://10.0.0.236/trunk@21037 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-17 23:18:13 +00:00
warren%netscape.com
e8b5c1f3f2 Added nsRDFResource.h for the mac
git-svn-id: svn://10.0.0.236/trunk@21036 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-17 23:02:00 +00:00
saari%netscape.com
6e6893dc91 /m/pub/mozilla/widget/src/mac/nsMenu.cpp
- uncommented MenuSelected implementation
- cleaned up MenuSelected implementation

/m/pub/mozilla/widget/src/mac/nsMenuBar.cpp
- Uncomment MenuSelected() implementation
- Uncomment release of nsIMenuListener to avoid leak

/m/pub/mozilla/widget/src/mac/nsMenuItem.cpp
- #include "nsIMenuListener.h"
- Implement AddMenuListener()
- Implement MenuSelected()

/m/pub/mozilla/widget/src/mac/nsMenuItem.h
- Added nsIMenuListener * mXULCommandListener member


git-svn-id: svn://10.0.0.236/trunk@21033 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-17 22:45:34 +00:00
brendan%netscape.com
679ff22189 Cope with void return.
git-svn-id: svn://10.0.0.236/trunk@21032 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-17 22:45:12 +00:00
bienvenu%netscape.com
a5b8b44aa3 dumpt in-memory toy db after reparsing folder
git-svn-id: svn://10.0.0.236/trunk@21031 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-17 22:38:57 +00:00
bienvenu%netscape.com
ceef1bfd5f get in-memory toy db working
git-svn-id: svn://10.0.0.236/trunk@21030 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-17 22:38:13 +00:00
hyatt%netscape.com
ba80bd96ca Fixed bug with inline scripts: wasn't truncating the text buffer.
git-svn-id: svn://10.0.0.236/trunk@21028 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-17 22:33:09 +00:00
hyatt%netscape.com
fd90c045c2 Implemented more DOM methods to get apprunner working with XUL files.
git-svn-id: svn://10.0.0.236/trunk@21027 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-17 22:32:40 +00:00
warren%netscape.com
c29487ef71 Consolidated DefaultResourceImpl with nsRDFResource.
git-svn-id: svn://10.0.0.236/trunk@21026 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-17 22:28:15 +00:00
cyeh%netscape.com
1d51efc7a2 step one in removing mozilla/layout/config: move special layout/config configuration
to default WIN32 rules.


git-svn-id: svn://10.0.0.236/trunk@21025 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-17 22:25:15 +00:00
brendan%netscape.com
b5dca37e01 More stub work checkpointing; expand tabs.
git-svn-id: svn://10.0.0.236/trunk@21024 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-17 22:13:32 +00:00
warren%netscape.com
39b1d08e3d Updated to use nsRDFResource (is this file obsolete though)?
git-svn-id: svn://10.0.0.236/trunk@21023 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-17 21:57:15 +00:00
terry%netscape.com
2f367f36a6 Put all the INPUT elements inside of the FORM element, OK?
git-svn-id: svn://10.0.0.236/trunk@21022 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-17 21:56:14 +00:00
alecf%netscape.com
ebdae2117a new generated javascript with constructor
git-svn-id: svn://10.0.0.236/trunk@21021 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-17 20:47:29 +00:00
buster%netscape.com
8f155a860a fix mac build for new nsCOMPtr code
git-svn-id: svn://10.0.0.236/trunk@21020 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-17 20:44:44 +00:00
waterson%netscape.com
c086534bbc Added RDF CIDs as #ifdef XP_MAC until somebody fixes dynamic self-registration for XPCOM DLLs.
git-svn-id: svn://10.0.0.236/trunk@21019 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-17 20:05:07 +00:00
ducarroz%netscape.com
1f157ad53d no comment
git-svn-id: svn://10.0.0.236/trunk@21018 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-17 19:59:37 +00:00
ducarroz%netscape.com
1bf8a9850f use nsIMsgSend to send a message
git-svn-id: svn://10.0.0.236/trunk@21017 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-17 19:57:48 +00:00
ducarroz%netscape.com
8aaa05a493 add lib raptorbase needed by nsMsgSend
git-svn-id: svn://10.0.0.236/trunk@21016 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-17 19:54:52 +00:00
ducarroz%netscape.com
e9888c15e1 did some work
git-svn-id: svn://10.0.0.236/trunk@21015 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-17 19:53:29 +00:00
ducarroz%netscape.com
cd5bf020f5 add new interface and member functions
git-svn-id: svn://10.0.0.236/trunk@21014 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-17 19:52:14 +00:00
ducarroz%netscape.com
69b296aa60 add more glue requested by nsMsgSend
git-svn-id: svn://10.0.0.236/trunk@21013 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-17 19:50:03 +00:00
ducarroz%netscape.com
8aebeb0c24 add nsMsgSend.cpp & nsMsgSendPart.cpp to the build
git-svn-id: svn://10.0.0.236/trunk@21012 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-17 19:49:23 +00:00
ducarroz%netscape.com
6e6e17bc43 clean up comment
git-svn-id: svn://10.0.0.236/trunk@21011 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-17 19:44:54 +00:00
ducarroz%netscape.com
5892636d05 add interface for set/get body
git-svn-id: svn://10.0.0.236/trunk@21010 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-17 19:43:26 +00:00
buster%netscape.com
f62022c72f Highlights:
updated to new nsCOMPtr usage
nsTextEditor::InsertBreak() implemented
  splits the text node at the caret (deletes any extended selection to force a collapsed selection.)
  inserts a <BR> which I assume we'll convert to a CR when we write to a text stream.
  undo and redo work, except for the bug noted below

More stuff:
interface cleanup
strategic debugging code added
delete selection txn sets the collapses the selection...this is just a placeholder, but I needed it for undo/redo of InsertBreak.
join and split now work for text nodes as well as interior nodes


git-svn-id: svn://10.0.0.236/trunk@21009 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-17 19:42:29 +00:00
ducarroz%netscape.com
858ef80269 add more glue requested by nsMsgSend
git-svn-id: svn://10.0.0.236/trunk@21008 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-17 19:42:02 +00:00
ducarroz%netscape.com
ae0105459f add export for nsIMsgSend.h & nsMsgSendFact.h
git-svn-id: svn://10.0.0.236/trunk@21007 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-17 19:41:12 +00:00
ducarroz%netscape.com
8472c11182 add factory for nsIMsgSend
git-svn-id: svn://10.0.0.236/trunk@21006 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-17 19:38:44 +00:00
hyatt%netscape.com
5efb69700e Finishing the broadcaster work (at least for now).
git-svn-id: svn://10.0.0.236/trunk@21005 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-17 19:35:53 +00:00
ducarroz%netscape.com
1bf050c768 add class id for nsMsgSend
git-svn-id: svn://10.0.0.236/trunk@21004 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-17 19:35:46 +00:00
ducarroz%netscape.com
45c0c4d8b7 add lib secfreenav32
git-svn-id: svn://10.0.0.236/trunk@21003 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-17 19:32:28 +00:00
ducarroz%netscape.com
1094bcf166 Initial checkin
git-svn-id: svn://10.0.0.236/trunk@21002 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-17 19:28:25 +00:00
kipp%netscape.com
04601e526f Fix mac build issue
git-svn-id: svn://10.0.0.236/trunk@21001 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-17 19:24:02 +00:00
hyatt%netscape.com
611f697372 More tweaks to the broadcasting stuff.
git-svn-id: svn://10.0.0.236/trunk@21000 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-17 18:58:05 +00:00
hyatt%netscape.com
0379cb730c Implemented brain-dead tree walk in GetElementByID.
git-svn-id: svn://10.0.0.236/trunk@20999 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-17 18:46:23 +00:00
locka%iol.ie
604377454a Update some API calls to handle new const tags
git-svn-id: svn://10.0.0.236/trunk@20998 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-17 18:45:59 +00:00
buster%netscape.com
2faefdcbe3 private interface for editor, used for common editing operations that
we don't want to expose publically.


git-svn-id: svn://10.0.0.236/trunk@20997 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-17 18:34:41 +00:00
hyatt%netscape.com
7df67aa0d4 Checking in code that does the broadcaster hookup.
git-svn-id: svn://10.0.0.236/trunk@20996 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-17 18:33:33 +00:00
nhotta%netscape.com
faf0820419 Added mCharset and mLocale to the class.
git-svn-id: svn://10.0.0.236/trunk@20995 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-17 18:32:33 +00:00
briano%netscape.com
ee7c2137c9 Automated update
git-svn-id: svn://10.0.0.236/trunk@20994 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-17 18:31:59 +00:00
kmcclusk%netscape.com
73a159c13d Added <INPUT type=file> to test_pr.html
git-svn-id: svn://10.0.0.236/trunk@20993 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-17 18:27:38 +00:00
slamm%netscape.com
3302284007 Source allmakefiles.sh instead of running in subshell. This way it can read the variables from configure.
git-svn-id: svn://10.0.0.236/trunk@20992 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-17 18:25:39 +00:00
harishd%netscape.com
09ea437c91 Added FontMetrics for regression testing.
Will be wired up later


git-svn-id: svn://10.0.0.236/trunk@20991 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-17 18:21:51 +00:00
warren%netscape.com
bf45e8cf21 Removed INCLUDE definition which was overriding my windows include path.
git-svn-id: svn://10.0.0.236/trunk@20990 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-17 18:21:40 +00:00
188 changed files with 5211 additions and 42091 deletions

View File

@@ -1,33 +0,0 @@
#!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

Binary file not shown.

Binary file not shown.

View File

@@ -1,19 +0,0 @@
# 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,23 +0,0 @@
#!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 tests
include <$(DEPTH)\config\rules.mak>

View File

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

View File

@@ -1,44 +0,0 @@
#!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 \
$(NULL)
EXPORTS := $(addprefix $(srcdir)/, $(EXPORTS))
MODULE=base
include $(topsrcdir)/config/config.mk
include $(topsrcdir)/config/rules.mk

View File

@@ -1,37 +0,0 @@
#!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 \
$(NULL)
MODULE = raptor
include <$(DEPTH)\config\rules.mak>

View File

@@ -1,116 +0,0 @@
/* -*- 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

@@ -1,53 +0,0 @@
/* -*- 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 PRUint32 GetCaretWidth() { return mCaretWidth; }
virtual PRUint32 GetCaretBlinkRate() { return mBlinkRate; }
protected:
// have value for no blinking
enum {
eDefaulBlinkRate = 500, // twice a second
eDefaultCaretWidth = 1 // one pixel wide
};
PRUint32 mCaretWidth; // caret width in twips
PRUint32 mBlinkRate; // blink rate in milliseconds
// members for vertical placement & size?
};
NS_BASE nsCaretProperties* NewCaretProperties();

View File

@@ -1,62 +0,0 @@
/* -*- 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

@@ -1,478 +0,0 @@
/* -*- 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.
//
// 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"
//========================================================================================
// 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 nsOutputFileStream;
class nsInputFileStream;
//========================================================================================
// 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 nsFileSpec
// This is whatever each platform really prefers to describe files as. Declared first
// because the other two types have an embeded nsFileSpec object.
//========================================================================================
{
public:
nsFileSpec();
NS_EXPLICIT nsFileSpec(const char* 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 nsFilePath& inPath);
void operator = (const nsFileURL& inURL);
void operator = (const nsFileSpec& inOther);
void operator = (const nsPersistentFileDescriptor& inOther);
#ifndef XP_MAC
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.
#endif
#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) {}
operator FSSpec* () { return &mSpec; }
operator const FSSpec* const () { return &mSpec; }
operator FSSpec& () { return mSpec; }
operator const FSSpec& () const { 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 { return mError; }
#if DEBUG
friend NS_BASE nsOutputStream& operator << (
nsOutputStream& s,
const nsFileSpec& spec); // THIS IS FOR DEBUGGING ONLY.
// see PersistentFileDescriptor for the real deal.
#endif
//--------------------------------------------------
// 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 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 --() ?
nsFileSpec operator + (const char* inRelativePath) const;
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 MakeUnique();
void MakeUnique(const char* inSuggestedLeafName);
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);
nsresult Rename(const char* inNewName); // not const: gets updated
nsresult Copy(const nsFileSpec& inNewParentDirectory) const;
nsresult Move(const nsFileSpec& inNewParentDirectory) const;
nsresult Execute(const char* args) const;
//--------------------------------------------------
// Data
//--------------------------------------------------
private:
friend class nsFilePath;
#ifdef XP_MAC
FSSpec mSpec;
#else
char* mPath;
#endif
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 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 nsFilePath& inOther);
void operator = (const nsFileSpec& inOther);
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* ();
operator const char* const ();
private:
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%20fish". Same as nsFileURL, but
// without the "file:// prefix".
//========================================================================================
{
public:
nsFilePath(const nsFilePath& inPath);
NS_EXPLICIT nsFilePath(const char* 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 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
//========================================================================================
{
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
nsPersistentFileDescriptor(const nsFileSpec& inPath);
void operator = (const nsFileSpec& inPath);
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);
private:
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;
bool mExists; // MUST be bool.
#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

@@ -1,547 +0,0 @@
/* -*- 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 versions of the file i/o streams,
// which wrap the NSPR file i/o plus console i/o.
//
// Related files:
// prio.h the NSPR file i/o C API), which is wrapped by
// THIS FILE statically linked C++ wrappers, which in turn are wrapped by
// nsIFileStream.h COM wrappers for this file, which are wrapped by
// nsAutoFileStream.h more easily used, nicer syntax wrappers for the
// COMified ones. Wrapper of a wrapper of a wrapper.
//
// 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 "nsIFileStream.h"
#include "nsCOMPtr.h"
class nsFileSpec;
class nsInputFileStream;
class nsOutputFileStream;
//========================================================================================
// 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 mEOF; }
char get();
PRInt32 read(void* s, PRInt32 n)
{
if (!mInputStream)
return 0;
PRInt32 result = 0;
mInputStream->Read((char*)s, 0, n, (PRUint32*)&result);
if (result < n)
mEOF = PR_TRUE;
return result;
}
// 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);
}
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 put(char c);
PRInt32 write(const void* s, PRInt32 n)
{
if (!mOutputStream)
return 0;
PRInt32 result = 0;
mOutputStream->Write((char*)s, 0, n, (PRUint32*)&result);
return result;
}
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);
// 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 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:
nsFileClient() // for delayed opening
: mResult(NS_OK)
{
}
nsFileClient(const nsCOMPtr<nsIFile>& inFile)
: mFile(do_QueryInterface(inFile))
, mResult(NS_OK)
{
}
PRBool is_file() const
{
return mFile ? PR_TRUE : PR_FALSE;
}
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 failed() const
{
return NS_FAILED(mResult);
}
void seek(PRInt32 offset)
{
seek(PR_SEEK_SET, offset);
}
void seek(PRSeekWhence whence, PRInt32 offset)
{
if (mFile)
mResult = mFile->Seek(whence, offset);
}
PRIntn tell()
{
PRIntn result = -1;
if (mFile)
mResult = mFile->Tell(&result);
return result;
}
// DATA
protected:
nsCOMPtr<nsIFile> mFile;
PRBool mResult;
}; // class nsFileClient
//========================================================================================
class NS_BASE nsInputFileStream
// Please read the comments at the top of this file
//========================================================================================
: public nsInputStream
, public nsFileClient
{
public:
enum { kDefaultMode = PR_RDONLY };
nsInputFileStream(nsIInputStream* inStream)
: nsInputStream(inStream)
, nsFileClient(do_QueryInterface(inStream))
, mFileInputStream(do_QueryInterface(inStream))
{
}
nsInputFileStream(
const nsFileSpec& inFile,
int nsprMode = kDefaultMode,
PRIntn accessMode = 00700) // <- OCTAL
: nsInputStream(nsnull)
{
nsISupports* stream;
NS_NewIOFileStream(
&stream,
inFile, nsprMode, accessMode);
mFile = nsQueryInterface(stream);
mInputStream = nsQueryInterface(stream);
mFileInputStream = nsQueryInterface(stream);
}
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).
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 nsOutputFileStream
// Please read the comments at the top of this file
//========================================================================================
: public nsOutputStream
, public nsFileClient
{
public:
enum { kDefaultMode = (PR_WRONLY | PR_CREATE_FILE | PR_TRUNCATE) };
nsOutputFileStream() {}
nsOutputFileStream(nsIOutputStream* inStream)
: nsOutputStream(inStream)
, nsFileClient(do_QueryInterface(inStream))
, mFileOutputStream(do_QueryInterface(inStream))
{
}
nsOutputFileStream(
const nsFileSpec& inFile,
int nsprMode = kDefaultMode,
PRIntn accessMode = 00700) // <- OCTAL
: nsOutputStream(nsnull)
{
nsISupports* stream;
if (NS_FAILED(NS_NewIOFileStream(
&stream,
inFile, nsprMode, accessMode)))
return;
mFile = nsQueryInterface(stream);
mOutputStream = nsQueryInterface(stream);
mFileOutputStream = nsQueryInterface(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 << (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);
}
// 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 << (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);
mInputStream = nsQueryInterface(stream);
mOutputStream = nsQueryInterface(stream);
mFileInputStream = nsQueryInterface(stream);
mFileOutputStream = nsQueryInterface(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 << (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

@@ -1,127 +0,0 @@
/* -*- 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, Tell etc.
//========================================================================================
: public nsISupports
{
public:
static const nsIID& IID() { 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 Seek(PRSeekWhence whence, PRInt32 offset) = 0;
NS_IMETHOD GetIsOpen(PRBool* outOpen) = 0;
NS_IMETHOD Tell(PRIntn* outWhere) = 0;
}; // class nsIFile
/* 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 nsISupports
{
public:
static const nsIID& IID() { 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 nsISupports
{
public:
static const nsIID& IID() { static nsIID iid = NS_IFILEOUTPUTSTREAM_IID; return iid; }
NS_IMETHOD Flush() = 0;
// Forces a write to disk.
}; // class nsIFileOutputStream
//----------------------------------------------------------------------------------------
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

@@ -1,48 +0,0 @@
/* -*- 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

@@ -1,66 +0,0 @@
/* -*- 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

@@ -1,60 +0,0 @@
/* -*- 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

@@ -1,939 +0,0 @@
/* -*- 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_ */

View File

@@ -1,24 +0,0 @@
#
# 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

@@ -1,88 +0,0 @@
#!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
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 \
nsProperties.cpp \
nsRBTree.cpp \
nsSizeOfHandler.cpp \
nsString.cpp \
nsUnicharBuffer.cpp \
nsUnicharInputStream.cpp \
nsVoidArray.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

@@ -1,39 +0,0 @@
#
# 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
include $(topsrcdir)/config/config.mk
CFLAGS += $(TK_CFLAGS)
include $(topsrcdir)/config/rules.mk

View File

@@ -1,40 +0,0 @@
/* -*- 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

@@ -1,190 +0,0 @@
/* -*- 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;
// 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

@@ -1,43 +0,0 @@
/* -*- 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();
}

View File

@@ -1,930 +0,0 @@
/* -*- 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.
*/
// This file is included by nsFile.cp, and includes the Macintosh-specific
// implementations.
#include "FullPath.h"
#include "FileCopy.h"
#include "MoreFilesExtras.h"
#include "nsEscape.h"
#include <Aliases.h>
#include <Folders.h>
#include <Errors.h>
#include <TextUtils.h>
#include <Processes.h>
const unsigned char* kAliasHavenFolderName = "\pnsAliasHaven";
//========================================================================================
namespace MacFileHelpers
//========================================================================================
{
inline void PLstrcpy(Str255 dst, ConstStr255Param src)
{
memcpy(dst, src, 1 + src[0]);
}
void PLstrcpy(Str255 dst, const char* src, int inMaxLen=255);
void PLstrncpy(Str255 dst, const char* src, int inMaxLen);
void SwapSlashColon(char * s);
OSErr FSSpecFromFullUnixPath(
const char * unixPath,
FSSpec& outSpec,
Boolean resolveAlias,
Boolean allowPartial = false,
Boolean createDirs = false);
char* MacPathFromUnixPath(const char* unixPath);
char* EncodeMacPath(
char* inPath, // NOT const - gets clobbered
Boolean prependSlash,
Boolean doEscape );
OSErr FSSpecFromPathname(
const char* inPathNamePtr,
FSSpec& outSpec,
Boolean inCreateDirs);
char* PathNameFromFSSpec(
const FSSpec& inSpec,
Boolean wantLeafName );
OSErr CreateFolderInFolder(
short refNum, // Parent directory/volume
long dirID,
ConstStr255Param folderName, // Name of the new folder
short& outRefNum, // Volume of the created folder
long& outDirID); //
// Some routines to support an "alias haven" directory. Aliases in this directory
// are never resolved. There is a ResolveAlias here that respects that. This is
// to support attaching of aliases in mail.
void EnsureAliasHaven();
void SetNoResolve(Boolean inResolve);
PRBool IsAliasSafe(const FSSpec& inSpec);
OSErr MakeAliasSafe(FSSpec& inOutSpec);
OSErr ResolveAliasFile(FSSpec& inOutSpec, Boolean& wasAliased);
Boolean sNoResolve = false;
long sAliasHavenDirID = 0;
short sAliasHavenVRefNum = 0;
} // namespace MacFileHelpers
//----------------------------------------------------------------------------------------
void MacFileHelpers::PLstrcpy(Str255 dst, const char* src, int inMax)
//----------------------------------------------------------------------------------------
{
int srcLength = strlen(src);
NS_ASSERTION(srcLength <= inMax, "Oops, string is too long!");
if (srcLength > inMax)
srcLength = inMax;
dst[0] = srcLength;
memcpy(&dst[1], src, srcLength);
}
//----------------------------------------------------------------------------------------
void MacFileHelpers::PLstrncpy(Str255 dst, const char* src, int inMax)
//----------------------------------------------------------------------------------------
{
int srcLength = strlen(src);
if (srcLength > inMax)
srcLength = inMax;
dst[0] = srcLength;
memcpy(&dst[1], src, srcLength);
}
//-----------------------------------
void MacFileHelpers::SwapSlashColon(char * s)
//-----------------------------------
{
while ( *s != 0)
{
if (*s == '/')
*s++ = ':';
else if (*s == ':')
*s++ = '/';
else
*s++;
}
} // MacFileHelpers::SwapSlashColon
//-----------------------------------
char* MacFileHelpers::EncodeMacPath(
char* inPath, // NOT const, gets clobbered
Boolean prependSlash,
Boolean doEscape )
// Transforms Macintosh style path into Unix one
// Method: Swap ':' and '/', hex escape the result
//-----------------------------------
{
if (inPath == nsnull)
return nsnull;
int pathSize = strlen(inPath);
// XP code sometimes chokes if there's a final slash in the unix path.
// Since correct mac paths to folders and volumes will end in ':', strip this
// first.
char* c = inPath + pathSize - 1;
if (*c == ':')
{
*c = 0;
pathSize--;
}
char * newPath = nsnull;
char * finalPath = nsnull;
if (prependSlash)
{
newPath = new char[pathSize + 2];
newPath[0] = ':'; // It will be converted to '/'
memcpy(&newPath[1], inPath, pathSize + 1);
}
else
{
newPath = new char[pathSize + 1];
strcpy(newPath, inPath);
}
if (newPath)
{
SwapSlashColon( newPath );
if (doEscape)
{
finalPath = nsEscape(newPath, url_Path);
delete [] newPath;
}
else
finalPath = newPath;
}
delete [] inPath;
return finalPath;
} // MacFileHelpers::EncodeMacPath
//----------------------------------------------------------------------------------------
inline void MacFileHelpers::SetNoResolve(Boolean inResolve)
//----------------------------------------------------------------------------------------
{
sNoResolve = inResolve;
} // MacFileHelpers::SetNoResolve
//----------------------------------------------------------------------------------------
OSErr MacFileHelpers::MakeAliasSafe(FSSpec& inOutSpec)
// Pass in the spec of an alias. This copies the file to the safe haven folder, and
// returns the spec of the copy to the caller
//----------------------------------------------------------------------------------------
{
EnsureAliasHaven();
nsFileSpec dstDirSpec(sAliasHavenVRefNum, sAliasHavenDirID, "\p");
// Make sure its name is unique
nsFileSpec havenSpec(sAliasHavenVRefNum, sAliasHavenDirID, "\pG'day");
if (havenSpec.Valid())
havenSpec.MakeUnique(inOutSpec.name);
// Copy the file into the haven directory
if (havenSpec.Valid())
{
OSErr err = ::FSpFileCopy(
&inOutSpec,
dstDirSpec,
havenSpec.GetLeafPName(),
nil, 0, true);
// Return the spec of the copy to the caller.
if (err != noErr)
return err;
inOutSpec = havenSpec;
}
return noErr;
} // MacFileHelpers::MakeAliasSafe
//----------------------------------------------------------------------------------------
char* MacFileHelpers::MacPathFromUnixPath(const char* unixPath)
//----------------------------------------------------------------------------------------
{
// Relying on the fact that the unix path is always longer than the mac path:
size_t len = strlen(unixPath);
char* result = new char[len + 2]; // ... but allow for the initial colon in a partial name
if (result)
{
char* dst = result;
const char* src = unixPath;
if (*src == '/') // * full path
src++;
else if (strchr(src, '/')) // * partial path, and not just a leaf name
*dst++ = ':';
strcpy(dst, src);
nsUnescape(dst); // Hex Decode
MacFileHelpers::SwapSlashColon(dst);
}
return result;
} // MacFileHelpers::MacPathFromUnixPath
//----------------------------------------------------------------------------------------
OSErr MacFileHelpers::FSSpecFromPathname(
const char* inPathNamePtr,
FSSpec& outSpec,
Boolean inCreateDirs)
// FSSpecFromPathname reverses PathNameFromFSSpec.
// It returns a FSSpec given a c string which is a mac pathname.
//----------------------------------------------------------------------------------------
{
OSErr err;
// Simplify this routine to use FSMakeFSSpec if length < 255. Otherwise use the MoreFiles
// routine FSpLocationFromFullPath, which allocates memory, to handle longer pathnames.
size_t inLength = strlen(inPathNamePtr);
if (inLength < 255)
{
Str255 ppath;
MacFileHelpers::PLstrcpy(ppath, inPathNamePtr);
err = ::FSMakeFSSpec(0, 0, ppath, &outSpec);
}
else
err = FSpLocationFromFullPath(inLength, inPathNamePtr, &outSpec);
if (err == dirNFErr && inCreateDirs)
{
const char* path = inPathNamePtr;
outSpec.vRefNum = 0;
outSpec.parID = 0;
do {
// Locate the colon that terminates the node.
// But if we've a partial path (starting with a colon), find the second one.
const char* nextColon = strchr(path + (*path == ':'), ':');
// Well, if there are no more colons, point to the end of the string.
if (!nextColon)
nextColon = path + strlen(path);
// Make a pascal string out of this node. Include initial
// and final colon, if any!
Str255 ppath;
MacFileHelpers::PLstrncpy(ppath, path, nextColon - path + 1);
// Use this string as a relative path using the directory created
// on the previous round (or directory 0,0 on the first round).
err = ::FSMakeFSSpec(outSpec.vRefNum, outSpec.parID, ppath, &outSpec);
// If this was the leaf node, then we are done.
if (!*nextColon)
break;
// If we got "file not found", then
// we need to create a directory.
if (err == fnfErr && *nextColon)
err = FSpDirCreate(&outSpec, smCurrentScript, &outSpec.parID);
// For some reason, this usually returns fnfErr, even though it works.
if (err != noErr && err != fnfErr)
return err;
path = nextColon; // next round
} while (1);
}
return err;
} // MacFileHelpers::FSSpecFromPathname
//----------------------------------------------------------------------------------------
OSErr MacFileHelpers::CreateFolderInFolder(
short refNum, // Parent directory/volume
long dirID,
ConstStr255Param folderName, // Name of the new folder
short& outRefNum, // Volume of the created folder
long& outDirID) //
// Creates a folder named 'folderName' inside a folder.
// The errors returned are same as PBDirCreate
//----------------------------------------------------------------------------------------
{
HFileParam hpb;
hpb.ioVRefNum = refNum;
hpb.ioDirID = dirID;
hpb.ioNamePtr = (StringPtr)&folderName;
OSErr err = PBDirCreateSync((HParmBlkPtr)&hpb);
if (err == noErr)
{
outRefNum = hpb.ioVRefNum;
outDirID = hpb.ioDirID;
}
else
{
outRefNum = 0;
outDirID = 0;
}
return err;
} // MacFileHelpers::CreateFolderInFolder
//----------------------------------------------------------------------------------------
void MacFileHelpers::EnsureAliasHaven()
//----------------------------------------------------------------------------------------
{
// Alias Haven is a directory in which we never resolve aliases.
if (sAliasHavenVRefNum != 0)
return;
FSSpec temp;
if (FindFolder(0, kTemporaryFolderType, true, & temp.vRefNum, &temp.parID) == noErr)
{
CreateFolderInFolder(
temp.vRefNum, // Parent directory/volume
temp.parID,
kAliasHavenFolderName, // Name of the new folder
sAliasHavenVRefNum, // Volume of the created folder
sAliasHavenDirID);
}
} // MacFileHelpers::EnsureAliasHaven
//----------------------------------------------------------------------------------------
PRBool MacFileHelpers::IsAliasSafe(const FSSpec& inSpec)
// Returns true if the alias is in the alias haven directory, or if alias resolution
// has been turned off.
//----------------------------------------------------------------------------------------
{
return sNoResolve
|| (inSpec.parID == sAliasHavenDirID && inSpec.vRefNum == sAliasHavenVRefNum);
} // MacFileHelpers::IsAliasSafe
//----------------------------------------------------------------------------------------
OSErr MacFileHelpers::ResolveAliasFile(FSSpec& inOutSpec, Boolean& wasAliased)
//----------------------------------------------------------------------------------------
{
wasAliased = false;
if (IsAliasSafe(inOutSpec))
return noErr;
Boolean dummy;
return ::ResolveAliasFile(&inOutSpec, TRUE, &dummy, &wasAliased);
} // MacFileHelpers::ResolveAliasFile
//-----------------------------------
OSErr MacFileHelpers::FSSpecFromFullUnixPath(
const char * unixPath,
FSSpec& outSpec,
Boolean resolveAlias,
Boolean allowPartial,
Boolean createDirs)
// File spec from URL. Reverses GetURLFromFileSpec
// Its input is only the <path> part of the URL
// JRM 97/01/08 changed this so that if it's a partial path (doesn't start with '/'),
// then it is combined with inOutSpec's vRefNum and parID to form a new spec.
//-----------------------------------
{
if (unixPath == nsnull)
return badFidErr;
char* macPath = MacPathFromUnixPath(unixPath);
if (!macPath)
return memFullErr;
OSErr err = noErr;
if (!allowPartial)
{
NS_ASSERTION(*unixPath == '/' /*full path*/, "Not a full Unix path!");
}
err = FSSpecFromPathname(macPath, outSpec, createDirs);
if (err == fnfErr)
err = noErr;
Boolean dummy;
if (err == noErr && resolveAlias) // Added
err = MacFileHelpers::ResolveAliasFile(outSpec, dummy);
delete [] macPath;
NS_ASSERTION(err==noErr||err==fnfErr||err==dirNFErr||err==nsvErr, "Not a path!");
return err;
} // MacFileHelpers::FSSpecFromLocalUnixPath
//-----------------------------------
char* MacFileHelpers::PathNameFromFSSpec( const FSSpec& inSpec, Boolean wantLeafName )
// Returns a full pathname to the given file
// Returned value is allocated with new [], and must be freed with delete []
// This is taken from FSpGetFullPath in MoreFiles, except that we need to tolerate
// fnfErr.
//-----------------------------------
{
char* result = nil;
OSErr err = noErr;
short fullPathLength = 0;
Handle fullPath = nsnull;
FSSpec tempSpec = inSpec;
if ( tempSpec.parID == fsRtParID )
{
/* The object is a volume */
/* Add a colon to make it a full pathname */
tempSpec.name[++tempSpec.name[0]] = ':';
/* We're done */
err = PtrToHand(&tempSpec.name[1], &fullPath, tempSpec.name[0]);
}
else
{
/* The object isn't a volume */
CInfoPBRec pb = { 0 };
Str63 dummyFileName;
MacFileHelpers::PLstrcpy(dummyFileName, "\pG'day!");
/* Is the object a file or a directory? */
pb.dirInfo.ioNamePtr = (! tempSpec.name[0]) ? (StringPtr)dummyFileName : tempSpec.name;
pb.dirInfo.ioVRefNum = tempSpec.vRefNum;
pb.dirInfo.ioDrDirID = tempSpec.parID;
pb.dirInfo.ioFDirIndex = 0;
err = PBGetCatInfoSync(&pb);
if ( err == noErr || err == fnfErr)
{
// if the object is a directory, append a colon so full pathname ends with colon
// Beware of the "illegal spec" case that Netscape uses (empty name string). In
// this case, we don't want the colon.
if ( err == noErr && tempSpec.name[0] && (pb.hFileInfo.ioFlAttrib & ioDirMask) != 0 )
{
++tempSpec.name[0];
tempSpec.name[tempSpec.name[0]] = ':';
}
/* Put the object name in first */
err = PtrToHand(&tempSpec.name[1], &fullPath, tempSpec.name[0]);
if ( err == noErr )
{
/* Get the ancestor directory names */
pb.dirInfo.ioNamePtr = tempSpec.name;
pb.dirInfo.ioVRefNum = tempSpec.vRefNum;
pb.dirInfo.ioDrParID = tempSpec.parID;
do /* loop until we have an error or find the root directory */
{
pb.dirInfo.ioFDirIndex = -1;
pb.dirInfo.ioDrDirID = pb.dirInfo.ioDrParID;
err = PBGetCatInfoSync(&pb);
if ( err == noErr )
{
/* Append colon to directory name */
++tempSpec.name[0];
tempSpec.name[tempSpec.name[0]] = ':';
/* Add directory name to beginning of fullPath */
(void) Munger(fullPath, 0, nsnull, 0, &tempSpec.name[1], tempSpec.name[0]);
err = MemError();
}
} while ( err == noErr && pb.dirInfo.ioDrDirID != fsRtDirID );
}
}
}
if ( err != noErr && err != fnfErr)
goto Clean;
fullPathLength = GetHandleSize(fullPath);
err = noErr;
int allocSize = 1 + fullPathLength;
// We only want the leaf name if it's the root directory or wantLeafName is true.
if (inSpec.parID != fsRtParID && !wantLeafName)
allocSize -= inSpec.name[0];
result = new char[allocSize];
if (!result)
goto Clean;
memcpy(result, *fullPath, allocSize - 1);
result[ allocSize - 1 ] = 0;
Clean:
if (fullPath)
DisposeHandle(fullPath);
NS_ASSERTION(result, "Out of memory"); // OOPS! very bad.
return result;
} // MacFileHelpers::PathNameFromFSSpec
//========================================================================================
// Macintosh nsFileSpec implementation
//========================================================================================
//----------------------------------------------------------------------------------------
nsFileSpec::nsFileSpec()
//----------------------------------------------------------------------------------------
: mError(NS_OK)
{
mSpec.name[0] = '\0';
}
//----------------------------------------------------------------------------------------
nsFileSpec::nsFileSpec(const nsFileSpec& inSpec)
//----------------------------------------------------------------------------------------
: mSpec(inSpec.mSpec)
, mError(inSpec.Error())
{
}
//----------------------------------------------------------------------------------------
nsFileSpec::nsFileSpec(const char* inString, PRBool inCreateDirs)
//----------------------------------------------------------------------------------------
{
mError = NS_FILE_RESULT(MacFileHelpers::FSSpecFromFullUnixPath(
inString, mSpec, false, true, inCreateDirs));
// allow a partial path, create as necessary
if (mError == NS_FILE_RESULT(fnfErr))
mError = NS_OK;
} // nsFileSpec::nsFileSpec
//----------------------------------------------------------------------------------------
nsFileSpec::nsFileSpec(
short vRefNum,
long parID,
ConstStr255Param name)
//----------------------------------------------------------------------------------------
{
mError = NS_FILE_RESULT(::FSMakeFSSpec(vRefNum, parID, name, &mSpec));
if (mError == NS_FILE_RESULT(fnfErr))
mError = noErr;
}
//----------------------------------------------------------------------------------------
nsFileSpec::nsFileSpec(const nsFilePath& inPath)
//----------------------------------------------------------------------------------------
{
*this = inPath.GetFileSpec();
}
#if DEBUG
//----------------------------------------------------------------------------------------
nsOutputStream& operator << (nsOutputStream& s, const nsFileSpec& spec)
//----------------------------------------------------------------------------------------
{
s << spec.mSpec.vRefNum << ", " << spec.mSpec.parID << ", \"";
s.write((const char*)&spec.mSpec.name[1], spec.mSpec.name[0]);
return s << "\"";
} // nsOutputStream& operator << (nsOutputStream&, const nsFileSpec&)
#endif
//----------------------------------------------------------------------------------------
void nsFileSpec::operator = (const char* inString)
//----------------------------------------------------------------------------------------
{
mError = NS_FILE_RESULT(MacFileHelpers::FSSpecFromFullUnixPath(inString, mSpec, false));
} // nsFileSpec::operator =
//----------------------------------------------------------------------------------------
void nsFileSpec::operator = (const nsFileSpec& inSpec)
//----------------------------------------------------------------------------------------
{
mSpec = inSpec.mSpec;
mError = inSpec.Error();
} // nsFileSpec::operator =
//----------------------------------------------------------------------------------------
void nsFileSpec::operator = (const nsFilePath& inPath)
//----------------------------------------------------------------------------------------
{
*this = inPath.GetFileSpec();
} // nsFileSpec::operator =
//----------------------------------------------------------------------------------------
PRBool nsFileSpec::Exists() const
//----------------------------------------------------------------------------------------
{
FSSpec temp;
return ::FSMakeFSSpec(mSpec.vRefNum, mSpec.parID, mSpec.name, &temp) == noErr;
} // nsFileSpec::operator =
//----------------------------------------------------------------------------------------
void nsFileSpec::SetLeafName(const char* inLeafName)
// In leaf name can actually be a partial path...
//----------------------------------------------------------------------------------------
{
// what about long relative paths? Hmm?
Str255 partialPath;
MacFileHelpers::PLstrcpy(partialPath, inLeafName);
mError = NS_FILE_RESULT(
::FSMakeFSSpec(mSpec.vRefNum, mSpec.parID, partialPath, &mSpec));
} // nsFileSpec::SetLeafName
//----------------------------------------------------------------------------------------
char* nsFileSpec::GetLeafName() const
// Result needs to be delete[]ed.
//----------------------------------------------------------------------------------------
{
char leaf[64];
memcpy(leaf, &mSpec.name[1], mSpec.name[0]);
leaf[mSpec.name[0]] = '\0';
return nsFileSpecHelpers::StringDup(leaf);
} // nsFileSpec::GetLeafName
//----------------------------------------------------------------------------------------
void nsFileSpec::MakeAliasSafe()
//----------------------------------------------------------------------------------------
{
mError = NS_FILE_RESULT(MacFileHelpers::MakeAliasSafe(mSpec));
} // nsFileSpec::MakeAliasSafe
//----------------------------------------------------------------------------------------
void nsFileSpec::MakeUnique(ConstStr255Param inSuggestedLeafName)
//----------------------------------------------------------------------------------------
{
if (inSuggestedLeafName[0] > 0)
MacFileHelpers::PLstrcpy(mSpec.name, inSuggestedLeafName);
MakeUnique();
} // nsFileSpec::MakeUnique
//----------------------------------------------------------------------------------------
void nsFileSpec::ResolveAlias(PRBool& wasAliased)
//----------------------------------------------------------------------------------------
{
Boolean wasAliased2;
mError = NS_FILE_RESULT(MacFileHelpers::ResolveAliasFile(mSpec, wasAliased2));
wasAliased = (wasAliased2 != false);
} // nsFileSpec::ResolveAlias
//----------------------------------------------------------------------------------------
PRBool nsFileSpec::IsFile() const
//----------------------------------------------------------------------------------------
{
long dirID;
Boolean isDirectory;
return (noErr == FSpGetDirectoryID(&mSpec, &dirID, &isDirectory) && !isDirectory);
} // nsFileSpec::IsFile
//----------------------------------------------------------------------------------------
PRBool nsFileSpec::IsDirectory() const
//----------------------------------------------------------------------------------------
{
long dirID;
Boolean isDirectory;
return (noErr == FSpGetDirectoryID(&mSpec, &dirID, &isDirectory) && isDirectory);
} // nsFileSpec::IsDirectory
//----------------------------------------------------------------------------------------
void nsFileSpec::GetParent(nsFileSpec& outSpec) const
//----------------------------------------------------------------------------------------
{
if (NS_SUCCEEDED(mError))
outSpec.mError
= NS_FILE_RESULT(::FSMakeFSSpec(mSpec.vRefNum, mSpec.parID, nsnull, outSpec));
} // nsFileSpec::GetParent
//----------------------------------------------------------------------------------------
void nsFileSpec::operator += (const char* inRelativePath)
//----------------------------------------------------------------------------------------
{
long dirID;
Boolean isDirectory;
mError = NS_FILE_RESULT(::FSpGetDirectoryID(&mSpec, &dirID, &isDirectory));
if (NS_SUCCEEDED(mError) && isDirectory)
{
Str255 partialPath;
MacFileHelpers::PLstrcpy(partialPath, inRelativePath);
mError = NS_FILE_RESULT(::FSMakeFSSpec(mSpec.vRefNum, dirID, partialPath, *this));
//if (NS_SUCCEEDED(mError))
// SetLeafName(inRelativePath);
}
} // nsFileSpec::operator +=
//----------------------------------------------------------------------------------------
void nsFileSpec::CreateDirectory(int /* unix mode */)
//----------------------------------------------------------------------------------------
{
long ignoredDirID;
FSpDirCreate(&mSpec, smCurrentScript, &ignoredDirID);
} // nsFileSpec::CreateDirectory
//----------------------------------------------------------------------------------------
void nsFileSpec::Delete(PRBool inRecursive)
//----------------------------------------------------------------------------------------
{
if (inRecursive)
{
// MoreFilesExtras
mError = NS_FILE_RESULT(::DeleteDirectory(
mSpec.vRefNum,
mSpec.parID,
const_cast<unsigned char*>(mSpec.name)));
}
else
mError = NS_FILE_RESULT(FSpDelete(&mSpec));
} // nsFileSpec::Delete
//----------------------------------------------------------------------------------------
nsresult nsFileSpec::Rename(const char* inNewName)
//----------------------------------------------------------------------------------------
{
if (strchr(inNewName, '/'))
return -1; // no relative paths here!
Str255 pName;
MacFileHelpers::PLstrcpy(pName, inNewName);
if (FSpRename(&mSpec, pName) != noErr)
return -1;
SetLeafName(inNewName);
return 0;
} // nsFileSpec::Rename
//----------------------------------------------------------------------------------------
nsresult nsFileSpec::Copy(const nsFileSpec& newParentDir) const
//----------------------------------------------------------------------------------------
{
// We can only copy into a directory, and (for now) can not copy entire directories
if (!newParentDir.IsDirectory() || (IsDirectory() ) )
return NS_FILE_FAILURE;
nsresult result = NS_FILE_RESULT(::FSpFileCopy( &mSpec,
&newParentDir.mSpec,
const_cast<StringPtr>(GetLeafPName()),
nsnull,
0,
true));
return result;
} // nsFileSpec::Copy
//----------------------------------------------------------------------------------------
nsresult nsFileSpec::Move(const nsFileSpec& newParentDir) const
//----------------------------------------------------------------------------------------
{
// We can only move into a directory
if (!newParentDir.IsDirectory())
return NS_FILE_FAILURE;
nsresult result = NS_FILE_RESULT(::FSpMoveRenameCompat(&mSpec,
&newParentDir.mSpec,
const_cast<StringPtr>(GetLeafPName())));
return result;
} // nsFileSpec::Move
//----------------------------------------------------------------------------------------
nsresult nsFileSpec::Execute(const char* /*args - how can this be cross-platform? problem! */ ) const
//----------------------------------------------------------------------------------------
{
if (IsDirectory())
return NS_FILE_FAILURE;
LaunchParamBlockRec launchThis;
launchThis.launchAppSpec = const_cast<FSSpec*>(&mSpec);
launchThis.launchAppParameters = nsnull; // args;
/* launch the thing */
launchThis.launchBlockID = extendedBlock;
launchThis.launchEPBLength = extendedBlockLen;
launchThis.launchFileFlags = nsnull;
launchThis.launchControlFlags = launchContinue + launchNoFileFlags + launchUseMinimum;
launchThis.launchControlFlags += launchDontSwitch;
nsresult result = NS_FILE_RESULT(::LaunchApplication(&launchThis));
return result;
} // nsFileSpec::Execute
//========================================================================================
// Macintosh nsFilePath implementation
//========================================================================================
//----------------------------------------------------------------------------------------
nsFilePath::nsFilePath(const char* inString, PRBool inCreateDirs)
//----------------------------------------------------------------------------------------
: mPath(nsnull)
, mFileSpec(inString, inCreateDirs)
{
// Make canonical and absolute.
char * path = MacFileHelpers::PathNameFromFSSpec( mFileSpec, TRUE );
mPath = MacFileHelpers::EncodeMacPath(path, true, true);
}
//----------------------------------------------------------------------------------------
nsFilePath::nsFilePath(const nsFileSpec& inSpec)
//----------------------------------------------------------------------------------------
: mFileSpec(inSpec)
{
char * path = MacFileHelpers::PathNameFromFSSpec( inSpec.mSpec, TRUE );
mPath = MacFileHelpers::EncodeMacPath(path, true, true);
}
//----------------------------------------------------------------------------------------
void nsFilePath::operator = (const nsFileSpec& inSpec)
//----------------------------------------------------------------------------------------
{
delete [] mPath;
char * path = MacFileHelpers::PathNameFromFSSpec( inSpec.mSpec, TRUE );
mPath = MacFileHelpers::EncodeMacPath(path, true, true);
mFileSpec = inSpec;
} // nsFilePath::operator =
//========================================================================================
// nsFileURL implementation
//========================================================================================
//----------------------------------------------------------------------------------------
nsFileURL::nsFileURL(const char* inString, PRBool inCreateDirs)
//----------------------------------------------------------------------------------------
: mURL(nsnull)
, mFileSpec(inString + kFileURLPrefixLength, inCreateDirs)
{
NS_ASSERTION(strstr(inString, kFileURLPrefix) == inString, "Not a URL!");
// Make canonical and absolute.
char* path = MacFileHelpers::PathNameFromFSSpec( mFileSpec, TRUE );
char* escapedPath = MacFileHelpers::EncodeMacPath(path, true, true);
mURL = nsFileSpecHelpers::StringDup(kFileURLPrefix, kFileURLPrefixLength + strlen(escapedPath));
strcat(mURL, escapedPath);
delete [] escapedPath;
} // nsFileURL::nsFileURL
//========================================================================================
// nsDirectoryIterator
//========================================================================================
//----------------------------------------------------------------------------------------
nsDirectoryIterator::nsDirectoryIterator(
const nsFileSpec& inDirectory
, int inIterateDirection)
//----------------------------------------------------------------------------------------
: mCurrent(inDirectory)
, mExists(false)
, mIndex(-1)
{
CInfoPBRec pb;
DirInfo* dipb = (DirInfo*)&pb;
// Sorry about this, there seems to be a bug in CWPro 4:
const FSSpec& inSpec = inDirectory.nsFileSpec::operator const FSSpec&();
Str255 outName;
MacFileHelpers::PLstrcpy(outName, inSpec.name);
pb.hFileInfo.ioNamePtr = outName;
pb.hFileInfo.ioVRefNum = inSpec.vRefNum;
pb.hFileInfo.ioDirID = inSpec.parID;
pb.hFileInfo.ioFDirIndex = 0; // use ioNamePtr and ioDirID
OSErr err = PBGetCatInfoSync( &pb );
// test that we have got a directory back, not a file
if ( (err != noErr ) || !( dipb->ioFlAttrib & 0x0010 ) )
return;
// Sorry about this, there seems to be a bug in CWPro 4:
FSSpec& currentSpec = mCurrent.nsFileSpec::operator FSSpec&();
currentSpec.vRefNum = inSpec.vRefNum;
currentSpec.parID = dipb->ioDrDirID;
mMaxIndex = pb.dirInfo.ioDrNmFls;
if (inIterateDirection > 0)
{
mIndex = 0; // ready to increment
++(*this); // the pre-increment operator
}
else
{
mIndex = mMaxIndex + 1; // ready to decrement
--(*this); // the pre-decrement operator
}
} // nsDirectoryIterator::nsDirectoryIterator
//----------------------------------------------------------------------------------------
OSErr nsDirectoryIterator::SetToIndex()
//----------------------------------------------------------------------------------------
{
CInfoPBRec cipb;
DirInfo *dipb=(DirInfo *)&cipb;
Str255 objectName;
dipb->ioCompletion = nsnull;
dipb->ioFDirIndex = mIndex;
// Sorry about this, there seems to be a bug in CWPro 4:
FSSpec& currentSpec = mCurrent.nsFileSpec::operator FSSpec&();
dipb->ioVRefNum = currentSpec.vRefNum; /* Might need to use vRefNum, not sure*/
dipb->ioDrDirID = currentSpec.parID;
dipb->ioNamePtr = objectName;
OSErr err = PBGetCatInfoSync(&cipb);
if (err == noErr)
err = FSMakeFSSpec(currentSpec.vRefNum, currentSpec.parID, objectName, &currentSpec);
mExists = err == noErr;
return err;
} // nsDirectoryIterator::SetToIndex()
//----------------------------------------------------------------------------------------
nsDirectoryIterator& nsDirectoryIterator::operator -- ()
//----------------------------------------------------------------------------------------
{
mExists = false;
while (--mIndex > 0)
{
OSErr err = SetToIndex();
if (err == noErr)
break;
}
return *this;
} // nsDirectoryIterator::operator --
//----------------------------------------------------------------------------------------
nsDirectoryIterator& nsDirectoryIterator::operator ++ ()
//----------------------------------------------------------------------------------------
{
mExists = false;
if (mIndex >= 0) // probably trying to use a file as a directory!
while (++mIndex <= mMaxIndex)
{
OSErr err = SetToIndex();
if (err == noErr)
break;
}
return *this;
} // nsDirectoryIterator::operator ++

View File

@@ -1,147 +0,0 @@
/* -*- 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

@@ -1,365 +0,0 @@
/* -*- 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
//========================================================================================
static NS_DEFINE_IID(kITimerIID, NS_ITIMER_IID);
NS_IMPL_ISUPPORTS(TimerImpl, kITimerIID)
//----------------------------------------------------------------------------------------
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(kITimerIID, (void **) aInstancePtrResult);
}

View File

@@ -1,112 +0,0 @@
#!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 \
nsEscape.cpp \
nsIFileStream.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 \
$(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
LCFLAGS = \
$(LCFLAGS) \
$(DEFINES) \
$(NULL)
# These are the libraries we need to link with to create the dll
LLIBS= \
$(DIST)\lib\xpcom32.lib \
$(DIST)\lib\libplc21.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

@@ -1,36 +0,0 @@
#
# 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
include $(topsrcdir)/config/rules.mk

View File

@@ -1,173 +0,0 @@
/* -*- 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

@@ -1,80 +0,0 @@
/* -*- 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

@@ -1,154 +0,0 @@
/* -*- 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);
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*) new char[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

@@ -1,402 +0,0 @@
/**
* 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;
}

View File

@@ -1,283 +0,0 @@
/* -*- 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

@@ -1,80 +0,0 @@
/* -*- 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 "nsRepository.h"
PRInt32 gLockCount = 0;
NS_DEFINE_IID(kIFactoryIID, NS_IFACTORY_IID);
extern "C" NS_EXPORT nsresult
NSRegisterSelf(const char* path)
{
nsresult ret;
ret = nsRepository::RegisterFactory(kPropertiesCID, path, PR_TRUE,
PR_TRUE);
if (NS_FAILED(ret)) {
return ret;
}
return ret;
}
extern "C" NS_EXPORT nsresult
NSUnregisterSelf(const char* path)
{
nsresult ret;
ret = nsRepository::UnregisterFactory(kPropertiesCID, path);
if (NS_FAILED(ret)) {
return ret;
}
return ret;
}
extern "C" NS_EXPORT nsresult
NSGetFactory(const nsCID& aClass, nsISupports* aServMgr, 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;
}

View File

@@ -1,26 +0,0 @@
/* -*- 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

@@ -1,138 +0,0 @@
/* -*- 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 amount = mSpace - aKeep;
PRUint32 nb;
*aErrorCode = aStream->Read(mBuffer, aKeep, amount, &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);
}

View File

@@ -1,513 +0,0 @@
/* -*- 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);
}
////////////////////////////////////////////////////////////////////////////////
// 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);
}

View File

@@ -1,161 +0,0 @@
/* -*- 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 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);
};
#endif /* nsCRT_h___ */

View File

@@ -1,540 +0,0 @@
/* -*- 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& aMemDestroyer) : mMemDestroyer(aMemDestroyer) {
mMemDestroyer=aMemDestroyer;
mCapacity=eGrowthDelta;
mOrigin=mSize=0;
mData=new void*[mCapacity];
}
/**
* Destructor
* @update gess4/18/98
*/
nsDeque::~nsDeque() {
Erase();
delete [] mData;
mData=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;
}
/**
* 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() {
ForEach(mMemDestroyer);
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
}

View File

@@ -1,406 +0,0 @@
/* -*- 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& aMemDestroyer);
~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;
/**
* Perform automated selftest on the deque
*
* @update gess4/18/98
* @param
* @return
*/
static void SelfTest();
protected:
PRInt32 mSize;
PRInt32 mCapacity;
PRInt32 mOrigin;
nsDequeFunctor& mMemDestroyer;
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

@@ -1,152 +0,0 @@
/* -*- 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)
//----------------------------------------------------------------------------------------
{
int32 i, extra = 0;
char *hexChars = "0123456789ABCDEF";
if(!str)
return(0);
register const unsigned char* src = (unsigned char *) str;
for (i = 0; i < len; i++)
{
if (!IS_OK(src[i]))
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;
for (i = 0; i < len; i++)
{
unsigned char c = src[i];
if (IS_OK(c))
{
*dst++ = c;
}
else if (mask == url_XPAlphas && c == ' ')
{
*dst++ = '+'; /* convert spaces to pluses */
}
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

@@ -1,801 +0,0 @@
/* -*- 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 "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)
{
*currentEnd = '\0';
nsFileSpec spec(nsFilePath(pathCopy, PR_FALSE));
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;
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
//----------------------------------------------------------------------------------------
nsFileURL::nsFileURL(const nsFileURL& inOther)
//----------------------------------------------------------------------------------------
: mURL(nsFileSpecHelpers::StringDup(inOther.mURL))
#ifdef XP_MAC
, mFileSpec(inOther.GetFileSpec())
#endif
{
} // nsFileURL::nsFileURL
//----------------------------------------------------------------------------------------
nsFileURL::nsFileURL(const nsFilePath& inOther)
//----------------------------------------------------------------------------------------
: mURL(nsFileSpecHelpers::AllocCat(kFileURLPrefix, (const char*)inOther))
#ifdef XP_MAC
, mFileSpec(inOther.GetFileSpec())
#endif
{
} // nsFileURL::nsFileURL
//----------------------------------------------------------------------------------------
nsFileURL::nsFileURL(const nsFileSpec& inOther)
: mURL(nsFileSpecHelpers::AllocCat(kFileURLPrefix, (const char*)nsFilePath(inOther)))
#ifdef XP_MAC
, mFileSpec(inOther)
#endif
//----------------------------------------------------------------------------------------
{
} // nsFileURL::nsFileURL
//----------------------------------------------------------------------------------------
nsFileURL::~nsFileURL()
//----------------------------------------------------------------------------------------
{
delete [] mURL;
}
//----------------------------------------------------------------------------------------
void nsFileURL::operator = (const char* inString)
//----------------------------------------------------------------------------------------
{
nsFileSpecHelpers::StringAssign(mURL, inString);
NS_ASSERTION(strstr(inString, kFileURLPrefix) == inString, "Not a URL!");
#ifdef XP_MAC
mFileSpec = inString + kFileURLPrefixLength;
#endif
} // nsFileURL::operator =
//----------------------------------------------------------------------------------------
void nsFileURL::operator = (const nsFileURL& inOther)
//----------------------------------------------------------------------------------------
{
mURL = nsFileSpecHelpers::StringAssign(mURL, inOther.mURL);
#ifdef XP_MAC
mFileSpec = inOther.GetFileSpec();
#endif
} // nsFileURL::operator =
//----------------------------------------------------------------------------------------
void nsFileURL::operator = (const nsFilePath& inOther)
//----------------------------------------------------------------------------------------
{
delete [] mURL;
mURL = nsFileSpecHelpers::AllocCat(kFileURLPrefix, (const char*)inOther);
#ifdef XP_MAC
mFileSpec = inOther.GetFileSpec();
#endif
} // nsFileURL::operator =
//----------------------------------------------------------------------------------------
void nsFileURL::operator = (const nsFileSpec& inOther)
//----------------------------------------------------------------------------------------
{
delete [] mURL;
mURL = nsFileSpecHelpers::AllocCat(kFileURLPrefix, (const char*)nsFilePath(inOther));
#ifdef XP_MAC
mFileSpec = inOther;
#endif
} // nsFileURL::operator =
#if DEBUG
//----------------------------------------------------------------------------------------
nsOutputStream& operator << (nsOutputStream& s, const nsFileURL& url)
//----------------------------------------------------------------------------------------
{
return (s << url.mURL);
}
#endif
//========================================================================================
// 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
//----------------------------------------------------------------------------------------
nsFilePath::nsFilePath(const nsFileURL& inOther)
//----------------------------------------------------------------------------------------
: mPath(nsFileSpecHelpers::StringDup(inOther.mURL + kFileURLPrefixLength))
#ifdef XP_MAC
, mFileSpec(inOther.GetFileSpec())
#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
#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
}
//----------------------------------------------------------------------------------------
void nsFilePath::operator = (const nsFileURL& inOther)
//----------------------------------------------------------------------------------------
{
nsFileSpecHelpers::StringAssign(mPath, (const char*)nsFilePath(inOther));
#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)
//----------------------------------------------------------------------------------------
#ifndef XP_MAC
: mPath(nsnull)
#endif
{
*this = inDescriptor;
}
//----------------------------------------------------------------------------------------
nsFileSpec::nsFileSpec(const nsFileURL& inURL)
//----------------------------------------------------------------------------------------
#ifndef XP_MAC
: mPath(nsnull)
#endif
{
*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 (strlen(leafName) > 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);
#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
//----------------------------------------------------------------------------------------
nsFileSpec::~nsFileSpec()
//----------------------------------------------------------------------------------------
{
#ifndef XP_MAC
delete [] mPath;
#endif
}
#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_TRUE /* XXX? */);
mError = NS_OK;
}
#endif //XP_UNIX
#if DEBUG
#if (defined(XP_UNIX) || defined(XP_PC))
//----------------------------------------------------------------------------------------
nsOutputStream& operator << (nsOutputStream& s, const nsFileSpec& spec)
//----------------------------------------------------------------------------------------
{
return (s << (const char*)spec.mPath);
}
#endif // DEBUG && XP_UNIX
#endif
//----------------------------------------------------------------------------------------
nsFileSpec nsFileSpec::operator + (const char* inRelativePath) const
//----------------------------------------------------------------------------------------
{
nsFileSpec result = *this;
result += inRelativePath;
return result;
} // nsFileSpec::operator +
//========================================================================================
// 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.operator const FSSpec* const (), &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);
#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
//----------------------------------------------------------------------------------------
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 (nsInputFileStream&)s;
bigBuffer[8] = '\0';
sscanf(bigBuffer, "%lx", &bytesRead);
if (bytesRead > MAX_PERSISTENT_DATA_SIZE)
return (nsInputFileStream&)s; // preposterous.
// Now we know how many bytes to read, do it.
s.read(bigBuffer, bytesRead);
d.SetData(bigBuffer, bytesRead);
return (nsInputFileStream&)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;
}

View File

@@ -1,203 +0,0 @@
/* -*- 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 <string.h>
#include <stdio.h>
//========================================================================================
// nsInputStream
//========================================================================================
//----------------------------------------------------------------------------------------
nsInputStream::~nsInputStream()
//----------------------------------------------------------------------------------------
{
mInputStream->Close();
}
//----------------------------------------------------------------------------------------
char nsInputStream::get()
//----------------------------------------------------------------------------------------
{
char c;
read(&c, sizeof(c));
return c;
}
//----------------------------------------------------------------------------------------
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()
//----------------------------------------------------------------------------------------
{
mOutputStream->Close();
}
//----------------------------------------------------------------------------------------
void nsOutputStream::put(char c)
//----------------------------------------------------------------------------------------
{
write(&c, sizeof(c));
}
//----------------------------------------------------------------------------------------
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, "%d", val);
return (*this << buf);
}
//----------------------------------------------------------------------------------------
nsOutputStream& nsOutputStream::operator << (unsigned short val)
//----------------------------------------------------------------------------------------
{
char buf[30];
sprintf(buf, "%ud", 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, "%uld", val);
return (*this << buf);
}
//========================================================================================
// nsInputFileStream
//========================================================================================
//----------------------------------------------------------------------------------------
PRBool nsInputFileStream::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;
} // nsInputStream::readline
//========================================================================================
// nsOutputFileStream
//========================================================================================
//----------------------------------------------------------------------------------------
void nsOutputFileStream::flush()
//----------------------------------------------------------------------------------------
{
if (mFileOutputStream)
mFileOutputStream->Flush();
}
//========================================================================================
// Manipulators
//========================================================================================
//----------------------------------------------------------------------------------------
nsOutputStream& nsEndl(nsOutputStream& os)
//----------------------------------------------------------------------------------------
{
os.put('\n');
os.flush();
return os;
} // nsEndl

View File

@@ -1,22 +0,0 @@
#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

@@ -1,51 +0,0 @@
/* -*- 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

@@ -1,79 +0,0 @@
/* -*- 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& IID() { 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

@@ -1,58 +0,0 @@
/* -*- 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& IID() { 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

@@ -1,57 +0,0 @@
/* -*- 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

@@ -1,451 +0,0 @@
#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 nsIOutputStream
, public nsIInputStream
, 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 aOffset,
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;
if (aOffset)
PR_Seek(mFileDesc, aOffset, PR_SEEK_CUR);
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 aOffset,
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;
if (aOffset)
PR_Seek(mFileDesc, aOffset, PR_SEEK_CUR);
PRInt32 bytesWrit = PR_Write(mFileDesc, aBuf, aCount);
if (bytesWrit != aCount)
{
mFailed = PR_TRUE;
*aWriteCount = 0;
return NS_FILE_RESULT(PR_GetError());
}
*aWriteCount = bytesWrit;
return NS_OK;
}
NS_IMETHOD Flush();
protected:
PRFileDesc* mFileDesc;
int mNSPRMode;
PRBool mFailed;
PRBool mEOF;
PRInt32 mLength;
}; // class FileImpl
#define SAY_I_IMPLEMENT(classname) \
if (aIID.Equals(classname::IID())) \
{ \
*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(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)->IID()))
{
*aInstancePtr = (void*)((nsIBaseStream*)(nsIOutputStream*)this);
NS_ADDREF_THIS();
return NS_OK;
}
if (aIID.Equals(((nsISupports*)(nsIOutputStream*)this)->IID()))
{
*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;
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;
}
else if (newPosition >= fileSize)
{
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

@@ -1,56 +0,0 @@
/* -*- 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& IID() { 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 aOffset the start offset of the data
* @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 aOffset, PRUint32 aCount, PRUint32 *aReadCount) = 0;
};
#endif /* nsInputStream_h___ */

View File

@@ -1,48 +0,0 @@
/* -*- 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& IID() { static nsIID iid = NS_IOUTPUTSTREAM_IID; return iid; }
/** Write data into the stream.
* @param aBuf the buffer into which the data is read
* @param aOffset the start offset of the data
* @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 aOffset, PRUint32 aCount, PRUint32 *aWriteCount) = 0;
};
#endif /* nsOutputStream_h___ */

View File

@@ -1,94 +0,0 @@
/* -*- 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:
/**
* 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

@@ -1,41 +0,0 @@
/* -*- 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:
virtual void Notify(nsITimer *timer)=0;
};
#endif

View File

@@ -1,46 +0,0 @@
/* -*- 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

@@ -1,62 +0,0 @@
/* -*- 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___ */

View File

@@ -1,340 +0,0 @@
/* -*- 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

@@ -1,312 +0,0 @@
/* -*- 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_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

@@ -1,37 +0,0 @@
/* -*- 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

@@ -1,423 +0,0 @@
/**
* 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;
}

View File

@@ -1,223 +0,0 @@
/**
* 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

@@ -1,121 +0,0 @@
/* -*- 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

@@ -1,133 +0,0 @@
/* -*- 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

View File

@@ -1,808 +0,0 @@
/* -*- 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

View File

@@ -1,184 +0,0 @@
/* -*- 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 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

@@ -1,142 +0,0 @@
/* -*- 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

@@ -1,314 +0,0 @@
/* -*- 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)
{
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

@@ -1,182 +0,0 @@
/* -*- 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

@@ -1,411 +0,0 @@
/* -*- 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

@@ -1,125 +0,0 @@
/* -*- 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___ */

View File

@@ -1,168 +0,0 @@
/* -*- 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
#define HAS_C_PLUS_PLUS_CASTS // we'll be optimistic.
#if defined(__sgi) && !defined(__GNUC__)
#undef HAS_C_PLUS_PLUS_CASTS
#endif
#if defined(HAS_C_PLUS_PLUS_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

@@ -1,47 +0,0 @@
#!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

@@ -1,39 +0,0 @@
/* -*- 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

@@ -1,200 +0,0 @@
/* -*- 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();
}

View File

@@ -1,6 +0,0 @@
This directory is obsolete.
The nsTimer files that used to live here have been moved to ../motif
in order to allow for multiple unix toolkits.
ramiro@netscape.com 11-02-1998

View File

@@ -1,365 +0,0 @@
/* -*- 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 is included by nsFileSpec.cpp, and includes the Unix-specific
// implementations.
#include <sys/stat.h>
#include <sys/param.h>
#include <errno.h>
#include <dirent.h>
#include <unistd.h>
#include <stdlib.h>
#include "nsError.h"
//----------------------------------------------------------------------------------------
void nsFileSpecHelpers::Canonify(char*& ioPath, PRBool inMakeDirs)
// Canonify, make absolute, and check whether directories exist
//----------------------------------------------------------------------------------------
{
if (!ioPath)
return;
if (inMakeDirs)
{
const mode_t mode = 0700;
nsFileSpecHelpers::MakeAllDirectories(ioPath, mode);
}
char buffer[MAXPATHLEN];
errno = 0;
*buffer = '\0';
char* canonicalPath = realpath(ioPath, buffer);
if (!canonicalPath)
{
// Linux's realpath() is pathetically buggy. If the reason for the nil
// result is just that the leaf does not exist, strip the leaf off,
// process that, and then add the leaf back.
char* allButLeaf = nsFileSpecHelpers::StringDup(ioPath);
if (!allButLeaf)
return;
char* lastSeparator = strrchr(allButLeaf, '/');
if (lastSeparator)
{
*lastSeparator = '\0';
canonicalPath = realpath(allButLeaf, buffer);
strcat(buffer, "/");
// Add back the leaf
strcat(buffer, ++lastSeparator);
}
delete [] allButLeaf;
}
if (!canonicalPath && *ioPath != '/' && !inMakeDirs)
{
// Well, if it's a relative path, hack it ourselves.
canonicalPath = realpath(".", buffer);
if (canonicalPath)
{
strcat(canonicalPath, "/");
strcat(canonicalPath, ioPath);
}
}
if (canonicalPath)
nsFileSpecHelpers::StringAssign(ioPath, canonicalPath);
} // nsFileSpecHelpers::Canonify
//----------------------------------------------------------------------------------------
void nsFileSpec::SetLeafName(const char* inLeafName)
//----------------------------------------------------------------------------------------
{
nsFileSpecHelpers::LeafReplace(mPath, '/', inLeafName);
} // nsFileSpec::SetLeafName
//----------------------------------------------------------------------------------------
char* nsFileSpec::GetLeafName() const
//----------------------------------------------------------------------------------------
{
return nsFileSpecHelpers::GetLeaf(mPath, '/');
} // nsFileSpec::GetLeafName
//----------------------------------------------------------------------------------------
PRBool nsFileSpec::Exists() const
//----------------------------------------------------------------------------------------
{
struct stat st;
return 0 == stat(mPath, &st);
} // nsFileSpec::Exists
//----------------------------------------------------------------------------------------
PRBool nsFileSpec::IsFile() const
//----------------------------------------------------------------------------------------
{
struct stat st;
return 0 == stat(mPath, &st) && S_ISREG(st.st_mode);
} // nsFileSpec::IsFile
//----------------------------------------------------------------------------------------
PRBool nsFileSpec::IsDirectory() const
//----------------------------------------------------------------------------------------
{
struct stat st;
return 0 == stat(mPath, &st) && S_ISDIR(st.st_mode);
} // nsFileSpec::IsDirectory
//----------------------------------------------------------------------------------------
void nsFileSpec::GetParent(nsFileSpec& outSpec) const
//----------------------------------------------------------------------------------------
{
nsFileSpecHelpers::StringAssign(outSpec.mPath, mPath);
char* cp = strrchr(outSpec.mPath, '/');
if (cp)
*cp = '\0';
} // nsFileSpec::GetParent
//----------------------------------------------------------------------------------------
void nsFileSpec::operator += (const char* inRelativePath)
//----------------------------------------------------------------------------------------
{
if (!inRelativePath || !mPath)
return;
char endChar = mPath[strlen(mPath) - 1];
if (endChar == '/')
nsFileSpecHelpers::ReallocCat(mPath, "x");
else
nsFileSpecHelpers::ReallocCat(mPath, "/x");
SetLeafName(inRelativePath);
} // nsFileSpec::operator +=
//----------------------------------------------------------------------------------------
void nsFileSpec::CreateDirectory(int mode)
//----------------------------------------------------------------------------------------
{
// Note that mPath is canonical!
mkdir(mPath, mode);
} // nsFileSpec::CreateDirectory
//----------------------------------------------------------------------------------------
void nsFileSpec::Delete(PRBool inRecursive)
// To check if this worked, call Exists() afterwards, see?
//----------------------------------------------------------------------------------------
{
if (IsDirectory())
{
if (inRecursive)
{
for (nsDirectoryIterator i(*this); i.Exists(); i++)
{
nsFileSpec& child = (nsFileSpec&)i;
child.Delete(inRecursive);
}
}
rmdir(mPath);
}
else
remove(mPath);
} // nsFileSpec::Delete
//----------------------------------------------------------------------------------------
nsresult nsFileSpec::Rename(const char* inNewName)
//----------------------------------------------------------------------------------------
{
// This function should not be used to move a file on disk.
if (strchr(inNewName, '/'))
return NS_FILE_FAILURE;
if (PR_Rename(mPath, inNewName) != 0)
{
return NS_FILE_FAILURE;
}
SetLeafName(inNewName);
return NS_OK;
} // nsFileSpec::Rename
static int CrudeFileCopy(const char* in, const char* out)
{
struct stat in_stat;
int stat_result = -1;
char buf [1024];
FILE *ifp, *ofp;
int rbytes, wbytes;
if (!in || !out)
return -1;
stat_result = stat (in, &in_stat);
ifp = fopen (in, "r");
if (!ifp)
{
return -1;
}
ofp = fopen (out, "w");
if (!ofp)
{
fclose (ifp);
return -1;
}
while ((rbytes = fread (buf, 1, sizeof(buf), ifp)) > 0)
{
while (rbytes > 0)
{
if ( (wbytes = fwrite (buf, 1, rbytes, ofp)) < 0 )
{
fclose (ofp);
fclose (ifp);
unlink(out);
return -1;
}
rbytes -= wbytes;
}
}
fclose (ofp);
fclose (ifp);
if (stat_result == 0)
{
chmod (out, in_stat.st_mode & 0777);
}
return 0;
} // nsFileSpec::Rename
//----------------------------------------------------------------------------------------
nsresult nsFileSpec::Copy(const nsFileSpec& inParentDirectory) const
//----------------------------------------------------------------------------------------
{
// We can only copy into a directory, and (for now) can not copy entire directories
nsresult result = NS_FILE_FAILURE;
if (inParentDirectory.IsDirectory() && (! IsDirectory() ) )
{
char *leafname = GetLeafName();
char* destPath = nsFileSpecHelpers::StringDup(inParentDirectory, ( strlen(inParentDirectory) + 1 + strlen(leafname) ) );
strcat(destPath, "/");
strcat(destPath, leafname);
delete [] leafname;
result = NS_FILE_RESULT(CrudeFileCopy(*this, destPath));
delete [] destPath;
}
return result;
} // nsFileSpec::Copy
//----------------------------------------------------------------------------------------
nsresult nsFileSpec::Move(const nsFileSpec& inNewParentDirectory) const
//----------------------------------------------------------------------------------------
{
// We can only copy into a directory, and (for now) can not copy entire directories
nsresult result = NS_FILE_FAILURE;
if (inNewParentDirectory.IsDirectory() && (! IsDirectory() ) )
{
char *leafname = GetLeafName();
char* destPath
= nsFileSpecHelpers::StringDup(
inNewParentDirectory,
strlen(inNewParentDirectory) + 1 + strlen(leafname));
strcat(destPath, "/");
strcat(destPath, leafname);
delete [] leafname;
result = NS_FILE_RESULT(CrudeFileCopy(*this, destPath));
if (result == NS_OK)
{
Delete(PR_FALSE);
}
delete [] destPath;
}
return result;
}
//----------------------------------------------------------------------------------------
nsresult nsFileSpec::Execute(const char* inArgs ) const
//----------------------------------------------------------------------------------------
{
nsresult result = NS_FILE_FAILURE;
if (! IsDirectory())
{
char* fileNameWithArgs
= nsFileSpecHelpers::StringDup(mPath, strlen(mPath) + 1 + strlen(inArgs));
strcat(fileNameWithArgs, " ");
strcat(fileNameWithArgs, inArgs);
result = NS_FILE_RESULT(system(fileNameWithArgs));
delete [] fileNameWithArgs;
}
return result;
} // nsFileSpec::Execute
//========================================================================================
// nsDirectoryIterator
//========================================================================================
//----------------------------------------------------------------------------------------
nsDirectoryIterator::nsDirectoryIterator(
const nsFileSpec& inDirectory
, int inIterateDirection)
//----------------------------------------------------------------------------------------
: mCurrent(inDirectory)
, mDir(nsnull)
, mExists(false)
{
mCurrent += "sysygy"; // prepare the path for SetLeafName
mDir = opendir((const char*)nsFilePath(inDirectory));
++(*this);
} // nsDirectoryIterator::nsDirectoryIterator
//----------------------------------------------------------------------------------------
nsDirectoryIterator::~nsDirectoryIterator()
//----------------------------------------------------------------------------------------
{
if (mDir)
closedir(mDir);
} // nsDirectoryIterator::nsDirectoryIterator
//----------------------------------------------------------------------------------------
nsDirectoryIterator& nsDirectoryIterator::operator ++ ()
//----------------------------------------------------------------------------------------
{
mExists = false;
if (!mDir)
return *this;
char* dot = ".";
char* dotdot = "..";
struct dirent* entry = readdir(mDir);
if (entry && strcmp(entry->d_name, dot) == 0)
entry = readdir(mDir);
if (entry && strcmp(entry->d_name, dotdot) == 0)
entry = readdir(mDir);
if (entry)
{
mExists = true;
mCurrent.SetLeafName(entry->d_name);
}
return *this;
} // nsDirectoryIterator::operator ++
//----------------------------------------------------------------------------------------
nsDirectoryIterator& nsDirectoryIterator::operator -- ()
//----------------------------------------------------------------------------------------
{
return ++(*this); // can't do it backwards.
} // nsDirectoryIterator::operator --

View File

@@ -1,40 +0,0 @@
#!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
LIBRARY_NAME=gmbase
MODULE=raptor
REQUIRES=xpcom raptor
CPPSRCS=nsTimer.cpp
CPP_OBJS=.\$(OBJDIR)\nsTimer.obj
LINCS=-I$(XPDIST)\public\xpcom -I$(XPDIST)\public\raptor
LCFLAGS = \
$(LCFLAGS) \
-D_IMPL_NS_BASE \
$(NULL)
include <$(DEPTH)\config\rules.mak>
libs:: $(OBJS)
$(MAKE_INSTALL) $(OBJDIR)\nsTimer.obj ..\$(OBJDIR)

View File

@@ -1,40 +0,0 @@
/* -*- 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
mCaretWidth = 2; // 2 pixel caret on Windows
}
//-----------------------------------------------------------------------------
nsCaretProperties* NewCaretProperties()
{
return new nsCaretProperties();
}

View File

@@ -1,408 +0,0 @@
/* -*- 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.
*/
// This file is included by nsFileSpec.cp, and includes the Windows-specific
// implementations.
#include <sys/stat.h>
#include <direct.h>
#include <stdlib.h>
#include "prio.h"
#include "nsError.h"
#include "windows.h"
#ifdef UNICODE
#define CreateDirectoryW CreateDirectory
#else
#define CreateDirectoryA CreateDirectory
#endif
//----------------------------------------------------------------------------------------
void nsFileSpecHelpers::Canonify(char*& ioPath, PRBool inMakeDirs)
// Canonify, make absolute, and check whether directories exist. This
// takes a (possibly relative) native path and converts it into a
// fully qualified native path.
//----------------------------------------------------------------------------------------
{
if (!ioPath)
return;
if (inMakeDirs) {
const int mode = 0700;
char* unixStylePath = nsFileSpecHelpers::StringDup(ioPath);
nsFileSpecHelpers::NativeToUnix(unixStylePath);
nsFileSpecHelpers::MakeAllDirectories(unixStylePath, mode);
delete[] unixStylePath;
}
char buffer[_MAX_PATH];
errno = 0;
*buffer = '\0';
char* canonicalPath = _fullpath(buffer, ioPath, _MAX_PATH);
NS_ASSERTION( canonicalPath[0] != '\0', "Uh oh...couldn't convert" );
if (canonicalPath[0] == '\0')
return;
nsFileSpecHelpers::StringAssign(ioPath, canonicalPath);
}
//----------------------------------------------------------------------------------------
void nsFileSpecHelpers::UnixToNative(char*& ioPath)
// This just does string manipulation. It doesn't check reality, or canonify, or
// anything
//----------------------------------------------------------------------------------------
{
// Allow for relative or absolute. We can do this in place, because the
// native path is never longer.
if (!ioPath || !*ioPath)
return;
char* src = ioPath;
if (*ioPath == '/')
{
// Strip initial slash for an absolute path
src++;
}
// Convert the vertical slash to a colon
char* cp = src + 1;
// If it was an absolute path, check for the drive letter
if (*ioPath == '/' && strstr(cp, "|/") == cp)
*cp = ':';
// Convert '/' to '\'.
while (*++cp)
{
if (*cp == '/')
*cp = '\\';
}
if (*ioPath == '/') {
for (cp = ioPath; *cp; ++cp)
*cp = *(cp + 1);
}
}
//----------------------------------------------------------------------------------------
void nsFileSpecHelpers::NativeToUnix(char*& ioPath)
// This just does string manipulation. It doesn't check reality, or canonify, or
// anything. The unix path is longer, so we can't do it in place.
//----------------------------------------------------------------------------------------
{
if (!ioPath || !*ioPath)
return;
// Convert the drive-letter separator, if present
char* temp = nsFileSpecHelpers::StringDup("/", 1 + strlen(ioPath));
char* cp = ioPath + 1;
if (strstr(cp, ":\\") == cp) {
*cp = '|'; // absolute path
}
else {
*temp = '\0'; // relative path
}
// Convert '\' to '/'
for (; *cp; cp++)
{
if (*cp == '\\')
*cp = '/';
}
// Add the slash in front.
strcat(temp, ioPath);
StringAssign(ioPath, temp);
delete [] temp;
}
//----------------------------------------------------------------------------------------
nsFileSpec::nsFileSpec(const nsFilePath& inPath)
//----------------------------------------------------------------------------------------
: mPath(NULL)
{
*this = inPath;
}
//----------------------------------------------------------------------------------------
void nsFileSpec::operator = (const nsFilePath& inPath)
//----------------------------------------------------------------------------------------
{
nsFileSpecHelpers::StringAssign(mPath, (const char*)inPath);
nsFileSpecHelpers::UnixToNative(mPath);
mError = NS_OK;
} // nsFileSpec::operator =
//----------------------------------------------------------------------------------------
nsFilePath::nsFilePath(const nsFileSpec& inSpec)
//----------------------------------------------------------------------------------------
: mPath(NULL)
{
*this = inSpec;
} // nsFilePath::nsFilePath
//----------------------------------------------------------------------------------------
void nsFilePath::operator = (const nsFileSpec& inSpec)
//----------------------------------------------------------------------------------------
{
nsFileSpecHelpers::StringAssign(mPath, inSpec.mPath);
nsFileSpecHelpers::NativeToUnix(mPath);
} // nsFilePath::operator =
//----------------------------------------------------------------------------------------
void nsFileSpec::SetLeafName(const char* inLeafName)
//----------------------------------------------------------------------------------------
{
nsFileSpecHelpers::LeafReplace(mPath, '\\', inLeafName);
} // nsFileSpec::SetLeafName
//----------------------------------------------------------------------------------------
char* nsFileSpec::GetLeafName() const
//----------------------------------------------------------------------------------------
{
return nsFileSpecHelpers::GetLeaf(mPath, '\\');
} // nsFileSpec::GetLeafName
//----------------------------------------------------------------------------------------
PRBool nsFileSpec::Exists() const
//----------------------------------------------------------------------------------------
{
struct stat st;
return 0 == stat(mPath, &st);
} // nsFileSpec::Exists
//----------------------------------------------------------------------------------------
PRBool nsFileSpec::IsFile() const
//----------------------------------------------------------------------------------------
{
struct stat st;
return 0 == stat(mPath, &st) && (_S_IFREG & st.st_mode);
} // nsFileSpec::IsFile
//----------------------------------------------------------------------------------------
PRBool nsFileSpec::IsDirectory() const
//----------------------------------------------------------------------------------------
{
struct stat st;
return 0 == stat(mPath, &st) && (_S_IFDIR & st.st_mode);
} // nsFileSpec::IsDirectory
//----------------------------------------------------------------------------------------
void nsFileSpec::GetParent(nsFileSpec& outSpec) const
//----------------------------------------------------------------------------------------
{
nsFileSpecHelpers::StringAssign(outSpec.mPath, mPath);
char* cp = strrchr(outSpec.mPath, '\\');
if (cp)
*cp = '\0';
} // nsFileSpec::GetParent
//----------------------------------------------------------------------------------------
void nsFileSpec::operator += (const char* inRelativePath)
//----------------------------------------------------------------------------------------
{
if (!inRelativePath || !mPath)
return;
if (mPath[strlen(mPath) - 1] == '\\')
nsFileSpecHelpers::ReallocCat(mPath, "x");
else
nsFileSpecHelpers::ReallocCat(mPath, "\\x");
SetLeafName(inRelativePath);
} // nsFileSpec::operator +=
//----------------------------------------------------------------------------------------
void nsFileSpec::CreateDirectory(int /*mode*/)
//----------------------------------------------------------------------------------------
{
// Note that mPath is canonical!
mkdir(mPath);
} // nsFileSpec::CreateDirectory
//----------------------------------------------------------------------------------------
void nsFileSpec::Delete(PRBool inRecursive)
//----------------------------------------------------------------------------------------
{
if (IsDirectory())
{
if (inRecursive)
{
for (nsDirectoryIterator i(*this); i.Exists(); i++)
{
nsFileSpec& child = (nsFileSpec&)i;
child.Delete(inRecursive);
}
}
rmdir(mPath);
}
else
{
remove(mPath);
}
} // nsFileSpec::Delete
//----------------------------------------------------------------------------------------
nsresult nsFileSpec::Rename(const char* inNewName)
//----------------------------------------------------------------------------------------
{
// This function should not be used to move a file on disk.
if (strchr(inNewName, '/'))
return NS_FILE_FAILURE;
if (PR_Rename(*this, inNewName) != NS_OK)
{
return NS_FILE_FAILURE;
}
SetLeafName(inNewName);
return NS_OK;
} // nsFileSpec::Rename
//----------------------------------------------------------------------------------------
nsresult nsFileSpec::Copy(const nsFileSpec& inParentDirectory) const
//----------------------------------------------------------------------------------------
{
// We can only copy into a directory, and (for now) can not copy entire directories
if (inParentDirectory.IsDirectory() && (! IsDirectory() ) )
{
char *leafname = GetLeafName();
char* destPath = nsFileSpecHelpers::StringDup(inParentDirectory, ( strlen(inParentDirectory) + 1 + strlen(leafname) ) );
strcat(destPath, "\\");
strcat(destPath, leafname);
delete [] leafname;
// CopyFile returns non-zero if succeeds
int copyOK = CopyFile(*this, destPath, true);
delete[] destPath;
if (copyOK)
{
return NS_OK;
}
}
return NS_FILE_FAILURE;
} // nsFileSpec::Copy
//----------------------------------------------------------------------------------------
nsresult nsFileSpec::Move(const nsFileSpec& nsNewParentDirectory) const
//----------------------------------------------------------------------------------------
{
// We can only copy into a directory, and (for now) can not copy entire directories
if (nsNewParentDirectory.IsDirectory() && (! IsDirectory() ) )
{
char *leafname = GetLeafName();
char *destPath = nsFileSpecHelpers::StringDup(nsNewParentDirectory, ( strlen(nsNewParentDirectory) + 1 + strlen(leafname) ));
strcat(destPath, "\\");
strcat(destPath, leafname);
delete [] leafname;
// MoveFile returns non-zero if succeeds
int copyOK = MoveFile(*this, destPath);
delete [] destPath;
if (copyOK)
{
return NS_OK;
}
}
return NS_FILE_FAILURE;
} // nsFileSpec::Move
//----------------------------------------------------------------------------------------
nsresult nsFileSpec::Execute(const char* inArgs ) const
//----------------------------------------------------------------------------------------
{
if (! IsDirectory())
{
char* fileNameWithArgs = NULL;
fileNameWithArgs = nsFileSpecHelpers::StringDup(mPath, ( strlen(mPath) + 1 + strlen(inArgs) ) );
strcat(fileNameWithArgs, " ");
strcat(fileNameWithArgs, inArgs);
int execResult = WinExec( fileNameWithArgs, SW_NORMAL );
delete [] fileNameWithArgs;
if (execResult > 31)
{
return NS_OK;
}
}
return NS_FILE_FAILURE;
} // nsFileSpec::Execute
//========================================================================================
// nsDirectoryIterator
//========================================================================================
//----------------------------------------------------------------------------------------
nsDirectoryIterator::nsDirectoryIterator(
const nsFileSpec& inDirectory
, int inIterateDirection)
//----------------------------------------------------------------------------------------
: mCurrent(inDirectory)
, mDir(nsnull)
, mExists(false)
{
mDir = PR_OpenDir(inDirectory);
mCurrent += "dummy";
++(*this);
} // nsDirectoryIterator::nsDirectoryIterator
//----------------------------------------------------------------------------------------
nsDirectoryIterator::~nsDirectoryIterator()
//----------------------------------------------------------------------------------------
{
if (mDir)
PR_CloseDir(mDir);
} // nsDirectoryIterator::nsDirectoryIterator
//----------------------------------------------------------------------------------------
nsDirectoryIterator& nsDirectoryIterator::operator ++ ()
//----------------------------------------------------------------------------------------
{
mExists = false;
if (!mDir)
return *this;
PRDirEntry* entry = PR_ReadDir(mDir, PR_SKIP_BOTH); // Ignore '.' && '..'
if (entry)
{
mExists = true;
mCurrent.SetLeafName(entry->name);
}
return *this;
} // nsDirectoryIterator::operator ++
//----------------------------------------------------------------------------------------
nsDirectoryIterator& nsDirectoryIterator::operator -- ()
//----------------------------------------------------------------------------------------
{
return ++(*this); // can't do it backwards.
} // nsDirectoryIterator::operator --

View File

@@ -1,362 +0,0 @@
/* -*- 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 <windows.h>
#include <limits.h>
static NS_DEFINE_IID(kITimerIID, NS_ITIMER_IID);
/*
* Implementation of timers lifted from Windows front-end file timer.cpp
*/
class TimerImpl : public nsITimer {
public:
static TimerImpl *gTimerList;
static UINT gWindowsTimer;
static DWORD gNextFire;
static void ProcessTimeouts(DWORD aNow);
static void SyncTimeoutPeriod(DWORD aTickCount);
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();
void Fire(DWORD aNow);
virtual PRUint32 GetDelay() { return mDelay; }
virtual void SetDelay(PRUint32 aDelay) {};
virtual void* GetClosure() { return mClosure; }
private:
nsresult Init(PRUint32 aDelay);
PRUint32 mDelay;
nsTimerCallbackFunc mFunc;
void *mClosure;
nsITimerCallback *mCallback;
DWORD mFireTime;
// PRBool mRepeat;
TimerImpl *mNext;
};
TimerImpl *TimerImpl::gTimerList = NULL;
UINT TimerImpl::gWindowsTimer = 0;
DWORD TimerImpl::gNextFire = (DWORD)-1;
void CALLBACK FireTimeout(HWND aWindow,
UINT aMessage,
UINT aTimerID,
DWORD aTime)
{
static BOOL bCanEnter = TRUE;
// Don't allow old timer messages in here.
if(aMessage != WM_TIMER) {
PR_ASSERT(0);
return;
}
if(aTimerID != TimerImpl::gWindowsTimer) {
return;
}
// Block only one entry into this function, or else.
if(bCanEnter) {
bCanEnter = FALSE;
// see if we need to fork off any timeout functions
if(TimerImpl::gTimerList) {
TimerImpl::ProcessTimeouts(aTime);
}
bCanEnter = TRUE;
}
}
// Function to correctly have the timer be set.
void
TimerImpl::SyncTimeoutPeriod(DWORD aTickCount)
{
// May want us to set tick count ourselves.
if(aTickCount == 0) {
aTickCount = ::GetTickCount();
}
// If there's no list, we should clear the timer.
if(!gTimerList) {
if(gWindowsTimer) {
::KillTimer(NULL, gWindowsTimer);
gWindowsTimer = 0;
gNextFire = (DWORD)-1;
}
}
else {
// See if we need to clear the current timer.
// Curcumstances are that if the timer will not
// fire on time for the next timeout.
BOOL bSetTimer = FALSE;
TimerImpl *pTimeout = gTimerList;
if(gWindowsTimer) {
if(pTimeout->mFireTime != gNextFire) {
::KillTimer(NULL, gWindowsTimer);
gWindowsTimer = 0;
gNextFire = (DWORD)-1;
// Set the timer.
bSetTimer = TRUE;
}
}
else {
// No timer set, attempt.
bSetTimer = TRUE;
}
if(bSetTimer) {
DWORD dwFireWhen = pTimeout->mFireTime > aTickCount ?
pTimeout->mFireTime - aTickCount : 0;
if(dwFireWhen > UINT_MAX) {
dwFireWhen = UINT_MAX;
}
UINT uFireWhen = (UINT)dwFireWhen;
PR_ASSERT(gWindowsTimer == 0);
gWindowsTimer = ::SetTimer(NULL, 0, uFireWhen, (TIMERPROC)FireTimeout);
if(gWindowsTimer) {
// Set the fire time.
gNextFire = pTimeout->mFireTime;
}
}
}
}
// Walk down the timeout list and launch anyone appropriate
void
TimerImpl::ProcessTimeouts(DWORD aNow)
{
TimerImpl *p = gTimerList;
if(aNow == 0) {
aNow = ::GetTickCount();
}
BOOL bCalledSync = FALSE;
// loop over all entries
while(p) {
// send it
if(p->mFireTime < aNow) {
// Make sure that the timer cannot be deleted during the
// Fire(...) call which may release *all* other references
// to p...
NS_ADDREF(p);
p->Fire(aNow);
// Clear the timer.
// Period synced.
p->Cancel();
bCalledSync = TRUE;
NS_RELEASE(p);
// Reset the loop (can't look at p->pNext now, and called
// code may have added/cleared timers).
// (could do this by going recursive and returning).
p = gTimerList;
} else {
// Make sure we fire an timer.
// Also, we need to check to see if things are backing up (they
// may be asking to be fired long before we ever get to them,
// and we don't want to pass in negative values to the real
// timer code, or it takes days to fire....
if(bCalledSync == FALSE) {
SyncTimeoutPeriod(aNow);
bCalledSync = TRUE;
}
// Get next timer.
p = p->mNext;
}
}
}
TimerImpl::TimerImpl()
{
NS_INIT_REFCNT();
mFunc = NULL;
mCallback = NULL;
mNext = NULL;
mClosure = nsnull;
}
TimerImpl::~TimerImpl()
{
Cancel();
NS_IF_RELEASE(mCallback);
}
nsresult
TimerImpl::Init(nsTimerCallbackFunc aFunc,
void *aClosure,
// PRBool aRepeat,
PRUint32 aDelay)
{
mFunc = aFunc;
mClosure = aClosure;
// mRepeat = aRepeat;
return Init(aDelay);
}
nsresult
TimerImpl::Init(nsITimerCallback *aCallback,
// PRBool aRepeat,
PRUint32 aDelay)
{
mCallback = aCallback;
NS_ADDREF(mCallback);
// mRepeat = aRepeat;
return Init(aDelay);
}
nsresult
TimerImpl::Init(PRUint32 aDelay)
{
DWORD dwNow = ::GetTickCount();
mDelay = aDelay;
mFireTime = (DWORD) aDelay + dwNow;
mNext = NULL;
// add it to the list
if(!gTimerList) {
// no list add it
gTimerList = this;
}
else {
// is it before everything else on the list?
if(mFireTime < gTimerList->mFireTime) {
mNext = gTimerList;
gTimerList = this;
} else {
TimerImpl * pPrev = gTimerList;
TimerImpl * pCurrent = gTimerList;
while(pCurrent && (pCurrent->mFireTime <= mFireTime)) {
pPrev = pCurrent;
pCurrent = pCurrent->mNext;
}
PR_ASSERT(pPrev);
// insert it after pPrev (this could be at the end of the list)
mNext = pPrev->mNext;
pPrev->mNext = this;
}
}
NS_ADDREF(this);
// Sync the timer fire period.
SyncTimeoutPeriod(dwNow);
return NS_OK;
}
NS_IMPL_ISUPPORTS(TimerImpl, kITimerIID)
void
TimerImpl::Fire(DWORD aNow)
{
if (mFunc != NULL) {
(*mFunc)(this, mClosure);
}
else if (mCallback != NULL) {
mCallback->Notify(this);
}
}
void
TimerImpl::Cancel()
{
TimerImpl *me = this;
if(gTimerList == this) {
// first element in the list lossage
gTimerList = mNext;
} else {
// walk until no next pointer
for(TimerImpl * p = gTimerList; p && p->mNext && (p->mNext != this); p = p->mNext)
;
// if we found something valid pull it out of the list
if(p && p->mNext && p->mNext == this) {
p->mNext = mNext;
} else {
// get out before we delete something that looks bogus
return;
}
}
// if we got here it must have been a valid element so trash it
NS_RELEASE(me);
// If there's now no be sure to clear the timer.
SyncTimeoutPeriod(0);
}
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);
}

View File

@@ -1,103 +0,0 @@
/* -*- 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 <stdio.h>
#include "nsIUnicharInputStream.h"
#include "nsIURL.h"
#include "nsCRT.h"
#include "nsString.h"
#include "prprf.h"
#include "prtime.h"
static nsString* ConvertCharacterSetName(const char* aName)
{
return new nsString(aName);
}
int main(int argc, char** argv)
{
if (3 != argc) {
printf("usage: CvtURL url character-set-name\n");
return -1;
}
char* characterSetName = argv[2];
nsString* cset = ConvertCharacterSetName(characterSetName);
if (PRInt32(cset) < 0) {
printf("illegal character set name: '%s'\n", characterSetName);
return -1;
}
// Create url object
char* urlName = argv[1];
nsIURL* url;
nsresult rv = NS_NewURL(&url, urlName);
if (NS_OK != rv) {
printf("invalid URL: '%s'\n", urlName);
return -1;
}
// Get an input stream from the url
nsresult ec;
nsIInputStream* in;
ec = NS_OpenURL(url, &in);
if (nsnull == in) {
printf("open of url('%s') failed: error=%x\n", urlName, ec);
return -1;
}
// Translate the input using the argument character set id into unicode
nsIUnicharInputStream* uin;
rv = NS_NewConverterStream(&uin, nsnull, in, 0, cset);
if (NS_OK != rv) {
printf("can't create converter input stream: %d\n", rv);
return -1;
}
// Read the input and write some output
PRTime start = PR_Now();
PRInt32 count = 0;
for (;;) {
PRUnichar buf[1000];
PRUint32 nb;
ec = uin->Read(buf, 0, 1000, &nb);
if (ec < 0) {
if (ec != NS_BASE_STREAM_EOF) {
printf("i/o error: %d\n", ec);
}
break;
}
count += nb;
}
PRTime end = PR_Now();
PRTime conversion, ustoms;
LL_I2L(ustoms, 1000);
LL_SUB(conversion, end, start);
LL_DIV(conversion, conversion, ustoms);
char buf[500];
PR_snprintf(buf, sizeof(buf),
"converting and discarding %d bytes took %lldms",
count, conversion);
puts(buf);
// Release the objects
in->Release();
uin->Release();
url->Release();
return 0;
}

View File

@@ -1,614 +0,0 @@
/* -*- 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 "nsFileSpec.h"
#include "nsFileStream.h"
//#include "string.h"
struct FilesTest
{
FilesTest() : mConsole() {}
int RunAllTests();
void WriteStuff(nsOutputFileStream& s);
int InputStream(const char* relativePath);
int OutputStream(const char* relativePath);
int IOStream(const char* relativePath);
int Parent(const char* relativePath, nsFileSpec& outParent);
int Delete(nsFileSpec& victim);
int CreateDirectory(nsFileSpec& victim);
int IterateDirectoryChildren(nsFileSpec& startChild);
int CanonicalPath(const char* relativePath);
int Persistence(const char* relativePath);
int Copy(const char* sourceFile, const char* targDir);
int Move(const char* sourceFile, const char* targDir);
int Rename(const char* sourceFile, const char* newName);
int Execute(const char* appName, const char* args);
void Banner(const char* bannerString);
void Passed();
void Failed();
void Inspect();
nsOutputConsoleStream mConsole;
};
//----------------------------------------------------------------------------------------
void FilesTest::Banner(const char* bannerString)
//----------------------------------------------------------------------------------------
{
mConsole
<< nsEndl
<< "---------------------------" << nsEndl
<< bannerString << " Test" << nsEndl
<< "---------------------------" << nsEndl;
}
//----------------------------------------------------------------------------------------
void FilesTest::Passed()
//----------------------------------------------------------------------------------------
{
((nsOutputStream&)mConsole) << "Test passed.";
mConsole << nsEndl;
}
//----------------------------------------------------------------------------------------
void FilesTest::Failed()
//----------------------------------------------------------------------------------------
{
mConsole << "ERROR: Test failed." << nsEndl;
}
//----------------------------------------------------------------------------------------
void FilesTest::Inspect()
//----------------------------------------------------------------------------------------
{
mConsole << nsEndl << "^^^^^^^^^^ PLEASE INSPECT OUTPUT FOR ERRORS" << nsEndl;
}
//----------------------------------------------------------------------------------------
void FilesTest::WriteStuff(nsOutputFileStream& s)
//----------------------------------------------------------------------------------------
{
// Initialize a URL from a string without suffix. Change the path to suit your machine.
nsFileURL fileURL("file:///Development/MPW/MPW%20Shell", false);
s << "File URL initialized to: \"" << fileURL << "\""<< nsEndl;
// Initialize a Unix path from a URL
nsFilePath filePath(fileURL);
s << "As a unix path: \"" << (const char*)filePath << "\""<< nsEndl;
// Initialize a native file spec from a URL
nsFileSpec fileSpec(fileURL);
s << "As a file spec: " << fileSpec << nsEndl;
// Make the spec unique (this one has no suffix).
fileSpec.MakeUnique();
s << "Unique file spec: " << fileSpec << nsEndl;
// Assign the spec to a URL
fileURL = fileSpec;
s << "File URL assigned from spec: \"" << fileURL << "\""<< nsEndl;
// Assign a unix path using a string with a suffix.
filePath = "/Development/MPW/SysErrs.err";
s << "File path reassigned to: \"" << (const char*)filePath << "\""<< nsEndl;
// Assign to a file spec using a unix path.
fileSpec = filePath;
s << "File spec reassigned to: " << fileSpec << nsEndl;
// Make this unique (this one has a suffix).
fileSpec.MakeUnique();
s << "File spec made unique: " << fileSpec << nsEndl;
} // WriteStuff
//----------------------------------------------------------------------------------------
int FilesTest::OutputStream(const char* relativePath)
//----------------------------------------------------------------------------------------
{
nsFilePath myTextFilePath(relativePath, true); // relative path.
const char* pathAsString = (const char*)myTextFilePath;
nsFileSpec mySpec(myTextFilePath);
{
mConsole << "WRITING IDENTICAL OUTPUT TO " << pathAsString << nsEndl << nsEndl;
nsOutputFileStream testStream(mySpec);
if (!testStream.is_open())
{
mConsole
<< "ERROR: File "
<< pathAsString
<< " could not be opened for output"
<< nsEndl;
return -1;
}
FilesTest::WriteStuff(testStream);
} // <-- Scope closes the stream (and the file).
if (!mySpec.Exists() || mySpec.IsDirectory() || !mySpec.IsFile())
{
mConsole
<< "ERROR: File "
<< pathAsString
<< " is not a file (cela n'est pas un pipe)"
<< nsEndl;
return -1;
}
Passed();
return 0;
}
//----------------------------------------------------------------------------------------
int FilesTest::IOStream(const char* relativePath)
//----------------------------------------------------------------------------------------
{
nsFilePath myTextFilePath(relativePath, true); // relative path.
const char* pathAsString = (const char*)myTextFilePath;
nsFileSpec mySpec(myTextFilePath);
mConsole
<< "Replacing \"path\" by \"ZUUL\" in " << pathAsString << nsEndl << nsEndl;
nsIOFileStream testStream(mySpec);
if (!testStream.is_open())
{
mConsole
<< "ERROR: File "
<< pathAsString
<< " could not be opened for input+output"
<< nsEndl;
return -1;
}
char line[1000];
testStream.seek(0); // check that the seek compiles
while (!testStream.eof())
{
PRInt32 pos = testStream.tell();
testStream.readline(line, sizeof(line));
char* replacementSubstring = strstr(line, "path");
if (replacementSubstring)
{
testStream.seek(pos + (replacementSubstring - line));
testStream << "ZUUL";
testStream.seek(pos); // back to the start of the line
}
}
return 0;
}
//----------------------------------------------------------------------------------------
int FilesTest::Persistence(
const char* relativePathToWrite)
//----------------------------------------------------------------------------------------
{
nsFilePath myTextFilePath(relativePathToWrite, true);
const char* pathAsString = (const char*)myTextFilePath;
nsFileSpec mySpec(myTextFilePath);
nsIOFileStream testStream(mySpec, (PR_RDWR | PR_CREATE_FILE | PR_TRUNCATE));
if (!testStream.is_open())
{
mConsole
<< "ERROR: File "
<< pathAsString
<< " could not be opened for input+output"
<< nsEndl;
return -1;
}
nsPersistentFileDescriptor myPersistent(mySpec);
mConsole
<< "Writing persistent file data " << pathAsString << nsEndl << nsEndl;
testStream.seek(0); // check that the seek compiles
testStream << myPersistent;
testStream.seek(0);
nsPersistentFileDescriptor mySecondPersistent;
testStream >> mySecondPersistent;
mySpec = mySecondPersistent;
#ifdef XP_MAC
if (mySpec.Error())
{
Failed();
return -1;
}
#endif
if (!mySpec.Exists())
{
Failed();
return -1;
}
Passed();
return 0;
}
//----------------------------------------------------------------------------------------
int FilesTest::InputStream(const char* relativePath)
//----------------------------------------------------------------------------------------
{
nsFilePath myTextFilePath(relativePath, true);
const char* pathAsString = (const char*)myTextFilePath;
mConsole << "READING BACK DATA FROM " << pathAsString << nsEndl << nsEndl;
nsFileSpec mySpec(myTextFilePath);
nsInputFileStream testStream2(mySpec);
if (!testStream2.is_open())
{
mConsole
<< "ERROR: File "
<< pathAsString
<< " could not be opened for input"
<< nsEndl;
return -1;
}
char line[1000];
testStream2.seek(0); // check that the seek compiles
while (!testStream2.eof())
{
testStream2.readline(line, sizeof(line));
mConsole << line << nsEndl;
}
Inspect();
return 0;
}
//----------------------------------------------------------------------------------------
int FilesTest::Parent(
const char* relativePath,
nsFileSpec& outParent)
//----------------------------------------------------------------------------------------
{
nsFilePath myTextFilePath(relativePath, true);
const char* pathAsString = (const char*)myTextFilePath;
nsFileSpec mySpec(myTextFilePath);
mySpec.GetParent(outParent);
nsFilePath parentPath(outParent);
mConsole
<< "GetParent() on "
<< "\n\t" << pathAsString
<< "\n yields "
<< "\n\t" << (const char*)parentPath
<< nsEndl;
Inspect();
return 0;
}
//----------------------------------------------------------------------------------------
int FilesTest::Delete(nsFileSpec& victim)
//----------------------------------------------------------------------------------------
{
// - Test of non-recursive delete
nsFilePath victimPath(victim);
mConsole
<< "Attempting to delete "
<< "\n\t" << (const char*)victimPath
<< "\n without recursive option (should fail)"
<< nsEndl;
victim.Delete(false);
if (victim.Exists())
Passed();
else
{
mConsole
<< "ERROR: File "
<< "\n\t" << (const char*)victimPath
<< "\n has been deleted without the recursion option,"
<< "\n and is a nonempty directory!"
<< nsEndl;
return -1;
}
// - Test of recursive delete
mConsole
<< nsEndl
<< "Deleting "
<< "\n\t" << (const char*)victimPath
<< "\n with recursive option"
<< nsEndl;
victim.Delete(true);
if (victim.Exists())
{
mConsole
<< "ERROR: Directory "
<< "\n\t" << (const char*)victimPath
<< "\n has NOT been deleted despite the recursion option!"
<< nsEndl;
return -1;
}
Passed();
return 0;
}
//----------------------------------------------------------------------------------------
int FilesTest::CreateDirectory(nsFileSpec& dirSpec)
//----------------------------------------------------------------------------------------
{
nsFilePath dirPath(dirSpec);
mConsole
<< "Testing CreateDirectory() using"
<< "\n\t" << (const char*)dirPath
<< nsEndl;
dirSpec.CreateDirectory();
if (dirSpec.Exists())
Passed();
else
{
Failed();
return -1;
}
dirSpec.Delete(true);
return 0;
}
//----------------------------------------------------------------------------------------
int FilesTest::IterateDirectoryChildren(nsFileSpec& startChild)
//----------------------------------------------------------------------------------------
{
// - Test of directory iterator
nsFileSpec grandparent;
startChild.GetParent(grandparent); // should be the original default directory.
nsFilePath grandparentPath(grandparent);
mConsole << "Forwards listing of " << (const char*)grandparentPath << ":" << nsEndl;
for (nsDirectoryIterator i(grandparent, +1); i.Exists(); i++)
{
char* itemName = ((nsFileSpec&)i).GetLeafName();
mConsole << '\t' << itemName << nsEndl;
delete [] itemName;
}
mConsole << "Backwards listing of " << (const char*)grandparentPath << ":" << nsEndl;
for (nsDirectoryIterator j(grandparent, -1); j.Exists(); j--)
{
char* itemName = ((nsFileSpec&)j).GetLeafName();
mConsole << '\t' << itemName << nsEndl;
delete [] itemName;
}
Inspect();
return 0;
}
//----------------------------------------------------------------------------------------
int FilesTest::CanonicalPath(
const char* relativePath)
//----------------------------------------------------------------------------------------
{
nsFilePath myTextFilePath(relativePath, true);
const char* pathAsString = (const char*)myTextFilePath;
if (*pathAsString != '/')
{
mConsole
<< "ERROR: after initializing the path object with a relative path,"
<< "\n the path consisted of the string "
<< "\n\t" << pathAsString
<< "\n which is not a canonical full path!"
<< nsEndl;
return -1;
}
Passed();
return 0;
}
//----------------------------------------------------------------------------------------
int FilesTest::Copy(const char* file, const char* dir)
//----------------------------------------------------------------------------------------
{
nsFileSpec dirPath(dir, true);
dirPath.CreateDirectory();
if (! dirPath.Exists())
{
Failed();
return -1;
}
nsFileSpec mySpec(file, true); // relative path.
{
nsIOFileStream testStream(mySpec); // creates the file
// Scope ends here, file gets closed
}
nsFileSpec filePath(file);
if (! filePath.Exists())
{
Failed();
return -1;
}
nsresult error = filePath.Copy(dirPath);
dirPath += filePath.GetLeafName();
if (! dirPath.Exists() || ! filePath.Exists() || NS_FAILED(error))
{
Failed();
return -1;
}
Passed();
return 0;
}
//----------------------------------------------------------------------------------------
int FilesTest::Move(const char* file, const char* dir)
//----------------------------------------------------------------------------------------
{
nsFileSpec dirPath(dir, true);
dirPath.CreateDirectory();
if (! dirPath.Exists())
{
Failed();
return -1;
}
nsFileSpec srcSpec(file, true); // relative path.
{
nsIOFileStream testStream(srcSpec); // creates the file
// file gets closed here because scope ends here.
};
if (! srcSpec.Exists())
{
Failed();
return -1;
}
nsresult error = srcSpec.Move(dirPath);
dirPath += srcSpec.GetLeafName();
if (! dirPath.Exists() || srcSpec.Exists() || NS_FAILED(error))
{
Failed();
return -1;
}
Passed();
return 0;
}
//----------------------------------------------------------------------------------------
int FilesTest::Execute(const char* appName, const char* args)
//----------------------------------------------------------------------------------------
{
nsFileSpec appPath(appName, false);
if (!appPath.Exists())
{
Failed();
return -1;
}
nsresult error = appPath.Execute(args);
if (NS_FAILED(error))
{
Failed();
return -1;
}
Passed();
return 0;
}
//----------------------------------------------------------------------------------------
int FilesTest::RunAllTests()
// For use with DEBUG defined.
//----------------------------------------------------------------------------------------
{
// Test of mConsole output
mConsole << "WRITING TEST OUTPUT TO CONSOLE" << nsEndl << nsEndl;
// Test of nsFileSpec
Banner("Interconversion");
WriteStuff(mConsole);
Inspect();
Banner("Canonical Path");
if (CanonicalPath("mumble/iotest.txt") != 0)
return -1;
Banner("OutputStream");
if (OutputStream("mumble/iotest.txt") != 0)
return -1;
Banner("InputStream");
if (InputStream("mumble/iotest.txt") != 0)
return -1;
Banner("IOStream");
if (IOStream("mumble/iotest.txt") != 0)
return -1;
if (InputStream("mumble/iotest.txt") != 0)
return -1;
Banner("Parent");
nsFileSpec parent;
if (Parent("mumble/iotest.txt", parent) != 0)
return -1;
Banner("Delete");
if (Delete(parent) != 0)
return -1;
Banner("CreateDirectory");
if (CreateDirectory(parent) != 0)
return -1;
Banner("IterateDirectoryChildren");
if (IterateDirectoryChildren(parent) != 0)
return -1;
Banner("Copy");
if (Copy("mumble/copyfile.txt", "mumble/copy") != 0)
return -1;
Banner("Move");
if (Move("mumble/moveFile.txt", "mumble/move") != 0)
return -1;
Banner("Execute");
#ifdef XP_MAC
// This path is hard-coded to test on jrm's machine. Finding an app
// on an arbitrary Macintosh would cost more trouble than it's worth.
// Change path to suit.
if NS_FAILED(Execute("/Projects/Nav45_BRANCH/ns/cmd/macfe/"\
"projects/client45/Client45PPC", ""))
#elif XP_PC
if NS_FAILED(Execute("c:\\windows\\notepad.exe", ""))
#else
if NS_FAILED(Execute("/bin/ls", "/"))
#endif
return -1;
Banner("Persistence");
if (Persistence("mumble/filedesc.dat") != 0)
return -1;
Banner("Delete again (to clean up our mess)");
if (Delete(parent) != 0)
return -1;
return 0;
}
//----------------------------------------------------------------------------------------
int main()
// For use with DEBUG defined.
//----------------------------------------------------------------------------------------
{
FilesTest tester;
return tester.RunAllTests();
} // main

View File

@@ -1,66 +0,0 @@
#
# 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
CPPSRCS = TestAtoms.cpp TestCRT.cpp CvtURL.cpp FilesTest.cpp PropertiesTest.cpp TestAutoLock.cpp
LIBS = \
-lnetlib \
-labouturl \
-lfileurl \
-lremoturl \
-lgophurl \
-lnetcnvts \
-lsockstuburl \
-lftpurl \
-lmimetype \
-lpwcac \
-lhttpurl \
-lnetwork \
-lnetutil \
-lnetcache \
-lgmbase$(MOZ_TOOLKIT) \
$(TK_LIBS) \
-lpref \
-lsecfree \
-ljs \
-lxp \
-lraptorbase \
-lxpcom \
-lreg \
$(ZLIB_LIBS) \
$(NSPR_LIBS) \
$(NULL)
SIMPLE_PROGRAMS = $(CPPSRCS:.cpp=)
include $(topsrcdir)/config/rules.mk
INCLUDES += -I$(srcdir)/../src
# needed for mac linux
ifeq ($(OS_ARCH),Linux)
ifneq ($(OS_RELEASE),1.2)
OS_LIBS += /usr/lib/libdl.so
endif
endif

View File

@@ -1,127 +0,0 @@
/* -*- 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 "nsXPComCIID.h"
#include "nsIEventQueueService.h"
#include "nsINetService.h"
#include "nsIProperties.h"
#include "nsIServiceManager.h"
#include "nsIURL.h"
#include "nsRepository.h"
#ifdef XP_PC
#include "plevent.h"
#endif
#define TEST_URL "resource:/res/test.properties"
#ifdef XP_PC
#define NETLIB_DLL "netlib.dll"
#define RAPTORBASE_DLL "raptorbase.dll"
#define XPCOM_DLL "xpcom32.dll"
#else
#ifdef XP_MAC
#define NETLIB_DLL "NETLIB_DLL"
#define RAPTORBASE_DLL "base.shlb"
#define XPCOM_DLL "XPCOM_DLL"
#else
#define NETLIB_DLL "libnetlib.so"
#define RAPTORBASE_DLL "libraptorbase.so"
#define XPCOM_DLL "libxpcom32.so"
#endif
#endif
static NS_DEFINE_IID(kEventQueueServiceCID, NS_EVENTQUEUESERVICE_CID);
static NS_DEFINE_IID(kIEventQueueServiceIID, NS_IEVENTQUEUESERVICE_IID);
static NS_DEFINE_IID(kINetServiceIID, NS_INETSERVICE_IID);
static NS_DEFINE_IID(kIPropertiesIID, NS_IPROPERTIES_IID);
static NS_DEFINE_IID(kNetServiceCID, NS_NETSERVICE_CID);
#ifdef XP_MAC // have not build this on PC and UNIX yet so make it #ifdef XP_MAC
extern "C" void NS_SetupRegistry();
#endif
int
main(int argc, char *argv[])
{
nsRepository::RegisterFactory(kNetServiceCID, NETLIB_DLL, PR_FALSE,
PR_FALSE);
nsRepository::RegisterFactory(kEventQueueServiceCID, XPCOM_DLL,
PR_FALSE, PR_FALSE);
#ifdef XP_MAC // have not build this on PC and UNIX yet so make it #ifdef XP_MAC
NS_SetupRegistry();
#endif
nsresult ret;
nsIEventQueueService* pEventQueueService = nsnull;
ret = nsServiceManager::GetService(kEventQueueServiceCID,
kIEventQueueServiceIID, (nsISupports**) &pEventQueueService);
if (NS_FAILED(ret)) {
printf("cannot get event queue service\n");
return 1;
}
ret = pEventQueueService->CreateThreadEventQueue();
if (NS_FAILED(ret)) {
printf("CreateThreadEventQueue failed\n");
return 1;
}
nsINetService* pNetService = nsnull;
ret = nsServiceManager::GetService(kNetServiceCID, kINetServiceIID,
(nsISupports**) &pNetService);
if (NS_FAILED(ret)) {
printf("cannot get net service\n");
return 1;
}
nsIURL *url = nsnull;
ret = pNetService->CreateURL(&url, nsString(TEST_URL), nsnull, nsnull,
nsnull);
if (NS_FAILED(ret)) {
printf("cannot create URL\n");
return 1;
}
nsIInputStream *in = nsnull;
ret = pNetService->OpenBlockingStream(url, nsnull, &in);
if (NS_FAILED(ret)) {
printf("cannot open stream\n");
return 1;
}
nsIProperties *props = nsnull;
ret = nsRepository::CreateInstance(kPropertiesCID, NULL,
kIPropertiesIID, (void**) &props);
if (NS_FAILED(ret)) {
printf("create nsIProperties failed\n");
return 1;
}
props->Load(in);
int i = 1;
while (1) {
char name[16];
sprintf(name, "%d", i);
nsAutoString v("");
props->GetProperty(name, v);
if (!v.Length()) {
break;
}
char *value = v.ToNewCString();
cout << "\"" << i << "\"=\"" << value << "\"" << endl;
i++;
}
return 0;
}

View File

@@ -1,109 +0,0 @@
/* -*- 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 "prprf.h"
#include "prtime.h"
#include <stdio.h>
extern "C" int _CrtSetDbgFlag(int);
int main(int argc, char** argv)
{
FILE* fp = fopen("words.txt", "r");
if (nsnull == fp) {
printf("can't open words.txt\n");
return -1;
}
PRInt32 count = 0;
PRUnichar** strings = new PRUnichar*[60000];
nsIAtom** ids = new nsIAtom*[60000];
nsAutoString s1, s2;
PRTime start = PR_Now();
PRInt32 i;
for (i = 0; i < 60000; i++) {
char buf[1000];
char* s = fgets(buf, sizeof(buf), fp);
if (nsnull == s) {
break;
}
nsAutoString sb(buf);
strings[count++] = sb.ToNewUnicode();
sb.ToUpperCase();
strings[count++] = sb.ToNewUnicode();
}
PRTime end0 = PR_Now();
// Find and create idents
for (i = 0; i < count; i++) {
ids[i] = NS_NewAtom(strings[i]);
}
PRUnichar qqs[1]; qqs[0] = 0;
nsIAtom* qq = NS_NewAtom(qqs);
PRTime end1 = PR_Now();
// Now make sure we can find all the idents we just made
for (i = 0; i < count; i++) {
nsIAtom* id = NS_NewAtom(ids[i]->GetUnicode());
if (id != ids[i]) {
id->ToString(s1);
ids[i]->ToString(s2);
printf("find failed: id='%s' ids[%d]='%s'\n",
s1.ToNewCString(), i, s2.ToNewCString());
return -1;
}
NS_RELEASE(id);
}
PRTime end2 = PR_Now();
// Destroy all the atoms we just made
NS_RELEASE(qq);
for (i = 0; i < count; i++) {
NS_RELEASE(ids[i]);
}
// Print out timings
PRTime end3 = PR_Now();
PRTime creates, finds, lookups, dtor, ustoms;
LL_I2L(ustoms, 1000);
LL_SUB(creates, end0, start);
LL_DIV(creates, creates, ustoms);
LL_SUB(finds, end1, end0);
LL_DIV(finds, finds, ustoms);
LL_SUB(lookups, end2, end1);
LL_DIV(lookups, lookups, ustoms);
LL_SUB(dtor, end3, end2);
char buf[500];
PR_snprintf(buf, sizeof(buf), "making %d ident strings took %lldms",
count, creates);
puts(buf);
PR_snprintf(buf, sizeof(buf), "%d new idents took %lldms",
count, finds);
puts(buf);
PR_snprintf(buf, sizeof(buf), "%d ident lookups took %lldms",
count, lookups);
puts(buf);
PR_snprintf(buf, sizeof(buf), "dtor took %lldusec", dtor);
puts(buf);
printf("%d live atoms\n", NS_GetNumberOfAtoms());
NS_POSTCONDITION(0 == NS_GetNumberOfAtoms(), "dangling atoms");
return 0;
}

View File

@@ -1,72 +0,0 @@
/* -*- 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.
*/
/*
Some tests for nsAutoLock.
*/
#include "nsAutoLock.h"
#include "prthread.h"
PRLock* gLock;
int gCount;
static void run(void* arg)
{
for (int i = 0; i < 1000000; ++i) {
nsAutoLock guard(gLock);
++gCount;
PR_ASSERT(gCount == 1);
--gCount;
}
}
int main(int argc, char** argv)
{
gLock = PR_NewLock();
gCount = 0;
// This shouldn't compile
//nsAutoLock* l1 = new nsAutoLock(theLock);
//delete l1;
// Create a block-scoped lock. This should compile.
{
nsAutoLock l2(gLock);
}
// Fork a thread to access the shared variable in a tight loop
PRThread* t1 =
PR_CreateThread(PR_SYSTEM_THREAD,
run,
nsnull,
PR_PRIORITY_NORMAL,
PR_GLOBAL_THREAD,
PR_JOINABLE_THREAD,
0);
// ...and now do the same thing ourselves
run(nsnull);
// Wait for the background thread to finish, if necessary.
PR_JoinThread(t1);
return 0;
}

View File

@@ -1,89 +0,0 @@
/* -*- 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 "nsCRT.h"
#include "nsString.h"
#include "plstr.h"
#include <stdlib.h>
// Verify that nsCRT versions of string comparison routines get the
// same answers as the native non-unicode versions. We only pass in
// iso-latin-1 strings, so the comparision must be valid.
static void Check(const char* s1, const char* s2, PRIntn n)
{
PRIntn clib = PL_strcmp(s1, s2);
PRIntn clib_n = PL_strncmp(s1, s2, n);
PRIntn clib_case = PL_strcasecmp(s1, s2);
PRIntn clib_case_n = PL_strncasecmp(s1, s2, n);
nsAutoString t1(s1), t2(s2);
const PRUnichar* us1 = t1.GetUnicode();
const PRUnichar* us2 = t2.GetUnicode();
PRIntn u = nsCRT::strcmp(us1, s2);
PRIntn u_n = nsCRT::strncmp(us1, s2, n);
PRIntn u_case = nsCRT::strcasecmp(us1, s2);
PRIntn u_case_n = nsCRT::strncasecmp(us1, s2, n);
PRIntn u2 = nsCRT::strcmp(us1, us2);
PRIntn u2_n = nsCRT::strncmp(us1, us2, n);
PRIntn u2_case = nsCRT::strcasecmp(us1, us2);
PRIntn u2_case_n = nsCRT::strncasecmp(us1, us2, n);
NS_ASSERTION(clib == u, "strcmp");
NS_ASSERTION(clib_n == u_n, "strncmp");
NS_ASSERTION(clib_case == u_case, "strcasecmp");
NS_ASSERTION(clib_case_n == u_case_n, "strncasecmp");
NS_ASSERTION(clib == u2, "strcmp");
NS_ASSERTION(clib_n == u2_n, "strncmp");
NS_ASSERTION(clib_case == u2_case, "strcasecmp");
NS_ASSERTION(clib_case_n == u2_case_n, "strncasecmp");
}
struct Test {
const char* s1;
const char* s2;
PRIntn n;
};
static Test tests[] = {
{ "foo", "foo", 3 },
{ "foo", "fo", 3 },
{ "foo", "bar", 3 },
{ "foo", "ba", 3 },
{ "foo", "zap", 3 },
{ "foo", "za", 3 },
{ "bar", "foo", 3 },
{ "bar", "fo", 3 },
{ "bar", "foo", 3 },
{ "bar", "fo", 3 },
};
#define NUM_TESTS (sizeof(tests) / sizeof(tests[0]))
void main()
{
Test* tp = tests;
for (PRIntn i = 0; i < NUM_TESTS; i++, tp++) {
Check(tp->s1, tp->s2, tp->n);
}
}

View File

@@ -1,202 +0,0 @@
/* -*- 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 "prtypes.h"
#include "nsVoidArray.h"
#include "nsITimer.h"
#include "nsITimerCallback.h"
#include <stdio.h>
#include <stdlib.h>
#include "resources.h"
#include <windows.h>
static char* class1Name = "TimerTest";
static HINSTANCE gInstance, gPrevInstance;
static nsVoidArray *gTimeouts = NULL;
static void CreateRepeat(PRUint32 aDelay);
void
MyCallback (nsITimer *aTimer, void *aClosure)
{
printf("Timer executed with delay %d\n", (int)aClosure);
if (gTimeouts->RemoveElement(aTimer) == PR_TRUE) {
NS_RELEASE(aTimer);
}
}
void
MyRepeatCallback (nsITimer *aTimer, void *aClosure)
{
printf("Timer executed with delay %d\n", (int)aClosure);
if (gTimeouts->RemoveElement(aTimer) == PR_TRUE) {
NS_RELEASE(aTimer);
}
CreateRepeat((PRUint32)aClosure);
}
static void
CreateOneShot(PRUint32 aDelay)
{
nsITimer *timer;
NS_NewTimer(&timer);
timer->Init(MyCallback, (void *)aDelay, aDelay);
gTimeouts->AppendElement(timer);
}
static void
CreateRepeat(PRUint32 aDelay)
{
nsITimer *timer;
NS_NewTimer(&timer);
timer->Init(MyRepeatCallback, (void *)aDelay, aDelay);
gTimeouts->AppendElement(timer);
}
static void
CancelAll()
{
int i, count = gTimeouts->Count();
for (i=0; i < count; i++) {
nsITimer *timer = (nsITimer *)gTimeouts->ElementAt(i);
if (timer != NULL) {
timer->Cancel();
NS_RELEASE(timer);
}
}
gTimeouts->Clear();
}
long PASCAL
WndProc(HWND hWnd, UINT msg, WPARAM param, LPARAM lparam)
{
HMENU hMenu;
switch (msg) {
case WM_COMMAND:
hMenu = GetMenu(hWnd);
switch (LOWORD(param)) {
case TIMER_EXIT:
::DestroyWindow(hWnd);
exit(0);
case TIMER_1SECOND:
CreateOneShot(1000);
break;
case TIMER_5SECOND:
CreateOneShot(5000);
break;
case TIMER_10SECOND:
CreateOneShot(10000);
break;
case TIMER_1REPEAT:
CreateRepeat(1000);
break;
case TIMER_5REPEAT:
CreateRepeat(5000);
break;
case TIMER_10REPEAT:
CreateRepeat(10000);
break;
case TIMER_CANCEL:
CancelAll();
break;
default:
break;
}
default:
break;
}
return DefWindowProc(hWnd, msg, param, lparam);
}
static HWND CreateTopLevel(const char* clazz, const char* title,
int aWidth, int aHeight)
{
// Create a simple top level window
HWND window = ::CreateWindowEx(WS_EX_CLIENTEDGE,
clazz, title,
WS_OVERLAPPEDWINDOW|WS_CLIPCHILDREN,
CW_USEDEFAULT, CW_USEDEFAULT,
aWidth, aHeight,
HWND_DESKTOP,
NULL,
gInstance,
NULL);
::ShowWindow(window, SW_SHOW);
::UpdateWindow(window);
return window;
}
int PASCAL
WinMain(HINSTANCE instance, HINSTANCE prevInstance, LPSTR cmdParam, int nCmdShow)
{
gInstance = instance;
if (!prevInstance) {
WNDCLASS wndClass;
wndClass.style = 0;
wndClass.lpfnWndProc = WndProc;
wndClass.cbClsExtra = 0;
wndClass.cbWndExtra = 0;
wndClass.hInstance = gInstance;
wndClass.hIcon = LoadIcon(NULL, IDI_APPLICATION);
wndClass.hCursor = LoadCursor(NULL, IDC_ARROW);
wndClass.hbrBackground = (HBRUSH) GetStockObject(LTGRAY_BRUSH);
wndClass.lpszMenuName = class1Name;
wndClass.lpszClassName = class1Name;
RegisterClass(&wndClass);
}
// Create our first top level window
HWND window = CreateTopLevel(class1Name, "Raptor HTML Viewer", 620, 400);
gTimeouts = new nsVoidArray();
// Process messages
MSG msg;
while (GetMessage(&msg, NULL, 0, 0)) {
TranslateMessage(&msg);
DispatchMessage(&msg);
}
return msg.wParam;
}
void main(int argc, char **argv)
{
WinMain(GetModuleHandle(NULL), NULL, 0, SW_SHOW);
}

View File

@@ -1,112 +0,0 @@
#!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=..\..
MAKE_OBJ_TYPE = EXE
PROG0 = .\$(OBJDIR)\TimerTest.exe
PROG1 = .\$(OBJDIR)\TestAtoms.exe
PROG2 = .\$(OBJDIR)\CvtURL.exe
PROG3 = .\$(OBJDIR)\TestCRT.exe
PROG4 = .\$(OBJDIR)\FilesTest.exe
PROG5 = .\$(OBJDIR)\PropertiesTest.exe
PROG6 = .\$(OBJDIR)\TestAutoLock.exe
RESFILE = timer.res
PROGRAMS = $(PROG0) $(PROG1) \
!ifdef MODULAR_NETLIB
$(PROG2) \
$(PROG3) \
$(PROG5) \
!endif
$(PROG4) \
$(PROG6) \
$(NULL)
LINCS=-I..\src -I$(PUBLIC)\xpcom -I$(PUBLIC)\netlib -I$(PUBLIC)\raptor
LLIBS= \
$(DIST)\lib\xpcom32.lib \
$(DIST)\lib\raptorbase.lib \
!ifdef MODULAR_NETLIB
$(DIST)\lib\netlib.lib \
!endif
$(LIBNSPR) \
$(DIST)\lib\libplc21.lib \
!if "$(MOZ_BITS)"=="32" && defined(MOZ_DEBUG) && defined(GLOWCODE)
$(GLOWDIR)\glowcode.lib \
!endif
$(RESFILE)
include <$(DEPTH)\config\rules.mak>
install:: $(PROGRAMS)
$(MAKE_INSTALL) $(PROG0) $(DIST)\bin
$(MAKE_INSTALL) $(PROG1) $(DIST)\bin
!ifdef MODULAR_NETLIB
$(MAKE_INSTALL) $(PROG2) $(DIST)\bin
$(MAKE_INSTALL) $(PROG3) $(DIST)\bin
$(MAKE_INSTALL) $(PROG5) $(DIST)\bin
$(MAKE_INSTALL) test.properties $(DIST)\bin\res
!endif
$(MAKE_INSTALL) $(PROG4) $(DIST)\bin
$(MAKE_INSTALL) $(PROG6) $(DIST)\bin
clobber::
rm -f $(DIST)\bin\TimerTest.exe
rm -f $(DIST)\bin\TestAtoms.exe
!ifdef MODULAR_NETLIB
rm -f $(DIST)\bin\CvtURL.exe
rm -f $(DIST)\bin\TestCRT.exe
rm -f $(DIST)\bin\PropertiesTest.exe
rm -f $(DIST)\bin\res\test.properties
!endif
rm -f $(DIST)\bin\FilesTest.exe
rm -f $(DIST)\bin\TestAutoLock.exe
# Move this into config/obj.inc when it's allowed
.cpp{.\$(OBJDIR)\}.exe:
$(CC) @<<$(CFGFILE)
$(CFLAGS)
$(LCFLAGS)
$(LINCS)
$(LINCS_1)
$(INCS)
$(LLIBS)
$(OS_LIBS)
-Fd$(PBDFILE)
-Fe.\$(OBJDIR)\
-Fo.\$(OBJDIR)\
$(CURDIR)$(*B).cpp
<<KEEP
$(PROG0): $(OBJDIR) TimerTest.cpp $(RESFILE)
$(PROG1): $(OBJDIR) TestAtoms.cpp
$(PROG4): $(OBJDIR) FilesTest.cpp
!ifdef MODULAR_NETLIB
$(PROG2): $(OBJDIR) CvtURL.cpp
$(PROG3): $(OBJDIR) TestCRT.cpp
$(PROG5): $(OBJDIR) PropertiesTest.cpp
!endif
$(PROG6): $(OBJDIR) TestAutoLock.cpp

View File

@@ -1,26 +0,0 @@
# 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.
#
1=1
2=2
3 =3
4 =4
5=5
6= 6
7=7
8= 8
# this is a comment
9=this is the first part of a continued line \
and here is the 2nd part

View File

@@ -1,38 +0,0 @@
/*
* 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 "resources.h"
TIMERTEST MENU DISCARDABLE
{
POPUP "Debug"
{
POPUP "One Shot"
{
MENUITEM "1 second", TIMER_1SECOND
MENUITEM "5 second", TIMER_5SECOND
MENUITEM "10 second", TIMER_10SECOND
}
POPUP "Repeated"
{
MENUITEM "1 second", TIMER_1REPEAT
MENUITEM "5 second", TIMER_5REPEAT
MENUITEM "10 second", TIMER_10REPEAT
}
MENUITEM "Cancel All", TIMER_CANCEL
MENUITEM "Exit", TIMER_EXIT
}
}

View File

@@ -0,0 +1,134 @@
/* -*- 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 "Fundamentals.h"
#include "BitSet.h"
// Return the next bit after index set to true or -1 if none.
//
Int32 BitSet::nextOne(Int32 pos) const
{
++pos;
if (pos < 0 || Uint32(pos) >= universeSize)
return -1;
Uint32 offset = getWordOffset(pos);
Uint8 index = getBitOffset(pos);
Word* ptr = &word[offset];
Word currentWord = *ptr++ >> index;
if (currentWord != Word(0)) {
while ((currentWord & Word(1)) == 0) {
++index;
currentWord >>= 1;
}
return (offset << nBitsInWordLog2) + index;
}
Word* limit = &word[getSizeInWords(universeSize)];
while (ptr < limit) {
++offset;
currentWord = *ptr++;
if (currentWord != Word(0)) {
index = 0;
while ((currentWord & Word(1)) == 0) {
++index;
currentWord >>= 1;
}
return (offset << nBitsInWordLog2) + index;
}
}
return -1;
}
// Return the next bit after index set to false or -1 if none.
//
Int32 BitSet::nextZero(Int32 pos) const
{
++pos;
if (pos < 0 || Uint32(pos) >= universeSize)
return -1;
Uint32 offset = getWordOffset(pos);
Uint8 index = getBitOffset(pos);
Word* ptr = &word[offset];
Word currentWord = *ptr++ >> index;
if (currentWord != Word(~0)) {
for (; index < nBitsInWord; ++index) {
if ((currentWord & Word(1)) == 0) {
Int32 ret = (offset << nBitsInWordLog2) + index;
return (Uint32(ret) < universeSize) ? ret : -1;
}
currentWord >>= 1;
}
}
Word* limit = &word[getSizeInWords(universeSize)];
while (ptr < limit) {
++offset;
currentWord = *ptr++;
if (currentWord != Word(~0)) {
for (index = 0; index < nBitsInWord; ++index) {
if ((currentWord & Word(1)) == 0) {
Int32 ret = (offset << nBitsInWordLog2) + index;
return (Uint32(ret) < universeSize) ? ret : -1;
}
currentWord >>= 1;
}
}
}
return -1;
}
#ifdef DEBUG_LOG
// Print the set.
//
void BitSet::printPretty(LogModuleObject log)
{
UT_OBJECTLOG(log, PR_LOG_ALWAYS, ("[ "));
for (Int32 i = firstOne(); i != -1; i = nextOne(i)) {
Int32 currentBit = i;
UT_OBJECTLOG(log, PR_LOG_ALWAYS, ("%d", currentBit));
Int32 nextBit = nextOne(currentBit);
if (nextBit != currentBit + 1) {
UT_OBJECTLOG(log, PR_LOG_ALWAYS, (" "));
continue;
}
while ((nextBit != -1) && (nextBit == (currentBit + 1))) {
currentBit = nextBit;
nextBit = nextOne(nextBit);
}
if (currentBit > (i+1))
UT_OBJECTLOG(log, PR_LOG_ALWAYS, ("-%d ", currentBit));
else
UT_OBJECTLOG(log, PR_LOG_ALWAYS, (" %d ", currentBit));
i = currentBit;
}
UT_OBJECTLOG(log, PR_LOG_ALWAYS, ("]\n"));
}
#endif // DEBUG_LOG

View File

@@ -0,0 +1,195 @@
/* -*- 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 _BITSET_H_
#define _BITSET_H_
#include "Fundamentals.h"
#include "LogModule.h"
#include "Pool.h"
#include <string.h>
//------------------------------------------------------------------------------
// BitSet -
class BitSet
{
private:
#if (PR_BITS_PER_WORD == 64)
typedef Uint64 Word;
#elif (PR_BITS_PER_WORD == 32)
typedef Uint32 Word;
#endif
static const nBitsInWord = PR_BITS_PER_WORD;
static const nBytesInWord = PR_BYTES_PER_WORD;
static const nBitsInWordLog2 = PR_BITS_PER_WORD_LOG2;
static const nBytesInWordLog2 = PR_BYTES_PER_WORD_LOG2;
// Return the number of Word need to store the universe.
static Uint32 getSizeInWords(Uint32 sizeOfUniverse) {return (sizeOfUniverse + (nBitsInWord - 1)) >> nBitsInWordLog2;}
// Return the given element offset in its containing Word.
static Uint32 getBitOffset(Uint32 element) {return element & (nBitsInWord - 1);}
// Return the Word offset for the given element int the universe.
static Uint32 getWordOffset(Uint32 element) {return element >> nBitsInWordLog2;}
// Return the mask for the given bit index.
static Word getMask(Uint8 index) {return Word(1) << index;}
private:
Uint32 universeSize; // Size of the universe
Word* word; // universe memory.
private:
// No copy constructor.
BitSet(const BitSet&);
// Check if the given set's universe is of the same size than this universe.
void checkUniverseCompatibility(const BitSet& set) const {assert(set.universeSize == universeSize);}
// Check if pos is valid for this set's universe.
void checkMember(Int32 pos) const {assert(pos >=0 && Uint32(pos) < universeSize);}
public:
// Create a bitset of universeSize bits.
BitSet(Pool& pool, Uint32 universeSize) : universeSize(universeSize) {word = new(pool) Word[getSizeInWords(universeSize)]; clear();}
// Return the size of this bitset.
Uint32 getSize() const {return universeSize;}
// Clear the bitset.
void clear() {memset(word, 0x00, getSizeInWords(universeSize) << nBytesInWordLog2);}
// Clear the bit at index.
void clear(Uint32 index) {checkMember(index); word[getWordOffset(index)] &= ~getMask(index);}
// Set the bitset.
void set() {memset(word, 0xFF, getSizeInWords(universeSize) << nBytesInWordLog2);}
// Set the bit at index.
void set(Uint32 index) {checkMember(index); word[getWordOffset(index)] |= getMask(index);}
// Return true if the bit at index is set.
bool test(Uint32 index) const {checkMember(index); return (word[getWordOffset(index)] & getMask(index)) != 0;}
// Union with the given bitset.
inline void or(const BitSet& set);
// Intersection with the given bitset.
inline void and(const BitSet& set);
// Difference with the given bitset.
inline void difference(const BitSet& set);
// Copy set.
inline BitSet& operator = (const BitSet& set);
// Return true if the bitset are identical.
friend bool operator == (const BitSet& set1, const BitSet& set2);
// Return true if the bitset are different.
friend bool operator != (const BitSet& set1, const BitSet& set2);
// Logical operators.
BitSet& operator |= (const BitSet& set) {or(set); return *this;}
BitSet& operator &= (const BitSet& set) {and(set); return *this;}
BitSet& operator -= (const BitSet& set) {difference(set); return *this;}
// Return the first bit at set to true or -1 if none.
Int32 firstOne() const {return nextOne(-1);}
// Return the next bit after index set to true or -1 if none.
Int32 nextOne(Int32 pos) const;
// Return the first bit at set to false or -1 if none.
Int32 firstZero() const {return nextZero(-1);}
// Return the next bit after index set to false or -1 if none.
Int32 nextZero(Int32 pos) const;
// Iterator to conform with the set API.
typedef Int32 iterator;
// Return true if the walk is ordered.
static bool isOrdered() {return true;}
// Return the iterator for the first element of this set.
iterator begin() const {return firstOne();}
// Return the next iterator.
iterator advance(iterator pos) const {return nextOne(pos);}
// Return true if the iterator is at the end of the set.
bool done(iterator pos) const {return pos == -1;}
// Return the element corresponding to the given iterator.
Uint32 get(iterator pos) const {return pos;}
#ifdef DEBUG_LOG
// Print the set.
void printPretty(LogModuleObject log);
#endif // DEBUG_LOG
};
// Union with the given bitset.
//
inline void BitSet::or(const BitSet& set)
{
checkUniverseCompatibility(set);
Word* src = set.word;
Word* dst = word;
Word* limit = &src[getSizeInWords(universeSize)];
while (src < limit)
*dst++ |= *src++;
}
// Intersection with the given bitset.
//
inline void BitSet::and(const BitSet& set)
{
checkUniverseCompatibility(set);
Word* src = set.word;
Word* dst = word;
Word* limit = &src[getSizeInWords(universeSize)];
while (src < limit)
*dst++ &= *src++;
}
// Difference with the given bitset.
//
inline void BitSet::difference(const BitSet& set)
{
checkUniverseCompatibility(set);
Word* src = set.word;
Word* dst = word;
Word* limit = &src[getSizeInWords(universeSize)];
while (src < limit)
*dst++ &= ~*src++;
}
// Copy the given set into this set.
//
inline BitSet& BitSet::operator = (const BitSet& set)
{
checkUniverseCompatibility(set);
if (this != &set)
memcpy(word, set.word, getSizeInWords(universeSize) << nBytesInWordLog2);
return *this;
}
// Return true if the given set is identical to this set.
inline bool operator == (const BitSet& set1, const BitSet& set2)
{
set1.checkUniverseCompatibility(set2);
if (&set1 == &set2)
return true;
return memcmp(set1.word, set2.word, BitSet::getSizeInWords(set1.universeSize) << BitSet::nBytesInWordLog2) == 0;
}
inline bool operator != (const BitSet& set1, const BitSet& set2) {return !(set1 == set2);}
#endif // _BITSET_H

View File

@@ -0,0 +1,159 @@
/* -*- 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 _COALESCING_H_
#define _COALESCING_H_
#include "Fundamentals.h"
#include "Pool.h"
#include "RegisterPressure.h"
#include "InterferenceGraph.h"
#include "ControlGraph.h"
#include "ControlNodes.h"
#include "Instruction.h"
#include "SparseSet.h"
#include "RegisterAllocator.h"
#include "RegisterAllocatorTools.h"
#if 1
// Performing an ultra conservative coalescing meens that when we look at
// candidates (source,destination) for coalescing we need to make sure
// that the combined interference of the source and destination register
// will not exceed the total number of register available for the register
// class.
#define ULTRA_CONSERVATIVE_COALESCING
#else
// If we are not doing an ultra conservative coalescing we have to make sure
// that the total number of neighbor whose degree is greater than the total
// number of register is not greater than the total number of register.
#undef ULTRA_CONSERVATIVE_COALESCING
#endif
template <class RegisterPressure>
struct Coalescing
{
static bool coalesce(RegisterAllocator& registerAllocator);
};
template <class RegisterPressure>
bool Coalescing<RegisterPressure>::coalesce(RegisterAllocator& registerAllocator)
{
Pool& pool = registerAllocator.pool;
// Initialize the lookup table
//
Uint32 rangeCount = registerAllocator.rangeCount;
RegisterName* newRange = new RegisterName[2 * rangeCount];
RegisterName* coalescedRange = &newRange[rangeCount];
RegisterName* name2range = registerAllocator.name2range;
init(coalescedRange, rangeCount);
SparseSet interferences(pool, rangeCount);
InterferenceGraph<RegisterPressure>& iGraph = registerAllocator.iGraph;
bool removedInstructions = false;
ControlGraph& controlGraph = registerAllocator.controlGraph;
ControlNode** nodes = controlGraph.lndList;
Uint32 nNodes = controlGraph.nNodes;
// Walk the nodes in the loop nesting depth list.
for (Int32 n = nNodes - 1; n >= 0; n--) {
InstructionList& instructions = nodes[n]->getInstructions();
InstructionList::iterator it = instructions.begin();
while (!instructions.done(it)) {
Instruction& instruction = instructions.get(it);
it = instructions.advance(it);
if ((instruction.getFlags() & ifCopy) != 0) {
assert(instruction.getInstructionUseBegin() != instruction.getInstructionUseEnd() && instruction.getInstructionUseBegin()[0].isRegister());
assert(instruction.getInstructionDefineBegin() != instruction.getInstructionDefineEnd() && instruction.getInstructionDefineBegin()[0].isRegister());
RegisterName source = findRoot(name2range[instruction.getInstructionUseBegin()[0].getRegisterName()], coalescedRange);
RegisterName destination = findRoot(name2range[instruction.getInstructionDefineBegin()[0].getRegisterName()], coalescedRange);
if (source == destination) {
instruction.remove();
} else if (!iGraph.interfere(source, destination)) {
InterferenceVector* sourceVector = iGraph.getInterferenceVector(source);
InterferenceVector* destinationVector = iGraph.getInterferenceVector(destination);
#ifdef ULTRA_CONSERVATIVE_COALESCING
interferences.clear();
InterferenceVector* vector;
for (vector = sourceVector; vector != NULL; vector = vector->next) {
RegisterName* neighbors = vector->neighbors;
for (Uint32 i = 0; i < vector->count; i++)
interferences.set(findRoot(neighbors[i], coalescedRange));
}
for (vector = destinationVector; vector != NULL; vector = vector->next) {
RegisterName* neighbors = vector->neighbors;
for (Uint32 i = 0; i < vector->count; i++)
interferences.set(findRoot(neighbors[i], coalescedRange));
}
Uint32 count = interferences.getSize();
#else // ULTRA_CONSERVATIVE_COALESCING
trespass("not implemented");
Uint32 count = 0;
#endif // ULTRA_CONSERVATIVE_COALESCING
if (count < 6 /* FIX: should get the number from the class */) {
// Update the interferences vector.
if (sourceVector == NULL) {
iGraph.setInterferenceVector(source, destinationVector);
sourceVector = destinationVector;
} else if (destinationVector == NULL)
iGraph.setInterferenceVector(destination, sourceVector);
else {
InterferenceVector* last = NULL;
for (InterferenceVector* v = sourceVector; v != NULL; v = v->next)
last = v;
assert(last);
last->next = destinationVector;
iGraph.setInterferenceVector(destination, sourceVector);
}
// Update the interference matrix.
for (InterferenceVector* v = sourceVector; v != NULL; v = v->next) {
RegisterName* neighbors = v->neighbors;
for (Uint32 i = 0; i < v->count; i++) {
RegisterName neighbor = findRoot(neighbors[i], coalescedRange);
iGraph.setInterference(neighbor, source);
iGraph.setInterference(neighbor, destination);
}
}
instruction.remove();
coalescedRange[source] = destination;
removedInstructions = true;
}
}
}
}
}
registerAllocator.rangeCount = compress(registerAllocator.name2range, coalescedRange, registerAllocator.nameCount, rangeCount);
delete newRange;
return removedInstructions;
}
#endif // _COALESCING_H_

View File

@@ -0,0 +1,283 @@
/* -*- 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 NEW_LAURENTM_CODE
#include "Coloring.h"
#include "VirtualRegister.h"
#include "FastBitSet.h"
#include "FastBitMatrix.h"
#include "CpuInfo.h"
bool Coloring::
assignRegisters(FastBitMatrix& interferenceMatrix)
{
PRUint32 *stackPtr = new(pool) PRUint32[vRegManager.count()];
return select(interferenceMatrix, stackPtr, simplify(interferenceMatrix, stackPtr));
}
PRInt32 Coloring::
getLowestSpillCostRegister(FastBitSet& bitset)
{
PRInt32 lowest = bitset.firstOne();
if (lowest != -1)
{
Flt32 cost = vRegManager.getVirtualRegister(lowest).spillInfo.spillCost;
for (PRInt32 r = bitset.nextOne(lowest); r != -1; r = bitset.nextOne(r))
{
VirtualRegister& vReg = vRegManager.getVirtualRegister(r);
if (!vReg.spillInfo.infiniteSpillCost && (vReg.spillInfo.spillCost < cost))
{
cost = vReg.spillInfo.spillCost;
lowest = r;
}
}
}
return lowest;
}
PRUint32* Coloring::
simplify(FastBitMatrix interferenceMatrix, PRUint32* stackPtr)
{
// first we construct the sets low and high. low contains all nodes of degree
// inferior to the number of register available on the processor. All the
// nodes with an high degree and a finite spill cost are placed in high.
// Nodes of high degree and infinite spill cost are not included in either sets.
PRUint32 nRegisters = vRegManager.count();
FastBitSet low(pool, nRegisters);
FastBitSet high(pool, nRegisters);
FastBitSet stack(pool, nRegisters);
for (VirtualRegisterManager::iterator i = vRegManager.begin(); !vRegManager.done(i); i = vRegManager.advance(i))
{
VirtualRegister& vReg = vRegManager.getVirtualRegister(i);
if (vReg.getClass() == vrcStackSlot)
{
stack.set(i);
vReg.colorRegister(nRegisters);
}
else
{
if (vReg.colorInfo.interferenceDegree < NUMBER_OF_REGISTERS)
low.set(i);
else // if (!vReg.spillInfo.infiniteSpillCost)
high.set(i);
// Set coloring info.
vReg.spillInfo.willSpill = false;
switch(vReg.getClass())
{
case vrcInteger:
vReg.colorRegister(LAST_GREGISTER + 1);
break;
case vrcFloatingPoint:
case vrcFixedPoint:
vReg.colorRegister(LAST_FPREGISTER + 1);
break;
default:
PR_ASSERT(false); // Cannot happen.
}
}
}
// push the stack registers
PRInt32 j;
for (j = stack.firstOne(); j != -1; j = stack.nextOne(j))
*stackPtr++ = j;
// simplify
while (true)
{
PRInt32 r;
while ((r = getLowestSpillCostRegister(low)) != -1)
{
VirtualRegister& vReg = vRegManager.getVirtualRegister(r);
/* update low and high */
FastBitSet inter(interferenceMatrix.getRow(r), nRegisters);
for (j = inter.firstOne(); j != -1; j = inter.nextOne(j))
{
VirtualRegister& neighbor = vRegManager.getVirtualRegister(j);
// if the new interference degree of one of his neighbor becomes
// NUMBER_OF_REGISTERS - 1 then it is added to the set 'low'.
PRUint32 maxInterference = 0;
switch (neighbor.getClass())
{
case vrcInteger:
maxInterference = NUMBER_OF_GREGISTERS;
break;
case vrcFloatingPoint:
case vrcFixedPoint:
maxInterference = NUMBER_OF_FPREGISTERS;
break;
default:
PR_ASSERT(false);
}
if ((vRegManager.getVirtualRegister(j).colorInfo.interferenceDegree-- == maxInterference))
{
high.clear(j);
low.set(j);
}
vReg.colorInfo.interferenceDegree--;
interferenceMatrix.clear(r, j);
interferenceMatrix.clear(j, r);
}
low.clear(r);
// Push this register.
*stackPtr++ = r;
}
if ((r = getLowestSpillCostRegister(high)) != -1)
{
high.clear(r);
low.set(r);
}
else
break;
}
return stackPtr;
}
bool Coloring::
select(FastBitMatrix& interferenceMatrix, PRUint32* stackBase, PRUint32* stackPtr)
{
PRUint32 nRegisters = vRegManager.count();
FastBitSet usedRegisters(NUMBER_OF_REGISTERS + 1); // usedRegisters if used for both GR & FPR.
FastBitSet preColoredRegisters(NUMBER_OF_REGISTERS + 1);
FastBitSet usedStack(nRegisters + 1);
bool success = true;
Int32 lastUsedSSR = -1;
// select
while (stackPtr != stackBase)
{
// Pop one register.
PRUint32 r = *--stackPtr;
VirtualRegister& vReg = vRegManager.getVirtualRegister(r);
FastBitSet neighbors(interferenceMatrix.getRow(r), nRegisters);
if (vReg.getClass() == vrcStackSlot)
// Stack slots coloring.
{
usedStack.clear();
for (PRInt32 i = neighbors.firstOne(); i != -1; i = neighbors.nextOne(i))
usedStack.set(vRegManager.getVirtualRegister(i).getColor());
Int32 color = usedStack.firstZero();
vReg.colorRegister(color);
if (color > lastUsedSSR)
lastUsedSSR = color;
}
else
// Integer & Floating point register coloring.
{
usedRegisters.clear();
preColoredRegisters.clear();
for (PRInt32 i = neighbors.firstOne(); i != -1; i = neighbors.nextOne(i))
{
VirtualRegister& nvReg = vRegManager.getVirtualRegister(i);
usedRegisters.set(nvReg.getColor());
if (nvReg.isPreColored())
preColoredRegisters.set(nvReg.getPreColor());
}
if (vReg.hasSpecialInterference)
usedRegisters |= vReg.specialInterference;
PRInt8 c = -1;
PRInt8 maxColor = 0;
PRInt8 firstColor = 0;
switch (vReg.getClass())
{
case vrcInteger:
firstColor = FIRST_GREGISTER;
maxColor = LAST_GREGISTER;
break;
case vrcFloatingPoint:
case vrcFixedPoint:
firstColor = FIRST_FPREGISTER;
maxColor = LAST_FPREGISTER;
break;
default:
PR_ASSERT(false);
}
if (vReg.isPreColored())
{
c = vReg.getPreColor();
if (usedRegisters.test(c))
c = -1;
}
else
{
for (c = usedRegisters.nextZero(firstColor - 1); (c >= 0) && (c <= maxColor) && (preColoredRegisters.test(c));
c = usedRegisters.nextZero(c)) {}
}
if ((c >= 0) && (c <= maxColor))
{
vReg.colorRegister(c);
}
else
{
VirtualRegister& stackRegister = vRegManager.newVirtualRegister(vrcStackSlot);
vReg.equivalentRegister[vrcStackSlot] = &stackRegister;
vReg.spillInfo.willSpill = true;
success = false;
}
}
}
#ifdef DEBUG
if (success)
{
for (VirtualRegisterManager::iterator i = vRegManager.begin(); !vRegManager.done(i); i = vRegManager.advance(i))
{
VirtualRegister& vReg = vRegManager.getVirtualRegister(i);
switch (vReg.getClass())
{
case vrcInteger:
if (vReg.getColor() > LAST_GREGISTER)
PR_ASSERT(false);
break;
case vrcFloatingPoint:
case vrcFixedPoint:
#if NUMBER_OF_FPREGISTERS != 0
if (vReg.getColor() > LAST_FPREGISTER)
PR_ASSERT(false);
#endif
break;
default:
break;
}
}
}
#endif
vRegManager.nUsedStackSlots = lastUsedSSR + 1;
return success;
}
#endif // NEW_LAURENTM_CODE

View File

@@ -0,0 +1,284 @@
/* -*- 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 "Fundamentals.h"
#include "ControlGraph.h"
#include "ControlNodes.h"
#include "Instruction.h"
#include "RegisterAllocator.h"
#include "VirtualRegister.h"
#include "InterferenceGraph.h"
#include "SparseSet.h"
#include "Spilling.h"
#include "Splits.h"
UT_EXTERN_LOG_MODULE(RegAlloc);
template <class RegisterPressure>
class Coloring
{
private:
static RegisterName* simplify(RegisterAllocator& registerAllocator, RegisterName* coloringStack);
static bool select(RegisterAllocator& registerAllocator, RegisterName* coloringStack, RegisterName* coloringStackPtr);
public:
static bool color(RegisterAllocator& registerAllocator);
static void finalColoring(RegisterAllocator& registerAllocator);
};
template <class RegisterPressure>
void Coloring<RegisterPressure>::finalColoring(RegisterAllocator& registerAllocator)
{
RegisterName* color = registerAllocator.color;
RegisterName* name2range = registerAllocator.name2range;
ControlGraph& controlGraph = registerAllocator.controlGraph;
ControlNode** nodes = controlGraph.dfsList;
Uint32 nNodes = controlGraph.nNodes;
for (Uint32 n = 0; n < nNodes; n++) {
InstructionList& instructions = nodes[n]->getInstructions();
for (InstructionList::iterator i = instructions.begin(); !instructions.done(i); i = instructions.advance(i)) {
Instruction& instruction = instructions.get(i);
InstructionUse* useEnd = instruction.getInstructionUseEnd();
for (InstructionUse* usePtr = instruction.getInstructionUseBegin(); usePtr < useEnd; usePtr++)
if (usePtr->isRegister()) {
usePtr->setRegisterName(color[name2range[usePtr->getRegisterName()]]);
#ifdef DEBUG
RegisterID rid = usePtr->getRegisterID();
setColoredRegister(rid);
usePtr->setRegisterID(rid);
#endif // DEBUG
}
InstructionDefine* defineEnd = instruction.getInstructionDefineEnd();
for (InstructionDefine* definePtr = instruction.getInstructionDefineBegin(); definePtr < defineEnd; definePtr++)
if (definePtr->isRegister()) {
definePtr->setRegisterName(color[name2range[definePtr->getRegisterName()]]);
#ifdef DEBUG
RegisterID rid = definePtr->getRegisterID();
setColoredRegister(rid);
definePtr->setRegisterID(rid);
#endif // DEBUG
}
}
}
}
template <class RegisterPressure>
bool Coloring<RegisterPressure>::select(RegisterAllocator& registerAllocator, RegisterName* coloringStack, RegisterName* coloringStackPtr)
{
Uint32 rangeCount = registerAllocator.rangeCount;
RegisterName* color = new RegisterName[rangeCount];
registerAllocator.color = color;
for (Uint32 r = 1; r < rangeCount; r++)
color[r] = RegisterName(6); // FIX;
// Color the preColored registers.
//
VirtualRegisterManager& vrManager = registerAllocator.vrManager;
RegisterName* name2range = registerAllocator.name2range;
PreColoredRegister* machineEnd = vrManager.getMachineRegistersEnd();
for (PreColoredRegister* machinePtr = vrManager.getMachineRegistersBegin(); machinePtr < machineEnd; machinePtr++)
if (machinePtr->id != invalidID) {
color[name2range[getName(machinePtr->id)]] = machinePtr->color;
UT_OBJECTLOG(UT_LOG_MODULE(RegAlloc), PR_LOG_ALWAYS, ("\twill preColor range %d as %d\n", name2range[getName(machinePtr->id)], machinePtr->color));
}
SpillCost* cost = registerAllocator.spillCost;
Pool& pool = registerAllocator.pool;
SparseSet& spill = *new(pool) SparseSet(pool, rangeCount);
registerAllocator.willSpill = &spill;
SparseSet neighborColors(pool, 6); // FIX
InterferenceGraph<RegisterPressure>& iGraph = registerAllocator.iGraph;
bool coloringFailed = false;
while (coloringStackPtr > coloringStack) {
RegisterName range = *--coloringStackPtr;
if (!cost[range].infinite && cost[range].cost < 0) {
coloringFailed = true;
spill.set(range);
UT_OBJECTLOG(UT_LOG_MODULE(RegAlloc), PR_LOG_ALWAYS, ("\tfailed to color %d, will spill.\n", range));
} else {
neighborColors.clear();
for (InterferenceVector* vector = iGraph.getInterferenceVector(range); vector != NULL; vector = vector->next)
for (Int32 i = vector->count - 1; i >= 0; --i) {
RegisterName neighborColor = color[vector->neighbors[i]];
if (neighborColor < 6) // FIX
neighborColors.set(neighborColor);
}
if (neighborColors.getSize() == 6) { // FIX
coloringFailed = true;
UT_OBJECTLOG(UT_LOG_MODULE(RegAlloc), PR_LOG_ALWAYS, ("\tfailed to color %d, ", range));
if (!Splits<RegisterPressure>::findSplit(registerAllocator, color, range)) {
UT_OBJECTLOG(UT_LOG_MODULE(RegAlloc), PR_LOG_ALWAYS, ("will spill.\n"));
spill.set(range);
} else
UT_OBJECTLOG(UT_LOG_MODULE(RegAlloc), PR_LOG_ALWAYS, ("will split.\n"));
} else {
for (Uint32 i = 0; i < 6; i++) // FIX
if (!neighborColors.test(i)) {
fprintf(stdout, "\twill color %d as %d\n", range, i);
color[range] = RegisterName(i);
break;
}
}
}
}
#ifdef DEBUG_LOG
if (coloringFailed) {
UT_OBJECTLOG(UT_LOG_MODULE(RegAlloc), PR_LOG_ALWAYS, ("Coloring failed:\n"));
UT_OBJECTLOG(UT_LOG_MODULE(RegAlloc), PR_LOG_ALWAYS, ("\twill spill: "));
spill.printPretty(UT_LOG_MODULE(RegAlloc));
} else {
UT_OBJECTLOG(UT_LOG_MODULE(RegAlloc), PR_LOG_ALWAYS, ("Coloring succeeded:\n"));
for (Uint32 i = 1; i < rangeCount; i++)
UT_OBJECTLOG(UT_LOG_MODULE(RegAlloc), PR_LOG_ALWAYS, ("\trange %d colored as %d\n", i, color[i]));
}
#endif
return !coloringFailed;
}
template <class RegisterPressure>
RegisterName* Coloring<RegisterPressure>::simplify(RegisterAllocator& registerAllocator, RegisterName* coloringStack)
{
InterferenceGraph<RegisterPressure>& iGraph = registerAllocator.iGraph;
SpillCost* spillCost = registerAllocator.spillCost;
Uint32 rangeCount = registerAllocator.rangeCount;
Uint32* degree = new Uint32[rangeCount];
for (RegisterName i = RegisterName(1); i < rangeCount; i = RegisterName(i + 1)) {
InterferenceVector* vector = iGraph.getInterferenceVector(i);
degree[i] = (vector != NULL) ? vector->count : 0;
}
Pool& pool = registerAllocator.pool;
SparseSet low(pool, rangeCount);
SparseSet high(pool, rangeCount);
SparseSet highInfinite(pool, rangeCount);
SparseSet preColored(pool, rangeCount);
// Get the precolored registers.
//
VirtualRegisterManager& vrManager = registerAllocator.vrManager;
RegisterName* name2range = registerAllocator.name2range;
PreColoredRegister* machineEnd = vrManager.getMachineRegistersEnd();
for (PreColoredRegister* machinePtr = vrManager.getMachineRegistersBegin(); machinePtr < machineEnd; machinePtr++)
if (machinePtr->id != invalidID)
preColored.set(name2range[getName(machinePtr->id)]);
// Insert the live ranges in the sets.
//
for (Uint32 range = 1; range < rangeCount; range++)
if (!preColored.test(range))
if (degree[range] < 6) // FIX
low.set(range);
else if (!spillCost[range].infinite)
high.set(range);
else
highInfinite.set(range);
#ifdef DEBUG_LOG
UT_OBJECTLOG(UT_LOG_MODULE(RegAlloc), PR_LOG_ALWAYS, ("Coloring sets:\n\tlow = "));
low.printPretty(UT_LOG_MODULE(RegAlloc));
UT_OBJECTLOG(UT_LOG_MODULE(RegAlloc), PR_LOG_ALWAYS, ("\thigh = "));
high.printPretty(UT_LOG_MODULE(RegAlloc));
UT_OBJECTLOG(UT_LOG_MODULE(RegAlloc), PR_LOG_ALWAYS, ("\thighInfinite = "));
highInfinite.printPretty(UT_LOG_MODULE(RegAlloc));
UT_OBJECTLOG(UT_LOG_MODULE(RegAlloc), PR_LOG_ALWAYS, ("\tpreColored = "));
preColored.printPretty(UT_LOG_MODULE(RegAlloc));
#endif // DEBUG_LOG
RegisterName* coloringStackPtr = coloringStack;
while (low.getSize() != 0 || high.getSize() != 0) {
while (low.getSize() != 0) {
RegisterName range = RegisterName(low.getOne());
low.clear(range);
*coloringStackPtr++ = range;
for (InterferenceVector* vector = iGraph.getInterferenceVector(range); vector != NULL; vector = vector->next)
for (Int32 i = (vector->count - 1); i >= 0; --i) {
RegisterName neighbor = vector->neighbors[i];
degree[neighbor]--;
if (degree[neighbor] < 6) // FIX
if (high.test(neighbor)) {
high.clear(neighbor);
low.set(neighbor);
} else if (highInfinite.test(neighbor)) {
highInfinite.clear(neighbor);
low.set(neighbor);
}
}
}
if (high.getSize() != 0) {
RegisterName best = RegisterName(high.getOne());
double bestCost = spillCost[best].cost;
double bestDegree = degree[best];
// Choose the next best candidate.
//
for (SparseSet::iterator i = high.begin(); !high.done(i); i = high.advance(i)) {
RegisterName range = RegisterName(high.get(i));
double thisCost = spillCost[range].cost;
double thisDegree = degree[range];
if (thisCost * bestDegree < bestCost * thisDegree) {
best = range;
bestCost = thisCost;
bestDegree = thisDegree;
}
}
high.clear(best);
low.set(best);
}
}
assert(highInfinite.getSize() == 0);
delete degree;
#ifdef DEBUG_LOG
UT_OBJECTLOG(UT_LOG_MODULE(RegAlloc), PR_LOG_ALWAYS, ("Coloring stack:\n\t"));
for (RegisterName* sp = coloringStack; sp < coloringStackPtr; ++sp)
UT_OBJECTLOG(UT_LOG_MODULE(RegAlloc), PR_LOG_ALWAYS, ("%d ", *sp));
UT_OBJECTLOG(UT_LOG_MODULE(RegAlloc), PR_LOG_ALWAYS, ("\n"));
#endif // DEBUG_LOG
return coloringStackPtr;
}
template <class RegisterPressure>
bool Coloring<RegisterPressure>::color(RegisterAllocator& registerAllocator)
{
RegisterName* coloringStack = new RegisterName[registerAllocator.rangeCount];
return select(registerAllocator, coloringStack, simplify(registerAllocator, coloringStack));
}

View File

@@ -0,0 +1,212 @@
/* -*- 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 "Fundamentals.h"
#include <string.h>
#include "ControlGraph.h"
#include "ControlNodes.h"
#include "DominatorGraph.h"
DominatorGraph::DominatorGraph(ControlGraph& controlGraph) : controlGraph(controlGraph)
{
Uint32 nNodes = controlGraph.nNodes;
GtoV = new Uint32[nNodes + 1];
VtoG = new Uint32[nNodes + 1];
Uint32 v = 1;
for (Uint32 n = 0; n < nNodes; n++) {
VtoG[v] = n;
GtoV[n] = v++;
}
// Initialize all the 1-based arrays.
//
parent = new Uint32[v];
semi = new Uint32[v];
vertex = new Uint32[v];
label = new Uint32[v];
size = new Uint32[v];
ancestor = new Uint32[v];
child = new Uint32[v];
dom = new Uint32[v];
bucket = new DGLinkedList*[v];
memset(semi, '\0', v * sizeof(Uint32));
memset(bucket, '\0', v * sizeof(DGLinkedList*));
vCount = v;
build();
delete parent;
delete semi;
delete vertex;
delete label;
delete size;
delete ancestor;
delete child;
delete dom;
delete bucket;
}
Uint32 DominatorGraph::DFS(Uint32 vx, Uint32 n)
{
semi[vx] = ++n;
vertex[n] = label[vx] = vx;
ancestor[vx] = child[vx] = 0;
size[vx] = 1;
ControlNode& node = *controlGraph.dfsList[VtoG[vx]];
ControlEdge* successorEnd = node.getSuccessorsEnd();
for (ControlEdge* successorPtr = node.getSuccessorsBegin(); successorPtr < successorEnd; successorPtr++) {
Uint32 w = GtoV[successorPtr->getTarget().dfsNum];
if (semi[w] == 0) {
parent[w] = vx;
n = DFS(w, n);
}
}
return n;
}
void DominatorGraph::LINK(Uint32 vx, Uint32 w)
{
Uint32 s = w;
while (semi[label[w]] < semi[label[child[s]]]) {
if (size[s] + size[child[child[s]]] >= (size[child[s]] << 1)) {
ancestor[child[s]] = s;
child[s] = child[child[s]];
} else {
size[child[s]] = size[s];
s = ancestor[s] = child[s];
}
}
label[s] = label[w];
size[vx] += size[w];
if(size[vx] < (size[w] << 1)) {
Uint32 t = s;
s = child[vx];
child[vx] = t;
}
while( s != 0 ) {
ancestor[s] = vx;
s = child[s];
}
}
void DominatorGraph::COMPRESS(Uint32 vx)
{
if(ancestor[ancestor[vx]] != 0) {
COMPRESS(ancestor[vx]);
if(semi[label[ancestor[vx]]] < semi[label[vx]])
label[vx] = label[ancestor[vx]];
ancestor[vx] = ancestor[ancestor[vx]];
}
}
Uint32 DominatorGraph::EVAL(Uint32 vx)
{
if(ancestor[vx] == 0)
return label[vx];
COMPRESS(vx);
return (semi[label[ancestor[vx]]] >= semi[label[vx]]) ? label[vx] : label[ancestor[vx]];
}
void DominatorGraph::build()
{
Uint32 n = DFS(GtoV[0], 0);
size[0] = label[0] = semi[0];
for (Uint32 i = n; i >= 2; i--) {
Uint32 w = vertex[i];
ControlNode& node = *controlGraph.dfsList[VtoG[w]];
const DoublyLinkedList<ControlEdge>& predecessors = node.getPredecessors();
for (DoublyLinkedList<ControlEdge>::iterator p = predecessors.begin(); !predecessors.done(p); p = predecessors.advance(p)) {
Uint32 vx = GtoV[predecessors.get(p).getSource().dfsNum];
Uint32 u = EVAL(vx);
if(semi[u] < semi[w])
semi[w] = semi[u];
}
DGLinkedList* elem = new DGLinkedList();
elem->next = bucket[vertex[semi[w]]];
elem->index = w;
bucket[vertex[semi[w]]] = elem;
LINK(parent[w], w);
elem = bucket[parent[w]];
while(elem != NULL) {
Uint32 vx = elem->index;
Uint32 u = EVAL(vx);
dom[vx] = (semi[u] < semi[vx]) ? u : parent[w];
elem = elem->next;
}
}
memset(size, '\0', n * sizeof(Uint32));
Pool& pool = controlGraph.pool;
nodes = new(pool) DGNode[n];
for(Uint32 j = 2; j <= n; j++) {
Uint32 w = vertex[j];
Uint32 d = dom[w];
if(d != vertex[semi[w]]) {
d = dom[d];
dom[w] = d;
}
size[d]++;
}
dom[GtoV[0]] = 0;
for (Uint32 k = 1; k <= n; k++) {
DGNode& node = nodes[VtoG[k]];
Uint32 count = size[k];
node.successorsEnd = node.successorsBegin = (count) ? new(pool) Uint32[count] : (Uint32*) 0;
}
for (Uint32 l = 2; l <= n; l++)
*(nodes[VtoG[dom[l]]].successorsEnd)++ = VtoG[l];
}
#ifdef DEBUG_LOG
void DominatorGraph::printPretty(LogModuleObject log)
{
UT_OBJECTLOG(log, PR_LOG_ALWAYS, ("Dominator Graph:\n"));
Uint32 nNodes = controlGraph.nNodes;
for (Uint32 i = 0; i < nNodes; i++) {
DGNode& node = nodes[i];
if (node.successorsBegin != node.successorsEnd) {
UT_OBJECTLOG(log, PR_LOG_ALWAYS, ("\tN%d dominates ", i));
for (Uint32* successorsPtr = node.successorsBegin; successorsPtr < node.successorsEnd; successorsPtr++)
UT_OBJECTLOG(log, PR_LOG_ALWAYS, ("N%d ", *successorsPtr));
UT_OBJECTLOG(log, PR_LOG_ALWAYS, ("\n"));
}
}
}
#endif // DEBUG_LOG

View File

@@ -0,0 +1,80 @@
/* -*- 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 _DOMINATOR_GRAPH_H_
#define _DOMINATOR_GRAPH_H_
#include "LogModule.h"
class ControlGraph;
struct DGNode
{
Uint32* successorsBegin;
Uint32* successorsEnd;
};
struct DGLinkedList
{
DGLinkedList* next;
Uint32 index;
};
class DominatorGraph
{
private:
ControlGraph& controlGraph;
Uint32 vCount;
Uint32* VtoG;
Uint32* GtoV;
Uint32* parent;
Uint32* semi;
Uint32* vertex;
Uint32* label;
Uint32* size;
Uint32* ancestor;
Uint32* child;
Uint32* dom;
DGLinkedList** bucket;
DGNode* nodes;
private:
void build();
Uint32 DFS(Uint32 vx, Uint32 n);
void LINK(Uint32 vx, Uint32 w);
void COMPRESS(Uint32 vx);
Uint32 EVAL(Uint32 vx);
public:
DominatorGraph(ControlGraph& controlGraph);
Uint32* getSuccessorsBegin(Uint32 n) const {return nodes[n].successorsBegin;}
Uint32* getSuccessorsEnd(Uint32 n) const {return nodes[n].successorsEnd;}
#ifdef DEBUG_LOG
void printPretty(LogModuleObject log);
#endif // DEBUG_LOG
};
#endif // _DOMINATOR_GRAPH_H_

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