Compare commits

..

2093 Commits

Author SHA1 Message Date
spence%netscape.com
233427693e unix build fix
git-svn-id: svn://10.0.0.236/branches/N2@24851 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-23 17:37:01 +00:00
spence%netscape.com
8a5d6cea8a unix parity
git-svn-id: svn://10.0.0.236/branches/N2@24825 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-23 08:41:00 +00:00
spence%netscape.com
060c6b2ea2 unix cleanup
git-svn-id: svn://10.0.0.236/branches/N2@24822 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-23 08:23:21 +00:00
spence%netscape.com
09b0cb9dac still bringing unix up-to-date
git-svn-id: svn://10.0.0.236/branches/N2@24646 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-22 02:41:00 +00:00
spence%netscape.com
edba634cae unix parity
git-svn-id: svn://10.0.0.236/branches/N2@24644 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-22 02:30:33 +00:00
spence%netscape.com
a7365899d1 unix parity
git-svn-id: svn://10.0.0.236/branches/N2@24639 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-22 01:14:23 +00:00
spence%netscape.com
c3389b3323 bring up-to-date on unix
git-svn-id: svn://10.0.0.236/branches/N2@24637 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-22 01:10:00 +00:00
gagan%netscape.com
718ec18100 Updates, just moving between machines...
git-svn-id: svn://10.0.0.236/branches/N2@24279 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-17 22:53:00 +00:00
gagan%netscape.com
7d190a8dd4 Removed pluggable for now...
git-svn-id: svn://10.0.0.236/branches/N2@23299 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 08:26:52 +00:00
gagan%netscape.com
e1ebb3e092 Changes... updates. Added nsIHeader.h
git-svn-id: svn://10.0.0.236/branches/N2@23287 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 05:27:33 +00:00
gagan%netscape.com
59705f110a Updates.
git-svn-id: svn://10.0.0.236/branches/N2@23286 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 05:27:07 +00:00
gagan%netscape.com
10d067c837 Added HTTP specific files for the pluggable protocols architecture. Made changes from IID() to GetIID() function. Other misc. errors etc.
git-svn-id: svn://10.0.0.236/branches/N2@23223 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-08 23:52:00 +00:00
gagan%netscape.com
0995f00878 The new files for pluggable HTTP. These would eventually go under mozilla/network/pluggable/http but are here till DP's autoregistration code
gets in for HTTP.


git-svn-id: svn://10.0.0.236/branches/N2@23222 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-08 23:49:55 +00:00
spence%netscape.com
44c6ee7bd0 make unix build with new netlib changes
git-svn-id: svn://10.0.0.236/branches/N2@22550 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 08:52:18 +00:00
gagan%netscape.com
6b475c2062 Makefiles for about:protocol.
git-svn-id: svn://10.0.0.236/branches/N2@22044 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 03:38:56 +00:00
gagan%netscape.com
6445d6fc19 Some diff...
git-svn-id: svn://10.0.0.236/branches/N2@22032 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 02:34:56 +00:00
gagan%netscape.com
504987c7f8 Added pluggable protocols directory. Eventually the protocols directory will go away.
git-svn-id: svn://10.0.0.236/branches/N2@22031 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 02:32:22 +00:00
gagan%netscape.com
3c3c9de879 Added pluggable dir structure. Eventually this will replace the protocol
tree. First checkin.


git-svn-id: svn://10.0.0.236/branches/N2@22030 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 02:31:09 +00:00
gagan%netscape.com
4fb4cdbaf9 Changes related to calling nsIProtocolInstance, and added error handling codes.
git-svn-id: svn://10.0.0.236/branches/N2@22015 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 01:51:02 +00:00
gagan%netscape.com
6c56d63c2b First checkin of nsIProtocolInstance.
git-svn-id: svn://10.0.0.236/branches/N2@21819 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 01:35:28 +00:00
gagan%netscape.com
6360bf628f Changes...
git-svn-id: svn://10.0.0.236/branches/N2@21818 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 01:34:58 +00:00
gagan%netscape.com
17afc12ff5 More changes...
git-svn-id: svn://10.0.0.236/branches/N2@21817 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 01:34:32 +00:00
gagan%netscape.com
d2c8923434 Debug method...
git-svn-id: svn://10.0.0.236/branches/N2@21707 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 05:44:01 +00:00
gagan%netscape.com
d962f6c931 Some fixes and changed the parsing routine to use PL_strpbrk.
git-svn-id: svn://10.0.0.236/branches/N2@21703 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 04:57:40 +00:00
gagan%netscape.com
c467d95fcc URL parsing related work.
git-svn-id: svn://10.0.0.236/branches/N2@20920 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-17 08:35:12 +00:00
gagan%netscape.com
7d6ab18c04 Removed local nsFileStream.cpp.
git-svn-id: svn://10.0.0.236/branches/N2@20882 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-17 04:23:49 +00:00
gagan%netscape.com
2267821c34 Removed local nsFileStream.h we are now using mozilla/base/public/nsFileStream.h
git-svn-id: svn://10.0.0.236/branches/N2@20881 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-17 04:18:56 +00:00
spence%netscape.com
f652521f1f replacement of nsFileStream
git-svn-id: svn://10.0.0.236/branches/N2@20880 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-17 04:12:27 +00:00
gagan%netscape.com
4df60ddcca Minor tweaks to build on windows.
git-svn-id: svn://10.0.0.236/branches/N2@20864 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-17 03:15:35 +00:00
gagan%netscape.com
2a952c444d Ah... more of TheManager changes.
git-svn-id: svn://10.0.0.236/branches/N2@20861 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-17 02:58:48 +00:00
gagan%netscape.com
b1d8f9e682 Modified the global manager to be initialized only when somebody makes the first request for it. Possible fix for the static initialization problem. Should work.
git-svn-id: svn://10.0.0.236/branches/N2@20859 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-17 02:46:17 +00:00
spence%netscape.com
d2229d1d13 cleanup of old FileStream class
git-svn-id: svn://10.0.0.236/branches/N2@20835 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-17 00:16:19 +00:00
gagan%netscape.com
1165868b3c Updates. transfering to my desktop...
git-svn-id: svn://10.0.0.236/branches/N2@20827 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-16 22:42:10 +00:00
gagan%netscape.com
f74ec1b6ec Makefile changes for the new files.
git-svn-id: svn://10.0.0.236/branches/N2@20746 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-16 00:05:43 +00:00
gagan%netscape.com
2946bb22b6 Updates. Should compile now.
git-svn-id: svn://10.0.0.236/branches/N2@20745 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-16 00:04:30 +00:00
gagan%netscape.com
071e3adc48 First checkin of URL interfaces. Not in the build yet.
git-svn-id: svn://10.0.0.236/branches/N2@20536 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-12 05:54:58 +00:00
gagan%netscape.com
46e56a76cd New URL implementation files. Not in the build as yet. (Even for N2)
git-svn-id: svn://10.0.0.236/branches/N2@20535 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-12 05:51:23 +00:00
spence%netscape.com
7a5a6134fc resurrected
git-svn-id: svn://10.0.0.236/branches/N2@20350 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-11 03:31:54 +00:00
spence%netscape.com
57dafff70d cleanup
git-svn-id: svn://10.0.0.236/branches/N2@20344 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-11 03:00:37 +00:00
(no author)
34420a2e9d This commit was manufactured by cvs2svn to create branch 'N2'.
git-svn-id: svn://10.0.0.236/branches/N2@20337 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-11 02:25:26 +00:00
spence%netscape.com
81aeb86448 updated to use mozilla/base nsFileStream
git-svn-id: svn://10.0.0.236/branches/N2@20336 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-11 02:25:25 +00:00
spence%netscape.com
5586abebc4 updated NU_CACHE to use mozilla/base nsFileStream class
git-svn-id: svn://10.0.0.236/branches/N2@20333 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-11 01:58:11 +00:00
spence%netscape.com
76c32f445f updated to use mozilla/base nsFileStream; changed name to avoid confusion
git-svn-id: svn://10.0.0.236/branches/N2@20309 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-11 00:25:41 +00:00
spence%netscape.com
ca07152e56 removed bogosity that broke NU_CACHE on unix
git-svn-id: svn://10.0.0.236/branches/N2@20287 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-10 20:51:08 +00:00
spence%netscape.com
aa16a83c74 NU_CACHE build changes for Linux
git-svn-id: svn://10.0.0.236/branches/N2@19429 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-03 13:54:52 +00:00
spence%netscape.com
df7795dbf4 NU_CACHE build changes for Linux
git-svn-id: svn://10.0.0.236/branches/N2@19428 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-03 13:45:53 +00:00
(no author)
74ce2dfd5d This commit was manufactured by cvs2svn to create branch 'N2'.
git-svn-id: svn://10.0.0.236/branches/N2@18827 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 23:06:34 +00:00
jband%netscape.com
9f11bbe8cc removed IMalloc clone and replaced it with use of nsIAllocator
git-svn-id: svn://10.0.0.236/trunk@18826 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 23:06:33 +00:00
wtc%netscape.com
4174f88609 Backed out the previous revision, which was checked in when the tree
is closed.


git-svn-id: svn://10.0.0.236/trunk@18825 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 22:39:53 +00:00
wtc%netscape.com
c543c71121 changed value of TOO_LONG to 5000
git-svn-id: svn://10.0.0.236/trunk@18824 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 22:36:24 +00:00
pinkerton%netscape.com
53318941d5 appr for checkin while tree closed by sar. addref and release when we save a ptr to which widget the mouse is over or clicked on. Since we now do widget refcounting correctly, we need to do it correctly elsewhere ;)
git-svn-id: svn://10.0.0.236/trunk@18823 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 22:17:42 +00:00
jj%netscape.com
bea7127b57 fixed non-debug build bustage
git-svn-id: svn://10.0.0.236/trunk@18822 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 22:10:44 +00:00
petitta%netscape.com
b84c7b45fa Added Files
git-svn-id: svn://10.0.0.236/trunk@18821 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 21:48:24 +00:00
mcmullen%netscape.com
ba14699cdd First Checked In.
git-svn-id: svn://10.0.0.236/trunk@18820 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 21:34:36 +00:00
terry%netscape.com
77a57f11b6 Was picking wrong OS for Macs by default (according to brade@netscape.com).
git-svn-id: svn://10.0.0.236/trunk@18819 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 21:28:38 +00:00
terry%netscape.com
1d1db39246 Fixed stupid typo.
git-svn-id: svn://10.0.0.236/trunk@18818 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 21:23:06 +00:00
terry%netscape.com
f5e4efb177 Added three new fields (which appear in the UI only if params are
turned on): target_milestone, qa_contact, and status_whiteboard.


git-svn-id: svn://10.0.0.236/trunk@18817 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 21:17:10 +00:00
terry%netscape.com
a27c99e830 Oops; wasn't setting the URL field.
git-svn-id: svn://10.0.0.236/trunk@18816 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 20:46:27 +00:00
briano%netscape.com
773f5dbf54 Automated update
git-svn-id: svn://10.0.0.236/trunk@18815 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 20:00:49 +00:00
slamm%netscape.com
a7cd6099cd Use TK_CFLAGS instead of TK_(MOTIF|GTK)_CFLAGS. Use TK_LIBS instead of TK_(MOTIF|GTK)_LIBS to simplify makefile rules. Also general Makefile clean up.
git-svn-id: svn://10.0.0.236/trunk@18814 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 19:54:40 +00:00
slamm%netscape.com
f0c4854988 Removing module name that does not apply.
git-svn-id: svn://10.0.0.236/trunk@18813 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 19:54:36 +00:00
slamm%netscape.com
42981e777b Use TK_CFLAGS instead of TK_(MOTIF|GTK)_CFLAGS. Use TK_LIBS instead of TK_(MOTIF|GTK)_LIBS to simplify makefile rules. Also general Makefile clean up. The link line still needs some work.
git-svn-id: svn://10.0.0.236/trunk@18812 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 19:53:37 +00:00
slamm%netscape.com
133ae04eae Use TK_CFLAGS instead of TK_MOTIF_FLAGS.
git-svn-id: svn://10.0.0.236/trunk@18811 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 19:53:18 +00:00
slamm%netscape.com
3e044b9cd2 Use TK_CFLAGS instead of TK_GTK_FLAGS.
git-svn-id: svn://10.0.0.236/trunk@18810 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 19:53:07 +00:00
slamm%netscape.com
6ae4bf74e6 Use TK_LIBS instead of TK_GTK_LIBS and clean up the makefile a bit
git-svn-id: svn://10.0.0.236/trunk@18809 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 19:52:45 +00:00
slamm%netscape.com
7f37e1cc1b Use TK_CFLAGS instead of TK_GTK_FLAGS. Put each CPPSRC on its own line
git-svn-id: svn://10.0.0.236/trunk@18808 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 19:52:30 +00:00
slamm%netscape.com
da0e16aeae Use TK_CFLAGS instead of TK_(MOTIF|GTK)_CFLAGS. Use TK_LIBS instead of TK_(MOTIF|GTK)_LIBS to simplify makefile rules.
git-svn-id: svn://10.0.0.236/trunk@18807 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 19:51:59 +00:00
buster%netscape.com
4e86fbc278 primarily comments and documentation
also removed nsTableFrame::QueryInterface() because it was just extraneous, and it made
an assumption about what class nsTableFrame derives from.  Let the vtable do its work...


git-svn-id: svn://10.0.0.236/trunk@18806 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 19:29:24 +00:00
kmcclusk%netscape.com
30f6f5db1a Replaced defaultchecked with checked
git-svn-id: svn://10.0.0.236/trunk@18805 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 19:19:07 +00:00
pinkerton%netscape.com
ca6d66dfbe make toolbars a little wider in their parent frame.
git-svn-id: svn://10.0.0.236/trunk@18804 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 19:15:01 +00:00
pinkerton%netscape.com
1d7cc71d41 backing out last two changes because they hork everything up.
git-svn-id: svn://10.0.0.236/trunk@18803 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 19:10:16 +00:00
erik%netscape.com
82ce19e7f7 again, had to fix some strange IID stuff that wouldn't compile on the Mac
git-svn-id: svn://10.0.0.236/trunk@18802 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 18:46:07 +00:00
erik%netscape.com
baa996e88c added PropertiesTest for new Java property file-like class
git-svn-id: svn://10.0.0.236/trunk@18801 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 18:42:28 +00:00
erik%netscape.com
144c1ce875 added nsProperties.cpp and nsBaseDLL.cpp
(for Java property file-like class, and its NSGetFactory)


git-svn-id: svn://10.0.0.236/trunk@18800 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 18:22:03 +00:00
mscott%netscape.com
fcbd98b397 Include sockstub
git-svn-id: svn://10.0.0.236/trunk@18799 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 18:19:40 +00:00
erik%netscape.com
62ec62189f added nsIProperties.h (like Java property files)
git-svn-id: svn://10.0.0.236/trunk@18798 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 18:18:35 +00:00
mscott%netscape.com
b85bbf44ef Include sockstub directory...
git-svn-id: svn://10.0.0.236/trunk@18797 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 18:17:25 +00:00
cata%netscape.com
dc32ee6b17 Test code for the hacky Ascii Encoder added.
git-svn-id: svn://10.0.0.236/trunk@18796 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 18:06:03 +00:00
cata%netscape.com
cf5bd0e193 Hacky Ascii Unicode encoder added for testing purposes.
git-svn-id: svn://10.0.0.236/trunk@18795 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 18:05:08 +00:00
cata%netscape.com
bec0cde3ee More methods added in the interface.
git-svn-id: svn://10.0.0.236/trunk@18794 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 18:03:59 +00:00
cata%netscape.com
b42e6a8457 Docs added. Changes in error codes.
git-svn-id: svn://10.0.0.236/trunk@18793 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 18:02:58 +00:00
cata%netscape.com
2bacaceb15 Added Error Offset Code for the Unicode Converters module.
git-svn-id: svn://10.0.0.236/trunk@18792 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 18:00:50 +00:00
kipp%netscape.com
a6a37b1d25 Fixed build bustage
git-svn-id: svn://10.0.0.236/trunk@18791 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 17:40:10 +00:00
saari%netscape.com
951d8949f7 fixing secondary build break
nsMenu should be nsMenuItem


git-svn-id: svn://10.0.0.236/trunk@18790 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 17:38:43 +00:00
saari%netscape.com
6c31961b64 fixing secondary build break
nsMenu not defined. Should be nsMenuItem


git-svn-id: svn://10.0.0.236/trunk@18789 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 17:37:42 +00:00
pinkerton%netscape.com
5076ef03f5 make toolbox gray, not green.
git-svn-id: svn://10.0.0.236/trunk@18788 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 17:36:39 +00:00
pinkerton%netscape.com
01cdf927e8 add in toolbox
git-svn-id: svn://10.0.0.236/trunk@18787 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 17:36:12 +00:00
saari%netscape.com
c415de0dcb fixed a previous typo of mine
git-svn-id: svn://10.0.0.236/trunk@18786 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 17:33:55 +00:00
saari%netscape.com
1a3881cf7d hacking xptoolkit menus
git-svn-id: svn://10.0.0.236/trunk@18785 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 17:33:00 +00:00
saari%netscape.com
4981161e36 Adding in a XUL menubar.
This isn't really the right place for a XUL menubar, but it will do for the M1 demo.


git-svn-id: svn://10.0.0.236/trunk@18783 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 17:16:38 +00:00
pinkerton%netscape.com
465d554d62 add xul namespace line.
git-svn-id: svn://10.0.0.236/trunk@18782 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 17:11:02 +00:00
saari%netscape.com
cb3aa7d868 fixing build break
change AddItem to AddMenuItem


git-svn-id: svn://10.0.0.236/trunk@18781 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 17:00:11 +00:00
kostello%netscape.com
34cb44acbc Updated XIFDTD token processing to match Rick's changes
by imitating behavior found in nsWellFormedDTD.cpp


git-svn-id: svn://10.0.0.236/trunk@18780 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 16:37:53 +00:00
kostello%netscape.com
91f739386d Fixed bug: dereferencing a null in nsMarkupDocument
Suppressed creation of STYLE leaf tag in the XIF encoding
until style sheet output is fixed.


git-svn-id: svn://10.0.0.236/trunk@18779 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 16:35:32 +00:00
saari%netscape.com
b5d0671483 /m/pub/mozilla/xpfe/appshell/src/nsWebShellWindow.cpp
- Several menu construction changes


git-svn-id: svn://10.0.0.236/trunk@18778 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 16:25:22 +00:00
saari%netscape.com
c4c3da74b7 /m/pub/mozilla/widget/public/nsIMenuItem.h
- Added SetLabel method

/m/pub/mozilla/widget/src/mac/nsMenuItem.h
/m/pub/mozilla/widget/src/gtk/nsMenuItem.h
/m/pub/mozilla/widget/src/motif/nsMenuItem.h
/m/pub/mozilla/widget/src/windows/nsMenuItem.h
- Added SetLabel method

/m/pub/mozilla/widget/src/mac/nsMenuItem.cpp
/m/pub/mozilla/widget/src/gtk/nsMenuItem.cpp
/m/pub/mozilla/widget/src/motif/nsMenuItem.cpp
/m/pub/mozilla/widget/src/windows/nsMenuItem.cpp
- Added SetLabel method


git-svn-id: svn://10.0.0.236/trunk@18777 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 16:14:48 +00:00
saari%netscape.com
aa2dacad70 /m/pub/mozilla/widget/public/nsIMenuBar.h
- Added Paint method

/m/pub/mozilla/widget/src/mac/nsMenuBar.h
- Added Paint method
- Mac implementation changes
/m/pub/mozilla/widget/src/gtk/nsMenuBar.h
/m/pub/mozilla/widget/src/motif/nsMenuBar.h
/m/pub/mozilla/widget/src/windows/nsMenuBar.h
- Added Paint method

/m/pub/mozilla/widget/src/mac/nsMenuBar.cpp
- Added Paint method
- Mac implementation changes
/m/pub/mozilla/widget/src/gtk/nsMenuBar.cpp
/m/pub/mozilla/widget/src/motif/nsMenuBar.cpp
/m/pub/mozilla/widget/src/windows/nsMenuBar.cpp
- Added Paint method


git-svn-id: svn://10.0.0.236/trunk@18776 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 16:05:57 +00:00
saari%netscape.com
b82abe0bdc /m/pub/mozilla/widget/public/nsIMenu.h
- Changed AddItem to AddMenuItem

/m/pub/mozilla/widget/src/mac/nsMenu.h
/m/pub/mozilla/widget/src/gtk/nsMenu.h
/m/pub/mozilla/widget/src/motif/nsMenu.h
/m/pub/mozilla/widget/src/windows/nsMenu.h
- Changed AddItem to AddMenuItem

/m/pub/mozilla/widget/src/mac/nsMenu.cpp
/m/pub/mozilla/widget/src/gtk/nsMenu.cpp
/m/pub/mozilla/widget/src/motif/nsMenu.cpp
/m/pub/mozilla/widget/src/windows/nsMenu.cpp
- Changed AddItem to AddMenuItem


git-svn-id: svn://10.0.0.236/trunk@18775 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 15:57:57 +00:00
saari%netscape.com
ddb6f2dc54 /m/pub/mozilla/widget/public/nsIWidget.h
- Added AddMenuListener method


git-svn-id: svn://10.0.0.236/trunk@18774 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 15:48:22 +00:00
rods%netscape.com
271bdffbb9 Commented out some debug statements
git-svn-id: svn://10.0.0.236/trunk@18773 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 15:32:19 +00:00
rods%netscape.com
abd0d10a02 The :prefs" variable in the "Print" method is null so I changed
NS_RELEASE(prefs) to NS_IF_RELEASE(prefs) why is prefs null??


git-svn-id: svn://10.0.0.236/trunk@18772 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 15:25:56 +00:00
rods%netscape.com
5d60d05625 Added Throbber
git-svn-id: svn://10.0.0.236/trunk@18771 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 15:15:21 +00:00
hyatt%netscape.com
4b53bc9711 Making events still possible within tree cells.
git-svn-id: svn://10.0.0.236/trunk@18770 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 12:42:37 +00:00
hyatt%netscape.com
4aab5ce7f9 Making events for arbitrary HTML still work in tree cells.
git-svn-id: svn://10.0.0.236/trunk@18769 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 12:42:21 +00:00
hyatt%netscape.com
bdfeda7589 Improvements to the tree widget to implement expanding and collapsing
nodes.


git-svn-id: svn://10.0.0.236/trunk@18768 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 12:17:35 +00:00
saari%netscape.com
2c9d2f2f26 mozilla/xpfe/appshell/src/nsWebShellWindow.cpp
- Added LoadMenus method to construct menus

mozilla/xpfe/appshell/src/nsWebShellWindow.h
- Added LoadMenus method


git-svn-id: svn://10.0.0.236/trunk@18767 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 10:51:28 +00:00
saari%netscape.com
951f351f66 Fixing missing return value breakage.
git-svn-id: svn://10.0.0.236/trunk@18766 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 10:39:52 +00:00
hyatt%netscape.com
7be892c832 Implemented selection in the tree view.
git-svn-id: svn://10.0.0.236/trunk@18765 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 10:10:37 +00:00
hyatt%netscape.com
72e9f65dec Fixed a bug wherein tree frames weren't being added to the flow.
git-svn-id: svn://10.0.0.236/trunk@18764 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 10:10:02 +00:00
saari%netscape.com
44aab19939 /m/pub/mozilla/widget/src/mac/nsWindow.cpp
/m/pub/mozilla/widget/src/motif/nsWindow.cpp
/m/pub/mozilla/widget/src/windows/nsWindow.cpp
- call nsMenuListener in DispatchEvent


git-svn-id: svn://10.0.0.236/trunk@18763 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 09:37:23 +00:00
saari%netscape.com
eb40ba55b1 /m/pub/mozilla/widget/src/mac/nsIMenuBar.cpp
/m/pub/mozilla/widget/src/gtk/nsIMenuBar.cpp
/m/pub/mozilla/widget/src/motif/nsIMenuBar.cpp
/m/pub/mozilla/widget/src/windows/nsIMenuBar.cpp
- Added MenuSelected routine

/m/pub/mozilla/widget/src/mac/nsMenuBar.h
/m/pub/mozilla/widget/src/gtk/nsMenuBar.h
/m/pub/mozilla/widget/src/motif/nsMenuBar.h
/m/pub/mozilla/widget/src/windows/nsMenuBar.h
- nsMenuBar inherits from nsMenuListener


git-svn-id: svn://10.0.0.236/trunk@18762 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 09:02:51 +00:00
cls%seawood.org
0a820d90f0 Better handling of compiler options. Thanks to Tim Rice <tim@trr.metro.NET> for the patch.
git-svn-id: svn://10.0.0.236/trunk@18761 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 08:45:40 +00:00
saari%netscape.com
05ddd629aa nsIMenu.h
- Add SetLabel method

nsMenu.h
- Added SetLabel method

nsMenu.cpp
- Added SetLabel method

nsIWidget.h
- Added AddMenuListener method

/m/pub/mozilla/webshell/tests/viewer/nsSetupRegistry.cpp
- Registered factories for nsMenuBar, nsMenu, and nsMenuItem


git-svn-id: svn://10.0.0.236/trunk@18760 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 07:51:20 +00:00
hyatt%netscape.com
97b9d670fb Adding nsTreeCellFrame.cpp to project.
git-svn-id: svn://10.0.0.236/trunk@18759 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 07:46:10 +00:00
hyatt%netscape.com
6fa63c6ee6 Adding tree cell frame.
git-svn-id: svn://10.0.0.236/trunk@18758 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 07:31:14 +00:00
hyatt%netscape.com
2ae301f308 @%!%@!
git-svn-id: svn://10.0.0.236/trunk@18757 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 07:30:24 +00:00
hyatt%netscape.com
bfe575e019 Getting rid of a conflict that I had.
git-svn-id: svn://10.0.0.236/trunk@18756 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 07:23:58 +00:00
hyatt%netscape.com
eeb09800bb Tweaking XUL frame construction. Also adding in a temporary tweak to
keep a NOTYETIMPLEMENTED from firing when an attribute in XML is
changed.  (Making it do a reflow rather than a reframe.)


git-svn-id: svn://10.0.0.236/trunk@18755 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 07:22:05 +00:00
mcafee%netscape.com
2f2f97c6a2 Adding pure target to run purify (Solaris)
git-svn-id: svn://10.0.0.236/trunk@18754 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 07:17:32 +00:00
sfraser%netscape.com
d9f7d78652 Return a result (duh) from InitNativeWindow()
git-svn-id: svn://10.0.0.236/trunk@18753 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 06:47:08 +00:00
coop%netscape.com
d91301c106 NOT YET PART OF SEAMONKEY:
* fixed XPT_SizeOfHeader. It wasn't actually walking the annotations, but it does now.
* added some basic dumping code to SimpleTypeLib. Currently only the headers can be dumped. Once XDR read code is up and running, this dumping code will become a separate utility, most likely under a libxpt/tools subdir.


git-svn-id: svn://10.0.0.236/trunk@18752 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 06:32:57 +00:00
saari%netscape.com
dac2b29609 Adding a nsnull check before we call through a returned pointer. Breaking on linux
git-svn-id: svn://10.0.0.236/trunk@18751 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 06:01:38 +00:00
troy%netscape.com
3e91c0d918 Changed Reflow() to take into account absolutely positioned child
frames when computing the desired size


git-svn-id: svn://10.0.0.236/trunk@18750 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 05:58:43 +00:00
ramiro%netscape.com
8ef7c25bf9 Fix it for real this time. I thought i fixed before. Why is this so hard ?
git-svn-id: svn://10.0.0.236/trunk@18749 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 05:55:09 +00:00
troy%netscape.com
df2016e126 Added work-in-progress for 'fixed' positioning
git-svn-id: svn://10.0.0.236/trunk@18748 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 05:37:55 +00:00
troy%netscape.com
3381a561f5 Added helper function IsAbsolutelyPositioned() to nsStylePosition
git-svn-id: svn://10.0.0.236/trunk@18747 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 05:35:54 +00:00
sfraser%netscape.com
d4ac017acd Changes to avoid using window refCons for raptor data. Store a list of windows in nsMacMessageSink, pass all events to the sink, and return a boolean for handled status. In the window, add and remove raptor windows from the list.
git-svn-id: svn://10.0.0.236/trunk@18746 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 05:24:26 +00:00
sfraser%netscape.com
f777c9980b Fix menu ID conflict between Print one column, and tree view menu items.
git-svn-id: svn://10.0.0.236/trunk@18745 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 05:22:06 +00:00
sfraser%netscape.com
fbb47872c1 Added a method to nsBrowserWindow to allow platform-specific subclasses to set up native window data on window creation. On Mac, the viewer uses the window refCon to store an nsBrowserWindow now.
Also fixed menu item numbering, as two different items were using 2000.


git-svn-id: svn://10.0.0.236/trunk@18744 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 05:21:43 +00:00
sfraser%netscape.com
40a9063f33 Added a method to nsBrowserWindow to allow platform-specific subclasses to set up native window data on window creation. On Mac, we use this to set refCon data. On other platforms, it's just a stub.
git-svn-id: svn://10.0.0.236/trunk@18743 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 05:20:43 +00:00
briano%netscape.com
6d18ce16f8 Automated update
git-svn-id: svn://10.0.0.236/trunk@18742 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 05:15:34 +00:00
ramiro%netscape.com
e6691ac53f Add xpfe/browser/public to build.
git-svn-id: svn://10.0.0.236/trunk@18741 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 05:13:41 +00:00
pollmann%netscape.com
d6917d7a28 Bug 2370: FreeBSD 3.0 patches
git-svn-id: svn://10.0.0.236/trunk@18740 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 05:10:54 +00:00
ramiro%netscape.com
449732ccac Ignore generated files.
git-svn-id: svn://10.0.0.236/trunk@18739 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 05:09:47 +00:00
mcafee%netscape.com
bf03978d35 ignore generated Makefile
git-svn-id: svn://10.0.0.236/trunk@18738 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 05:06:20 +00:00
sfraser%netscape.com
dacac830ff Fix the about box so that it doesn't refer to PowerPlant
git-svn-id: svn://10.0.0.236/trunk@18737 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 05:05:52 +00:00
rods%netscape.com
b02a88cfcd Added setting of the initial URL in the URL Bar
git-svn-id: svn://10.0.0.236/trunk@18736 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 04:53:10 +00:00
ramiro%netscape.com
fec89f754b Add makefile to unbreak build.
git-svn-id: svn://10.0.0.236/trunk@18735 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 04:49:35 +00:00
gagan%netscape.com
fe96f1475e Replaced default 4.05 with 5.0 for User agent string.
git-svn-id: svn://10.0.0.236/trunk@18734 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 04:28:34 +00:00
mscott%netscape.com
e852893424 Externally define msg_LineBuffer....
git-svn-id: svn://10.0.0.236/trunk@18733 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 04:23:11 +00:00
rods%netscape.com
d46dbf1fea Added BUTTON.ROLLOVER and BUTTON.DIABLED pseudo-classes
git-svn-id: svn://10.0.0.236/trunk@18732 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 04:22:35 +00:00
saari%netscape.com
b45b87c481 mozilla/widget/src/xpwidgets/nsBaseWidget.h
uncommented nsIMenuListener   *mMenuListener for XPToolkit menus

Index: nsBaseWidget.cpp
===================================================================
RCS file: /m/pub/mozilla/widget/src/xpwidgets/nsBaseWidget.cpp
uncommented  mMenuListener code for XPToolkit menus


git-svn-id: svn://10.0.0.236/trunk@18731 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 04:20:20 +00:00
mscott%netscape.com
061191ff9e Include rdf to fix build breakage when nsIMsgFolder started inheriting from an RDF interface....
git-svn-id: svn://10.0.0.236/trunk@18730 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 04:19:26 +00:00
rods%netscape.com
bf214b42ce Implemented the window.print() method
git-svn-id: svn://10.0.0.236/trunk@18729 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 04:15:19 +00:00
rods%netscape.com
40a68b95fc Commented out the MACRO for for settting and getting the disabled attribute
I implemented them fully so I code set the "disabled" pseudo-class properly


git-svn-id: svn://10.0.0.236/trunk@18728 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 04:13:44 +00:00
sdagley%netscape.com
b9ba3e6a61 First Checked In.
git-svn-id: svn://10.0.0.236/trunk@18727 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 04:12:38 +00:00
sdagley%netscape.com
3b80fdaa48 Updating so that builds on the Mac will use a SIOUX console window rather than writing to a file (which doesn't work unless running under the debugger for an undetermined reason).
git-svn-id: svn://10.0.0.236/trunk@18726 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 04:11:54 +00:00
rods%netscape.com
b44e44cb62 Added rollover pseudo-class processing for mouse enter and exit
git-svn-id: svn://10.0.0.236/trunk@18725 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 04:09:12 +00:00
rods%netscape.com
6d6fb26dd3 Fixed up the UI, added the status bar
git-svn-id: svn://10.0.0.236/trunk@18724 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 04:03:46 +00:00
mscott%netscape.com
0aa401a0e6 Use nsMsgFolderFlags.h instead of msgFolderFlags.h...
git-svn-id: svn://10.0.0.236/trunk@18723 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 04:03:17 +00:00
rods%netscape.com
dd210ba364 Added a lot code for M1
git-svn-id: svn://10.0.0.236/trunk@18722 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 04:02:33 +00:00
mscott%netscape.com
72385b26ac Export nsMsgPtrArray.h and nsMsgGroupRecord.h
git-svn-id: svn://10.0.0.236/trunk@18721 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 04:02:04 +00:00
mscott%netscape.com
406bb8f692 include rosetta.h in this file.
git-svn-id: svn://10.0.0.236/trunk@18720 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 03:58:45 +00:00
rods%netscape.com
9cc237bfee initial checkin
git-svn-id: svn://10.0.0.236/trunk@18719 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 03:55:39 +00:00
troy%netscape.com
8b3ad3c365 Changed nsAbsoluteItems to be a derived class of nsFrameItems
git-svn-id: svn://10.0.0.236/trunk@18718 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 03:53:54 +00:00
mscott%netscape.com
9f44caa1f6 Export nsINNTPCategoryContainer.h
git-svn-id: svn://10.0.0.236/trunk@18717 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 03:52:53 +00:00
rods%netscape.com
090afdeb87 I uncommented out the progation of the EndLoadURL notification
git-svn-id: svn://10.0.0.236/trunk@18716 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 03:50:10 +00:00
alecf%netscape.com
0290bab375 whoops, this was the wrong name for this file
git-svn-id: svn://10.0.0.236/trunk@18715 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 03:49:09 +00:00
troy%netscape.com
00c1f554bc Added nsLayoutAtoms::fixedList for specifying the name of the additional
child list for 'fixed' elements


git-svn-id: svn://10.0.0.236/trunk@18714 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 03:48:39 +00:00
alecf%netscape.com
020bec1e30 adding utility macros to implement XPIDL-generated getter/setter methods
git-svn-id: svn://10.0.0.236/trunk@18713 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 03:34:53 +00:00
alecf%netscape.com
87e829537e updated to use more standard naming conventions and added function descriptions
git-svn-id: svn://10.0.0.236/trunk@18712 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 03:28:20 +00:00
troy%netscape.com
fe96feb62a Hooked printing back up. It was a casuality of the viewport changes
git-svn-id: svn://10.0.0.236/trunk@18711 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 03:24:12 +00:00
alecf%netscape.com
233bdcb5ad remove some cruft, fix some indenting
git-svn-id: svn://10.0.0.236/trunk@18710 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 03:12:49 +00:00
alecf%netscape.com
3a0c7221e0 add nsNNTPHost to build
git-svn-id: svn://10.0.0.236/trunk@18709 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 03:12:24 +00:00
wtc%netscape.com
c49c5990c0 Bugsplat bug #340901: On AIX, PR_TransmitFile calls the new send_file()
system call if it is available.  The patch is contributed by IBM's
Anthony Moore <anthonym@npec.netscape.com>.


git-svn-id: svn://10.0.0.236/trunk@18708 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 03:12:16 +00:00
alecf%netscape.com
2a2c6ceac1 slight case change in new interface
git-svn-id: svn://10.0.0.236/trunk@18707 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 03:12:11 +00:00
putterman%netscape.com
004e28586a Added nsIMsgFolder implentation
git-svn-id: svn://10.0.0.236/trunk@18706 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 03:04:29 +00:00
terry%netscape.com
2fe75675e5 If the version isn't valid, try "other" before giving up.
git-svn-id: svn://10.0.0.236/trunk@18705 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 03:00:31 +00:00
putterman%netscape.com
68757819d4 Add new methods to nsIMsgFolder interface
git-svn-id: svn://10.0.0.236/trunk@18704 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 02:59:12 +00:00
mscott%netscape.com
252ad58710 Adding code to parse a news url and to load a news url for the test harness...
git-svn-id: svn://10.0.0.236/trunk@18703 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 02:58:53 +00:00
alecf%netscape.com
f6bf2a81b4 first entry of Proxy via Event Queue utility routines
git-svn-id: svn://10.0.0.236/trunk@18702 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 02:58:19 +00:00
alecf%netscape.com
dc15ecd43c first entry of nsProxyEvent helper routines for writing proxy interfaces
git-svn-id: svn://10.0.0.236/trunk@18701 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 02:57:46 +00:00
terry%netscape.com
6ef898005f Fixed error message when version is invalid.
git-svn-id: svn://10.0.0.236/trunk@18700 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 02:56:20 +00:00
pollmann%netscape.com
71a84022b9 Bug 1958: Submit value for checkboxes or "on" for checkboxes with no value.
git-svn-id: svn://10.0.0.236/trunk@18699 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 02:33:16 +00:00
briano%netscape.com
63cfa56abe Automated update
git-svn-id: svn://10.0.0.236/trunk@18698 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 02:30:35 +00:00
mcafee%netscape.com
39fe474e3b Adding toolbar icons
git-svn-id: svn://10.0.0.236/trunk@18697 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 02:26:53 +00:00
mcafee%netscape.com
9d1b6ffc74 Adding xpfe/browser to build
git-svn-id: svn://10.0.0.236/trunk@18696 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 02:26:07 +00:00
mcafee%netscape.com
a9911ab9bf Adding xpfe/browser
git-svn-id: svn://10.0.0.236/trunk@18695 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 02:24:53 +00:00
mjudge%netscape.com
72e99c7c16 Must allow for the fact that content may be nsnull in ALL cases.
git-svn-id: svn://10.0.0.236/trunk@18694 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 02:15:38 +00:00
warren%netscape.com
879bf81b4e Looks like I forgot a public declaration.
git-svn-id: svn://10.0.0.236/trunk@18693 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 02:12:57 +00:00
mcmullen%netscape.com
d530ae462b Added a new InitializeMacToolbox() to NSStdLib (declared in macstdlibextras.h) and exported it. This makes all the Mac Toolbox Init calls, and also (if DEBUG) initializes SIOUX without menus. Safe to call this multiple times (it has a static boolean). Removed toolbox initialization from constructor of nsAppShell, and called InitializeMacToolbox() instead. Called InitializeMacToolbox from main in viewer app, and also from a static initializer in nsAppRunner.cpp.
git-svn-id: svn://10.0.0.236/trunk@18692 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 02:11:56 +00:00
pinkerton%netscape.com
b6116d5d47 Got reflow working so that it lays out its children one right after the other, leaving room for a grippy to be drawn.
git-svn-id: svn://10.0.0.236/trunk@18691 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 02:11:07 +00:00
warren%netscape.com
eef8571946 Added nsIAllocator and implementation. Made service manager services sticky'.
git-svn-id: svn://10.0.0.236/trunk@18690 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 02:02:22 +00:00
kmcclusk%netscape.com
78f31b3921 Modified GetDefaultChecked and SetDefaultChecked to get and set the checked
attribute.


git-svn-id: svn://10.0.0.236/trunk@18689 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 01:35:30 +00:00
despotdaemon%netscape.com
8c22f7a0dc Pseudo-automatic update of changes made by brendan@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@18688 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 01:34:46 +00:00
rjc%netscape.com
cb72ae28f2 Oops, didn't mean to check in changes for the file system into makefiles.
git-svn-id: svn://10.0.0.236/trunk@18687 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 01:26:08 +00:00
rjc%netscape.com
64903cc309 First cut at a file system data source.
git-svn-id: svn://10.0.0.236/trunk@18686 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 01:26:07 +00:00
despotdaemon%netscape.com
fa263f5e52 Pseudo-automatic update of changes made by wtc@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@18685 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 01:07:59 +00:00
waterson%netscape.com
4fb93e8735 Exposed EventListenerManager.
git-svn-id: svn://10.0.0.236/trunk@18684 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 00:58:49 +00:00
bienvenu%netscape.com
7b287efdfc initial entry into cvs of makefiles for mdb
git-svn-id: svn://10.0.0.236/trunk@18683 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 00:56:09 +00:00
bienvenu%netscape.com
668a8e2aad add mdb directory to db build
git-svn-id: svn://10.0.0.236/trunk@18682 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 00:54:49 +00:00
kmcclusk%netscape.com
bb135eae27 Implemented GetChecked and SetChecked for nsHTMLInputElement by going through
the nsCheckboxControlFrame and nsRadioControlFrame.cpp


git-svn-id: svn://10.0.0.236/trunk@18681 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 00:51:46 +00:00
bienvenu%netscape.com
b815400fc6 initial entry into cvs of MDB interface
git-svn-id: svn://10.0.0.236/trunk@18680 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 00:45:21 +00:00
bienvenu%netscape.com
76f95a8712 add win makefile for msgdb
git-svn-id: svn://10.0.0.236/trunk@18679 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 00:43:00 +00:00
bienvenu%netscape.com
516f7fd8d2 start implementing mail msg db
git-svn-id: svn://10.0.0.236/trunk@18678 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 00:42:13 +00:00
bienvenu%netscape.com
7e3a4dd843 start getting msgdb code to build
git-svn-id: svn://10.0.0.236/trunk@18677 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 00:40:29 +00:00
bienvenu%netscape.com
2ffac12ecc start getting msgdb building
git-svn-id: svn://10.0.0.236/trunk@18676 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 00:37:45 +00:00
bienvenu%netscape.com
686d146dff add makefiles for db directories
git-svn-id: svn://10.0.0.236/trunk@18675 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 00:36:45 +00:00
bienvenu%netscape.com
2870f82941 export MailNewsTypes.h
git-svn-id: svn://10.0.0.236/trunk@18674 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 00:35:12 +00:00
bienvenu%netscape.com
8432c564f8 add view index, remove msg flags which are stored elsewhere
git-svn-id: svn://10.0.0.236/trunk@18673 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 00:34:31 +00:00
pollmann%netscape.com
2e9ab16293 Bug 1958: Submit x, y coords for unnamed image elements. Submit coords only once.
git-svn-id: svn://10.0.0.236/trunk@18672 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 00:25:40 +00:00
nhotta%netscape.com
82bcd53640 Initial check in.
git-svn-id: svn://10.0.0.236/trunk@18671 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 00:19:24 +00:00
erik%netscape.com
4ae5d93417 For some reason, the IID stuff didn't compile on the Mac. Fixed now.
git-svn-id: svn://10.0.0.236/trunk@18670 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 00:18:34 +00:00
ducarroz%netscape.com
eb2fed3e15 Added command to execute manifest on network:protocol:sockstub:
git-svn-id: svn://10.0.0.236/trunk@18669 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 00:15:25 +00:00
vidur%netscape.com
bd2f738058 First pass implementation of document.implementation
git-svn-id: svn://10.0.0.236/trunk@18668 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 00:12:33 +00:00
ducarroz%netscape.com
13acab0d03 added sub group sockstub and added to it file sockstub.cpp
git-svn-id: svn://10.0.0.236/trunk@18667 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 00:12:09 +00:00
ducarroz%netscape.com
b6c9941c80 Added command to execute manifest on network:protocol:sockstub:
git-svn-id: svn://10.0.0.236/trunk@18666 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 00:03:50 +00:00
ducarroz%netscape.com
1383058e53 Added nsITransport.h
git-svn-id: svn://10.0.0.236/trunk@18665 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 00:03:49 +00:00
cmanske%netscape.com
0c870ba5af Changed Windows makefile to use BASE directory instead of CORE
git-svn-id: svn://10.0.0.236/trunk@18664 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 00:00:37 +00:00
briano%netscape.com
a517c981d1 Automated update
git-svn-id: svn://10.0.0.236/trunk@18663 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-27 00:00:34 +00:00
mcafee%netscape.com
2461c1d3c3 Renaming editor/core to editor/base
git-svn-id: svn://10.0.0.236/trunk@18662 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 23:59:14 +00:00
slamm%netscape.com
52f5c6a55c Only update .md files when NO_MDUPDATE is unset.
git-svn-id: svn://10.0.0.236/trunk@18661 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 23:54:59 +00:00
erik%netscape.com
714a8f406b Added test program and test file for new nsIStringBundle class
(for externalizing strings so that they can be localized).


git-svn-id: svn://10.0.0.236/trunk@18660 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 23:54:30 +00:00
erik%netscape.com
894a7ba3bd Added implementation of new nsIStringBundle class.
git-svn-id: svn://10.0.0.236/trunk@18659 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 23:53:37 +00:00
erik%netscape.com
a7283ed820 Added public header file for new nsIStringBundle class.
git-svn-id: svn://10.0.0.236/trunk@18658 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 23:53:01 +00:00
erik%netscape.com
cc32d390c7 Added test program and test file for new nsIProperties stuff.
(Like Java properties.)


git-svn-id: svn://10.0.0.236/trunk@18657 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 23:51:18 +00:00
erik%netscape.com
961ef36d39 Added implementation of new nsIProperties class (like Java properties).
Also added nsBaseDLL.cpp for factory for this DLL (raptorbase).


git-svn-id: svn://10.0.0.236/trunk@18656 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 23:50:25 +00:00
alecf%netscape.com
98eefe872a makefile for XPIDL on Windows
git-svn-id: svn://10.0.0.236/trunk@18655 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 23:49:43 +00:00
waterson%netscape.com
c3e5920240 Got Win32-specific stuff up and running. This caused a bit of code-juggling in the Unix and Mac implementations. a=mcmullen.
git-svn-id: svn://10.0.0.236/trunk@18654 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 23:49:33 +00:00
mjudge%netscape.com
ce3006450c Fixing rangelist to look at frame content not the frame hierarchy do decide if you clicked on the background frame.
git-svn-id: svn://10.0.0.236/trunk@18653 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 23:49:17 +00:00
erik%netscape.com
21ae15f95f public header file for new nsIProperties class (like Java properties)
git-svn-id: svn://10.0.0.236/trunk@18652 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 23:48:54 +00:00
kmcclusk%netscape.com
6550e9da04 Added GetPrimaryFrame utility method.
git-svn-id: svn://10.0.0.236/trunk@18651 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 23:43:52 +00:00
alecf%netscape.com
5f81a8c8dd add declarations for factories
git-svn-id: svn://10.0.0.236/trunk@18650 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 23:17:39 +00:00
pollmann%netscape.com
1e53362e49 Bug 2279: Don't create widgets for hidden form elements.
git-svn-id: svn://10.0.0.236/trunk@18649 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 22:11:59 +00:00
rhp%netscape.com
e64187e51f Cleanup changes for libmime.
git-svn-id: svn://10.0.0.236/trunk@18648 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 21:47:51 +00:00
alecf%netscape.com
2ab9aad2f4 slight change to meet new nsRepository API
git-svn-id: svn://10.0.0.236/trunk@18647 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 21:42:39 +00:00
alecf%netscape.com
9d2f7df13e fix build bustage - API change for GetRangeOfArtsToDownload and
special case for Windows to use char* instead of const char* for XP_AppCodeName


git-svn-id: svn://10.0.0.236/trunk@18646 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 21:41:55 +00:00
bienvenu%netscape.com
25db1aed1f remove so I can name it correctly nsMsgHdr.cpp
git-svn-id: svn://10.0.0.236/trunk@18645 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 21:41:50 +00:00
alecf%netscape.com
bf42a83e5d nsNNTPNewsgroupList should be implementing nsINNTPNewsgroupList, not nsINNTPArticleList.
Made some API changes and class changes to bring them in sync


git-svn-id: svn://10.0.0.236/trunk@18644 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 21:32:51 +00:00
alecf%netscape.com
3b7baf5487 the IDL compiler is smart enough to handle nsINNTPHost now
git-svn-id: svn://10.0.0.236/trunk@18643 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 21:32:04 +00:00
mscott%netscape.com
38330b38e1 Temporarily add NET_SaCat/Copy to nsNNTPProtocol. Include allxpstr.h as well....
git-svn-id: svn://10.0.0.236/trunk@18642 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 21:26:48 +00:00
slamm%netscape.com
839f5f7862 Cleaning this up. Some of these rules don't apply. Others are in rules.mk
git-svn-id: svn://10.0.0.236/trunk@18640 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 20:17:35 +00:00
petitta%netscape.com
f583b70913 updated yet again
git-svn-id: svn://10.0.0.236/trunk@18639 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 20:11:43 +00:00
alecf%netscape.com
37be85660a add delete operator so this will compile
git-svn-id: svn://10.0.0.236/trunk@18637 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 20:08:34 +00:00
alecf%netscape.com
3122ee1ba4 add factory and declarations for interface methods
git-svn-id: svn://10.0.0.236/trunk@18636 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 20:07:48 +00:00
alecf%netscape.com
1de29ceae9 rename Initialize->Init to match interface, and add factory
git-svn-id: svn://10.0.0.236/trunk@18635 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 20:04:41 +00:00
petitta%netscape.com
1334d0d0b6 updated again
git-svn-id: svn://10.0.0.236/trunk@18634 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 19:52:07 +00:00
shaver%netscape.com
50af4f507e Fixed method and type descriptors, made const descriptors go.
git-svn-id: svn://10.0.0.236/trunk@18633 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 19:31:25 +00:00
rods%netscape.com
5a8321381d took browser out of the build
git-svn-id: svn://10.0.0.236/trunk@18632 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 19:21:18 +00:00
michaelp%netscape.com
b448a5f840 turned on the throbbing N again.
git-svn-id: svn://10.0.0.236/trunk@18631 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 19:09:22 +00:00
petitta%netscape.com
d1f8c96d05 Modified
git-svn-id: svn://10.0.0.236/trunk@18630 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 18:44:23 +00:00
alecf%netscape.com
f5bacba5d7 stop using IsXXX for boolean Getters
git-svn-id: svn://10.0.0.236/trunk@18629 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 18:20:30 +00:00
pinkerton%netscape.com
bb880b4b55 fix a leak where the Enumerator would create itself with a refcnt of 1 and then we'd addref it again in GetChildren(). Fixed so that the Enumerator doesn't addref itself and added addref's in the appropriate places to correct that assumption.
git-svn-id: svn://10.0.0.236/trunk@18628 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 18:07:11 +00:00
rods%netscape.com
7902fb13e2 Added the "Home" button.
git-svn-id: svn://10.0.0.236/trunk@18627 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 18:03:08 +00:00
rods%netscape.com
0f5dd89cc5 It now looks for it's children WebShell by name and instead of assuming
that they are at a given position.


git-svn-id: svn://10.0.0.236/trunk@18626 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 18:01:38 +00:00
rods%netscape.com
692077b956 Added commands
git-svn-id: svn://10.0.0.236/trunk@18625 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 17:45:44 +00:00
nhotta%netscape.com
85d13bd02e Change to use WinAPI for collation key creation.
git-svn-id: svn://10.0.0.236/trunk@18624 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 17:37:17 +00:00
nhotta%netscape.com
e0818cc28e Added additional library to to link.
git-svn-id: svn://10.0.0.236/trunk@18623 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 17:35:42 +00:00
pinkerton%netscape.com
76a4ad4447 Pull throbber gifs from viewer instead of xpviewer to match what the windows build is doing.
git-svn-id: svn://10.0.0.236/trunk@18622 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 17:29:41 +00:00
pinkerton%netscape.com
ca0330b3fe Pull some chrome stuff from xpfe/browser to get appviewer up and running. These chrome files will move, but they live where they live right now.
git-svn-id: svn://10.0.0.236/trunk@18621 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 17:14:37 +00:00
troy%netscape.com
88177ce149 Fixed a problem in CalculateLeftRightMargin()
git-svn-id: svn://10.0.0.236/trunk@18620 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 16:34:08 +00:00
rods%netscape.com
86547bd566 Added appshell bootstrap and browser directories to build
git-svn-id: svn://10.0.0.236/trunk@18619 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 16:01:30 +00:00
rods%netscape.com
3bc4bf2b13 Changed initial document to appshell.html
git-svn-id: svn://10.0.0.236/trunk@18618 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 16:00:57 +00:00
rods%netscape.com
8d18051670 Added nsXULCommand
git-svn-id: svn://10.0.0.236/trunk@18617 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 15:59:53 +00:00
rods%netscape.com
3e82cea749 It now derives from nsIDocumentLoader and it processes and itstalls XULCommands
git-svn-id: svn://10.0.0.236/trunk@18616 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 15:58:58 +00:00
rods%netscape.com
8b344cdfea It now derives from nsIDocumentLoader and I added the XUL Command list
git-svn-id: svn://10.0.0.236/trunk@18615 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 15:57:59 +00:00
rods%netscape.com
976a2fafb8 Added cast for mWindowList methods
git-svn-id: svn://10.0.0.236/trunk@18614 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 15:55:44 +00:00
rods%netscape.com
dbb8132f71 added nsXULCommand
git-svn-id: svn://10.0.0.236/trunk@18613 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 15:45:35 +00:00
rods%netscape.com
7a5f2025aa Initial checkin
git-svn-id: svn://10.0.0.236/trunk@18612 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 15:44:24 +00:00
rods%netscape.com
0444d79703 Initial checkin (not building source yet)
git-svn-id: svn://10.0.0.236/trunk@18611 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 15:43:34 +00:00
dcone%netscape.com
c966f58d0d Added nsXULCommand.cpp for Rod Spears
git-svn-id: svn://10.0.0.236/trunk@18610 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 15:30:43 +00:00
rods%netscape.com
d600d7cae9 Added toolbar.xml and xul.css
git-svn-id: svn://10.0.0.236/trunk@18609 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 15:26:14 +00:00
rods%netscape.com
d3e9bd91a1 Changed the IFRAME to use toolbar.xml
git-svn-id: svn://10.0.0.236/trunk@18608 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 15:22:25 +00:00
rods%netscape.com
3a56986bde Initial checkin
git-svn-id: svn://10.0.0.236/trunk@18607 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 15:08:23 +00:00
rods%netscape.com
90dae20de7 Added nsIXULCommand
git-svn-id: svn://10.0.0.236/trunk@18606 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 15:06:21 +00:00
briano%netscape.com
3ba6e59952 Automated update
git-svn-id: svn://10.0.0.236/trunk@18605 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 13:00:37 +00:00
mcafee%netscape.com
89b776545b Adding intl/locale, intl/unicharutil Makefiles
git-svn-id: svn://10.0.0.236/trunk@18604 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 12:48:25 +00:00
mcafee%netscape.com
406f101f88 Adding makefiles for Linux, hope that's Ok
git-svn-id: svn://10.0.0.236/trunk@18603 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 12:47:33 +00:00
mcafee%netscape.com
e313740053 Use local TOOLKIT_LIBS instead of hard-coding in gtk. Still needs to be fixed in rules.mk
git-svn-id: svn://10.0.0.236/trunk@18602 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 11:59:48 +00:00
mcafee%netscape.com
23f7b9f073 Fixing Solaris build breakage
git-svn-id: svn://10.0.0.236/trunk@18601 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 11:44:32 +00:00
mcafee%netscape.com
543b008d43 Cleaning this up: whitespace only
git-svn-id: svn://10.0.0.236/trunk@18600 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 10:45:46 +00:00
rpotts%netscape.com
126778f89f Added PR_BEGIN_MACRO/PR_END_MACRO around all multi-line macros...
git-svn-id: svn://10.0.0.236/trunk@18599 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 09:46:33 +00:00
mcafee%netscape.com
2e4daba1da Switch to using rules in rules.mk instead of making them up here. Nuked unnecessary link lines, fixed incorrect reference to viewer.exe.
git-svn-id: svn://10.0.0.236/trunk@18598 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 09:29:54 +00:00
rpotts%netscape.com
8f0d397a2d The AttributeChanged(...) method of all form controls now call their base class AttributeChanged() method. Also implemented the disabled attribute in the base class...
git-svn-id: svn://10.0.0.236/trunk@18597 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 07:57:54 +00:00
mcafee%netscape.com
92f7c1bbaa Use logic in rules.mk for -DWIDGET_DLL and -DGFXWIN_DLL defines; nuked unnecessary INCLUDES addition; renamed nsUnixMain.cpp to nsMotifMain.cpp to be consistant with the Gtk naming here.
git-svn-id: svn://10.0.0.236/trunk@18596 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 07:48:13 +00:00
rpotts%netscape.com
3ef498ecfb Added some more LINCS after the big OJI checkin...
git-svn-id: svn://10.0.0.236/trunk@18595 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 07:46:51 +00:00
rpotts%netscape.com
ede3b2feb0 Fixed up NSGetFactory(...) after the big service manager checkin...
git-svn-id: svn://10.0.0.236/trunk@18594 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 07:44:02 +00:00
mcafee%netscape.com
21951bcff7 Renaming to nsMotifMain.cpp to be consistant with nsGTKMain.cpp
git-svn-id: svn://10.0.0.236/trunk@18593 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 07:40:57 +00:00
rickg%netscape.com
6239093dc6 more incremental improvements
git-svn-id: svn://10.0.0.236/trunk@18592 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 07:36:27 +00:00
mcafee%netscape.com
aad69207fd Moving nsUnixMain.cpp to nsMotifMain.cpp to be consistant with nsGTKMain.cpp, unix is ambiguous and might be misleading
git-svn-id: svn://10.0.0.236/trunk@18591 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 07:31:44 +00:00
gagan%netscape.com
ab193e013b Fix for 2107.
git-svn-id: svn://10.0.0.236/trunk@18590 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 07:23:51 +00:00
waterson%netscape.com
00c1047430 Moved XPCOM to in front of LiveConnect to fixed build bustage.
git-svn-id: svn://10.0.0.236/trunk@18589 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 07:02:51 +00:00
troy%netscape.com
e23285c5da Fixed a problem in ConstructFrameByTag() where absolutely positioned elements
weren't handled properly


git-svn-id: svn://10.0.0.236/trunk@18588 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 06:00:30 +00:00
troy%netscape.com
99f8cc5c71 Fixed some problem in ConstructFrameByDisplayType() where in now cases
(e.g. floaters and relatively positioned blocks) the newly constructed
frame wasn't getting added to aFrameItems


git-svn-id: svn://10.0.0.236/trunk@18587 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 05:46:04 +00:00
waterson%netscape.com
35841c5590 Fixed bug where random properties on the root content node were coming up as bogus columns.
git-svn-id: svn://10.0.0.236/trunk@18586 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 05:30:24 +00:00
wtc%netscape.com
f2c3098f2c Dealt with the definitions of the obsolete integer types that
conflict with the typedefs in BeOS's <support/SupportDefs.h>.
(Acknowledgment: Matthew Zahorik <maz@albany.net>)


git-svn-id: svn://10.0.0.236/trunk@18585 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 05:23:03 +00:00
ramiro%netscape.com
2370b023c9 Ignore generated files.
git-svn-id: svn://10.0.0.236/trunk@18584 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 05:07:03 +00:00
troy%netscape.com
44300b03b8 Fixed a problem with placeholder frame's clearing the child list and
causing the previous frames to disappear


git-svn-id: svn://10.0.0.236/trunk@18583 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 05:05:19 +00:00
bienvenu%netscape.com
62ed743f3e initial entry into cvs of news and mail db subclasses
git-svn-id: svn://10.0.0.236/trunk@18582 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 04:50:54 +00:00
ramiro%netscape.com
8f2990b857 Ignore generated files.
git-svn-id: svn://10.0.0.236/trunk@18581 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 04:46:37 +00:00
alecf%netscape.com
eabd0bfa79 reflect Is -> Get getter stuff from XPIDL compiler change
git-svn-id: svn://10.0.0.236/trunk@18580 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 04:30:10 +00:00
alecf%netscape.com
50abd3de2a fix an api change
git-svn-id: svn://10.0.0.236/trunk@18579 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 04:15:20 +00:00
alecf%netscape.com
ee8f616d02 fix a few more functions to bring this up to match the IDL
git-svn-id: svn://10.0.0.236/trunk@18578 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 04:14:57 +00:00
alecf%netscape.com
38f75cbfce fix some warnings, etc
git-svn-id: svn://10.0.0.236/trunk@18577 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 04:14:30 +00:00
alecf%netscape.com
cec8a9a572 add new function so nsNNTPHost can compile
git-svn-id: svn://10.0.0.236/trunk@18576 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 04:12:46 +00:00
alecf%netscape.com
82c431066f remove pane-specific AddSubscribedNewsgroup for now, and rename function
git-svn-id: svn://10.0.0.236/trunk@18575 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 04:12:10 +00:00
waterson%netscape.com
98cfa2b5da Fixed capitalization error.
git-svn-id: svn://10.0.0.236/trunk@18573 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 04:03:59 +00:00
alecf%netscape.com
2f6556e311 add ignore files
git-svn-id: svn://10.0.0.236/trunk@18572 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 03:50:34 +00:00
mcafee%netscape.com
d5d68ac980 Making this test build on Solaris
git-svn-id: svn://10.0.0.236/trunk@18571 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 03:19:50 +00:00
rickg%netscape.com
7b84baad9b fix build crash
git-svn-id: svn://10.0.0.236/trunk@18570 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 03:02:29 +00:00
rickg%netscape.com
70609b39ee fix build crash
git-svn-id: svn://10.0.0.236/trunk@18569 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 02:59:09 +00:00
mcafee%netscape.com
c9f16df0cd Making tests build on Solaris
git-svn-id: svn://10.0.0.236/trunk@18568 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 02:51:10 +00:00
alecf%netscape.com
8cd44bae4a do lots of implementation of nsINNTPHost interface so that this class is instantiable.
git-svn-id: svn://10.0.0.236/trunk@18567 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 02:17:07 +00:00
alecf%netscape.com
a4d377fd96 nsNNTPArticleList should be implementing the right interface
and implementing nsISupports


git-svn-id: svn://10.0.0.236/trunk@18566 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 02:15:59 +00:00
alecf%netscape.com
7a384da5bf fix return types
git-svn-id: svn://10.0.0.236/trunk@18565 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 02:14:12 +00:00
wtc%netscape.com
7761ce2d75 Merged first batch of BeOS port patches contributed by
Matthew Zahorik <maz@albany.net>.


git-svn-id: svn://10.0.0.236/trunk@18564 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 01:56:55 +00:00
troy%netscape.com
ca757713fa Removed "tab" chars
git-svn-id: svn://10.0.0.236/trunk@18563 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 01:47:01 +00:00
rickg%netscape.com
0ee8c3c05f missed this API change
git-svn-id: svn://10.0.0.236/trunk@18562 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 01:45:40 +00:00
beard%netscape.com
bf04f97fec Added nsElementTable.cpp for rickg.
git-svn-id: svn://10.0.0.236/trunk@18561 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 01:41:32 +00:00
troy%netscape.com
6ecb547128 Hooked up print-preview to work again
git-svn-id: svn://10.0.0.236/trunk@18560 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 01:39:08 +00:00
shaver%netscape.com
4764e3bd54 fixed fencepost in XPT_DoHeader, along with more error-checking
git-svn-id: svn://10.0.0.236/trunk@18559 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 01:34:21 +00:00
rickg%netscape.com
ff454b59ec made javascript happier
git-svn-id: svn://10.0.0.236/trunk@18558 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 01:25:37 +00:00
waterson%netscape.com
5a9f7dd463 Added code to spit out style sheet and named data source info. Fixed some bugs with references to internal anonymous resources.
git-svn-id: svn://10.0.0.236/trunk@18557 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 01:24:34 +00:00
rickg%netscape.com
20a3af2667 fixed a wad of parser bugs
git-svn-id: svn://10.0.0.236/trunk@18556 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 01:24:31 +00:00
waterson%netscape.com
fb766d5316 Altered anonymous resources to be produced with a hash mark, so they look more like anchors.
git-svn-id: svn://10.0.0.236/trunk@18555 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 01:23:55 +00:00
terry%netscape.com
aca4488af6 Added MailNews project.
git-svn-id: svn://10.0.0.236/trunk@18554 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 01:22:56 +00:00
waterson%netscape.com
14cf8d9163 Fixed bug in arcs-out cursor.
git-svn-id: svn://10.0.0.236/trunk@18553 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 01:22:40 +00:00
waterson%netscape.com
29fafe3a49 Changes for new service manager stuff.
git-svn-id: svn://10.0.0.236/trunk@18552 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 01:21:25 +00:00
hyatt%netscape.com
33451dc445 Adding support for tree indentation. nsTreeIndentation.cpp
git-svn-id: svn://10.0.0.236/trunk@18551 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 01:20:28 +00:00
beard%netscape.com
dd6cebf197 Added LiveConnect to build and MANIFEST processing.
git-svn-id: svn://10.0.0.236/trunk@18550 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 01:14:00 +00:00
hyatt%netscape.com
83b6123fe6 Added support for tree indentation.
git-svn-id: svn://10.0.0.236/trunk@18549 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 01:12:51 +00:00
petitta%netscape.com
c6a1e8d864 Updated to 1.0.3
git-svn-id: svn://10.0.0.236/trunk@18548 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 01:09:50 +00:00
sfraser%netscape.com
0303ea33b9 Add an optimization in the large heap allocators which keeps track of the largest contiguous free block in each chunk.
git-svn-id: svn://10.0.0.236/trunk@18547 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 01:08:54 +00:00
mjudge%netscape.com
8df9a54c9b oops ifdef 0 is bad should be if 0
git-svn-id: svn://10.0.0.236/trunk@18545 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 01:01:56 +00:00
bienvenu%netscape.com
fd10199de6 add MessageHdrStruct and db cache apis
git-svn-id: svn://10.0.0.236/trunk@18544 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 00:54:09 +00:00
bienvenu%netscape.com
2db1bb7d5d initial entry of types used throughout mailnews backend
git-svn-id: svn://10.0.0.236/trunk@18543 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 00:52:54 +00:00
mjudge%netscape.com
8856b10b58 turning off printf debug statements in debug to speed up resizing
git-svn-id: svn://10.0.0.236/trunk@18542 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 00:40:39 +00:00
buster%netscape.com
c4f9290ed2 checked in wrong version of editor previously. This is the right version.
git-svn-id: svn://10.0.0.236/trunk@18541 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 00:38:34 +00:00
buster%netscape.com
817b2a47d9 DeleteSelection now walks the content tree, so it can handle delete at the
end of a node and backspace at the beginning of a node


git-svn-id: svn://10.0.0.236/trunk@18540 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 00:37:42 +00:00
troy%netscape.com
d0406126ba Changed scrolling so it happens on the viewport instead of the HTML
element


git-svn-id: svn://10.0.0.236/trunk@18539 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 00:05:21 +00:00
terry%netscape.com
7d54925600 Added CCK project.
git-svn-id: svn://10.0.0.236/trunk@18538 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 00:04:33 +00:00
guha%netscape.com
1658de670e fix template
git-svn-id: svn://10.0.0.236/trunk@18537 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-25 23:57:52 +00:00
mjudge%netscape.com
cee15cff25 fixing build bustage for someone
git-svn-id: svn://10.0.0.236/trunk@18536 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-25 23:55:59 +00:00
guha%netscape.com
45bd69beef fix template
git-svn-id: svn://10.0.0.236/trunk@18535 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-25 23:55:05 +00:00
wtc%netscape.com
568e392af7 Bumped revision to 3.1.
git-svn-id: svn://10.0.0.236/trunk@18534 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-25 23:52:26 +00:00
wtc%netscape.com
5e0ff19bc7 Added BeOS files contributed by Matthew Zahorik <maz@albany.net>.
git-svn-id: svn://10.0.0.236/trunk@18533 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-25 23:52:00 +00:00
alecf%netscape.com
20cff3e357 nsNNTPHost finally compiles. Adding it to the build system
git-svn-id: svn://10.0.0.236/trunk@18532 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-25 23:45:57 +00:00
wtc%netscape.com
4128e5d1a8 Bumped the revision to 3.1.
git-svn-id: svn://10.0.0.236/trunk@18531 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-25 23:45:48 +00:00
alecf%netscape.com
3d609968e8 newsgroups keep track of thier pretty names
newsgroups don't keep track of flags (that's a job for nsIMsgFolder)


git-svn-id: svn://10.0.0.236/trunk@18530 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-25 23:45:29 +00:00
wtc%netscape.com
18ddca2674 Added new BeOS files contributed by Matthew Zahorik <maz@albany.net>.
git-svn-id: svn://10.0.0.236/trunk@18529 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-25 23:41:16 +00:00
michaelp%netscape.com
db1f2bd88d fix build bustage.
git-svn-id: svn://10.0.0.236/trunk@18528 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-25 23:40:01 +00:00
alecf%netscape.com
e11912d34b rename Profile->Virtual and change API slightly to be more COM like
git-svn-id: svn://10.0.0.236/trunk@18527 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-25 23:38:53 +00:00
alecf%netscape.com
9438e2b421 more changes to nsIMsgFolder for functions we need to have once the real
nsIMsgFolder arrives


git-svn-id: svn://10.0.0.236/trunk@18526 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-25 23:38:09 +00:00
mjudge%netscape.com
7073ad3df7 changing paintunicodestring and paintasciistring to map from content coordinates to painttext coordinatres. in get position, i am now mapping from paint coordinates to content coordinates. also, the frames themselves now set the focus and anchor for a nsIFocusTracker passed in object.
git-svn-id: svn://10.0.0.236/trunk@18525 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-25 23:29:53 +00:00
mjudge%netscape.com
4bcd16ae84 keeping the selection code pure by not knowing anything about the graphic representation of the selection. just offset to offset. adding code to reselect the anchor and focus frame in the nsIFocusTracker by passing it to the nsIFrame setselectedcontent method.
git-svn-id: svn://10.0.0.236/trunk@18524 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-25 23:28:59 +00:00
mjudge%netscape.com
44f08a72d5 adding parameters to setselectedcontent. This will keep down overhead of the nsIFrame implementation and still not allow outsiders to talk to their presshell. so please forgive this grown method. this extra parameter will maintain the anchor and focus point after reflow
git-svn-id: svn://10.0.0.236/trunk@18523 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-25 23:28:23 +00:00
terry%netscape.com
6e5e8910da Check for undefined var.
git-svn-id: svn://10.0.0.236/trunk@18522 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-25 23:26:28 +00:00
rhp%netscape.com
97740bb7bb Continuing cleanup of calls no longer needed.
git-svn-id: svn://10.0.0.236/trunk@18521 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-25 23:21:14 +00:00
rhp%netscape.com
886616001a Add HTML tags back into code after a bug was fixed in raptor.
git-svn-id: svn://10.0.0.236/trunk@18520 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-25 23:19:24 +00:00
guha%netscape.com
8a77d70353 slightly faster parser
git-svn-id: svn://10.0.0.236/trunk@18519 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-25 23:16:04 +00:00
mscott%netscape.com
9952f7bf55 Include netutils.h before including mktcp.h for Linux build.
git-svn-id: svn://10.0.0.236/trunk@18518 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-25 23:08:27 +00:00
hyatt%netscape.com
34a5cfcdd8 Tweaks to enable XUL frame construction to prevent the construction based on
display type.


git-svn-id: svn://10.0.0.236/trunk@18517 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-25 23:07:17 +00:00
michaelp%netscape.com
8f2fccaa79 apparently this needs to be exported too...
git-svn-id: svn://10.0.0.236/trunk@18516 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-25 23:06:55 +00:00
mscott%netscape.com
69bca89f3e Correct spelling error in libary name for sockstub...
git-svn-id: svn://10.0.0.236/trunk@18515 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-25 22:31:28 +00:00
rhp%netscape.com
2252d04796 Changes for HTML generation
git-svn-id: svn://10.0.0.236/trunk@18514 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-25 22:31:18 +00:00
rhp%netscape.com
e21485acfe Changes for html generation
git-svn-id: svn://10.0.0.236/trunk@18513 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-25 22:29:03 +00:00
michaelp%netscape.com
3a8fb707b7 removed gfx/src from list of MANIFESTs to process.
git-svn-id: svn://10.0.0.236/trunk@18512 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-25 22:17:26 +00:00
vidur%netscape.com
d804a8f7f9 Implemented nsIDOMElement::Normalize
git-svn-id: svn://10.0.0.236/trunk@18511 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-25 22:17:15 +00:00
michaelp%netscape.com
25094ac7f0 moving headers from src to public. added support for dib sections to windows
drawing surface. WIP on making blender work with arbitrary pixel organizations.


git-svn-id: svn://10.0.0.236/trunk@18510 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-25 22:16:47 +00:00
kmcclusk%netscape.com
509a2f333f Added SetProperty/GetProperty methods to nsIFormControlFrame. Added stub
implementations for all classes that derive from nsIFormControlFrame


git-svn-id: svn://10.0.0.236/trunk@18509 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-25 22:16:27 +00:00
hyatt%netscape.com
5031243e51 Altered the way frame construction works. ConstructFrame can now potentially
build up a list of sibling frame subtrees.  This allows for the creation of
multiple frames from a single content node, and for easy merging of two different
lists of subtrees during frame construction.


git-svn-id: svn://10.0.0.236/trunk@18508 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-25 22:13:03 +00:00
akkana%netscape.com
006f55116c Pav's changes only work if you also have his fixes to gtk.
Since those aren't available yet, I've reverted his changes to make
selection and editor typein work.
When the new gtk is available, search for HAVE_GTK_BETTER_THAN_1_1_13
to see how to turn his changes back on (they are very worthwhile, we
just can't afford a regression while we wait for the new gtk).


git-svn-id: svn://10.0.0.236/trunk@18507 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-25 22:10:48 +00:00
mscott%netscape.com
b932a218b9 Test app for verifying the socket implmeentation of nsITransport. (not currently being built by any of the public makefiles)
git-svn-id: svn://10.0.0.236/trunk@18506 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-25 19:42:32 +00:00
shaver%netscape.com
d08f3acd1b Fixed IID copying (duh -- all the bytes matter).
NewString and NewStringZ APIs.
No more bit-fields (nod to jband and fur, thanks).
Cleaned up Annotation structures.
On-disk offsets are 1-based.
Write annotations to disk, and account for them in header size, etc.
Fix sundry cursor-vs-&cursor bugs and don't-allocate-on-decode bugs.
Write MethodDescriptors and InterfaceDescriptors to disk!
Executive Summary: can now write very simple .xpt files!


git-svn-id: svn://10.0.0.236/trunk@18505 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-25 19:36:48 +00:00
pinkerton%netscape.com
658c86f7a4 fixing a leak in GetChildren() and cleaning it up to use nsComPtr when creating a new enumerator.
git-svn-id: svn://10.0.0.236/trunk@18504 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-25 19:18:43 +00:00
mscott%netscape.com
73cbb5ae24 socket implementation of the transport interface. (not currently being built by checked in makefiles)
git-svn-id: svn://10.0.0.236/trunk@18503 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-25 19:10:04 +00:00
ramiro%netscape.com
62b2548020 Added that lovely alternate/default style selector to the menu (it works great
on Linux), and fixed a typo in the compatibility menu. Just little stuff, as
usual...
Thanks to Steve Morrison <smorrison@gte.com> for providing the fix.


git-svn-id: svn://10.0.0.236/trunk@18502 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-25 18:54:10 +00:00
mscott%netscape.com
f4c3d83059 Build the sockstub directory.
git-svn-id: svn://10.0.0.236/trunk@18501 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-25 18:24:58 +00:00
briano%netscape.com
a961931540 Automated update
git-svn-id: svn://10.0.0.236/trunk@18500 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-25 18:00:35 +00:00
mscott%netscape.com
3ceba2a26e Build network/protocol/sockstub directory.
git-svn-id: svn://10.0.0.236/trunk@18499 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-25 17:51:52 +00:00
mscott%netscape.com
2ceefe58b9 Build sockstub directory
git-svn-id: svn://10.0.0.236/trunk@18498 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-25 17:51:06 +00:00
mscott%netscape.com
77868dc446 Makefile for the sockstub protocol directory..
git-svn-id: svn://10.0.0.236/trunk@18497 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-25 17:50:41 +00:00
mscott%netscape.com
aa60cc320b Build the sockstub directory....
git-svn-id: svn://10.0.0.236/trunk@18496 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-25 17:48:44 +00:00
pinkerton%netscape.com
8cad597409 Fix bug 2535 (memory leaks) with nsCOMPtr
git-svn-id: svn://10.0.0.236/trunk@18495 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-25 17:45:04 +00:00
pinkerton%netscape.com
148b605fbb Fix bug 2535 (memory leak) with nsCOMPtr
git-svn-id: svn://10.0.0.236/trunk@18494 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-25 17:44:21 +00:00
ftang%netscape.com
48e0a7b1ab change nsCharSetID into nsString type
git-svn-id: svn://10.0.0.236/trunk@18491 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-25 16:05:04 +00:00
rhp%netscape.com
321a2a9f44 Handler for calendar info.
git-svn-id: svn://10.0.0.236/trunk@18490 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-25 14:27:33 +00:00
rhp%netscape.com
7e2cd3bad4 Updates for external vcard handler.
git-svn-id: svn://10.0.0.236/trunk@18489 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-25 14:27:05 +00:00
rhp%netscape.com
d9c3a6a581 Changes for external content type handlers.
git-svn-id: svn://10.0.0.236/trunk@18488 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-25 13:40:08 +00:00
rhp%netscape.com
1e570382d7 Removing files from mime src.
git-svn-id: svn://10.0.0.236/trunk@18487 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-25 13:34:07 +00:00
rhp%netscape.com
b0e0b9e79d Removing files.
git-svn-id: svn://10.0.0.236/trunk@18486 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-25 13:33:21 +00:00
rhp%netscape.com
706dcd2d19 Changes for external content type handlers.
git-svn-id: svn://10.0.0.236/trunk@18485 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-25 13:29:16 +00:00
amusil%netscape.com
13e555c340 Fixing build bustage
git-svn-id: svn://10.0.0.236/trunk@18484 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-25 12:18:51 +00:00
amusil%netscape.com
629296566d Fix Mac build bustage
git-svn-id: svn://10.0.0.236/trunk@18483 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-25 11:39:48 +00:00
grail%cafebabe.org
8f044d3596 Fixed spacing problem between icon in toolbar for Composition window.
git-svn-id: svn://10.0.0.236/trunk@18482 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-25 11:29:40 +00:00
amusil%netscape.com
1a6a7a52aa New Service Manager changes
git-svn-id: svn://10.0.0.236/trunk@18481 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-25 11:08:18 +00:00
amusil%netscape.com
46e3e5e60a Changed function name
git-svn-id: svn://10.0.0.236/trunk@18480 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-25 10:57:57 +00:00
amusil%netscape.com
5868424a36 Added support for new service manager
git-svn-id: svn://10.0.0.236/trunk@18479 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-25 10:55:35 +00:00
amusil%netscape.com
5d0d9931c7 new stream files
git-svn-id: svn://10.0.0.236/trunk@18478 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-25 10:36:43 +00:00
tague%netscape.com
a7951cb1e3 Fixed build bustage. Added nsIPluginStreamInfo.h to export list.
git-svn-id: svn://10.0.0.236/trunk@18477 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-25 10:26:43 +00:00
amusil%netscape.com
2e6673e09c new stream files
git-svn-id: svn://10.0.0.236/trunk@18476 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-25 10:17:46 +00:00
amusil%netscape.com
31299a6bfd update for new stream
git-svn-id: svn://10.0.0.236/trunk@18475 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-25 10:11:51 +00:00
amusil%netscape.com
5259c020ba *** empty log message ***
git-svn-id: svn://10.0.0.236/trunk@18474 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-25 10:10:29 +00:00
amusil%netscape.com
3386ab9d93 New Stream API update
git-svn-id: svn://10.0.0.236/trunk@18473 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-25 09:30:04 +00:00
sudu%netscape.com
135544df29 Files Sudu's script failed to check in
git-svn-id: svn://10.0.0.236/trunk@18472 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-25 09:00:42 +00:00
rpotts%netscape.com
259184bc0e Made sure all interface methods were defined with NS_IMETHOD... Windows cares about this :-(
git-svn-id: svn://10.0.0.236/trunk@18471 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-25 08:34:56 +00:00
rpotts%netscape.com
e02d0064a8 Added nsCommandLineArgs to the build...
git-svn-id: svn://10.0.0.236/trunk@18470 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-25 08:34:02 +00:00
rpotts%netscape.com
f516f061bf Added nsICmdLineService.h to the exports list...
git-svn-id: svn://10.0.0.236/trunk@18469 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-25 08:24:26 +00:00
sudu%netscape.com
0f4d19b4b7 added nsIPluginStreamInfo.h to export
git-svn-id: svn://10.0.0.236/trunk@18468 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-25 08:14:40 +00:00
sudu%netscape.com
e74bb46494 New steam API header file
git-svn-id: svn://10.0.0.236/trunk@18467 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-25 08:13:10 +00:00
amusil%netscape.com
b700b8dbb9 OJI MozClassic to raptor merge
git-svn-id: svn://10.0.0.236/trunk@18466 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-25 08:05:06 +00:00
sudu%netscape.com
d3239a027a OJI MozClassic to raptor merge
git-svn-id: svn://10.0.0.236/trunk@18465 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-25 08:05:00 +00:00
pavlov%pavlov.net
1174d93a4d only redraw the stuff that needs to be redrawn, not the entire widget.
git-svn-id: svn://10.0.0.236/trunk@18464 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-25 02:21:20 +00:00
mjudge%netscape.com
c01fb9bfc1 adding same code to paintAscii as i did to paintUnicode
git-svn-id: svn://10.0.0.236/trunk@18463 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-25 01:53:40 +00:00
mjudge%netscape.com
58d3c27e3c ok I am changing nsPresShell to "do the right thing". The virtual methods to support nsIFocusTracker needed to use the MACROS the same as the rest of the methods. I also moved the growing inline methods to their own method declarations. pres shell also needs to send itself as a focus tracker to "reset selection" to allow a callback to reset the frames that will be the focus and anchor frames for the future. getting frames from content is easy, getting the exact frame with an offset as well is difficult. nsTextFrame does some funny things with whitespaces that was throwing off the selection code. one minute the beginning of a word is offset 1 then it grows to 2 if the whitespace on the previous line wraps. I also put limits on the selection drawing. the drawing was happening after reflow, but before reset selection. this made the selection drawing extend beyond the legal limits of the "textlength". P.S. since the paint unicode and paint ascii are so similar, is it better to make a helper func to do the common things? or maybe make another method just to save namespace?
git-svn-id: svn://10.0.0.236/trunk@18462 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-25 01:48:01 +00:00
mjudge%netscape.com
2cf43972e0 Focus tracker needs to send the tracker to the implementation of selection so that it can update the tracker as to which frame(s) should be considered the focus frames ect. This is not yet working fully. Everything I am checking in will stay, I simply have a decision to make as to exactly what to do next. RangeList also had some modifications to better selection
git-svn-id: svn://10.0.0.236/trunk@18461 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-25 01:42:34 +00:00
bienvenu%netscape.com
3cfade4c64 initial entry into cvs of msgdb api
git-svn-id: svn://10.0.0.236/trunk@18460 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-25 01:36:27 +00:00
bienvenu%netscape.com
6d5093b405 initial entry into cvs of msgdb impl
git-svn-id: svn://10.0.0.236/trunk@18459 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-25 01:31:40 +00:00
pavlov%pavlov.net
2cfa0d9b30 fix button pressing
git-svn-id: svn://10.0.0.236/trunk@18458 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-25 00:51:21 +00:00
pierre%netscape.com
217629589e added nsViewportFrame.cpp for Troy
git-svn-id: svn://10.0.0.236/trunk@18457 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-24 22:01:58 +00:00
troy%netscape.com
b276e5bb3a Initial check-in
git-svn-id: svn://10.0.0.236/trunk@18456 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-24 20:36:46 +00:00
grail%cafebabe.org
7b69d0f19b Minor "bug" in the xml file. Line with "\"\"". Ick.
git-svn-id: svn://10.0.0.236/trunk@18455 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-24 12:03:05 +00:00
grail%cafebabe.org
56e346a7d5 Moved to a recursive processing model so you don't have to mess with a
hashtable of parent widgets anymore.


git-svn-id: svn://10.0.0.236/trunk@18454 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-24 12:02:31 +00:00
pavlov%pavlov.net
bf1e7cbfda compute the scrollbar width/height instead of using a constant number
git-svn-id: svn://10.0.0.236/trunk@18453 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-24 07:53:30 +00:00
pavlov%pavlov.net
fbe22a1bf9 use some funky calculations to figure out the underline offset and the
underlining size


git-svn-id: svn://10.0.0.236/trunk@18452 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-24 06:55:17 +00:00
saari%netscape.com
d07fc84c6f Needed to add nsCommandLineService to AppShell.mcp to define NS_NewCmdLineService(), lest a build failure.
git-svn-id: svn://10.0.0.236/trunk@18451 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-24 00:16:56 +00:00
saari%netscape.com
301348a97e Fixing mac build. Tinderbox is lying.
Misnamed NS_NewCommandLineServiceFactory
renamed to 
NS_NewCmdLineServiceFactory

\Index: nsICmdLineService.h
===================================================================
RCS file: /m/pub/mozilla/xpfe/appshell/public/nsICmdLineService.h,v
retrieving revision 1.1
diff -r1.1 nsICmdLineService.h
54c54
< NS_NewCommandLineServiceFactory(nsIFactory** aFactory);
---
> NS_NewCmdLineServiceFactory(nsIFactory** aFactory);


git-svn-id: svn://10.0.0.236/trunk@18450 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-24 00:00:38 +00:00
mjudge%netscape.com
e5e6535f63 This checkin will stop the double addref to the incomming ranges. The problem was that the changing of the old array of voids and the nsVoidPtr array do NOT addref whereas the nsISupportsArray DOES! I suspected as much. I have removed the offending code and I believe this should make selection much cleaner.
git-svn-id: svn://10.0.0.236/trunk@18449 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-23 20:43:13 +00:00
peterl%netscape.com
633da8094f fixed a leak of an input stream
git-svn-id: svn://10.0.0.236/trunk@18448 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-23 19:28:09 +00:00
mcafee%netscape.com
88a347ab56 Switching to SIMPLE_PROGRAMS
git-svn-id: svn://10.0.0.236/trunk@18447 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-23 12:21:27 +00:00
mcafee%netscape.com
d87afbf15b Need NSPR to link
git-svn-id: svn://10.0.0.236/trunk@18446 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-23 12:20:31 +00:00
mcafee%netscape.com
30c7cb2930 Forgot link line rule
git-svn-id: svn://10.0.0.236/trunk@18445 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-23 12:20:00 +00:00
pavlov%pavlov.net
b732addd9c we require gtk 1.1.13, remove #ifdef's. clean up key press handling
git-svn-id: svn://10.0.0.236/trunk@18444 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-23 12:03:14 +00:00
mcafee%netscape.com
642a555baf Trying the 3.35 commit again (SIMPLE_PROGRAMS)
git-svn-id: svn://10.0.0.236/trunk@18443 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-23 11:41:15 +00:00
pavlov%pavlov.net
9e1b689b9f fix text widgets getting focus.
git-svn-id: svn://10.0.0.236/trunk@18442 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-23 11:26:09 +00:00
mcafee%netscape.com
60c3665391 Backing out until tree builds Ok
git-svn-id: svn://10.0.0.236/trunk@18441 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-23 10:14:58 +00:00
mcafee%netscape.com
3bd409654c Pushing the 1:1 source-file-to-binary mapping mechanism into rules.mk so we can share this with other directories. Look for the SIMPLE_PROGRAMS checkin into config/rules.mk
git-svn-id: svn://10.0.0.236/trunk@18440 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-23 09:42:33 +00:00
mcafee%netscape.com
0ef9e9e297 Adding support for 1:1 mapping for source files & binaries; this lets 2 or more binaries coexist in a single directory. Usage: <SIMPLE_PROGRAMS = Foo Bar> very similar to the way PROGRAM works.
git-svn-id: svn://10.0.0.236/trunk@18439 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-23 09:36:40 +00:00
briano%netscape.com
b68f174e2d Automated update
git-svn-id: svn://10.0.0.236/trunk@18438 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-23 09:00:36 +00:00
ramiro%netscape.com
c602963710 Add a -DMOZ_TOOLKIT=foo flag that makes it easy to distinguish toolkits in
code.


git-svn-id: svn://10.0.0.236/trunk@18437 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-23 08:57:10 +00:00
braddr%puremagic.com
a28d35c3d8 solaris 2.6 native makedepend can't handle lines over 4000 bytes, shorten this down to fit.
git-svn-id: svn://10.0.0.236/trunk@18436 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-23 08:24:39 +00:00
peterl%netscape.com
2f236a6ccc added style menu
git-svn-id: svn://10.0.0.236/trunk@18435 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-23 07:10:37 +00:00
peterl%netscape.com
05710ba81b sync to style set api change
git-svn-id: svn://10.0.0.236/trunk@18434 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-23 07:09:27 +00:00
peterl%netscape.com
4671b6225b cleaned up style sheet ordering
git-svn-id: svn://10.0.0.236/trunk@18433 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-23 07:09:06 +00:00
peterl%netscape.com
2d1ae38e3d allow reconstruct frames to work on all documents
git-svn-id: svn://10.0.0.236/trunk@18432 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-23 07:08:38 +00:00
peterl%netscape.com
8d45726e09 made media case insensitive (for now)
git-svn-id: svn://10.0.0.236/trunk@18431 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-23 07:08:11 +00:00
peterl%netscape.com
41850df73f added insert style sheet
git-svn-id: svn://10.0.0.236/trunk@18430 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-23 07:07:32 +00:00
peterl%netscape.com
77f64014a3 cleaned up style sheet ordering
support for selecting alternate style sheets


git-svn-id: svn://10.0.0.236/trunk@18429 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-23 07:07:09 +00:00
peterl%netscape.com
b02405c8c0 added meta tag http-equiv support
fixed selection of default style sheets
made style sheet loading not block parser
added support for several http headers


git-svn-id: svn://10.0.0.236/trunk@18428 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-23 07:05:49 +00:00
peterl%netscape.com
e67550003e only parse style attributes if doc style language is text/css
git-svn-id: svn://10.0.0.236/trunk@18427 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-23 07:04:28 +00:00
peterl%netscape.com
dd89cd1401 added helper methods for selecting & querying alternate style sheets
git-svn-id: svn://10.0.0.236/trunk@18426 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-23 07:03:46 +00:00
peterl%netscape.com
64dba30423 added HTTP header atoms
git-svn-id: svn://10.0.0.236/trunk@18425 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-23 07:02:56 +00:00
peterl%netscape.com
3ed30608b4 fixed case of media atoms
git-svn-id: svn://10.0.0.236/trunk@18424 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-23 07:02:10 +00:00
peterl%netscape.com
9a51691424 set now manages order of doc style sheets
git-svn-id: svn://10.0.0.236/trunk@18423 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-23 07:01:57 +00:00
peterl%netscape.com
d1a8b01386 added header data accessors
cleaned up style sheet ordering


git-svn-id: svn://10.0.0.236/trunk@18422 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-23 07:01:40 +00:00
peterl%netscape.com
9713cc8a09 simplified setting doc style sheets (set now manages ordering)
git-svn-id: svn://10.0.0.236/trunk@18421 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-23 07:01:02 +00:00
peterl%netscape.com
c2d5d9cb79 added accessors to get & set alternate style sheets
git-svn-id: svn://10.0.0.236/trunk@18420 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-23 07:00:39 +00:00
peterl%netscape.com
edced705c2 added header data accesors
git-svn-id: svn://10.0.0.236/trunk@18419 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-23 07:00:10 +00:00
peterl%netscape.com
d86add4d82 sync to nsIDocument API changes
git-svn-id: svn://10.0.0.236/trunk@18418 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-23 06:59:35 +00:00
peterl%netscape.com
b30e13c978 removed nspr from the pull_seamonkey target
git-svn-id: svn://10.0.0.236/trunk@18417 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-23 06:59:09 +00:00
peterl%netscape.com
4c6a934d77 added nsStringArray
git-svn-id: svn://10.0.0.236/trunk@18416 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-23 06:58:34 +00:00
gagan%netscape.com
e65729cc50 See diffs. Thanks wtc.
git-svn-id: svn://10.0.0.236/trunk@18415 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-23 06:15:22 +00:00
troy%netscape.com
953e1a3dbc Part of the fix for bug #2502. For the time being mark relative/absolute positioned
views as having transparent content


git-svn-id: svn://10.0.0.236/trunk@18414 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-23 05:47:55 +00:00
troy%netscape.com
94c5f449dd Added check for unconstrained width/height of the containing block when
computing 'offsets'


git-svn-id: svn://10.0.0.236/trunk@18413 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-23 04:49:15 +00:00
troy%netscape.com
e2ce091433 Fixed a memory leak of the web shell in LoadURL()
git-svn-id: svn://10.0.0.236/trunk@18412 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-23 04:16:18 +00:00
pavlov%pavlov.net
11541f543f clean up some font code
git-svn-id: svn://10.0.0.236/trunk@18411 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-23 03:29:50 +00:00
troy%netscape.com
01fc8b39f2 Fixed some assertions that didn't compile...
git-svn-id: svn://10.0.0.236/trunk@18410 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-23 03:19:38 +00:00
mscott%netscape.com
ce2f1c7917 Export nsITransport.h
git-svn-id: svn://10.0.0.236/trunk@18409 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-23 03:05:42 +00:00
mscott%netscape.com
0830d10110 Add sockstub to list of url types.
git-svn-id: svn://10.0.0.236/trunk@18408 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-23 02:56:30 +00:00
alecf%netscape.com
1dcbc8af25 add dummy nsIMsgFolder so that other things can compile.
putterman will check a real interface


git-svn-id: svn://10.0.0.236/trunk@18407 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-23 02:48:58 +00:00
alecf%netscape.com
2424f94ec5 get rid of all references to MSG_FolderInfo (should be nsIMsgFolder)
git-svn-id: svn://10.0.0.236/trunk@18406 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-23 02:46:15 +00:00
alecf%netscape.com
e61703b9b8 more updates to make this thing compile!
Fix alot of the GetType() and IsCategory() routines to use QueryInterface instead.


git-svn-id: svn://10.0.0.236/trunk@18405 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-23 02:45:28 +00:00
alecf%netscape.com
1e04b4539c add new nsINNTPCategoryContainer to be exported
git-svn-id: svn://10.0.0.236/trunk@18404 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-23 02:42:26 +00:00
alecf%netscape.com
6d49cd9f6d forgot to check in generated header
git-svn-id: svn://10.0.0.236/trunk@18403 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-23 02:42:05 +00:00
alecf%netscape.com
9cb38d2bda update attributes - flag is not an attribute, it's an accessor for many
different newsgroup (folder?) flags


git-svn-id: svn://10.0.0.236/trunk@18402 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-23 02:41:32 +00:00
alecf%netscape.com
691d1ed037 add new nsINNTPCategoryContainer interface
git-svn-id: svn://10.0.0.236/trunk@18401 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-23 02:40:27 +00:00
alecf%netscape.com
b23674c817 add an IID and make this derive from nsISupports
git-svn-id: svn://10.0.0.236/trunk@18400 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-23 02:39:43 +00:00
troy%netscape.com
1128cee41a Added XXX comment indicating that the #if 0 code in Init() is causing
a memory leak...


git-svn-id: svn://10.0.0.236/trunk@18399 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-23 02:38:16 +00:00
mscott%netscape.com
d9d77970dc A stub protocol used to support the new netlib <--> protocol model in the old networking world.
git-svn-id: svn://10.0.0.236/trunk@18398 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-23 02:34:01 +00:00
wtc%netscape.com
418e67a4a4 Avoid string literals that span multiple lines because some compilers
don't like line endings in string literals.


git-svn-id: svn://10.0.0.236/trunk@18397 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-23 02:04:40 +00:00
wtc%netscape.com
3682a5c58a Text after #endif should be put inside a comment.
git-svn-id: svn://10.0.0.236/trunk@18396 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-23 02:02:42 +00:00
pavlov%pavlov.net
f1d4e0ab8a animated things work, editor works, etc etc etc. be happy!
git-svn-id: svn://10.0.0.236/trunk@18395 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-23 01:58:45 +00:00
saari%netscape.com
c75d529454 Commenting out until I figure out what I horked
git-svn-id: svn://10.0.0.236/trunk@18394 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-23 01:08:17 +00:00
alecf%netscape.com
4ac8d4dbbd fix #include (unix is case sensitive)
git-svn-id: svn://10.0.0.236/trunk@18393 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-23 01:04:28 +00:00
alecf%netscape.com
3155d91aa3 forgot uuid
git-svn-id: svn://10.0.0.236/trunk@18392 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-23 01:02:16 +00:00
radha%netscape.com
d5dfa107f3 Remove that stupid printf from fe_GetConfigDir
git-svn-id: svn://10.0.0.236/trunk@18391 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-23 00:59:41 +00:00
radha%netscape.com
e116442fb0 Use the EventQueue service provider instead of manipulating directly with PLEventQueue
git-svn-id: svn://10.0.0.236/trunk@18390 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-23 00:54:43 +00:00
radha%netscape.com
8aa668599e Use the EventQueueService instead of creating the PLEventqueue directly.
Not quite sure if it works in motif.


git-svn-id: svn://10.0.0.236/trunk@18389 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-23 00:53:49 +00:00
radha%netscape.com
2bc4d3b1d0 Few debug statements added
git-svn-id: svn://10.0.0.236/trunk@18388 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-23 00:52:52 +00:00
mcafee%netscape.com
99ae4cff00 Compiler warning
git-svn-id: svn://10.0.0.236/trunk@18387 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-23 00:52:08 +00:00
radha%netscape.com
edbcac6ce6 gWebShell_UnixEventQueue is gone. Use the Event queue service instead
git-svn-id: svn://10.0.0.236/trunk@18386 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-23 00:52:01 +00:00
radha%netscape.com
f3974cee75 Compile nsEventQueueService for unix
git-svn-id: svn://10.0.0.236/trunk@18385 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-23 00:51:17 +00:00
radha%netscape.com
225f6f51be Export nsEventQueueService and bunch of other files
git-svn-id: svn://10.0.0.236/trunk@18384 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-23 00:50:55 +00:00
slamm%netscape.com
7efebe117e Make depend.mk files smaller by putting more dependencies on one line (i.e. Add a '-w' flag to makedepend).
git-svn-id: svn://10.0.0.236/trunk@18383 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-23 00:50:39 +00:00
radha%netscape.com
155a723fc9 Don't need that gWebShell_UnixEventQueue anymore. Unix uses the event queue
service just like XP_PC


git-svn-id: svn://10.0.0.236/trunk@18382 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-23 00:50:08 +00:00
saari%netscape.com
4a0954c052 Commenting out until I figure out what I horked
git-svn-id: svn://10.0.0.236/trunk@18381 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-23 00:46:57 +00:00
akkana%netscape.com
3ba704ef6d remove some verbose debugging messages
git-svn-id: svn://10.0.0.236/trunk@18380 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-23 00:38:54 +00:00
saari%netscape.com
1606aa27bf Commenting out until I figure out what I horked
git-svn-id: svn://10.0.0.236/trunk@18379 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-23 00:26:51 +00:00
troy%netscape.com
456f4bc464 Turned off debug message that was outputing to the console
git-svn-id: svn://10.0.0.236/trunk@18378 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-23 00:20:58 +00:00
vidur%netscape.com
af97890612 Implemented splitText for text nodes
git-svn-id: svn://10.0.0.236/trunk@18377 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-23 00:10:08 +00:00
ramiro%netscape.com
c4a45795d5 Ignore generated file.
git-svn-id: svn://10.0.0.236/trunk@18376 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-23 00:09:34 +00:00
ramiro%netscape.com
b21219c408 Build TestCOMPtr by default.
git-svn-id: svn://10.0.0.236/trunk@18375 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-23 00:03:44 +00:00
mcafee%netscape.com
a33b370cfb Cleaning up whitespace
git-svn-id: svn://10.0.0.236/trunk@18374 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-23 00:02:41 +00:00
akkana%netscape.com
579c399f12 2028: Get selection highlighting working on Linux
git-svn-id: svn://10.0.0.236/trunk@18373 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-23 00:00:46 +00:00
mcafee%netscape.com
1010f84a9c Missing license
git-svn-id: svn://10.0.0.236/trunk@18372 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 23:56:59 +00:00
mcafee%netscape.com
03a60460f8 Woops, forgot the license.
git-svn-id: svn://10.0.0.236/trunk@18371 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 23:54:25 +00:00
saari%netscape.com
cb9c9fb271 First Checked In.
git-svn-id: svn://10.0.0.236/trunk@18370 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 23:53:53 +00:00
despotdaemon%netscape.com
f30eb3c31d Pseudo-automatic update of changes made by terry@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@18369 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 23:41:27 +00:00
saari%netscape.com
e67ca2314a Set mMenuListener to null in constructor
git-svn-id: svn://10.0.0.236/trunk@18368 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 23:25:16 +00:00
saari%netscape.com
f8cb83a03e Added nsIMenuListener.h and made a member variable in nsBaseWidget for holding one of these.
This is for the XPToolkit menus to hook in and get notified of menu events.


git-svn-id: svn://10.0.0.236/trunk@18367 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 23:23:00 +00:00
troy%netscape.com
19c55aa5c3 Fixed ReflowTemp() so it's doing a legal incremental reflow, and changed
Reflow() so it does a minimally acceptable job of handling incremental reflow
commands...


git-svn-id: svn://10.0.0.236/trunk@18366 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 23:10:02 +00:00
troy%netscape.com
1e43a7153b Changed Reflow() to make sure we remove the reflow command for
incremental reflow commands passing through us


git-svn-id: svn://10.0.0.236/trunk@18365 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 23:08:42 +00:00
troy%netscape.com
f311f2476e Changed ContentChanged() to generate a reflow command
git-svn-id: svn://10.0.0.236/trunk@18364 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 23:07:09 +00:00
buster%netscape.com
cd2edf3e7c added some basic tree navigation methods.
implemented part of backspacing from the beginning of a text node.


git-svn-id: svn://10.0.0.236/trunk@18363 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 22:58:15 +00:00
vidur%netscape.com
ea2adbea24 Comments added to content model. Comments and text content now have a special tagname
git-svn-id: svn://10.0.0.236/trunk@18362 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 22:48:00 +00:00
harishd%netscape.com
bb9e8f162b StyleContext passed onto PaintBorder()
git-svn-id: svn://10.0.0.236/trunk@18361 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 22:38:34 +00:00
harishd%netscape.com
d04bba5e7b StyleContext passed onto PaintBorder()/PaintArrow()
git-svn-id: svn://10.0.0.236/trunk@18360 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 22:35:12 +00:00
harishd%netscape.com
81ef9c4292 StyleContext passed onto PaintArrow()
git-svn-id: svn://10.0.0.236/trunk@18359 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 22:34:28 +00:00
harishd%netscape.com
8f1b6c4b34 styleContext is passed onto PaintBorder()/PaintArrow()
git-svn-id: svn://10.0.0.236/trunk@18358 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 22:31:15 +00:00
harishd%netscape.com
3dea579ecf StyleContext info. is passed on into PaintBorder()
git-svn-id: svn://10.0.0.236/trunk@18357 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 22:30:02 +00:00
harishd%netscape.com
72a54d60f4 Stylecontext is passed to PaintBorder()
git-svn-id: svn://10.0.0.236/trunk@18356 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 22:28:12 +00:00
harishd%netscape.com
1aafb50b75 PaintBorder() method has stylecontext info.
git-svn-id: svn://10.0.0.236/trunk@18355 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 22:27:19 +00:00
harishd%netscape.com
3c5ba1d382 PaintBorder() modified to accept styleContext
git-svn-id: svn://10.0.0.236/trunk@18354 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 22:26:29 +00:00
harishd%netscape.com
e0f64c68e8 Passing styleContext info. to PaintBorder().
git-svn-id: svn://10.0.0.236/trunk@18353 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 22:25:58 +00:00
harishd%netscape.com
ac07320328 Passing stylecontext into Paintborder()
git-svn-id: svn://10.0.0.236/trunk@18352 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 22:25:00 +00:00
harishd%netscape.com
f95d3a13e2 Got stylecontext info into PaintBorder() for displaying
CSS borders.


git-svn-id: svn://10.0.0.236/trunk@18351 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 22:24:05 +00:00
radha%netscape.com
2727b67152 Use command line service to obtain URLs etc...
git-svn-id: svn://10.0.0.236/trunk@18350 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 22:22:33 +00:00
harishd%netscape.com
023152a6fa Modified the PaintBorder(), MakeBevelColor(), DrawSide(),
PaintBorderEdge() methods.


git-svn-id: svn://10.0.0.236/trunk@18349 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 22:22:26 +00:00
radha%netscape.com
a926066dba Add command line service to registry list
git-svn-id: svn://10.0.0.236/trunk@18348 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 22:22:13 +00:00
radha%netscape.com
40df649a4e Command line service provider. Initial checkin
git-svn-id: svn://10.0.0.236/trunk@18347 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 22:21:45 +00:00
radha%netscape.com
e2f35e4d1b Add factory instanciation for command line service provider
git-svn-id: svn://10.0.0.236/trunk@18346 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 22:20:57 +00:00
radha%netscape.com
96e6d94e56 Added nsICmdLineService.h
git-svn-id: svn://10.0.0.236/trunk@18345 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 22:20:23 +00:00
harishd%netscape.com
4946dc1658 Added method to display CSS 3D borders.
git-svn-id: svn://10.0.0.236/trunk@18344 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 22:20:11 +00:00
radha%netscape.com
708b23bb32 Added nsCommandLineService.cpp
git-svn-id: svn://10.0.0.236/trunk@18343 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 22:19:18 +00:00
harishd%netscape.com
4c1c0791f1 Added method to display CSS 3D borders.
Also, have added a helper method.


git-svn-id: svn://10.0.0.236/trunk@18342 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 22:19:13 +00:00
radha%netscape.com
b79029fdb8 Interface for command line service provider
git-svn-id: svn://10.0.0.236/trunk@18341 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 22:18:49 +00:00
terry%netscape.com
b70ff8ac48 That didn't work. Disable freshmeat another way.
git-svn-id: svn://10.0.0.236/trunk@18340 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 22:15:08 +00:00
kmcclusk%netscape.com
a3204bdd9b Removed code which set the defaultchecked from the checked attribute.
git-svn-id: svn://10.0.0.236/trunk@18339 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 22:14:58 +00:00
terry%netscape.com
801eeca0a3 Change mozbot's diet -- freshmeat is causing it to choke.
git-svn-id: svn://10.0.0.236/trunk@18338 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 22:11:19 +00:00
mjudge%netscape.com
549eaa4d7f selection rocks ass
git-svn-id: svn://10.0.0.236/trunk@18337 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 22:04:54 +00:00
waterson%netscape.com
7eb41b0061 Added a missing header file.
git-svn-id: svn://10.0.0.236/trunk@18336 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 22:04:27 +00:00
waterson%netscape.com
a945a4c56e Fixed a reference counting bug and a problem with the NS_RELEASE() macro.
git-svn-id: svn://10.0.0.236/trunk@18335 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 22:04:04 +00:00
mcafee%netscape.com
b39970f6d5 moving from STDARG to autoconf-blessed STDC_HEADERS
git-svn-id: svn://10.0.0.236/trunk@18334 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 22:01:40 +00:00
kipp%netscape.com
0360db506c reserved IID
git-svn-id: svn://10.0.0.236/trunk@18333 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 21:48:33 +00:00
sfraser%netscape.com
989547753d Fix non-debug build spankage, approved sar, jj.
git-svn-id: svn://10.0.0.236/trunk@18332 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 21:22:22 +00:00
sfraser%netscape.com
5355ea66f7 Fixing a test-stopping bug, approved by sar.
Fix some copy-paste madness in idler/repeater code,
and add an assert to ensure you are not running a bad timer.


git-svn-id: svn://10.0.0.236/trunk@18331 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 20:16:30 +00:00
terry%netscape.com
4aba402296 Make a bigger field to type your email address.
git-svn-id: svn://10.0.0.236/trunk@18330 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 19:54:18 +00:00
buster%netscape.com
652e32c887 better delete now that selection offsets are real.
git-svn-id: svn://10.0.0.236/trunk@18329 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 19:44:46 +00:00
kmcclusk%netscape.com
128da5b0f8 Removed nsIFormControLFrame.h since it now lives in public
git-svn-id: svn://10.0.0.236/trunk@18328 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 19:22:37 +00:00
kmcclusk%netscape.com
2dfc331847 Added missing methods to nsIFormControlFrame.h
git-svn-id: svn://10.0.0.236/trunk@18327 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 19:10:10 +00:00
buster%netscape.com
2c02dfaabf fixed debug asserts to allow for offset=count, since offsets represent
the slots between content.


git-svn-id: svn://10.0.0.236/trunk@18326 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 19:06:27 +00:00
buster%netscape.com
53a4f6ba7d delete range now iterates through the selection properly.
fixed an xpcom usage problem with macros...ALWAYS use {} on your if statements!


git-svn-id: svn://10.0.0.236/trunk@18325 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 19:05:08 +00:00
buster%netscape.com
048be49b69 made split test work with Ctrl-S only, so now you can type "s"
git-svn-id: svn://10.0.0.236/trunk@18324 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 19:03:23 +00:00
mjudge%netscape.com
21276a494f adding IID to interface
git-svn-id: svn://10.0.0.236/trunk@18323 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 18:58:43 +00:00
mjudge%netscape.com
06c5902e82 chagnes for selection to work
git-svn-id: svn://10.0.0.236/trunk@18322 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 18:58:14 +00:00
troy%netscape.com
064afea0b7 Added XXX comment for ReResolveStyleContext()
git-svn-id: svn://10.0.0.236/trunk@18321 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 18:23:06 +00:00
kmcclusk%netscape.com
5429720a08 Added export of nsIFormControlFrame.h for the MAC build
git-svn-id: svn://10.0.0.236/trunk@18320 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 18:21:39 +00:00
kmcclusk%netscape.com
aec40f3832 Modified Linux and Mac to export nsIFormControlFrame.h
git-svn-id: svn://10.0.0.236/trunk@18319 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 18:19:12 +00:00
kmcclusk%netscape.com
bd9bdef601 Added nsIFormControlFrame to the set of files to export
git-svn-id: svn://10.0.0.236/trunk@18318 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 18:14:23 +00:00
shaver%netscape.com
2d41ee208d Added prototypes for Header XDR functions.
Minor brace-placement tweaks.
Added SimpleTypeLib test program, although it doesn't build due to Makefile.in
suckage.
Fixed XPT_DoHeader to only write IDEs once (duh).
Added SizeOfHeaderBlock to API.


git-svn-id: svn://10.0.0.236/trunk@18317 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 17:53:35 +00:00
wtc%netscape.com
6e40fc8cb5 The build/hcc and build/hcpp scripts now take the compiler name as the
first argument.  This patch is contributed by Tim Rice <tim@trr.metro.net>.


git-svn-id: svn://10.0.0.236/trunk@18316 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 17:24:20 +00:00
buster%netscape.com
62018679d8 updated to new nsCOMPtr usage
git-svn-id: svn://10.0.0.236/trunk@18315 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 16:55:59 +00:00
dcone%netscape.com
e8cb1bcbfa Combined files so 3 were deleted, one added. The Rendering and Device contexts
no longer need deligates, so they were removed.  Cleaned up alot of code no
longer needed


git-svn-id: svn://10.0.0.236/trunk@18314 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 16:21:58 +00:00
blizzard%appliedtheory.com
66a6d1fe9b handle the top level widget special in resizing
git-svn-id: svn://10.0.0.236/trunk@18313 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 16:10:29 +00:00
dcone%netscape.com
b7650b7bc0 nsFormcontrolHelper.cpp
nsListControlFrame.cpp
nsCombboxcontrolframe.cpp


git-svn-id: svn://10.0.0.236/trunk@18312 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 16:08:52 +00:00
dcone%netscape.com
639fb0996b Added a manifest file for layout:html:forms:public
git-svn-id: svn://10.0.0.236/trunk@18311 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 16:04:51 +00:00
dcone%netscape.com
8f5b9c1901 First Checked In.
git-svn-id: svn://10.0.0.236/trunk@18310 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 16:04:08 +00:00
blizzard%appliedtheory.com
13cedd6699 resizing fixes
git-svn-id: svn://10.0.0.236/trunk@18309 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 16:02:34 +00:00
rods%netscape.com
2a580719d4 Ifdef'ed out the Pluggable event code
git-svn-id: svn://10.0.0.236/trunk@18308 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 15:56:21 +00:00
rods%netscape.com
749a5217b7 Initial checkin factored code from nsFormControlFrame
git-svn-id: svn://10.0.0.236/trunk@18307 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 15:47:33 +00:00
rods%netscape.com
ce9720c590 initial checkin
git-svn-id: svn://10.0.0.236/trunk@18306 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 15:41:28 +00:00
rods%netscape.com
3702364a44 Added nsIListControlFrame.h and nsComboboxControlFrame.h
git-svn-id: svn://10.0.0.236/trunk@18305 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 15:41:05 +00:00
buster%netscape.com
f1bacd2e07 made GetIsTransient return false by default, so most transactions don't need to implement GetIsTransient
made delete and backspace do the right thing (testing hacks removed)


git-svn-id: svn://10.0.0.236/trunk@18304 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 15:40:31 +00:00
rods%netscape.com
25196ce4f2 Added methods for creating ListControlFrame and ComboxControlFrames
git-svn-id: svn://10.0.0.236/trunk@18303 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 15:34:13 +00:00
rods%netscape.com
9b13d22d70 Factored out code for helper functions for determining size and for rendering
git-svn-id: svn://10.0.0.236/trunk@18302 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 15:32:57 +00:00
rods%netscape.com
9d5248a35c Added nsComboboxControlFrame nsListControlFrame
git-svn-id: svn://10.0.0.236/trunk@18301 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 15:32:34 +00:00
rods%netscape.com
5d9d7b1a75 Factored out the Initialization code for the ScrollFrame into a separate method
Added code to hide and show view when applied to the whole tree
Added a method for Creating the proper frames for the SELECT tag


git-svn-id: svn://10.0.0.236/trunk@18300 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 15:27:54 +00:00
rods%netscape.com
c4d19ab423 Added some additional attoms for the Combobox Frame Control
git-svn-id: svn://10.0.0.236/trunk@18299 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 15:25:12 +00:00
rods%netscape.com
b4a0472893 Removed the class def and put it in a new header nsScrollFrame.h
git-svn-id: svn://10.0.0.236/trunk@18298 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 15:23:51 +00:00
rods%netscape.com
6717d57280 Initial checkin the code was in nsScrollFrame.cpp
git-svn-id: svn://10.0.0.236/trunk@18297 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 15:23:15 +00:00
rhp%netscape.com
ebf361fe42 Just some cleanup of commented out code.
git-svn-id: svn://10.0.0.236/trunk@18296 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 14:06:55 +00:00
rhp%netscape.com
48bcd628fe Now, DLL's are loaded in an XP manner.
git-svn-id: svn://10.0.0.236/trunk@18295 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 14:05:15 +00:00
mcafee%netscape.com
bec9fa4dee Yanked rules that are in rules.mk
git-svn-id: svn://10.0.0.236/trunk@18294 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 12:14:51 +00:00
pavlov%pavlov.net
2e6a02ca58 setup place for ramiro to fix bug 2503 easily
git-svn-id: svn://10.0.0.236/trunk@18293 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 12:10:43 +00:00
briano%netscape.com
f6ea73216d Automated update
git-svn-id: svn://10.0.0.236/trunk@18292 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 12:00:40 +00:00
mcafee%netscape.com
3f6a97da54 Breathing Unix life into the rdf tests
git-svn-id: svn://10.0.0.236/trunk@18291 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 11:47:39 +00:00
mcafee%netscape.com
0a090ef99c Adding test directories for network, rdf
git-svn-id: svn://10.0.0.236/trunk@18290 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 11:46:46 +00:00
mcafee%netscape.com
8d7747b12f Add tests if ENABLE_TESTS=1
git-svn-id: svn://10.0.0.236/trunk@18289 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 11:46:20 +00:00
mcafee%netscape.com
871ba5cc04 Better link line, closer to linking...
git-svn-id: svn://10.0.0.236/trunk@18288 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 11:19:42 +00:00
mcafee%netscape.com
22bd814852 Unhard-coded library suffixes, yanked rules that are already in rules.mk
git-svn-id: svn://10.0.0.236/trunk@18287 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 11:11:16 +00:00
mcafee%netscape.com
23f177d2c6 Removing unneeded rule, we are closer to linking now
git-svn-id: svn://10.0.0.236/trunk@18286 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 11:05:34 +00:00
mcafee%netscape.com
57d4e8b0c9 Add tests if ENABLE_TESTS=1, cleaning up a bit
git-svn-id: svn://10.0.0.236/trunk@18285 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 11:05:00 +00:00
mcafee%netscape.com
dd2975fe39 Adding a Unix makefile for fftest
git-svn-id: svn://10.0.0.236/trunk@18284 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 10:44:32 +00:00
mcafee%netscape.com
a8a8007a50 Unix makefile for tests
git-svn-id: svn://10.0.0.236/trunk@18283 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 10:43:46 +00:00
mcafee%netscape.com
5e0f4f6e7d Removing stuff that is already in rules.mk, why duplicate it here?
git-svn-id: svn://10.0.0.236/trunk@18282 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 10:13:38 +00:00
mcafee%netscape.com
8ce2376142 Add tests if ENABLE_TESTS=1.
git-svn-id: svn://10.0.0.236/trunk@18281 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 10:04:51 +00:00
mcafee%netscape.com
dd4c94c66e Removed hard-coded link line, use the one in rules.mk instead.
git-svn-id: svn://10.0.0.236/trunk@18280 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 10:03:32 +00:00
mcafee%netscape.com
85eccd7f77 Turn on C++ linking if we have any .cpp files.
git-svn-id: svn://10.0.0.236/trunk@18279 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 10:01:44 +00:00
mcafee%netscape.com
0fe5e0486e hooked up STDARG to the autoconf definition.
git-svn-id: svn://10.0.0.236/trunk@18278 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 09:22:37 +00:00
shaver%netscape.com
2f66be3784 Added methods to create or fill headers, IDEs, interface descriptors,
method descriptors, param descriptors, const descriptors (partial)
and annotations.
Rejigged XPTAnnotation for proper struct nesting and linked-listed-ness.
Implemented SizeOfHeader (partially).
Fixed data_pool handling in XPT_DoHeader.
Implemented XPT_SeekTo and XPT_DoIID.


git-svn-id: svn://10.0.0.236/trunk@18277 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 09:13:02 +00:00
jfrancis%netscape.com
8f3f641ccb efficiency improvement to ComparePointToRange()
git-svn-id: svn://10.0.0.236/trunk@18276 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 08:59:26 +00:00
jfrancis%netscape.com
ca8e5f4cdd fixing bugs #2547 #2295
git-svn-id: svn://10.0.0.236/trunk@18275 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 08:58:43 +00:00
waterson%netscape.com
3920604b69 Implemented RDF container support and improved support for 'anonymous' resources for output of RDF/XML. Cleaned up common RDF vocabularies, placing #defines into rdf.h.
git-svn-id: svn://10.0.0.236/trunk@18274 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 06:48:25 +00:00
grail%cafebabe.org
3f2b918ccc Temporary fix for the new folder action. The dialog for it is still
broke. Too many things are just temporary hacks.


git-svn-id: svn://10.0.0.236/trunk@18273 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 06:45:10 +00:00
grail%cafebabe.org
4322f254c1 Removed classpath's bogusness. We need to get a better way to do this.
git-svn-id: svn://10.0.0.236/trunk@18272 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 06:44:30 +00:00
ramiro%netscape.com
3329dafec7 Ignore generated files.
git-svn-id: svn://10.0.0.236/trunk@18271 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 06:33:54 +00:00
briano%netscape.com
00c92ab262 Automated update
git-svn-id: svn://10.0.0.236/trunk@18270 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 06:15:34 +00:00
ramiro%netscape.com
6c2d59ff3e Add xul dirs.
git-svn-id: svn://10.0.0.236/trunk@18269 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 06:00:44 +00:00
ramiro%netscape.com
4871e4700f Add -I flags to pick up the right style and html base headers.
git-svn-id: svn://10.0.0.236/trunk@18268 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 06:00:21 +00:00
ramiro%netscape.com
41c102bca1 Add base to DIRS.
git-svn-id: svn://10.0.0.236/trunk@18267 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 05:59:42 +00:00
hyatt%netscape.com
069accd798 Adding linkage for the XUL base library.
git-svn-id: svn://10.0.0.236/trunk@18266 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 04:15:29 +00:00
troy%netscape.com
c86c1c1ca7 Correction to how offsets are computed for relatively positioned elements
git-svn-id: svn://10.0.0.236/trunk@18265 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 04:12:03 +00:00
mcafee%netscape.com
0cd1281d38 Bringing dbm/tests into the new autoconf world
git-svn-id: svn://10.0.0.236/trunk@18264 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 04:11:01 +00:00
mcafee%netscape.com
d964c42276 STDARG=1 is the default until we can autoconf this
git-svn-id: svn://10.0.0.236/trunk@18263 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 04:07:13 +00:00
pinkerton%netscape.com
70c4e1b464 hooking toolbars and toolbox back up. Sigh.
git-svn-id: svn://10.0.0.236/trunk@18262 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 04:04:12 +00:00
mcafee%netscape.com
73ed3a22a1 Adding support for linking binaries
git-svn-id: svn://10.0.0.236/trunk@18261 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 04:00:13 +00:00
sfraser%netscape.com
3c160c6d18 Fix ftang's build bustage -- move base.mcp to be built before the uconv stuff.
git-svn-id: svn://10.0.0.236/trunk@18260 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 03:53:24 +00:00
mjudge%netscape.com
bbddba9557 fixing build bustages
git-svn-id: svn://10.0.0.236/trunk@18259 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 03:50:22 +00:00
hyatt%netscape.com
9aea9834cb added nsTreeFrame.cpp to xul/base
git-svn-id: svn://10.0.0.236/trunk@18258 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 03:40:32 +00:00
hyatt%netscape.com
182b211c16 Tweak to make the XUL base library build.
git-svn-id: svn://10.0.0.236/trunk@18257 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 03:34:41 +00:00
hyatt%netscape.com
4335e45643 Added support for tree frame instantiation.
git-svn-id: svn://10.0.0.236/trunk@18256 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 03:31:56 +00:00
hyatt%netscape.com
17a01c504e Adding the tree frame class.
git-svn-id: svn://10.0.0.236/trunk@18255 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 03:28:29 +00:00
hyatt%netscape.com
5826d3fb46 Added atoms for the tree widget. Modified the makefile to make sure
that nsTreeView.cpp builds.


git-svn-id: svn://10.0.0.236/trunk@18254 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 03:27:35 +00:00
mjudge%netscape.com
da1cc58b72 fixing build bustage
git-svn-id: svn://10.0.0.236/trunk@18253 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 03:18:51 +00:00
mjudge%netscape.com
7a09e861da fix build
git-svn-id: svn://10.0.0.236/trunk@18252 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 02:06:06 +00:00
pinkerton%netscape.com
71d3b9f726 ack, unhook toolbars until i can solve the export problem on win.
git-svn-id: svn://10.0.0.236/trunk@18251 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 01:53:05 +00:00
rhp%netscape.com
4cb696a903 Adding changes for external modular content type handler plugins.
git-svn-id: svn://10.0.0.236/trunk@18250 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 01:51:43 +00:00
wtc%netscape.com
d9166e1649 Bugsplat bug #340345: need to initialize the last two function pointers
in the file I/O method table.


git-svn-id: svn://10.0.0.236/trunk@18249 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 01:49:28 +00:00
davidm%netscape.com
8ef5c8c436 2239 Crash when leaving test9
git-svn-id: svn://10.0.0.236/trunk@18248 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 01:49:08 +00:00
wtc%netscape.com
b14b6cf164 Removed an extra comma.
git-svn-id: svn://10.0.0.236/trunk@18247 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 01:47:31 +00:00
mscott%netscape.com
dcdbe4cbec Checking in the real fix for nsBufferedStream this time...
git-svn-id: svn://10.0.0.236/trunk@18246 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 01:46:37 +00:00
cyeh%netscape.com
e33cc2e2db added new hacky build configuration. if MOZ_DEBUG is not set, you can
set MOZ_DEBUGOPT. MOZ_DEBUGOPT will generate optimized bits, but also
generate debugging information linked into the libraries and executables.

this can be insanely useful when you are trying to track down compiler
optimization bugs.

to use, set MOZ_DEBUG=, set MOZ_DEBUGOPT=1


git-svn-id: svn://10.0.0.236/trunk@18245 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 01:45:38 +00:00
rhp%netscape.com
2263bd1e29 Adding changes for external modular content type handler plugins.
git-svn-id: svn://10.0.0.236/trunk@18244 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 01:44:22 +00:00
pinkerton%netscape.com
870c082b0a hookup toolbars and toolbox so they are instantiated when xul sees those tags.
git-svn-id: svn://10.0.0.236/trunk@18243 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 01:42:44 +00:00
cyeh%netscape.com
d9bb8b494e wrap !ifdef MOZ_DEBUG around custom .cpp rule so that if you are building optimized with
debug symbols, the rule doesn't go looking for PDB files that don't exist.
approved: kipp


git-svn-id: svn://10.0.0.236/trunk@18242 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 01:41:27 +00:00
mscott%netscape.com
6a47bca0aa nsBufferedStream::GetLength should return the data length instead of the write offset.
git-svn-id: svn://10.0.0.236/trunk@18241 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 01:35:44 +00:00
ftang%netscape.com
f5e5ee4980 add uconv, ucvlatin, ucvja into the build process
git-svn-id: svn://10.0.0.236/trunk@18240 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 01:30:07 +00:00
alecf%netscape.com
f2ea90ba00 add rules to automatically build .h files from .idl files if they are newer,
and add way of exporting IDL files with IDLSRCS


git-svn-id: svn://10.0.0.236/trunk@18239 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 01:28:13 +00:00
alecf%netscape.com
93b60e3ef6 specify the exact location of the XPIDL compiler
git-svn-id: svn://10.0.0.236/trunk@18238 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 01:27:28 +00:00
ftang%netscape.com
c1270ca38b fix the target name from shlib to shlb
git-svn-id: svn://10.0.0.236/trunk@18237 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 01:26:41 +00:00
mcafee%netscape.com
e1b0c0ce54 OBJS rule is in mozilla/config/rules.mk, don't duplicate it here.
git-svn-id: svn://10.0.0.236/trunk@18236 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 01:20:34 +00:00
scc%netscape.com
f2a42cc021 Made the constructor explicit again (see comment) to stop people from breaking the Linux builds.
git-svn-id: svn://10.0.0.236/trunk@18235 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 01:17:48 +00:00
pinkerton%netscape.com
ccac147d8b Work to get these instantiated.
git-svn-id: svn://10.0.0.236/trunk@18234 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 01:10:28 +00:00
pavlov%pavlov.net
fa6326f96b fix rods's broken code
git-svn-id: svn://10.0.0.236/trunk@18233 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 00:45:56 +00:00
rods%netscape.com
c45a0f4395 I removed the error.
git-svn-id: svn://10.0.0.236/trunk@18232 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 00:41:18 +00:00
troy%netscape.com
edef2644e5 Made handling of absolutely positioned child frames more efficient
git-svn-id: svn://10.0.0.236/trunk@18231 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 00:30:27 +00:00
sfraser%netscape.com
6b621fbc7f Removing ProfilerLib that I left in there by mistake.
git-svn-id: svn://10.0.0.236/trunk@18230 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 00:22:19 +00:00
sfraser%netscape.com
e336506959 First Checked In.
git-svn-id: svn://10.0.0.236/trunk@18229 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 00:21:46 +00:00
sfraser%netscape.com
65f954e71e Added a new target that builds a NewPtr-based implementation of malloc/free for debugging purposes.
git-svn-id: svn://10.0.0.236/trunk@18228 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 00:20:42 +00:00
sfraser%netscape.com
ab55f7150c Various optimizations in the memory allocators as fix for bug 2254. Also now zap the contents of allocated and freed blocks.
git-svn-id: svn://10.0.0.236/trunk@18227 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 00:20:06 +00:00
rods%netscape.com
4960f36497 Removed the GetFont method (this functionality is now a part of the nsIDeviceContext)
git-svn-id: svn://10.0.0.236/trunk@18226 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 23:59:14 +00:00
rods%netscape.com
d3e70b8d69 Added new Method for getting System Attributes (colors, fonts, sizes)
many of these are duplicated in nsLookAndFeel. The enums will be removed
from nsLookAndFeel.


git-svn-id: svn://10.0.0.236/trunk@18225 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 23:55:27 +00:00
ftang%netscape.com
f68075a555 add intl directory to the makefile
git-svn-id: svn://10.0.0.236/trunk@18224 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 23:53:08 +00:00
leif%netscape.com
06d474a186 Merged v1.1 development branch to trunk, v1.1 released
git-svn-id: svn://10.0.0.236/trunk@18220 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 23:52:52 +00:00
nhotta%netscape.com
fe81c0710b First Checked In.
git-svn-id: svn://10.0.0.236/trunk@18219 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 23:40:32 +00:00
nhotta%netscape.com
d70fa8a71d Changes for Mac build.
git-svn-id: svn://10.0.0.236/trunk@18218 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 23:37:56 +00:00
sfraser%netscape.com
2534046117 First Checked In.
git-svn-id: svn://10.0.0.236/trunk@18217 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 23:35:30 +00:00
sfraser%netscape.com
ad8275889f Added a #pragma error noting that this file is obsolete, but remains for reference reasons.
git-svn-id: svn://10.0.0.236/trunk@18216 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 23:35:08 +00:00
sfraser%netscape.com
cfae70862f Commented out obsolete PowerPlant includes
git-svn-id: svn://10.0.0.236/trunk@18215 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 23:34:32 +00:00
briano%netscape.com
cdf6f26113 Automated update
git-svn-id: svn://10.0.0.236/trunk@18214 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 23:30:38 +00:00
pavlov%pavlov.net
c9edc53ca0 require GTK 1.1.13
git-svn-id: svn://10.0.0.236/trunk@18213 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 23:26:19 +00:00
nhotta%netscape.com
fa0a416208 File Removed.
git-svn-id: svn://10.0.0.236/trunk@18212 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 23:26:07 +00:00
despotdaemon%netscape.com
cd408aa4cf Pseudo-automatic update of changes made by cyeh@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@18211 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 23:15:17 +00:00
nhotta%netscape.com
14c155e457 First Checked In.
git-svn-id: svn://10.0.0.236/trunk@18210 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 23:13:03 +00:00
wtc%netscape.com
e2e5fa8fb9 Bugsplat bug #340332: _PR_MD_CLOSE should wait, with no timeout,
until the pending async I/O operation is aborted.  Thanks to
Mark Rawling <mwr@npec.netscape.com> for the bug report and help
with debugging.


git-svn-id: svn://10.0.0.236/trunk@18209 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 23:11:22 +00:00
briano%netscape.com
9c8d20e4ac Automated update
git-svn-id: svn://10.0.0.236/trunk@18208 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 22:30:35 +00:00
waterson%netscape.com
718181609f Updated for new header files (not in the build).
git-svn-id: svn://10.0.0.236/trunk@18207 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 22:29:11 +00:00
waterson%netscape.com
039b980f72 Improved namespace handling for output of RDF/XML streams. Modified basic data source interface to include GetAllResources(), which enumerates all of the resources in the datasource. Moved code for dumping an RDF/XML stream out of nsInMemoryDataSource into nsRDFXMLDataSource.
git-svn-id: svn://10.0.0.236/trunk@18206 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 22:24:32 +00:00
mcafee%netscape.com
1cc8a06ad0 Adding guimgr to the editor build to match Win32
git-svn-id: svn://10.0.0.236/trunk@18205 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 22:19:45 +00:00
despotdaemon%netscape.com
b7d8a404ea Pseudo-automatic update of changes made by bienvenu@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@18204 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 22:16:13 +00:00
despotdaemon%netscape.com
dc8dabe88e Pseudo-automatic update of changes made by leaf@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@18203 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 22:12:01 +00:00
mcafee%netscape.com
fcb10dcf9b Comment: No output = test passed
git-svn-id: svn://10.0.0.236/trunk@18202 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 22:10:57 +00:00
kostello%netscape.com
c2d6eda11b Changed Code to match new selection work
git-svn-id: svn://10.0.0.236/trunk@18201 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 21:51:21 +00:00
kostello%netscape.com
aacb407d9b Commented out assert until Rick and I can figure
appropriate fix.


git-svn-id: svn://10.0.0.236/trunk@18200 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 21:48:40 +00:00
kostello%netscape.com
22f14ea4e2 Updated RDF document to match changed XIF signature
git-svn-id: svn://10.0.0.236/trunk@18199 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 21:46:27 +00:00
kostello%netscape.com
75d16ce80a Updated XIF code to match the new selection work.
git-svn-id: svn://10.0.0.236/trunk@18198 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 21:45:17 +00:00
akkana%netscape.com
826d1b136d Try a different form of casting to keep both Linux and the Mac happy
git-svn-id: svn://10.0.0.236/trunk@18197 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 21:10:12 +00:00
shaver%netscape.com
07a4b636fb test DoString
git-svn-id: svn://10.0.0.236/trunk@18193 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 20:05:58 +00:00
shaver%netscape.com
7d1aefc5e1 allocate memory for str->bytes in DoString decode, duh
git-svn-id: svn://10.0.0.236/trunk@18192 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 20:05:27 +00:00
buster%netscape.com
902ec60ee1 factored editor so a request (public) is separate from building the txn for that request (private)
added some debug code to transactions


git-svn-id: svn://10.0.0.236/trunk@18190 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 19:44:26 +00:00
vidur%netscape.com
7908dffae7 Fix to get default namespaces to work. Cleanup of DOM handling of character data.
git-svn-id: svn://10.0.0.236/trunk@18189 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 19:33:03 +00:00
akkana%netscape.com
9f4dfbc49b Fix nsCOMPtr casting build bustage
git-svn-id: svn://10.0.0.236/trunk@18188 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 19:31:57 +00:00
pinkerton%netscape.com
dc84cfe6ba remove file that shouldn't be there. mea culpa.
git-svn-id: svn://10.0.0.236/trunk@18187 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 19:25:25 +00:00
shaver%netscape.com
5d43857d3d fix dumb DBG thing
git-svn-id: svn://10.0.0.236/trunk@18186 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 19:21:58 +00:00
coop%netscape.com
5230673778 NOT YET PART OF SEAMONKEY:
* removed struct size #defines -> they were just silly anyway.
* replaced references to IDE file offsetsi with uint32 indices.
* first attempt at sorting out order of storage for XPTHeader and XPTInterfaceDirectoryEntry


git-svn-id: svn://10.0.0.236/trunk@18185 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 19:18:47 +00:00
alecf%netscape.com
bbe9ff8df9 changes to make XPIDL compiler work under Windows
git-svn-id: svn://10.0.0.236/trunk@18184 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 18:59:52 +00:00
pinkerton%netscape.com
299037dd3a not building the base dir for now.
git-svn-id: svn://10.0.0.236/trunk@18183 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 18:56:49 +00:00
wtc%netscape.com
30bf014603 Removed unnecessary macro define -D_THREAD_SAFE.
git-svn-id: svn://10.0.0.236/trunk@18182 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 18:49:31 +00:00
pinkerton%netscape.com
0b102f784e change lib name
git-svn-id: svn://10.0.0.236/trunk@18181 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 18:44:19 +00:00
pinkerton%netscape.com
1b89be8db8 start building the base directory
git-svn-id: svn://10.0.0.236/trunk@18180 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 18:36:33 +00:00
pinkerton%netscape.com
3877c94e12 added xul/base group and nsToolbarFrame.cpp and nsToolboxFrame.cpp
git-svn-id: svn://10.0.0.236/trunk@18179 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 18:33:29 +00:00
pinkerton%netscape.com
4a59b0b852 get compiling
git-svn-id: svn://10.0.0.236/trunk@18178 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 18:31:48 +00:00
pinkerton%netscape.com
6cb074b798 First Checked In.
git-svn-id: svn://10.0.0.236/trunk@18177 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 18:31:39 +00:00
shaver%netscape.com
ec12610954 Better cursor management stuff.
Mild macro renaming.
Debugging output from CHECK_COUNT.
Fixed primitives and PrimitiveTest: we now pass! (32, 16, 8 and CString)
Dynamically link PrimitiveTest.


git-svn-id: svn://10.0.0.236/trunk@18176 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 17:37:54 +00:00
pinkerton%netscape.com
fe46e5b54f First Checked In.
git-svn-id: svn://10.0.0.236/trunk@18175 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 16:11:40 +00:00
pinkerton%netscape.com
fc4915922f Moving to base/src to mimic rest of layout.
git-svn-id: svn://10.0.0.236/trunk@18174 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 16:10:03 +00:00
ramiro%netscape.com
f1c348081a Fix for bug 1982. Remove bogus NS_RELEASE() on a timer.
Thanks to Davide Pasetto <dipo@sis.it> for providing the fix and looking
the bug up on bugzilla!.


git-svn-id: svn://10.0.0.236/trunk@18173 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 14:37:51 +00:00
ftang%netscape.com
22322765b4 add intl directory
git-svn-id: svn://10.0.0.236/trunk@18172 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 12:12:49 +00:00
pierre%netscape.com
a3439dbf47 Fix #2251 "Garbage renders over the back button"
git-svn-id: svn://10.0.0.236/trunk@18171 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 11:42:00 +00:00
pierre%netscape.com
dee020a45b Removed the obsolete 'mTE'.
git-svn-id: svn://10.0.0.236/trunk@18170 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 11:41:26 +00:00
pierre%netscape.com
ba1dd649af Removed the unused method DrawWidget()
git-svn-id: svn://10.0.0.236/trunk@18169 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 11:21:51 +00:00
pierre%netscape.com
bfde531d65 Calls SetOrigin() in Invalidate(). Fixes the problem where on going to a new page the top of the html area gets drawn last. Thanks to Cyrus Harmon <cyrus@neomorphic.com>
git-svn-id: svn://10.0.0.236/trunk@18168 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 11:21:10 +00:00
rpotts%netscape.com
e3fb7eb1aa appshell.html
git-svn-id: svn://10.0.0.236/trunk@18167 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 11:01:01 +00:00
rpotts%netscape.com
39f9762907 Added support for updating the state of the toolbar controls after each URL load...
git-svn-id: svn://10.0.0.236/trunk@18166 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 10:02:23 +00:00
rpotts%netscape.com
f70ca77f96 whacked the default size of the webshellwindow for now...
git-svn-id: svn://10.0.0.236/trunk@18165 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 09:59:26 +00:00
pierre%netscape.com
daefb175d4 Mac only: added 'isCommand' in nsInputEvent
git-svn-id: svn://10.0.0.236/trunk@18164 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 09:52:07 +00:00
rpotts%netscape.com
f149440910 Added support for setting the DISABLED attrivute via the DOM...
git-svn-id: svn://10.0.0.236/trunk@18163 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 09:51:28 +00:00
briano%netscape.com
0f8bb10baa Automated update
git-svn-id: svn://10.0.0.236/trunk@18162 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 09:30:33 +00:00
hyatt%netscape.com
57173e943c Adding support for the widget tag to XUL.
git-svn-id: svn://10.0.0.236/trunk@18161 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 09:26:01 +00:00
hyatt%netscape.com
cf211c6530 Fixing bugs related to the widget atom.
git-svn-id: svn://10.0.0.236/trunk@18160 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 09:25:40 +00:00
ftang%netscape.com
6ffbd3ae72 add intl/uconv into the build system
git-svn-id: svn://10.0.0.236/trunk@18159 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 09:20:39 +00:00
pierre%netscape.com
ee08981436 initialize the Rendering Context from a GrafPort to fix a crash on print
git-svn-id: svn://10.0.0.236/trunk@18158 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 08:41:21 +00:00
rpotts%netscape.com
568c9da34d Base implementation on a DOM event listener...
git-svn-id: svn://10.0.0.236/trunk@18157 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 07:45:40 +00:00
rpotts%netscape.com
ec10bbffde controller component for the browser...
git-svn-id: svn://10.0.0.236/trunk@18156 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 07:45:11 +00:00
rpotts%netscape.com
c65113fc4a UI document for the apprunner.exe
git-svn-id: svn://10.0.0.236/trunk@18155 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 07:44:38 +00:00
rpotts%netscape.com
58b52f6a99 Factory for the browser DLL
git-svn-id: svn://10.0.0.236/trunk@18154 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 07:43:17 +00:00
ramiro%netscape.com
8ab33955da Add 'alldep' and 'everything' rules.
git-svn-id: svn://10.0.0.236/trunk@18153 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 07:42:44 +00:00
rpotts%netscape.com
1b4095133b windows makefile...
git-svn-id: svn://10.0.0.236/trunk@18152 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 07:42:37 +00:00
ramiro%netscape.com
94bce04a89 Make sure clobber kills dependancies.
git-svn-id: svn://10.0.0.236/trunk@18151 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 07:42:08 +00:00
rpotts%netscape.com
6af6ca022b CIDs for browser components...
git-svn-id: svn://10.0.0.236/trunk@18150 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 07:33:32 +00:00
rpotts%netscape.com
c360e48ecf windows makefile...
git-svn-id: svn://10.0.0.236/trunk@18149 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 07:33:08 +00:00
rpotts%netscape.com
cda381cbdc makefile.win
git-svn-id: svn://10.0.0.236/trunk@18148 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 07:32:30 +00:00
rpotts%netscape.com
2d570b4ffc Added nsAppShellCIDs.h as an include...
git-svn-id: svn://10.0.0.236/trunk@18147 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 07:29:53 +00:00
rpotts%netscape.com
697a5dceba Added an argument to CreateTopLevelWindow() which specifies the controller object to instantiate along with the UI document
git-svn-id: svn://10.0.0.236/trunk@18146 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 07:25:05 +00:00
rpotts%netscape.com
df9dc847f5 The WebShellWindow now implements nsIWebShellContainer. Added a controller argument to CreateTopLevelWindow()
git-svn-id: svn://10.0.0.236/trunk@18145 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 07:24:01 +00:00
rpotts%netscape.com
f32e0cbabf The AppShell now uses the EventQueue service. Added a temporary argument to CreateTopLevelWindow() which represents the controller object associated with a UI document - this will be removed when XUL supports this feature. Reworked the factory to use the template implementation provided by XPCom...
git-svn-id: svn://10.0.0.236/trunk@18144 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 07:22:58 +00:00
rpotts%netscape.com
8be182c8d8 Added the DOM to the include path...
git-svn-id: svn://10.0.0.236/trunk@18143 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 07:20:32 +00:00
rpotts%netscape.com
5d9b93e9f8 CIDs are now kept in nsAppShellCIDs.h
git-svn-id: svn://10.0.0.236/trunk@18142 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 07:20:01 +00:00
rpotts%netscape.com
7825607ddf Added a controller CID string argument to createTopLevelWindow (for now)...
git-svn-id: svn://10.0.0.236/trunk@18141 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 07:18:30 +00:00
rpotts%netscape.com
0325b85810 Added exports for nsAppShellCIDs.h and nsIWidgetController.h
git-svn-id: svn://10.0.0.236/trunk@18140 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 07:17:44 +00:00
rpotts%netscape.com
aebef542bf Interface for a non-ui controller component...
git-svn-id: svn://10.0.0.236/trunk@18139 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 07:17:01 +00:00
rpotts%netscape.com
422b53a5da AppShell CID file...
git-svn-id: svn://10.0.0.236/trunk@18138 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 07:15:52 +00:00
pinkerton%netscape.com
111eb2015c adding toolbox to collection of xul atoms
git-svn-id: svn://10.0.0.236/trunk@18137 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 05:54:38 +00:00
pinkerton%netscape.com
c0d8e5b3ef First Checked In.
git-svn-id: svn://10.0.0.236/trunk@18136 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 05:49:24 +00:00
pollmann%netscape.com
98d9fcade3 Bug 2279: Don't create widgets for hidden form elements.
git-svn-id: svn://10.0.0.236/trunk@18135 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 04:02:37 +00:00
danm%netscape.com
97da2ade09 build XUL
git-svn-id: svn://10.0.0.236/trunk@18134 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 03:51:16 +00:00
briano%netscape.com
38abe0e2d4 Automated update
git-svn-id: svn://10.0.0.236/trunk@18133 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 03:45:38 +00:00
danm%netscape.com
d040388bff build xul
git-svn-id: svn://10.0.0.236/trunk@18132 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 03:41:43 +00:00
danm%netscape.com
04e9301e4d build XUL
git-svn-id: svn://10.0.0.236/trunk@18131 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 03:40:21 +00:00
danm%netscape.com
713bd78058 create XUL frames
git-svn-id: svn://10.0.0.236/trunk@18130 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 03:37:37 +00:00
danm%netscape.com
efa4d4f460 load XUL atoms on XML document creation
git-svn-id: svn://10.0.0.236/trunk@18129 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 03:35:24 +00:00
danm%netscape.com
4f178959a5 added file xul/content/src/nsXULAtoms.cpp
git-svn-id: svn://10.0.0.236/trunk@18128 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 03:32:30 +00:00
pollmann%netscape.com
85c77005a0 Bug 1958: Fixing an apparent typo.
git-svn-id: svn://10.0.0.236/trunk@18127 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 03:09:25 +00:00
buster%netscape.com
4490a6149a bug fixes to delete range, plus some debugging printf's
git-svn-id: svn://10.0.0.236/trunk@18126 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 02:29:52 +00:00
jj%netscape.com
a8097b0db4 changed default CVS module from 'RaptorMac' to 'SeaMonkeyEditor'.
git-svn-id: svn://10.0.0.236/trunk@18125 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 02:26:40 +00:00
danm%netscape.com
64c1df8ee4 new xul directory
git-svn-id: svn://10.0.0.236/trunk@18124 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 01:56:05 +00:00
buster%netscape.com
801958a339 starting to move towards a slimmed down nsIEditor.h
git-svn-id: svn://10.0.0.236/trunk@18123 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 01:53:10 +00:00
buster%netscape.com
b48e2caf7c * added TransactionFactory. Editor no longer allocates its own transactions. This gives us an oppurtunity for a recycler.
* added DeleteSelection to editor.  Doesn't work very well yet because selection is giving me random offsets into text content.
* lots of work in the various transactions.


git-svn-id: svn://10.0.0.236/trunk@18122 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 01:51:09 +00:00
jfrancis%netscape.com
4891b6afd8 added a bunch of editor stuff for Steve
git-svn-id: svn://10.0.0.236/trunk@18121 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 01:46:52 +00:00
nhotta%netscape.com
562508f0d5 Initial check in.
git-svn-id: svn://10.0.0.236/trunk@18120 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 01:28:27 +00:00
waterson%netscape.com
b6493e8cbf Modified to just descend into the subdirs; got rid of rdftest.cpp.
git-svn-id: svn://10.0.0.236/trunk@18119 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 01:26:51 +00:00
waterson%netscape.com
2a8db68537 Obsolete.
git-svn-id: svn://10.0.0.236/trunk@18118 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 01:26:07 +00:00
fur%netscape.com
0a1d12585c Add java_lang_Thread.h
git-svn-id: svn://10.0.0.236/trunk@18117 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 01:25:12 +00:00
mscott%netscape.com
8431595ebe Add news to top level directories that get built.
git-svn-id: svn://10.0.0.236/trunk@18116 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 01:15:26 +00:00
mscott%netscape.com
28f5092aca Use the transport interface for communicating across the thread boundary...
git-svn-id: svn://10.0.0.236/trunk@18115 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 01:14:03 +00:00
mscott%netscape.com
af293b2d97 Cosmetic changes to build on windows...
git-svn-id: svn://10.0.0.236/trunk@18114 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 01:13:08 +00:00
mscott%netscape.com
0b26371b83 Export new header files.
git-svn-id: svn://10.0.0.236/trunk@18113 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 01:12:11 +00:00
nhotta%netscape.com
2f72e68727 Initial check in.
git-svn-id: svn://10.0.0.236/trunk@18112 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 01:11:00 +00:00
mscott%netscape.com
3664b28e00 Added new event sink files to makefile. nsINNTPHost should support ISupports....
git-svn-id: svn://10.0.0.236/trunk@18111 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 01:09:10 +00:00
mscott%netscape.com
e681cad92e First checked in.
git-svn-id: svn://10.0.0.236/trunk@18110 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 01:07:44 +00:00
mscott%netscape.com
68e0a17491 Export nsITransport.h
git-svn-id: svn://10.0.0.236/trunk@18109 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 01:06:55 +00:00
mscott%netscape.com
f56f2d4e52 First checked in. The transport interface is the means through which a protocol communicates to a socket (or file or some other mechanism) across the thread boundary between netlib and the protocol.
git-svn-id: svn://10.0.0.236/trunk@18108 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 01:06:22 +00:00
mjudge%netscape.com
1e63a95689 changes to unload my library correctly
git-svn-id: svn://10.0.0.236/trunk@18107 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 00:56:18 +00:00
nhotta%netscape.com
a3af3d319a Initial check in.
git-svn-id: svn://10.0.0.236/trunk@18106 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 00:49:28 +00:00
endico%mozilla.org
fb2904dbb0 Add java support
git-svn-id: svn://10.0.0.236/trunk@18105 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 00:42:26 +00:00
fur%netscape.com
b223edc9b8 Fix comment.
git-svn-id: svn://10.0.0.236/trunk@18104 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 00:42:03 +00:00
fur%netscape.com
c8fb4d3ae8 Allow class CharToByteConverter to be initialized, since the codegen limitations
that didn't allow it to be compiled have been remedied.


git-svn-id: svn://10.0.0.236/trunk@18103 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 00:41:09 +00:00
fur%netscape.com
72b5c556c0 Unicode characters are uint16, not int16.
git-svn-id: svn://10.0.0.236/trunk@18102 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 00:39:17 +00:00
fur%netscape.com
e41832992f Added routines to handle conversion of Java strings between UTF8 and UCS2
representations.


git-svn-id: svn://10.0.0.236/trunk@18101 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 00:38:34 +00:00
fur%netscape.com
28e0286a67 Frame::getCallingJavaMethod() now takes a stack depth parameter which indicates
the number of levels to pop the stack.


git-svn-id: svn://10.0.0.236/trunk@18100 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 00:37:14 +00:00
fur%netscape.com
2f763cedea Flush the log file after entry into a method is traced.
git-svn-id: svn://10.0.0.236/trunk@18099 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 00:22:22 +00:00
fur%netscape.com
3729c4258b Unicode characters are uint16's not int16's.
git-svn-id: svn://10.0.0.236/trunk@18098 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 00:20:41 +00:00
fur%netscape.com
eb71ff785b Fixes to newInstance0() method:
When checking to see if a calling method has permission to access a
class/constructor with package-level scope, walk two levels up the
stack, instead of one, since the immediate caller is always
java.lang.newInstance().

In addition to creating the object, invoke it's zero-argument constructor.


git-svn-id: svn://10.0.0.236/trunk@18097 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 00:19:56 +00:00
fur%netscape.com
4744e211dd Added do-nothing stub for registerNatives().
git-svn-id: svn://10.0.0.236/trunk@18096 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 00:16:40 +00:00
fur%netscape.com
d0b03dc69c Implement doPrivileged() method in a trivial way, such that privileges are
not actually checked or set.


git-svn-id: svn://10.0.0.236/trunk@18095 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 00:15:55 +00:00
fur%netscape.com
f1d1b986ee Don't add a thread-id or a newline to each logfile output line, at least not
in the default case.


git-svn-id: svn://10.0.0.236/trunk@18094 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 00:12:46 +00:00
fur%netscape.com
5707f6d56d Ensure that log-file flushing occurs even if the default log file is being used.
git-svn-id: svn://10.0.0.236/trunk@18093 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 00:11:55 +00:00
briano%netscape.com
321b0f22b1 Automated update
git-svn-id: svn://10.0.0.236/trunk@18092 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-20 23:37:59 +00:00
briano%netscape.com
be726c08ac Fixes provided by kstailey@disclosure.com. Unfortunately, I don't have a machine to test them on....
git-svn-id: svn://10.0.0.236/trunk@18091 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-20 23:30:52 +00:00
briano%netscape.com
51711ffde5 Automated update
git-svn-id: svn://10.0.0.236/trunk@18090 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-20 23:30:31 +00:00
buster%netscape.com
48e612895f put in Mike's change to Clear the selection when we take focus
this fixes the bug that the collection of ranges was monotonically increasing to infinity
as you clicked around in the document.


git-svn-id: svn://10.0.0.236/trunk@18089 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-20 23:23:28 +00:00
shaver%netscape.com
4bdd8e7d22 added libxpt/tests
git-svn-id: svn://10.0.0.236/trunk@18088 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-20 23:18:27 +00:00
shaver%netscape.com
b7788d4156 added some tests (we don't pass yet =) ), wrote some primitives
git-svn-id: svn://10.0.0.236/trunk@18087 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-20 23:17:05 +00:00
buster%netscape.com
1629d20dfd added IID static method so nsIEnumerator can be used with nsCOMPtr
git-svn-id: svn://10.0.0.236/trunk@18086 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-20 23:16:28 +00:00
srinivas%netscape.com
bb380e6470 Suspended local threads should be moved to the suspend queue after I/O
completion or timeout.


git-svn-id: svn://10.0.0.236/trunk@18085 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-20 23:13:06 +00:00
leaf%mozilla.org
9507265d17 removed dup NSPR entry
git-svn-id: svn://10.0.0.236/trunk@18084 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-20 20:32:59 +00:00
leaf%mozilla.org
2bb4427ae0 removing duplicate include
git-svn-id: svn://10.0.0.236/trunk@18083 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-20 20:20:20 +00:00
dougt%netscape.com
6a7a0d086a Added real IID's
git-svn-id: svn://10.0.0.236/trunk@18082 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-20 19:59:16 +00:00
waterson%netscape.com
c405cd59c1 Backed out bogus checking.
git-svn-id: svn://10.0.0.236/trunk@18081 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-20 19:56:34 +00:00
waterson%netscape.com
e4af99d487 Obsolete.
git-svn-id: svn://10.0.0.236/trunk@18080 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-20 19:53:07 +00:00
terry%netscape.com
3f8992a334 Simple script to show some build bustage stats.
git-svn-id: svn://10.0.0.236/trunk@18079 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-20 19:38:13 +00:00
akkana%netscape.com
31b1c02876 Handle alphanumeric characters properly
git-svn-id: svn://10.0.0.236/trunk@18078 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-20 18:43:59 +00:00
despotdaemon%netscape.com
fb8116a5d3 Pseudo-automatic update of changes made by don@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@18077 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-20 18:30:36 +00:00
coop%netscape.com
46278f0bfa NOT YET PART OF SEAMONKEY:
* added looping to read/write InterfaceDirectoryEntrys
* InterfaceDescriptors are no longer DECODEd as part of the IDE DECODEing process
* added skeleton for XPT_GetDescriptorByOffset


git-svn-id: svn://10.0.0.236/trunk@18076 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-20 17:58:14 +00:00
kipp%netscape.com
9c0fa91c65 allocated an IID
git-svn-id: svn://10.0.0.236/trunk@18075 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-20 17:53:09 +00:00
rods%netscape.com
f46b63bfa0 Fixed scrollbar rendering problem by commenting out the WM_CTLCOLORSCROLLBAR
message in switch statement. (fix thanks to Michael Lowe)


git-svn-id: svn://10.0.0.236/trunk@18074 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-20 15:42:51 +00:00
sar%netscape.com
824374961b add nsprpub since 1) we need to pull it from the tip, 2) it was in RaptorDist, so needs to be here --sarah
git-svn-id: svn://10.0.0.236/trunk@18073 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-20 10:25:46 +00:00
grail%cafebabe.org
04a228881d GridBagContraints.WEST is somehow an illegal argument. I have no
idea. Most problems with "New Folder ..."  is solved now up to
runtime. Nothing viewable is available yet. It can't find the resource
bundle "grendel.ui.Labels".


git-svn-id: svn://10.0.0.236/trunk@18072 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-20 09:56:13 +00:00
grail%cafebabe.org
48d3b28c3a Stupid stupid stupid. JComboBox.removeAllItems() NullExceptions if
there's a zero count. The safe way to call it is by:

if (combobox.getItemCount() > 0) {
  combobox.removeAllItems();
}

This is stupid.


git-svn-id: svn://10.0.0.236/trunk@18071 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-20 09:53:28 +00:00
sar%netscape.com
1559395b74 fixing a error in SeaMonkeyBrowser modules
git-svn-id: svn://10.0.0.236/trunk@18070 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-20 09:10:52 +00:00
rickg%netscape.com
6b9ae6865a tiny debugging improvements
git-svn-id: svn://10.0.0.236/trunk@18069 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-20 08:51:34 +00:00
sar%netscape.com
2e04bf6189 There is stuff that was in RaptorMac that wasn't in Seamonkey*. Now it's there --sarah
git-svn-id: svn://10.0.0.236/trunk@18068 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-20 07:54:22 +00:00
rickg%netscape.com
add2c72fa0 fixed nearly 20 parser bugs
git-svn-id: svn://10.0.0.236/trunk@18067 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-20 07:29:33 +00:00
buster%netscape.com
5ca7f5e8c6 fixed bug 2516. The InitChildList code needed to check display types before
assigning the mCaptionFrame member variable.


git-svn-id: svn://10.0.0.236/trunk@18066 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-20 07:27:06 +00:00
rickg%netscape.com
6f3675f1ff fixed nearly 20 parser bugs
git-svn-id: svn://10.0.0.236/trunk@18065 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-20 06:56:07 +00:00
grail%cafebabe.org
2749296524 Added action mapping to menus. Trimming is still missing.
git-svn-id: svn://10.0.0.236/trunk@18064 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-20 06:40:16 +00:00
grail%cafebabe.org
780a797180 Added action mapping to menus.
git-svn-id: svn://10.0.0.236/trunk@18063 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-20 06:40:01 +00:00
jband%netscape.com
1c7f6dde92 NOT PART OF SEAMONKEY. Workingon dealing with more types. Added access to WrappedNative from JSObject
git-svn-id: svn://10.0.0.236/trunk@18062 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-20 06:38:00 +00:00
troy%netscape.com
9b88cc5f1d Added additional parameter to GetNext() that specifies whether the frame is
removed from the path. This allows peeking at the next frame in the reflow
chain


git-svn-id: svn://10.0.0.236/trunk@18060 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-20 05:11:17 +00:00
troy%netscape.com
d152766772 Added additional parameter to GetNext() that allows peeking at the next
frame in the reflow command


git-svn-id: svn://10.0.0.236/trunk@18059 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-20 05:10:12 +00:00
troy%netscape.com
d0a1720f4d Added XXX reminder for myself
git-svn-id: svn://10.0.0.236/trunk@18058 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-20 04:50:35 +00:00
sar%netscape.com
f136a67812 try realtime quotes. the # should work, if not, it will get backed out.
git-svn-id: svn://10.0.0.236/trunk@18057 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-20 04:21:18 +00:00
troy%netscape.com
26a8236401 Removed some scroll related logic that was causing computed widths to be
computed incorrectly. Now the scroll frame handles it


git-svn-id: svn://10.0.0.236/trunk@18056 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-20 03:43:33 +00:00
briano%netscape.com
de5055d62a Automated update
git-svn-id: svn://10.0.0.236/trunk@18055 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-20 02:23:00 +00:00
briano%netscape.com
262843afe6 Automated update
git-svn-id: svn://10.0.0.236/trunk@18054 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-20 02:18:12 +00:00
despotdaemon%netscape.com
eaf487828a Pseudo-automatic update of changes made by brendan@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@18053 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-20 02:05:54 +00:00
briano%netscape.com
dee0b35090 Pre-generated configure script for platforms that don't have autoconf and GNU m4, and for people who don't want to waste time downloading and building them.
git-svn-id: svn://10.0.0.236/trunk@18052 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-20 01:49:03 +00:00
waterson%netscape.com
e822ec666d Renamed 'stream data source' to 'RDF/XML data source'; renamed 'data base' to 'composite data source'.
git-svn-id: svn://10.0.0.236/trunk@18051 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-20 01:43:39 +00:00
waterson%netscape.com
f081594357 Removed unnecessary #includes.
git-svn-id: svn://10.0.0.236/trunk@18050 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-20 01:42:34 +00:00
waterson%netscape.com
258b0d3c24 Changed 'data base' to 'composite data source'. Merged RDF/XML document and stream data source into one big happy interface.
git-svn-id: svn://10.0.0.236/trunk@18049 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-20 01:42:13 +00:00
akkana%netscape.com
74ec22f88f Fix pierre's silentdl build bustage
git-svn-id: svn://10.0.0.236/trunk@18048 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-20 01:39:08 +00:00
leaf%mozilla.org
6b366ba64c changing pull of nsprpub to pull from the tip.
git-svn-id: svn://10.0.0.236/trunk@18047 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-20 01:05:02 +00:00
vidur%netscape.com
2904958913 Fixing build bustage
git-svn-id: svn://10.0.0.236/trunk@18046 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-20 00:50:07 +00:00
donm%netscape.com
2467da69e4 making change to include Doug Turner's silentdl
git-svn-id: svn://10.0.0.236/trunk@18045 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-20 00:37:17 +00:00
pierre%netscape.com
f0aca82372 added silentdl to the list of manifest files
git-svn-id: svn://10.0.0.236/trunk@18044 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-20 00:36:13 +00:00
pierre%netscape.com
f81b0c50fe First Checked In.
git-svn-id: svn://10.0.0.236/trunk@18043 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-20 00:29:40 +00:00
dougt%netscape.com
7aa910f11c Adding Makefile.in to export headers.
git-svn-id: svn://10.0.0.236/trunk@18042 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-20 00:25:52 +00:00
sar%netscape.com
6daa819b73 add silentdl for dougt --sarah
git-svn-id: svn://10.0.0.236/trunk@18041 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-20 00:24:23 +00:00
coop%netscape.com
7383c42ad7 NOT YET PART OF SEAMONKEY:
* added offset management code in the form of calls to shaver's macros


git-svn-id: svn://10.0.0.236/trunk@18038 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-19 23:46:20 +00:00
wtc%netscape.com
661e55b97f Merged the pthreads patches for BSD/OS 4.0 contributed by
Bert Driehuis <bert_driehuis@nl.compuware.com>.
Modified files: BSD_OS.mk, _pth.h, bsdi.c, ptio.c, and pr/tests/Makefile.


git-svn-id: svn://10.0.0.236/trunk@18037 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-19 23:38:54 +00:00
dougt%netscape.com
7d9e3b3d43 Adding SilentDownload startup and shutdown to the viewer application.
git-svn-id: svn://10.0.0.236/trunk@18036 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-19 23:37:17 +00:00
mjudge%netscape.com
54b82849bb fiximg text selection for frames in frames
git-svn-id: svn://10.0.0.236/trunk@18035 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-19 23:36:06 +00:00
dougt%netscape.com
3aff90e222 Adding silentdl to the build directories.
git-svn-id: svn://10.0.0.236/trunk@18034 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-19 23:35:21 +00:00
karnaze%netscape.com
2242310cce content sink uses nsWebShell::GetIsFrame to set scrolling on nsWebShell
git-svn-id: svn://10.0.0.236/trunk@18033 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-19 23:16:02 +00:00
karnaze%netscape.com
506ead5fcd added GetIsFrame, SetIsFrame to distinguish <frame> documents
git-svn-id: svn://10.0.0.236/trunk@18032 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-19 23:14:31 +00:00
vidur%netscape.com
fdfa2b0b22 Completion of document as node - specifically, the childNodes array. Completion of nodeName, nodeValue and attributes properties for different types of nodes.
git-svn-id: svn://10.0.0.236/trunk@18031 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-19 23:07:33 +00:00
rpotts%netscape.com
a3efbe88da fixed bug when firing the OnConnectionsComplete() notification. If one of the listeners initiated a new URL load then state in the doc loader became inconsistent...
git-svn-id: svn://10.0.0.236/trunk@18030 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-19 22:48:05 +00:00
pierre%netscape.com
ae42b2d56a display the AppearanceMgr frame around edit fields
git-svn-id: svn://10.0.0.236/trunk@18029 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-19 22:34:43 +00:00
sfraser%netscape.com
a9183717cf File Removed.
git-svn-id: svn://10.0.0.236/trunk@18028 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-19 22:34:36 +00:00
pierre%netscape.com
f55ce79305 fixed Scroll() in case the caller passes a null clipRect
git-svn-id: svn://10.0.0.236/trunk@18022 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-19 19:29:43 +00:00
donm%netscape.com
8159390ee2 adding the smoke test build script
git-svn-id: svn://10.0.0.236/trunk@18021 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-19 18:54:41 +00:00
mjudge%netscape.com
e034b82d75 fixing selection a little
git-svn-id: svn://10.0.0.236/trunk@18020 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-19 17:41:08 +00:00
rods%netscape.com
529b6e8f8f Added new Method for Querying System Fonts
git-svn-id: svn://10.0.0.236/trunk@18019 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-19 17:36:19 +00:00
karnaze%netscape.com
3b1d92015b <form> inside <table> submits; marginwidth, marginheight in <frame> working; scrolling in <frame>, <iframe> working
git-svn-id: svn://10.0.0.236/trunk@18018 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-19 17:26:06 +00:00
pinkerton%netscape.com
c0703d6b97 Added cut/copy to pierre's paste work and sync'd the work done in textWidget to that in textAreaWidget so both now support cut/copy/paste the same way (though the code isn't shared).
git-svn-id: svn://10.0.0.236/trunk@18017 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-19 17:21:37 +00:00
terry%netscape.com
aaabaf86c1 Wasn't properly stripping out null queries on text searches.
Harmless, but was generating overly complicated SQL.


git-svn-id: svn://10.0.0.236/trunk@18016 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-19 17:17:21 +00:00
terry%netscape.com
c9d48f9027 Allow a "not regexp" search of email addresses.
git-svn-id: svn://10.0.0.236/trunk@18015 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-19 17:10:02 +00:00
terry%netscape.com
34312b1f2f I guess nobody ever queries for URLs by regexp, since that radio
button was completely busted.


git-svn-id: svn://10.0.0.236/trunk@18014 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-19 17:02:39 +00:00
vidur%netscape.com
582f32db7a Started implementation of Node properties and methods for documents.
git-svn-id: svn://10.0.0.236/trunk@18013 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-19 16:58:45 +00:00
pinkerton%netscape.com
b3afe20c10 added nsGenericDomNodeList.cpp
git-svn-id: svn://10.0.0.236/trunk@18012 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-19 16:39:10 +00:00
vidur%netscape.com
41ca50f15b new file - base class for other node lists
git-svn-id: svn://10.0.0.236/trunk@18011 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-19 15:50:20 +00:00
pierre%netscape.com
b3fd92890d use the newly added HandleUpdateEvent() to redraw the top-level widget
git-svn-id: svn://10.0.0.236/trunk@18010 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-19 14:34:14 +00:00
pierre%netscape.com
449bfd60e6 fixed live scrolling
git-svn-id: svn://10.0.0.236/trunk@18009 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-19 14:33:47 +00:00
pierre%netscape.com
b4ea06ef45 added HandleUpdateEvent() and use ::BeginUpdate() in Update() in order to improve performance during live scrolling
git-svn-id: svn://10.0.0.236/trunk@18008 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-19 14:33:21 +00:00
pierre%netscape.com
6d58fb6b7c added Paste
git-svn-id: svn://10.0.0.236/trunk@18007 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-19 10:29:48 +00:00
pierre%netscape.com
505e3d5466 moved ConvertOSMenuResultToPPMenuResult() from nsMacMain
git-svn-id: svn://10.0.0.236/trunk@18006 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-19 10:29:30 +00:00
pierre%netscape.com
13aa059a73 moved ConvertOSMenuResultToPPMenuResult() to the message pump
git-svn-id: svn://10.0.0.236/trunk@18005 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-19 10:29:14 +00:00
pierre%netscape.com
934589348e propagate menu event to focused widget and its parents
git-svn-id: svn://10.0.0.236/trunk@18004 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-19 10:28:53 +00:00
mjudge%netscape.com
2434c90ca2 selection should work now more or less
git-svn-id: svn://10.0.0.236/trunk@18003 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-19 06:42:39 +00:00
troy%netscape.com
7936b86b4a Changed it so the DidReflow() temporary hack doesn't apply to scrolled
frames


git-svn-id: svn://10.0.0.236/trunk@18001 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-19 06:00:08 +00:00
troy%netscape.com
c68ea5ab6f Fixed it so computedHeight is correctly computed
git-svn-id: svn://10.0.0.236/trunk@18000 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-19 05:59:24 +00:00
troy%netscape.com
d21c2c56d3 Minor cleanup
git-svn-id: svn://10.0.0.236/trunk@17999 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-19 05:18:26 +00:00
troy%netscape.com
fb1c8ede06 Part of the fix for bug #2485
git-svn-id: svn://10.0.0.236/trunk@17998 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-19 05:17:39 +00:00
pierre%netscape.com
47bd3bb6e7 Fixed the clip rgn in Scroll(): the scrollbars no longer flicker.
git-svn-id: svn://10.0.0.236/trunk@17997 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-19 04:29:08 +00:00
vidur%netscape.com
d39be21072 Made unparented nodes outside the document return a new document fragment as parent. Inserting a node into a tree removes it from its previous position
git-svn-id: svn://10.0.0.236/trunk@17996 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-19 03:54:26 +00:00
jfrancis%netscape.com
caa9033cb0 added Show() to DoFileOpen() - fixes bug #2415
git-svn-id: svn://10.0.0.236/trunk@17993 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-19 03:12:18 +00:00
pavlov%pavlov.net
319109dbd6 parse ~/.gtkrc (if it exists) file to make things look more consistant with
other gtk apps.


git-svn-id: svn://10.0.0.236/trunk@17991 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-19 02:45:55 +00:00
waterson%netscape.com
18451d26e9 Replacement for nsIRDFXMLDocument.h. Not yet in the build.
git-svn-id: svn://10.0.0.236/trunk@17988 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-19 02:43:03 +00:00
waterson%netscape.com
6b18066ef9 Replacement for nsStreamDataSource.cpp. Not yet in the build.
git-svn-id: svn://10.0.0.236/trunk@17987 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-19 02:42:30 +00:00
pavlov%pavlov.net
5b2738d43e return true for events that we handle and not false
git-svn-id: svn://10.0.0.236/trunk@17986 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-19 02:17:30 +00:00
jfrancis%netscape.com
cb60c36d89 adding checks for null mContext member in a couple of places - fixes bug #2200
git-svn-id: svn://10.0.0.236/trunk@17985 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-19 02:05:53 +00:00
jfrancis%netscape.com
10747a8399 fixing addref/release errors in SelectAll code - fixes bug #2166
git-svn-id: svn://10.0.0.236/trunk@17984 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-19 01:54:57 +00:00
jfrancis%netscape.com
372fb40b32 fixing bug in range endpoint comparison
git-svn-id: svn://10.0.0.236/trunk@17983 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-19 01:07:52 +00:00
mjudge%netscape.com
39596a0bb8 fixing linux
git-svn-id: svn://10.0.0.236/trunk@17982 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-19 01:00:31 +00:00
mjudge%netscape.com
815cd2038f update for linux
git-svn-id: svn://10.0.0.236/trunk@17981 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-19 00:40:38 +00:00
mjudge%netscape.com
63d65c3623 trying to fix linux..
git-svn-id: svn://10.0.0.236/trunk@17980 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-19 00:32:51 +00:00
mjudge%netscape.com
34e121bd88 test check
git-svn-id: svn://10.0.0.236/trunk@17979 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-19 00:13:07 +00:00
terry%netscape.com
140e93b105 Majorly changed querying of email addresses.
git-svn-id: svn://10.0.0.236/trunk@17978 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-19 00:07:46 +00:00
pierre%netscape.com
39b1681518 Paint only the damaged area instead of the whole widget. Reuse the rendering context to update the children. Scroll the children.
git-svn-id: svn://10.0.0.236/trunk@17977 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-19 00:02:51 +00:00
pierre%netscape.com
6df7749aba Numerous changes: introduced the DrawingSurface, a combination of GraphicState and GrafPort.
git-svn-id: svn://10.0.0.236/trunk@17976 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-19 00:02:15 +00:00
pierre%netscape.com
5ff85d5f7b DoMessagePump() no longer returns a boolean
git-svn-id: svn://10.0.0.236/trunk@17975 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-19 00:01:41 +00:00
buster%netscape.com
0d84dd5f3e workaround for bug 2476: check for null child list before calling nsFrameList::AppendFrames
git-svn-id: svn://10.0.0.236/trunk@17974 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-18 23:54:23 +00:00
pavlov%pavlov.net
56ad6341a4 fix mouse clicking
git-svn-id: svn://10.0.0.236/trunk@17973 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-18 23:42:04 +00:00
locka%iol.ie
d0d14bad7f Renamed m_nReadyState as m_nBrowserReadyState
Added fix to get_LocationURL, courtesy of Ryota Ando <rando@ca2.so-net.ne.jp>


git-svn-id: svn://10.0.0.236/trunk@17972 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-18 23:04:25 +00:00
mjudge%netscape.com
9251454eba Files for selection across frames.
git-svn-id: svn://10.0.0.236/trunk@17971 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-18 22:57:12 +00:00
locka%iol.ie
df3dbc9122 Added plugin headers. These are still #ifdef'd out for backwards compatibility
git-svn-id: svn://10.0.0.236/trunk@17970 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-18 22:38:46 +00:00
waterson%netscape.com
f52d81f64d Added documentation comments.
git-svn-id: svn://10.0.0.236/trunk@17969 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-18 22:31:05 +00:00
locka%iol.ie
802c8b4d2d First impl of ActiveX control site plugin
git-svn-id: svn://10.0.0.236/trunk@17968 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-18 22:29:43 +00:00
waterson%netscape.com
4b67c3a3c3 Added an assertion after OpenContainer() to help catch parse errors.
git-svn-id: svn://10.0.0.236/trunk@17967 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-18 22:14:59 +00:00
coop%netscape.com
df9664e830 NOT YET PART OF SEAMONKEY:
* added #defines for is_pointer/tag combos used in TypeDescriptors to match table in typelib spec.
* now handle error case in xpt_struct.c using macro
* still must do offset management


git-svn-id: svn://10.0.0.236/trunk@17966 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-18 22:04:49 +00:00
scc%netscape.com
7112370451 OK. We were wrong about the SOLARIS case. Sorry.
git-svn-id: svn://10.0.0.236/trunk@17964 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-18 20:32:41 +00:00
coop%netscape.com
c47ab182ae NOT YET PART OF SEAMONKEY:
* modified in-memory structs slightly to get them to compile
* xpt_strcut.c now compiles, and with no warnings (at no extra charge)
* still must do offset management


git-svn-id: svn://10.0.0.236/trunk@17963 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-18 19:53:47 +00:00
troy%netscape.com
5d136cd0e4 Changed to position absolute child elements relative to the padding edge not the
border edge


git-svn-id: svn://10.0.0.236/trunk@17962 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-18 19:30:42 +00:00
cls%seawood.org
0df6a2d9ae Don't include local cdefs.h if we have a system version.
git-svn-id: svn://10.0.0.236/trunk@17961 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-18 19:11:35 +00:00
cls%seawood.org
0d36c93ec3 Ifdef'd out obsolete header includes.
git-svn-id: svn://10.0.0.236/trunk@17960 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-18 19:05:24 +00:00
scc%netscape.com
a47b5a1409 Added patch for bsdi from netscape.public.mozilla.patches; removed test for !SOLARIS as agreed with macafee.
git-svn-id: svn://10.0.0.236/trunk@17958 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-18 18:32:33 +00:00
shaver%netscape.com
f3af37b200 Much XDR header whacking. Still need to figure out how the pool management
stuff looks.
Fixed XPT_PREAMBLE (again).
xpt_xdr.c now compiles!


git-svn-id: svn://10.0.0.236/trunk@17957 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-18 18:28:14 +00:00
shaver%netscape.com
e2bcd3d211 added libxpt Makefiles
git-svn-id: svn://10.0.0.236/trunk@17956 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-18 18:03:45 +00:00
shaver%netscape.com
10074f0384 fix up XPT_PREAMBLE booboo
git-svn-id: svn://10.0.0.236/trunk@17955 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-18 17:58:34 +00:00
shaver%netscape.com
8c0e3973f3 make goop (Win and Unix)
git-svn-id: svn://10.0.0.236/trunk@17954 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-18 17:44:06 +00:00
shaver%netscape.com
1a3b09ee9b make goop (Windows and Unix) and header fixes
git-svn-id: svn://10.0.0.236/trunk@17953 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-18 17:43:36 +00:00
troy%netscape.com
64fcc4cfa2 Improvements to absolute positioning code
git-svn-id: svn://10.0.0.236/trunk@17952 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-18 17:27:27 +00:00
troy%netscape.com
46eb195775 Initial check-in
git-svn-id: svn://10.0.0.236/trunk@17951 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-18 17:26:49 +00:00
coop%netscape.com
4082964458 NOT YET PART OF SEAMONKEY:
* updated XPT_Do code to match in-memory structs


git-svn-id: svn://10.0.0.236/trunk@17950 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-18 17:26:04 +00:00
shaver%netscape.com
ef01cf77ca new API stuff, and start on primitive implementations
git-svn-id: svn://10.0.0.236/trunk@17949 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-18 16:54:57 +00:00
rods%netscape.com
f07dcd7083 Initial checkin
git-svn-id: svn://10.0.0.236/trunk@17948 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-18 15:14:00 +00:00
coop%netscape.com
1692a63ff2 NOT YET PART OF SEAMONKEY:
* Added at least basic comments for all structs.
* Added #defines for struct sizes.


git-svn-id: svn://10.0.0.236/trunk@17947 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-18 15:00:03 +00:00
fur%netscape.com
22c3cb9f47 Work in progress
git-svn-id: svn://10.0.0.236/trunk@17946 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-18 06:22:14 +00:00
vidur%netscape.com
1897c0ba41 Implemented Element::GetElementsByTagName. Fixed bug 2327 - forms appearing multiple times in document.forms array.
git-svn-id: svn://10.0.0.236/trunk@17945 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-18 03:43:43 +00:00
val4%cornell.edu
a8feca1043 Background image
git-svn-id: svn://10.0.0.236/trunk@17944 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-18 03:43:04 +00:00
troy%netscape.com
17ecd2e936 Added nsIAreaFrame
git-svn-id: svn://10.0.0.236/trunk@17943 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-18 03:14:48 +00:00
troy%netscape.com
525b1062ea Fix for bug #2450; 'padding' wasn't getting handled properly
git-svn-id: svn://10.0.0.236/trunk@17942 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-18 00:48:59 +00:00
karnaze%netscape.com
46dc14a9bb scrollable row groups
git-svn-id: svn://10.0.0.236/trunk@17941 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-17 23:35:56 +00:00
pavlov%pavlov.net
f875678a9c use the right visual when we create the pixmaps
git-svn-id: svn://10.0.0.236/trunk@17940 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-17 22:48:27 +00:00
pavlov%pavlov.net
3f34c23843 fix Invalidate() and Update()
git-svn-id: svn://10.0.0.236/trunk@17939 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-17 19:30:13 +00:00
pavlov%pavlov.net
1485e914c7 only create 1 GC since we are pushing the same visual for all of the widgets.
git-svn-id: svn://10.0.0.236/trunk@17938 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-17 18:58:28 +00:00
pavlov%pavlov.net
c14457833d fix for crashing.
git-svn-id: svn://10.0.0.236/trunk@17937 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-17 17:51:02 +00:00
rpotts%netscape.com
684383509d Changed NS_DOCUMENTLOADER_CID to the new NS_DOCUMENTLOADER_SERVICE_CID
git-svn-id: svn://10.0.0.236/trunk@17936 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-17 11:49:41 +00:00
rpotts%netscape.com
64515206b5 The DocumentLoader is now a global service. Rather than creating document loaders via the factory, they are now created as child loaders of the global DocumentLoader service which is accessable via GetService.
git-svn-id: svn://10.0.0.236/trunk@17935 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-17 11:48:58 +00:00
rpotts%netscape.com
dc9ee3099d Changed NS_DOCUMENTLOADER_CID to NS_DOCUMENTLOADER_SERVICE_CID
git-svn-id: svn://10.0.0.236/trunk@17934 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-17 11:47:27 +00:00
troy%netscape.com
e0f2b783e6 Added 'computedMargin' to nsHTMLReflowState, which replaced the individual
margin values (e.g., computedLeftMargin)


git-svn-id: svn://10.0.0.236/trunk@17933 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-17 05:43:02 +00:00
pavlov%pavlov.net
b4df8837c5 fix bustage
git-svn-id: svn://10.0.0.236/trunk@17932 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-17 03:08:56 +00:00
pavlov%pavlov.net
0323370c96 move the event queue into nsToolkit
git-svn-id: svn://10.0.0.236/trunk@17931 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-17 02:09:55 +00:00
pavlov%pavlov.net
7ad97a3888 remove unused code
git-svn-id: svn://10.0.0.236/trunk@17930 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-17 02:09:24 +00:00
pavlov%pavlov.net
397d825a68 Inherit nsDialog from nsWindow instead of nsWidget. s/Motif/GTK+/ in *.h for
some comments


git-svn-id: svn://10.0.0.236/trunk@17929 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-17 01:36:13 +00:00
pavlov%pavlov.net
be590a7f1b move some stuff from nsWindow to nsWidget. Removed more unused code, do
redraws correctly...


git-svn-id: svn://10.0.0.236/trunk@17928 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-16 23:12:35 +00:00
troy%netscape.com
a8f6c4be42 Fixed it so relatively positioned block frames act as containing blocks
for absolutely positioned child elements


git-svn-id: svn://10.0.0.236/trunk@17927 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-16 22:18:08 +00:00
troy%netscape.com
09fde7e34c Changed nsHTMLReflowState to compute 'offsets' for relatively positioned
elements


git-svn-id: svn://10.0.0.236/trunk@17926 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-16 20:58:17 +00:00
talisman%anamorphic.com
e776b17de6 *** empty log message ***
git-svn-id: svn://10.0.0.236/trunk@17925 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-16 07:42:16 +00:00
pierre%netscape.com
46bf27e1f8 #2439: Links are not underlined correctly
git-svn-id: svn://10.0.0.236/trunk@17924 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-16 07:09:59 +00:00
alecf%netscape.com
0e1ebde9db change RemoveGroup a bit so we can remove by name and by newsgropu
git-svn-id: svn://10.0.0.236/trunk@17923 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-16 05:54:02 +00:00
alecf%netscape.com
9a8dd89fb4 adding new Category interface
git-svn-id: svn://10.0.0.236/trunk@17922 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-16 05:53:21 +00:00
alecf%netscape.com
c6499366d9 a little more - many more functions updated to match interface
git-svn-id: svn://10.0.0.236/trunk@17921 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-16 05:52:51 +00:00
alecf%netscape.com
eaf777dadd fix busted build in main tree
git-svn-id: svn://10.0.0.236/trunk@17920 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-16 05:52:29 +00:00
grail%cafebabe.org
1bda28a96d Lots of clean up with XML generated menus. Need some documentation
and action code inserted.


git-svn-id: svn://10.0.0.236/trunk@17919 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-16 05:24:25 +00:00
alecf%netscape.com
5fbd559ca3 back out relevant changes that broke the tree
git-svn-id: svn://10.0.0.236/trunk@17918 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-16 05:09:24 +00:00
alecf%netscape.com
10ce1a2ee5 add nsIMsgGroupRecord to build process
git-svn-id: svn://10.0.0.236/trunk@17917 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-16 04:59:25 +00:00
alecf%netscape.com
84a333ae28 new interface to nsMsgGroupRecord
git-svn-id: svn://10.0.0.236/trunk@17916 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-16 04:52:15 +00:00
alecf%netscape.com
95ddbb5ffd start moving stuff out of msgcom.h and into individual header files in mailnews
git-svn-id: svn://10.0.0.236/trunk@17915 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-16 04:44:00 +00:00
alecf%netscape.com
4089317770 adding MSG_FOLDER_FLAG* values from old include/msgcom.h
git-svn-id: svn://10.0.0.236/trunk@17914 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-16 04:30:00 +00:00
rickg%netscape.com
1de8de8681 fixed viewsource and parser/netlib bug
git-svn-id: svn://10.0.0.236/trunk@17913 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-16 04:25:40 +00:00
alecf%netscape.com
c6325f6625 more work trying to get this thing to compile - XPCOMify some interfaces
git-svn-id: svn://10.0.0.236/trunk@17912 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-16 03:57:39 +00:00
alecf%netscape.com
12f6e2266d adding new attributes subscribed and category
git-svn-id: svn://10.0.0.236/trunk@17911 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-16 03:56:56 +00:00
hyatt%netscape.com
614150d9c9 Added code to support CLSID instantiation. Approved by amusil and av.
git-svn-id: svn://10.0.0.236/trunk@17909 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-16 02:43:51 +00:00
scc%netscape.com
941d7a5f92 Now test pointer result _and_ error code on return from QueryInterface, as some implementations return garbage.
git-svn-id: svn://10.0.0.236/trunk@17908 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-16 02:37:22 +00:00
sfraser%netscape.com
e1b3d3bd12 Fix control key handling to call HandleControlKey, to fix the font problem. Also draw a box around the control for looks.
git-svn-id: svn://10.0.0.236/trunk@17907 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-16 00:42:33 +00:00
sfraser%netscape.com
37e14404f9 Mcmullen's fixes for scroll bar behaviour, and override a method so that scroll bars are sized correctly.
git-svn-id: svn://10.0.0.236/trunk@17906 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-16 00:41:20 +00:00
sfraser%netscape.com
1d7ca056f7 Tweak the window size so that the scroll bar is correctly positioned, and create a root Mac control for the window (so that we get control embedding).
git-svn-id: svn://10.0.0.236/trunk@17904 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-16 00:40:26 +00:00
sfraser%netscape.com
86e06cbf5a mcmullen's scrollbar fixes (use 32-bit control values), some tweaks of Mac control visibility to avoid drawing controls in the wrong places, add a couple of utility methods for creating and adjusting Mac controls.
git-svn-id: svn://10.0.0.236/trunk@17903 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-16 00:39:28 +00:00
davidm%netscape.com
17170dd5f8 2258 [PP] Messed up drawing after scrolling
git-svn-id: svn://10.0.0.236/trunk@17902 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-16 00:38:32 +00:00
sfraser%netscape.com
2046d592c4 Optimization: don't refocus a widget if it is already focussed
git-svn-id: svn://10.0.0.236/trunk@17901 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-16 00:30:40 +00:00
sfraser%netscape.com
bb73563bf0 Make the status bar read-only
git-svn-id: svn://10.0.0.236/trunk@17900 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-16 00:29:07 +00:00
ftang%netscape.com
6d11d388ca First Checked In.
git-svn-id: svn://10.0.0.236/trunk@17899 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-16 00:29:00 +00:00
ftang%netscape.com
f8c10c6657 add EUC-JP converter
git-svn-id: svn://10.0.0.236/trunk@17898 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-16 00:20:44 +00:00
kipp%netscape.com
3c2e84fe27 Removed List code now that base class dumps all child lists
git-svn-id: svn://10.0.0.236/trunk@17897 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-16 00:19:30 +00:00
kipp%netscape.com
fd7f93dbd7 Update List implementations to use GetAdditionalChildLists so that all lists of children are dumped out automatically
git-svn-id: svn://10.0.0.236/trunk@17896 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-16 00:19:10 +00:00
kipp%netscape.com
4e355995e6 Spanked away SizeOf methods and nsIListFilter
git-svn-id: svn://10.0.0.236/trunk@17895 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-16 00:00:50 +00:00
kipp%netscape.com
5f839220a3 Removed IListFilter and SizeOf API usage
git-svn-id: svn://10.0.0.236/trunk@17894 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 23:51:00 +00:00
sfraser%netscape.com
8286fbb064 Fix build bustage.
git-svn-id: svn://10.0.0.236/trunk@17893 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 23:47:23 +00:00
guha%netscape.com
4995984517 started implementing history (not yet in build system)
git-svn-id: svn://10.0.0.236/trunk@17892 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 23:44:37 +00:00
alecf%netscape.com
15773fd920 update to reflect renaming nsIMsgNewsgroup -> nsINNTPNewsgroup
git-svn-id: svn://10.0.0.236/trunk@17891 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 23:38:04 +00:00
alecf%netscape.com
4570d5baf2 update idl and header files to reflect nsIMsgNewsgroup->nsINNTPNewsgroup change
git-svn-id: svn://10.0.0.236/trunk@17890 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 23:34:20 +00:00
alecf%netscape.com
95618732f8 rename nsIMsgNewsgroup -> nsINNTPNewsgroup
git-svn-id: svn://10.0.0.236/trunk@17889 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 23:31:39 +00:00
despotdaemon%netscape.com
1c030bfa0b Pseudo-automatic update of changes made by akkana@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@17888 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 23:28:34 +00:00
jfrancis%netscape.com
d1c3b53530 redoing timer addref/release strategy, and guaranteeing that timers will only be put on the firing list _once_, even if a client tries to add it multiple times.
git-svn-id: svn://10.0.0.236/trunk@17887 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 23:18:57 +00:00
kipp%netscape.com
0471bcb97b Fixed a typo in the test url list
git-svn-id: svn://10.0.0.236/trunk@17886 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 22:58:06 +00:00
kipp%netscape.com
bcd0726142 new
git-svn-id: svn://10.0.0.236/trunk@17885 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 22:53:51 +00:00
kipp%netscape.com
1f0fa192a0 Switch to using nsFrameList for frame lists
git-svn-id: svn://10.0.0.236/trunk@17884 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 22:53:39 +00:00
kipp%netscape.com
c3040176bf Used revised version of nsContainerFrame that uses an nsFrameList instead of a raw nsIFrame*
git-svn-id: svn://10.0.0.236/trunk@17883 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 22:52:05 +00:00
dcone%netscape.com
478aeecf15 Added new postscript fontmetric code, and update the Device and Rendering context to use them
git-svn-id: svn://10.0.0.236/trunk@17882 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 22:44:32 +00:00
pierre%netscape.com
2a1651c3e4 fix for #2209 "Can't display toolbars and xpTree": always call CommonInit() in SelectDrawingSurface().
git-svn-id: svn://10.0.0.236/trunk@17881 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 22:35:41 +00:00
pierre%netscape.com
cf1d92e1f0 fixed the windowless menu handler to work with non-raptor windows (SIOUX debug window, for instance)
git-svn-id: svn://10.0.0.236/trunk@17880 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 22:34:59 +00:00
pierre%netscape.com
450d620463 no longer ignores the returned value from m_Observer->OnStartBinding(). This allows embedding apps (eg. Intuit) to intercept and filter URLs.
git-svn-id: svn://10.0.0.236/trunk@17879 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 22:34:46 +00:00
pierre%netscape.com
151f94686f fixed the bookmarks file path for the Mac
git-svn-id: svn://10.0.0.236/trunk@17878 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 22:34:15 +00:00
pierre%netscape.com
258d93b5db make aliases of RDF resources
git-svn-id: svn://10.0.0.236/trunk@17877 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 22:32:53 +00:00
joki%netscape.com
b10f143b39 Fix bogus return value on GetImageMap
git-svn-id: svn://10.0.0.236/trunk@17876 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 22:26:30 +00:00
harishd%netscape.com
221a2bc36c Added two new border style defines that
would be used later.


git-svn-id: svn://10.0.0.236/trunk@17875 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 22:24:29 +00:00
joki%netscape.com
06d70c449d Temporary fix to windows key events to give them a coord not associated with the mouse.
git-svn-id: svn://10.0.0.236/trunk@17874 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 22:24:23 +00:00
michaelp%netscape.com
3b9905b53c fixed busted javascript.
git-svn-id: svn://10.0.0.236/trunk@17873 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 22:16:40 +00:00
wtc%netscape.com
efcfe62f11 Bugzilla bug #2431: fixed PL_GetNextOpt so that it returns PL_OPT_BAD
instead of asserts when an option that has an associated value is
not followed by a value.  Also fixed a bug that incorrectly skipped
the option following a naked option.


git-svn-id: svn://10.0.0.236/trunk@17872 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 22:13:26 +00:00
michaelp%netscape.com
a1dbc02252 when a clip is specified for a view, the clip now only affects the
view for which it is specified, not any of it's children or other
views stacked "behind" it.


git-svn-id: svn://10.0.0.236/trunk@17871 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 22:11:46 +00:00
jfrancis%netscape.com
b21480c640 fixing destructor bug in Repeater
git-svn-id: svn://10.0.0.236/trunk@17870 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 22:11:16 +00:00
troy%netscape.com
c8ffafa0d6 Fixed it so that box offsets (left/right/top/bottom) can be negative numbers
git-svn-id: svn://10.0.0.236/trunk@17869 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 22:09:15 +00:00
terry%netscape.com
99aa534807 Allow querying by OS.
git-svn-id: svn://10.0.0.236/trunk@17868 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 22:05:42 +00:00
shaver%netscape.com
0d6c623096 more primitives and over-complex macros. next stop: bit-handling (not yet part of seamonkey)
git-svn-id: svn://10.0.0.236/trunk@17867 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 21:14:48 +00:00
terry%netscape.com
7053e3f078 When viewing a bug, make it possible to change its OS.
git-svn-id: svn://10.0.0.236/trunk@17866 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 20:39:20 +00:00
hshaw%netscape.com
31cbcecdc1 Remove C++ comments from previous checkin
git-svn-id: svn://10.0.0.236/trunk@17865 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 20:08:54 +00:00
rickg%netscape.com
797e5add3c fix for 2390
git-svn-id: svn://10.0.0.236/trunk@17864 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 19:55:29 +00:00
buster%netscape.com
a86baa60f0 comments and removal of dead code
git-svn-id: svn://10.0.0.236/trunk@17863 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 19:55:19 +00:00
gagan%netscape.com
6aa855c91d Switching off NU_CACHE by default for now...
git-svn-id: svn://10.0.0.236/trunk@17862 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 19:33:17 +00:00
rickg%netscape.com
2884211b1d fixed a dozen new parser bugs
git-svn-id: svn://10.0.0.236/trunk@17861 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 19:29:35 +00:00
coop%netscape.com
bcae14f76c NOT PART OF SEAMONKEY
- updated and streamlined in-memory structure to coincide with typelib specification.
- added comments for more obtuse structures


git-svn-id: svn://10.0.0.236/trunk@17860 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 19:23:40 +00:00
rickg%netscape.com
aaaf38083e exposed objectAt in deque, and fixed toInteger bug
git-svn-id: svn://10.0.0.236/trunk@17859 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 19:20:51 +00:00
vidur%netscape.com
c2d4d4ab29 Wildcard handling of document.getElementsByTagName. Better handling of casing and namespaces for tagNames.
git-svn-id: svn://10.0.0.236/trunk@17858 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 19:18:30 +00:00
mjudge%netscape.com
546bdab866 scc and I decided that the explicit keyword was not necessary for the constructor.
It never hurts you to make an nsCOMPtr.  MJ


git-svn-id: svn://10.0.0.236/trunk@17857 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 18:57:31 +00:00
guha%netscape.com
e1e2b2708a bookmarks stuff
git-svn-id: svn://10.0.0.236/trunk@17856 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 18:56:28 +00:00
alecf%netscape.com
9625b32c35 add useful constants
git-svn-id: svn://10.0.0.236/trunk@17855 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 18:28:52 +00:00
troy%netscape.com
8a00831853 Fix for bug #1998. Now we render the background image over the padding area and not over the border area
git-svn-id: svn://10.0.0.236/trunk@17854 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 18:25:58 +00:00
sfraser%netscape.com
47646ffd92 Turning off ATSUI font rendering (for now) so that QA can test layout that semi-works.
git-svn-id: svn://10.0.0.236/trunk@17853 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 18:18:02 +00:00
sfraser%netscape.com
8665f1db57 Another part of fix for 2411 -- add a condition that was in the 4.x codebase, that no font smaller than 9pt was used.
git-svn-id: svn://10.0.0.236/trunk@17852 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 18:15:21 +00:00
terry%netscape.com
209d13cfe2 Allow querying of URL.
git-svn-id: svn://10.0.0.236/trunk@17851 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 17:49:50 +00:00
kipp%netscape.com
7554cf628e Fixed absolute positioning bug I introduced in my last checkin
git-svn-id: svn://10.0.0.236/trunk@17850 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 17:33:00 +00:00
pinkerton%netscape.com
19c301f5fd remove powerplant debug/optimized libs.
git-svn-id: svn://10.0.0.236/trunk@17849 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 17:24:32 +00:00
despotdaemon%netscape.com
3f413cb923 Pseudo-automatic update of changes made by terry@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@17848 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 17:02:49 +00:00
rpotts%netscape.com
437fa7cdb5 Always fire the OnStopBinding() notification... Even if a previous call to the stream listener returned an error...
git-svn-id: svn://10.0.0.236/trunk@17847 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 10:23:32 +00:00
rpotts%netscape.com
401a0c93d9 Added some more debug trace messages...
git-svn-id: svn://10.0.0.236/trunk@17846 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 10:10:46 +00:00
sfraser%netscape.com
0297504a3b Fix font selection when using ATSUI (part of bug 2411)
git-svn-id: svn://10.0.0.236/trunk@17845 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 05:23:23 +00:00
jfrancis%netscape.com
a662b272cd Removing Powerplant
git-svn-id: svn://10.0.0.236/trunk@17844 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 05:19:59 +00:00
jfrancis%netscape.com
cc277fb0fc Powerplant Removal
git-svn-id: svn://10.0.0.236/trunk@17843 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 05:15:26 +00:00
jfrancis%netscape.com
a17a5c72c4 Fixing leaking of GraphioStates in nsRenderingContextMac destructor
git-svn-id: svn://10.0.0.236/trunk@17842 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 05:14:51 +00:00
jfrancis%netscape.com
7a1879608d Powerplant removal
git-svn-id: svn://10.0.0.236/trunk@17841 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 05:11:22 +00:00
troy%netscape.com
4eab0af794 Fixed an assert that was getting hit for absolutely positioned elements
git-svn-id: svn://10.0.0.236/trunk@17840 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 04:28:17 +00:00
pierre%netscape.com
fb7e0083d9 added html/base/src/nsFrameList.cpp for Kipp
git-svn-id: svn://10.0.0.236/trunk@17839 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 03:51:15 +00:00
sfraser%netscape.com
6d6a2a47aa Bustage fix: adding PowerPlant library back (DEBUG target only)
git-svn-id: svn://10.0.0.236/trunk@17838 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 03:46:36 +00:00
talisman%anamorphic.com
1b86ec0556 Moved member boolean collapsible into the Collapsible interface, where it belongs. Added javadoc comments for API documentation.(talisman)
git-svn-id: svn://10.0.0.236/trunk@17837 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 03:39:10 +00:00
talisman%anamorphic.com
952312d17b Moved member boolean collapsible into the interface, where it belongs.(talisman)
git-svn-id: svn://10.0.0.236/trunk@17836 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 03:38:02 +00:00
peterl%netscape.com
4903734012 fixed bad html that triggers an interesting bug in select control frame
git-svn-id: svn://10.0.0.236/trunk@17835 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 03:01:28 +00:00
mcmullen%netscape.com
8d0407462f More build bustage.
git-svn-id: svn://10.0.0.236/trunk@17834 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 02:33:47 +00:00
alecf%netscape.com
128bbd56f0 include fe_proto.h instead of manually defining LINEBREAK
git-svn-id: svn://10.0.0.236/trunk@17833 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 02:11:42 +00:00
peterl%netscape.com
03c3316c37 better base url handling
Checkin during red tree approved by sar


git-svn-id: svn://10.0.0.236/trunk@17832 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 02:09:56 +00:00
peterl%netscape.com
6a133b5aec better base url support
added support for "none" style change hint
added assert for recycling of html attributes

Checkin during red tree approved by sar


git-svn-id: svn://10.0.0.236/trunk@17831 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 02:09:29 +00:00
peterl%netscape.com
5418d308a2 don't assert when not mapping anything without mapping function
Checkin during red tree approved by sar


git-svn-id: svn://10.0.0.236/trunk@17830 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 02:08:20 +00:00
peterl%netscape.com
6f8531ba11 better base url support
Checkin during red tree approved by sar


git-svn-id: svn://10.0.0.236/trunk@17829 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 02:07:46 +00:00
peterl%netscape.com
3ea8de5a73 better base url support
fixed assert in call to deprecated url method

Checkin during red tree approved by sar


git-svn-id: svn://10.0.0.236/trunk@17828 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 02:07:15 +00:00
peterl%netscape.com
3d6d5eed05 better base URL support
better parsing of media types (per HTML4.0 spec)
enforce pseudo element sepectors at end of seletor list

Checkin during red tree approved by sar


git-svn-id: svn://10.0.0.236/trunk@17827 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 02:06:13 +00:00
peterl%netscape.com
ca0b670784 better computation of style hint
Checkin during red tree approved by sar


git-svn-id: svn://10.0.0.236/trunk@17826 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 02:04:51 +00:00
peterl%netscape.com
745ebf782f better base url support
fixed parsing of media attribute

Checkin during red tree approved by sar


git-svn-id: svn://10.0.0.236/trunk@17825 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 02:02:48 +00:00
peterl%netscape.com
707412ef5e better base url and target support
Checkin during red tree approved by sar


git-svn-id: svn://10.0.0.236/trunk@17824 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 02:01:36 +00:00
peterl%netscape.com
7f81a64fe4 better base URL support
set base url when parsing style attributes
better style attribute change notification

Checkin during red tree approved by sar


git-svn-id: svn://10.0.0.236/trunk@17823 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 01:59:42 +00:00
peterl%netscape.com
404b08681a made font color also set text decoration color
Checkin during red tree approved by sar


git-svn-id: svn://10.0.0.236/trunk@17822 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 01:58:41 +00:00
peterl%netscape.com
7a0ed38a4e better base URL support
Checkin during red tree approved by sar


git-svn-id: svn://10.0.0.236/trunk@17821 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 01:57:58 +00:00
peterl%netscape.com
3c961a8c32 changed parent/child ref/counting policy
Checkin during red tree approved by sar


git-svn-id: svn://10.0.0.236/trunk@17820 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 01:57:05 +00:00
peterl%netscape.com
80f5bcaac3 added better base url support
tweaks to attribute change notification

Checkin during red tree approved by sar


git-svn-id: svn://10.0.0.236/trunk@17819 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 01:56:18 +00:00
alecf%netscape.com
fa221950f2 add XPPtrArray and related classes
git-svn-id: svn://10.0.0.236/trunk@17818 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 01:54:38 +00:00
peterl%netscape.com
7b54523bc5 added GetBaseURL
Checkin during red tree approved by sar


git-svn-id: svn://10.0.0.236/trunk@17817 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 01:53:50 +00:00
peterl%netscape.com
f40f1b9daa added style hint "none"
Checkin during red tree approved by sar


git-svn-id: svn://10.0.0.236/trunk@17816 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 01:53:03 +00:00
peterl%netscape.com
faf263ca85 finally removed compatibility emulation of Nav font rounding bug
Let the games begin

Checkin during red tree approved by sar


git-svn-id: svn://10.0.0.236/trunk@17815 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 01:52:03 +00:00
kipp%netscape.com
f547bf04d4 Fixed up print-preview menu
git-svn-id: svn://10.0.0.236/trunk@17814 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 01:31:39 +00:00
kipp%netscape.com
a8300fda29 Stop using reflow commands for frame structure changes; instead invoke methods on the frames which then generate reflow commands as needed
git-svn-id: svn://10.0.0.236/trunk@17813 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 01:30:12 +00:00
kipp%netscape.com
ff4f7a9fe8 Implement temporary versions of AppendFrames/InsertFrames/RemoveFrame; stub out ReplaceFrame
git-svn-id: svn://10.0.0.236/trunk@17812 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 01:29:15 +00:00
kipp%netscape.com
098c401a87 Added nsFrameList to the build
git-svn-id: svn://10.0.0.236/trunk@17811 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 01:28:46 +00:00
kipp%netscape.com
ef96cd4a72 Added append/insert/remove/replace methods
git-svn-id: svn://10.0.0.236/trunk@17810 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 01:28:28 +00:00
kipp%netscape.com
f465191dd8 new
git-svn-id: svn://10.0.0.236/trunk@17809 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 01:28:07 +00:00
kipp%netscape.com
b2faafdce6 Fix build bustage
git-svn-id: svn://10.0.0.236/trunk@17808 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 01:01:39 +00:00
mcmullen%netscape.com
9905bf6e1a Fix build bustage
git-svn-id: svn://10.0.0.236/trunk@17807 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 00:57:14 +00:00
jfrancis%netscape.com
a47c7d6527 turning building of PP back on for now - something else appears to need it.
git-svn-id: svn://10.0.0.236/trunk@17806 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 00:28:12 +00:00
jfrancis%netscape.com
f0f22a9148 Removing Powerplant
git-svn-id: svn://10.0.0.236/trunk@17805 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 00:12:02 +00:00
alecf%netscape.com
1b2a75f8e6 add imap to build tree
git-svn-id: svn://10.0.0.236/trunk@17804 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 00:08:56 +00:00
alecf%netscape.com
7888f0ca7a nsINNTPHost and nsNNTPHost now compile.
git-svn-id: svn://10.0.0.236/trunk@17803 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 00:08:34 +00:00
alecf%netscape.com
0319af5eec fix Emacs identing line
git-svn-id: svn://10.0.0.236/trunk@17802 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 00:07:52 +00:00
coop%netscape.com
9d9781932c Fleshed out XDR code for in-memory structs.
To do:
- still need to track data pool offsets for most structs


git-svn-id: svn://10.0.0.236/trunk@17801 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 00:06:44 +00:00
jfrancis%netscape.com
73d5178d78 Removing Powerplant
git-svn-id: svn://10.0.0.236/trunk@17800 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 00:06:35 +00:00
alecf%netscape.com
0a0005d6bc fix Emacs indenting
git-svn-id: svn://10.0.0.236/trunk@17799 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 00:06:12 +00:00
alecf%netscape.com
31c86c4cb7 update NSPR APIs and fix Emacs identing
git-svn-id: svn://10.0.0.236/trunk@17798 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 00:05:47 +00:00
coop%netscape.com
f10c484578 Made necessary modifications to in-memory structs after writing some of
the XDR code for them.


git-svn-id: svn://10.0.0.236/trunk@17797 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 00:04:56 +00:00
sfraser%netscape.com
42d6e74fbe Reinstate buster's changes, with a fix for the nsCOMPtr problem.
git-svn-id: svn://10.0.0.236/trunk@17796 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 00:03:41 +00:00
alecf%netscape.com
3a4c7fbd89 fix Emacs identing
git-svn-id: svn://10.0.0.236/trunk@17795 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 00:03:24 +00:00
jfrancis%netscape.com
582edeead6 First Checked In.
git-svn-id: svn://10.0.0.236/trunk@17794 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 00:01:47 +00:00
alecf%netscape.com
5833f62773 new nsIMAPGroupRecord
git-svn-id: svn://10.0.0.236/trunk@17793 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 00:00:49 +00:00
alecf%netscape.com
86dfe9cb2d start building nsMsgGroupRecord
git-svn-id: svn://10.0.0.236/trunk@17792 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-15 00:00:31 +00:00
alecf%netscape.com
05dde72e8f move nsIMsgHost.* into base
git-svn-id: svn://10.0.0.236/trunk@17791 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-14 23:51:32 +00:00
davidm%netscape.com
6821d981a7 2312 When not using ATSUI, no conversion is made from Latin-1 to MacRoman
2155  Proportional font spacing issues using metrics ( fix for nonATSUI drawing case )


git-svn-id: svn://10.0.0.236/trunk@17790 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-14 23:51:17 +00:00
gagan%netscape.com
8a5d4c16b8 Fix for 1856 and 2094. is_write_ready for the next stream was returning 0 and we were continuing to write with that size (0). This triggered the end of stream. Now we correctly do nothing if is_write_ready returns 0.
git-svn-id: svn://10.0.0.236/trunk@17789 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-14 23:51:11 +00:00
sfraser%netscape.com
f55d23d9be Call Inherited::SetFont in the SetFont method
git-svn-id: svn://10.0.0.236/trunk@17788 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-14 23:43:41 +00:00
vidur%netscape.com
2fdb6d754e clone test
git-svn-id: svn://10.0.0.236/trunk@17787 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-14 23:42:11 +00:00
sfraser%netscape.com
08e3cd334b Fix a couple of warnings by making callbacks static.
git-svn-id: svn://10.0.0.236/trunk@17786 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-14 23:37:57 +00:00
sfraser%netscape.com
4bb3f24b2b Moved nsTextNode.cpp, nsCommentNode.cpp, nsGenericDOMDataNode.cpp from html/content to base (for vidur)
git-svn-id: svn://10.0.0.236/trunk@17785 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-14 23:37:18 +00:00
law%netscape.com
89203899af Updated with new enumerator protocols
git-svn-id: svn://10.0.0.236/trunk@17784 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-14 23:30:44 +00:00
mcmullen%netscape.com
89a909043d Added all the nucache files to the memory module project (as a group) so that NU_CACHE can be turned on with a flick of the wrist, made the modular memory library build with the NU_CACHE flag turned on, fixed build warnings and errors. The NU_CACHE flag is still OFF, because the database code doesn't exist for Macintosh or Unix :-(
git-svn-id: svn://10.0.0.236/trunk@17783 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-14 23:27:36 +00:00
mcmullen%netscape.com
9b9be1867f Fixed some warnings.Added all the nucache files to the memory module project (as a group) so that NU_CACHE can be turned on with a flick of the wrist, made the modular memory library build with the NU_CACHE flag turned on, fixed build warnings and errors. The NU_CACHE flag is still OFF, because the database code doesn't exist for Macintosh or Unix :-(
git-svn-id: svn://10.0.0.236/trunk@17782 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-14 23:27:27 +00:00
ftang%netscape.com
e4802c01ae fix the bug which will crash when some converter are not available
git-svn-id: svn://10.0.0.236/trunk@17781 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-14 23:24:17 +00:00
ftang%netscape.com
0ece72f323 add greek test case
git-svn-id: svn://10.0.0.236/trunk@17780 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-14 23:23:30 +00:00
ftang%netscape.com
043757e9fc add ucvlatin into -I
git-svn-id: svn://10.0.0.236/trunk@17779 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-14 23:23:13 +00:00
mcmullen%netscape.com
46a406db90 Added all the nucache files to the memory module project (as a group) so that NU_CACHE can be turned on with a flick of the wrist, made the modular memory library build with the NU_CACHE flag turned on, fixed build warnings and errors. The NU_CACHE flag is still OFF, because the database code doesn't exist for Macintosh or Unix :-(
git-svn-id: svn://10.0.0.236/trunk@17778 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-14 23:21:06 +00:00
alecf%netscape.com
ccf32dc186 add new MIME and IMAP trees to --enable-mailnews
git-svn-id: svn://10.0.0.236/trunk@17777 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-14 23:20:33 +00:00
alecf%netscape.com
66bdba18ff add new IMAP makefiles
git-svn-id: svn://10.0.0.236/trunk@17776 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-14 23:16:27 +00:00
vidur%netscape.com
d81e61b1ff Moved text and comment code out of HTML-specific directories. Completed CloneNode for elements. Completed factory methods for intersection of XML and HTML.
git-svn-id: svn://10.0.0.236/trunk@17775 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-14 23:14:02 +00:00
alecf%netscape.com
9b8f7545fe adding nsMsgGroupRecord (previously msg_GroupRecord)
git-svn-id: svn://10.0.0.236/trunk@17773 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-14 23:09:22 +00:00
dveditz%netscape.com
1ff29abbe0 merging in changes from Classic branch. Not part of SeaMonkey build (yet)
git-svn-id: svn://10.0.0.236/trunk@17772 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-14 23:08:21 +00:00
waterson%netscape.com
5d490128a8 Turn off arithmetic conversion warnings in build.
git-svn-id: svn://10.0.0.236/trunk@17770 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-14 23:05:28 +00:00
waterson%netscape.com
f48c09fa09 Fix compiler warning.
git-svn-id: svn://10.0.0.236/trunk@17769 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-14 23:04:59 +00:00
despotdaemon%netscape.com
92b1cc77bb Pseudo-automatic update of changes made by val4@cornell.edu.
git-svn-id: svn://10.0.0.236/trunk@17768 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-14 23:04:41 +00:00
waterson%netscape.com
52326281de Oops. Had an = when I meant ==.
git-svn-id: svn://10.0.0.236/trunk@17767 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-14 23:04:16 +00:00
waterson%netscape.com
7ad183bf13 Fixed compiler warning.
git-svn-id: svn://10.0.0.236/trunk@17766 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-14 23:03:07 +00:00
pavlov%pavlov.net
82360354b0 #ifdef around some recent gtk changes
git-svn-id: svn://10.0.0.236/trunk@17765 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-14 23:02:50 +00:00
terry%netscape.com
cec25e81be rickg now owns what toshok did.
git-svn-id: svn://10.0.0.236/trunk@17753 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-14 22:18:58 +00:00
buster%netscape.com
045c82cdbf backed out Merge functionality because it doesn't compile on Mac.
git-svn-id: svn://10.0.0.236/trunk@17752 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-14 21:52:08 +00:00
despotdaemon%netscape.com
552637d5ff Pseudo-automatic update of changes made by terry@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@17750 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-14 20:41:35 +00:00
mcmullen%netscape.com
5922ad8b08 First Checked In.
git-svn-id: svn://10.0.0.236/trunk@17749 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-14 19:46:11 +00:00
buster%netscape.com
162941cddc added pres shell to nsIEditor::Init
git-svn-id: svn://10.0.0.236/trunk@17748 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-14 19:41:38 +00:00
mcmullen%netscape.com
875d966f65 Added #ifdefs to recent temp hack, to make it easy to turn the temp hack off.
git-svn-id: svn://10.0.0.236/trunk@17747 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-14 19:36:22 +00:00
pinkerton%netscape.com
b3353eb548 fix misunderstanding with params to SetText()
git-svn-id: svn://10.0.0.236/trunk@17746 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-14 18:57:44 +00:00
pinkerton%netscape.com
baa0573468 fix misunderstanding with parameters in SetText()
git-svn-id: svn://10.0.0.236/trunk@17745 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-14 18:56:49 +00:00
buster%netscape.com
4cd5464496 pass the pres shell to the editor init method
git-svn-id: svn://10.0.0.236/trunk@17744 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-14 18:52:16 +00:00
gagan%netscape.com
5d422e8d5b Fix the errors resulting from no Content-Length headers.
git-svn-id: svn://10.0.0.236/trunk@17743 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-14 18:47:38 +00:00
pavlov%pavlov.net
9c2f480a0e fix bug 2352
git-svn-id: svn://10.0.0.236/trunk@17742 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-14 18:35:55 +00:00
dcone%netscape.com
d6dd039681 Added files DeleteRangeTxn.cpp DeleteNodeTxn.cpp
git-svn-id: svn://10.0.0.236/trunk@17741 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-14 18:19:19 +00:00
buster%netscape.com
dceac9452d added DeleteElementTxn and DeleteRangeTxn, and added merging of text insertions.
added some better error checking on all transactions.


git-svn-id: svn://10.0.0.236/trunk@17740 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-14 18:02:45 +00:00
shaver%netscape.com
f062e83a76 updated API example in XPT_DoIDE
git-svn-id: svn://10.0.0.236/trunk@17739 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-14 17:35:14 +00:00
larryh%netscape.com
a3ac02c342 Diffs from John Fairhurst mjf35@hermes.cam.ac.uk for OS/2
git-svn-id: svn://10.0.0.236/trunk@17738 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-14 16:14:22 +00:00
waterson%netscape.com
deecde44a4 Rearranged stream and content sink stuff to be a part of base: content sink will eventually be replaced by a lower-level parser implementation. Improved the named data source handling.
git-svn-id: svn://10.0.0.236/trunk@17737 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-14 10:55:08 +00:00
ftang%netscape.com
ee542163d0 make UNIX build and run
git-svn-id: svn://10.0.0.236/trunk@17736 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-14 10:28:18 +00:00
ftang%netscape.com
2d37ef1259 fix the FastTableInit code
git-svn-id: svn://10.0.0.236/trunk@17730 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-14 08:49:03 +00:00
ftang%netscape.com
4d05a35652 fix the 0x00-0x20 and 0x7f problem nsUnicodeDecodeUtil.cpp
git-svn-id: svn://10.0.0.236/trunk@17729 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-14 08:22:31 +00:00
ftang%netscape.com
08a09d5e00 fix charset is caseless bug
git-svn-id: svn://10.0.0.236/trunk@17724 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-14 07:46:17 +00:00
ftang%netscape.com
91bf06000f add ucvlatin, add cp1253, iso-8859-1, windows-1253 converter, change the nsIUnicodeDecodeUtil interface
git-svn-id: svn://10.0.0.236/trunk@17722 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-14 07:39:45 +00:00
ftang%netscape.com
0fa4a59674 add first check in
git-svn-id: svn://10.0.0.236/trunk@17721 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-14 07:35:24 +00:00
pierre%netscape.com
a5b1311644 fixed build breakage
git-svn-id: svn://10.0.0.236/trunk@17720 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-14 07:30:02 +00:00
sfraser%netscape.com
cc87efd697 Fix build bustage (adding method CreateFontAliasTable())
git-svn-id: svn://10.0.0.236/trunk@17719 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-14 07:14:24 +00:00
pierre%netscape.com
a1c5cf9b9d Fix (part of) bug 2154: small-caps are displayed with the 'condense' attribute.
git-svn-id: svn://10.0.0.236/trunk@17718 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-14 07:12:07 +00:00
pierre%netscape.com
7e6e42282a Fixed the mouseRgn in WaitNextEvent in order not to continuously send mouseMoved events.
git-svn-id: svn://10.0.0.236/trunk@17717 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-14 07:02:28 +00:00
pierre%netscape.com
d0824bc3f6 Fix (part of) bug 2154: small-caps are displayed with the 'condense' attribute.
git-svn-id: svn://10.0.0.236/trunk@17716 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-14 06:54:21 +00:00
rpotts%netscape.com
5ab09dfebf Fixed up the signature for nsIContentViewerContainer::GetContentViewer()...
git-svn-id: svn://10.0.0.236/trunk@17715 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-14 06:49:59 +00:00
rpotts%netscape.com
9251d0c8b0 Added support for GetContainer()/SetContainer(). Added the OnStartURLLoad() notification to the DocumentLoadObserver...
git-svn-id: svn://10.0.0.236/trunk@17714 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-14 06:44:23 +00:00
rpotts%netscape.com
73e2ec4c7e Added OnStartURLLoad() notification which is called whenever the document loader has established a connection...
git-svn-id: svn://10.0.0.236/trunk@17713 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-14 06:37:11 +00:00
rpotts%netscape.com
f98ba48091 Added GetContainer() and SetContainer() methods which allow access to the ContentViewerContainer (ie webshell) associated with the document loader.
git-svn-id: svn://10.0.0.236/trunk@17712 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-14 06:34:56 +00:00
rpotts%netscape.com
943b5057e7 Moved GetContentViewer() from nsIWebShell into nsIContentViewerContainer...
git-svn-id: svn://10.0.0.236/trunk@17711 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-14 06:33:54 +00:00
rpotts%netscape.com
2c59a6eb70 Add some code that was lost from nsURL.cpp OpenStream(...). Use the nsIURLGroup if available to open the stream. This allows URL loads to be grouped together.
git-svn-id: svn://10.0.0.236/trunk@17710 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-14 06:12:36 +00:00
sfraser%netscape.com
db5ebeda1e No longer call the static method of nsFontMetricsMac in StartDraw; since nsMacControl implements SetFont now, this is no longer necessary.
git-svn-id: svn://10.0.0.236/trunk@17709 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-14 05:50:56 +00:00
sfraser%netscape.com
26ba0ffeae Add a utility routine to set the port's text traits, and call it from GetWidth and DrawString. Also fix warnings with the ATSUI calls, and fix the ATSUI #ifdef so that it's possible to #ifdef out all calls to the ATSUI library.
git-svn-id: svn://10.0.0.236/trunk@17708 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-14 05:49:51 +00:00
sfraser%netscape.com
707af630d5 Override SetFont to setup the control font properly. Previously, it was being picked up from the port just before drawing, which no longer works after the font optimizations in GFX.
git-svn-id: svn://10.0.0.236/trunk@17707 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-14 05:48:29 +00:00
sfraser%netscape.com
057f004909 Fix for bug 2211, and other font rendering changes and fixes. Fix davidm's changes to avoid blowing the font cache, change the static function to return font information, rather than set it.
git-svn-id: svn://10.0.0.236/trunk@17706 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-14 05:47:20 +00:00
sfraser%netscape.com
e1318ff7cd Override CreateFontAliasTable to tweak the font settings for Mac (specifically, use Courier in preference to Courier New for the fixed width font). Also #ifdef out the font num cache, now that nsFontMetricsMac is smarter about cacheing the font num.
git-svn-id: svn://10.0.0.236/trunk@17705 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-14 05:44:50 +00:00
sfraser%netscape.com
19b8fd4bae Added FontManager lib, for the call to the MacOS 8.5 routine FetchFontInfo
git-svn-id: svn://10.0.0.236/trunk@17704 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-14 05:43:18 +00:00
sfraser%netscape.com
d96a496896 Warnings fix (remove ; )
git-svn-id: svn://10.0.0.236/trunk@17703 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-14 05:37:28 +00:00
troy%netscape.com
ecc9f6f19d Removed the content-parent frame pointer. Now we just have the one geometric
parent


git-svn-id: svn://10.0.0.236/trunk@17702 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-14 05:16:23 +00:00
troy%netscape.com
5caea33110 Fix for bug #2316. Added back some code I removed because I didn't think we
needed it, but without out it 'color' doesn't inherit properly


git-svn-id: svn://10.0.0.236/trunk@17701 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-14 05:14:11 +00:00
sfraser%netscape.com
1667c46952 Warning fix (remove ;)
git-svn-id: svn://10.0.0.236/trunk@17700 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-14 05:12:30 +00:00
endico%mozilla.org
1d6131a23a Be still more terse.
git-svn-id: svn://10.0.0.236/trunk@17699 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-14 05:00:43 +00:00
endico%mozilla.org
b38a1bbdc3 make the credits at the end of each page more terse
git-svn-id: svn://10.0.0.236/trunk@17697 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-14 04:53:30 +00:00
jband%netscape.com
fb0c34af4a NOT PART OF SEAMONKEY - factored out data conversion routines, need to now make them handle datatypes not yet handled
git-svn-id: svn://10.0.0.236/trunk@17696 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-14 04:25:31 +00:00
endico%mozilla.org
fad62ea3b8 fix regexps to fix shaver's xpcom/tools/xpidl/ description bustage
git-svn-id: svn://10.0.0.236/trunk@17695 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-14 03:52:10 +00:00
dougt%netscape.com
fda6b1aa8a Initial Checkin of SilentDownload examples.
git-svn-id: svn://10.0.0.236/trunk@17681 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-14 01:48:18 +00:00
dougt%netscape.com
adbc6f06d0 Initial checkin of Silentdownload. This does not hook it up to the build
system.


git-svn-id: svn://10.0.0.236/trunk@17680 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-14 01:47:16 +00:00
despotdaemon%netscape.com
a305cc3f93 Pseudo-automatic update of changes made by brendan@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@17674 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-14 00:46:13 +00:00
alecf%netscape.com
6e4020a144 move to new NSPR APIs
git-svn-id: svn://10.0.0.236/trunk@17673 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-14 00:45:46 +00:00
alecf%netscape.com
5add71ad41 Ignore Makefile's
git-svn-id: svn://10.0.0.236/trunk@17672 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-14 00:42:15 +00:00
alecf%netscape.com
d34fd206f5 *** empty log message ***
git-svn-id: svn://10.0.0.236/trunk@17671 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-14 00:41:25 +00:00
val4%cornell.edu
1f3ae5b4a0 Working on condensing the file manipulation functions.
Some error checking.


git-svn-id: svn://10.0.0.236/trunk@17666 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-13 23:39:46 +00:00
norris%netscape.com
301616f606 fix bug 335882: crash printing out a function
git-svn-id: svn://10.0.0.236/trunk@17665 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-13 23:28:45 +00:00
alecf%netscape.com
dbba5b8db2 PL_Malloc -> PR_Malloc
(oops)


git-svn-id: svn://10.0.0.236/trunk@17663 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-13 22:48:44 +00:00
jband%netscape.com
f2d2484bc9 NOT PART OF SEAMONKEY - initial stuff for calling from native to JS (works with int params and hardcoded InterfaceInfo). quick implementation of nsID for JavaScript
git-svn-id: svn://10.0.0.236/trunk@17662 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-13 22:45:12 +00:00
shaver%netscape.com
94275ccb6c start of per-struct XDR code; a: leaf
git-svn-id: svn://10.0.0.236/trunk@17661 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-13 21:52:02 +00:00
terry%netscape.com
2187a56ca7 Oops; wasn't cleaning up properly.
git-svn-id: svn://10.0.0.236/trunk@17659 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-13 20:33:03 +00:00
terry%netscape.com
8f4dfd10d3 despot now also automatically creates mailing lists of people who can
check into a repository.


git-svn-id: svn://10.0.0.236/trunk@17658 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-13 20:31:36 +00:00
sfraser%netscape.com
bd27d339e7 Remove nsEditorInterfaces.cpp
git-svn-id: svn://10.0.0.236/trunk@17654 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-13 19:16:26 +00:00
buster%netscape.com
aaf9843c9f removed nsEditorInterfaces.cpp and all references to global methods therein.
all editing is handled by the editor now.


git-svn-id: svn://10.0.0.236/trunk@17653 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-13 18:52:02 +00:00
buster%netscape.com
2ec12ddca8 removed the test inspectors from the menu. They were confusing people.
When the time is right, I'll add them back in conditionally.


git-svn-id: svn://10.0.0.236/trunk@17652 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-13 18:14:35 +00:00
shaver%netscape.com
9da4ecb3d3 more header goo, xdr implementation stubs
git-svn-id: svn://10.0.0.236/trunk@17651 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-13 15:20:25 +00:00
rickg%netscape.com
fbfe87c995 fixed nested listing bug, and prep work for new logparse system
git-svn-id: svn://10.0.0.236/trunk@17650 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-13 08:43:20 +00:00
pollmann%netscape.com
1c39ca1162 Bug 2088 2099: Similar fixes for nsListBox (add PreCreateWidget to get mMultiSelect)
git-svn-id: svn://10.0.0.236/trunk@17648 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-13 07:27:24 +00:00
rpotts%netscape.com
c7fcd604c6 If no range headers are set then return NULL from GetByteRangeHeader() not an empty string...
git-svn-id: svn://10.0.0.236/trunk@17647 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-13 07:17:39 +00:00
pollmann%netscape.com
a58c0398d8 Bug 2088 2099: Check the IsPassword and IsReadOnly data members on creation.
git-svn-id: svn://10.0.0.236/trunk@17646 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-13 07:14:22 +00:00
pollmann%netscape.com
3d8261ebe9 Bug 2088 2099: Add PreCreateWidget method for password and readonly text elements.
git-svn-id: svn://10.0.0.236/trunk@17645 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-13 07:09:21 +00:00
troy%netscape.com
e69d38cccb Fix for bug #2276, and some initial support for 'right' and 'bottom'
for absolutely positioned elements


git-svn-id: svn://10.0.0.236/trunk@17644 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-13 06:37:31 +00:00
grail%cafebabe.org
c372c414ad Fix to get sizes of folder, threads, and messages to retain sizing
information.


git-svn-id: svn://10.0.0.236/trunk@17643 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-13 05:59:26 +00:00
rhp%netscape.com
c051bc3777 Adding modular libMIME to the tree.
git-svn-id: svn://10.0.0.236/trunk@17642 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-13 02:51:00 +00:00
mcmullen%netscape.com
629f7e6755 These include fixes of crashing bugs that were in the Nova tree and made since the last merge point (April 98), along with some bug prevention efforts, such as unobfuscating the return types. For example, some JSBools were being simply cast to a return value of "int", reversing their sense (success = JS_TRUE = 1 != 0)! In a world where everybody returns "int", the hidden bug is king.
git-svn-id: svn://10.0.0.236/trunk@17640 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-13 02:32:09 +00:00
rhp%netscape.com
80f6c6fa18 Adding modular libMIME to the tree.
git-svn-id: svn://10.0.0.236/trunk@17639 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-13 02:26:49 +00:00
davidm%netscape.com
418e0c2c79 Bugzilla [PP] Font mapping is wrong
git-svn-id: svn://10.0.0.236/trunk@17638 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-13 02:14:10 +00:00
rhp%netscape.com
2b4f3e72b9 Adding modular libMIME to the tree.
git-svn-id: svn://10.0.0.236/trunk@17637 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-13 01:54:56 +00:00
ebina%netscape.com
33caa0addc Add the gzip decoder back in.
git-svn-id: svn://10.0.0.236/trunk@17636 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-13 01:43:28 +00:00
petitta%netscape.com
db6199f447 Temporarly took out #define MOZ_FULLCIRCLE
git-svn-id: svn://10.0.0.236/trunk@17635 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-13 01:11:54 +00:00
petitta%netscape.com
1340dbe0ef Full Circle Mods
git-svn-id: svn://10.0.0.236/trunk@17634 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-13 00:46:28 +00:00
troy%netscape.com
bbcce4c71a Re-commiting my fucking changes...
git-svn-id: svn://10.0.0.236/trunk@17633 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-13 00:44:48 +00:00
troy%netscape.com
bb626b6036 Re-committing my fucking changes...
git-svn-id: svn://10.0.0.236/trunk@17632 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-13 00:38:29 +00:00
ebina%netscape.com
b860710c8e Once I turn on automatic decompressing gain we will have a dependency
on the zip library here.


git-svn-id: svn://10.0.0.236/trunk@17631 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-13 00:19:29 +00:00
pinkerton%netscape.com
4cd5350a12 fix problem where SetText would truncate text to 255.
git-svn-id: svn://10.0.0.236/trunk@17630 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-13 00:03:05 +00:00
pinkerton%netscape.com
496db1c678 fix #2247 to fix lack of redraw when text is set
git-svn-id: svn://10.0.0.236/trunk@17629 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-13 00:02:51 +00:00
cltbld%netscape.com
cd62100e23 backing out changes made against a red tree
git-svn-id: svn://10.0.0.236/trunk@17628 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-13 00:00:57 +00:00
vidur%netscape.com
672d296303 Fix for bug 1258. Content sink flushes tags when it sees a script, but makes sure that reflow doesn't happen until its safe again.
git-svn-id: svn://10.0.0.236/trunk@17627 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-12 23:49:13 +00:00
petitta%netscape.com
2f690d5017 Fixed Syntax errors
git-svn-id: svn://10.0.0.236/trunk@17626 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-12 23:32:30 +00:00
petitta%netscape.com
ae0b14d006 Set MOZ_FULLCIRCLE = 0
git-svn-id: svn://10.0.0.236/trunk@17625 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-12 23:27:04 +00:00
troy%netscape.com
9654e78020 Fixed a memory leak
git-svn-id: svn://10.0.0.236/trunk@17624 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-12 23:17:49 +00:00
troy%netscape.com
b2b5d3f972 Moved a NS_RELEASE to a different point so we're less likely to have a non-local exit
miss the release


git-svn-id: svn://10.0.0.236/trunk@17623 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-12 23:17:20 +00:00
pollmann%netscape.com
73e3b8a43c Bug 2234: Crash on JS Submit().
git-svn-id: svn://10.0.0.236/trunk@17622 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-12 23:11:26 +00:00
petitta%netscape.com
bd7aae37af Fixed my boneheaded syntax goofs.....
git-svn-id: svn://10.0.0.236/trunk@17621 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-12 21:47:08 +00:00
shaver%netscape.com
13346a8dec initial XDR primitives
git-svn-id: svn://10.0.0.236/trunk@17620 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-12 21:36:11 +00:00
gagan%netscape.com
87b98ccf20 Fixed MAX_FORMATS_OUT which is now correctly defined in net.h. Thanks ebina.
git-svn-id: svn://10.0.0.236/trunk@17619 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-12 21:34:58 +00:00
despotdaemon%netscape.com
6be3aae4eb Pseudo-automatic update of changes made by brendan@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@17618 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-12 21:34:49 +00:00
gagan%netscape.com
06fa45f3b8 Fixed MAX_FORMATS_OUT that used to be incorrectly set.
git-svn-id: svn://10.0.0.236/trunk@17617 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-12 21:34:20 +00:00
alecf%netscape.com
704571812b update to use new NSPR APIs
git-svn-id: svn://10.0.0.236/trunk@17616 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-12 21:03:59 +00:00
alecf%netscape.com
90489758d1 fix string routines to use NSPR
git-svn-id: svn://10.0.0.236/trunk@17615 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-12 21:01:54 +00:00
petitta%netscape.com
7b94973506 Added MOZ_FULLCIRCLE for the TalkBack Client.
git-svn-id: svn://10.0.0.236/trunk@17614 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-12 20:57:30 +00:00
petitta%netscape.com
3ec094cb24 Updated to handle Talkback Client.
git-svn-id: svn://10.0.0.236/trunk@17613 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-12 20:53:24 +00:00
despotdaemon%netscape.com
662ba5f4fc Pseudo-automatic update of changes made by cyeh@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@17612 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-12 20:50:56 +00:00
despotdaemon%netscape.com
705558e337 Pseudo-automatic update of changes made by cyeh@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@17611 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-12 20:50:23 +00:00
petitta%netscape.com
d83e0f433d Updated Build scripts for the inclusion of the talkback stuff.
git-svn-id: svn://10.0.0.236/trunk@17610 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-12 20:49:54 +00:00
alecf%netscape.com
bb238f863d rename nsIMsgNewsHost -> nsINNTPHost in all files that use it
git-svn-id: svn://10.0.0.236/trunk@17609 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-12 20:44:13 +00:00
alecf%netscape.com
0ae88c5c48 add new nsNNTPHost implementation - NNTP specific version of nsIMsgHost, implementation of nsINNTPHost
git-svn-id: svn://10.0.0.236/trunk@17608 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-12 20:42:22 +00:00
alecf%netscape.com
9f2af5acbd get Emacs mode line right for IDL!
git-svn-id: svn://10.0.0.236/trunk@17607 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-12 20:41:04 +00:00
alecf%netscape.com
25444d1c4c adding new nsIMsgHost interface
git-svn-id: svn://10.0.0.236/trunk@17606 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-12 20:37:41 +00:00
alecf%netscape.com
250cc6f3dc rename nsIMsgNewsHost -> nsINNTPHost and start adding old MSG_NewsHost methods
git-svn-id: svn://10.0.0.236/trunk@17605 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-12 20:36:37 +00:00
despotdaemon%netscape.com
1b72eebb15 Pseudo-automatic update of changes made by leaf@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@17604 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-12 20:23:14 +00:00
despotdaemon%netscape.com
9464edcc8f Pseudo-automatic update of changes made by cbegle@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@17603 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-12 19:59:19 +00:00
dougt%netscape.com
dac03c0d9a Added GetContentLength and GetServerStatus to nsIURL class
git-svn-id: svn://10.0.0.236/trunk@17602 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-12 19:45:46 +00:00
waterson%netscape.com
d2fd5b8e78 Obsoleted.
git-svn-id: svn://10.0.0.236/trunk@17601 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-12 19:42:36 +00:00
waterson%netscape.com
f4e23d1ec9 Added resources to build.
git-svn-id: svn://10.0.0.236/trunk@17598 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-12 19:41:44 +00:00
waterson%netscape.com
c637ea386a Factored content model builder code into its own interface. Hooked up RDF-to-content model notification. Minor bug fixes in data sources.
git-svn-id: svn://10.0.0.236/trunk@17595 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-12 19:41:06 +00:00
coop%netscape.com
e922cb1761 Removed references to xpidl_typelib.h
git-svn-id: svn://10.0.0.236/trunk@17594 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-12 19:26:37 +00:00
mcmullen%netscape.com
590180f6f7 Fully implement scrollbars - live scrolling, etc. Includes changes by Cyrus Harmon.
git-svn-id: svn://10.0.0.236/trunk@17593 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-12 19:26:31 +00:00
shaver%netscape.com
420e0f51a8 initial typelib structures
git-svn-id: svn://10.0.0.236/trunk@17592 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-12 19:17:25 +00:00
pinkerton%netscape.com
efa104cbfb fixes for SetDOMAttribute --> SetAttribute change.
git-svn-id: svn://10.0.0.236/trunk@17591 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-12 18:20:58 +00:00
guha%netscape.com
46e5bfae41 adding a tree interface to datasources. Not yet in build system
git-svn-id: svn://10.0.0.236/trunk@17590 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-12 17:35:25 +00:00
dcone%netscape.com
f161b6e232 Added files
nsDomAttribute.cpp, nsDomAttributeMap.cpp, nsGenericXMLElement.cpp


git-svn-id: svn://10.0.0.236/trunk@17588 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-12 16:54:30 +00:00
vidur%netscape.com
7cee1d1143 attributes test
git-svn-id: svn://10.0.0.236/trunk@17587 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-12 16:43:24 +00:00
kipp%netscape.com
c5c21eff17 Use new flag defines
git-svn-id: svn://10.0.0.236/trunk@17586 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-12 16:42:03 +00:00
kipp%netscape.com
4bf9a053b1 Clean up block frame flags
git-svn-id: svn://10.0.0.236/trunk@17585 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-12 16:41:30 +00:00
vidur%netscape.com
78eec9966b Added nsIDOMAttributePrivate
git-svn-id: svn://10.0.0.236/trunk@17584 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-12 16:38:52 +00:00
vidur%netscape.com
5435e41ebe Added new namespace/attribute parsing methods to nsIContent
git-svn-id: svn://10.0.0.236/trunk@17583 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-12 16:38:28 +00:00
vidur%netscape.com
c5e776a818 Second pass of attributes as nodes. Improved namespace management - XML elements now hold on to their containing namespace. Fixed Get/SetDOMAttriute naming issue. Added new namespace parsing methods to nsIContent
git-svn-id: svn://10.0.0.236/trunk@17582 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-12 16:37:24 +00:00
vidur%netscape.com
4a1535fb62 Fixed Get/SetAttribute naming problem
git-svn-id: svn://10.0.0.236/trunk@17581 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-12 16:35:14 +00:00
pierre%netscape.com
6179f08691 Some cleanup in ATSUI. The constant USE_ATSUI_HACK, when it's not defined, now effectively removes all the ATSUI code and the ATSUnicodeLib can be removed from the project.
git-svn-id: svn://10.0.0.236/trunk@17580 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-12 11:35:49 +00:00
rickg%netscape.com
e6c9ca3a33 removed problematic assertion
git-svn-id: svn://10.0.0.236/trunk@17574 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-12 08:46:02 +00:00
vidur%netscape.com
8a6027fba4 new files
git-svn-id: svn://10.0.0.236/trunk@17573 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-12 08:45:23 +00:00
ftang%netscape.com
3a68d19d55 change dependency. add sjis test cases
git-svn-id: svn://10.0.0.236/trunk@17572 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-12 08:35:45 +00:00
ftang%netscape.com
40144bd963 add shift jis converter, add table driven decode utility and interface, change module name from intl to uconv
git-svn-id: svn://10.0.0.236/trunk@17571 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-12 08:34:29 +00:00
ftang%netscape.com
84652f9f5e change module from intl to uconv, add utility files
git-svn-id: svn://10.0.0.236/trunk@17570 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-12 08:26:54 +00:00
ftang%netscape.com
5f280e103c add Shift to Unicode converter
git-svn-id: svn://10.0.0.236/trunk@17569 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-12 08:24:34 +00:00
dp%netscape.com
2f3f7cea38 Eliminating NU_CACHE build dependency if NO_NU_CACHE is defined
git-svn-id: svn://10.0.0.236/trunk@17568 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-12 08:07:19 +00:00
rickg%netscape.com
86ed346089 fixed bug 2274
git-svn-id: svn://10.0.0.236/trunk@17557 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-12 06:04:05 +00:00
ramiro%netscape.com
acb177fff4 Make sure .cvsignore gets checked out with the MozillaSourceUnixOnly module.
git-svn-id: svn://10.0.0.236/trunk@17553 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-12 05:53:52 +00:00
waterson%netscape.com
304f152661 Initial revision (not yet in build.)
git-svn-id: svn://10.0.0.236/trunk@17546 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-12 05:33:32 +00:00
waterson%netscape.com
17741ff819 Initial revision. (Not yet in the build.)
git-svn-id: svn://10.0.0.236/trunk@17545 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-12 05:32:30 +00:00
despotdaemon%netscape.com
7cd134bac0 Pseudo-automatic update of changes made by bienvenu@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@17544 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-12 05:18:51 +00:00
blizzard%appliedtheory.com
df0c9d4a08 clean up factories for gtk. make destroying for nsWidgets() cleaner.
git-svn-id: svn://10.0.0.236/trunk@17543 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-12 04:42:09 +00:00
pavlov%pavlov.net
936b4bb074 sync all my changes. removed lots of code that is provided in nsBaseWidget,
added focus handlers, etc etc etc


git-svn-id: svn://10.0.0.236/trunk@17542 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-12 03:56:33 +00:00
rickg%netscape.com
6b72f77ef5 this fixes some of what ails us with XML
git-svn-id: svn://10.0.0.236/trunk@17541 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-12 02:37:22 +00:00
despotdaemon%netscape.com
3ab32dadcd Pseudo-automatic update of changes made by davidmc@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@17540 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-12 02:33:25 +00:00
sdagley%netscape.com
e7b7c5345f Fix improper calculation of gmtDelta - was using Mac toolbox BitTest routine to test the wrong bit, changed to a simpler & test. Checking in with permission of cyeh.
git-svn-id: svn://10.0.0.236/trunk@17539 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-12 01:22:46 +00:00
warren%netscape.com
87fb4e371e Added headings
git-svn-id: svn://10.0.0.236/trunk@17538 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-12 01:19:11 +00:00
rickg%netscape.com
eac2a23d6b incremental fix for DON to get Linux off the floor
git-svn-id: svn://10.0.0.236/trunk@17537 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-12 01:14:12 +00:00
alecf%netscape.com
772621999e update windows makefile to export the right XPCOM headers
git-svn-id: svn://10.0.0.236/trunk@17536 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-12 01:10:13 +00:00
alecf%netscape.com
6e248cd38a oops, misspelled MEWS->NEWS
git-svn-id: svn://10.0.0.236/trunk@17535 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-12 01:09:45 +00:00
alecf%netscape.com
7c484d3803 update windows makefile
git-svn-id: svn://10.0.0.236/trunk@17534 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-12 01:06:39 +00:00
alecf%netscape.com
c52f8ecd3d add new files to the Unix build process
git-svn-id: svn://10.0.0.236/trunk@17533 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-12 01:05:21 +00:00
alecf%netscape.com
633383ee9e nsNNTPArticleSet compiles now
git-svn-id: svn://10.0.0.236/trunk@17532 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-12 00:48:47 +00:00
alecf%netscape.com
6b917f4b51 needed MarkDirty so that nsNNTPArticleSet could compile
git-svn-id: svn://10.0.0.236/trunk@17531 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-12 00:48:28 +00:00
alecf%netscape.com
6b0124e885 InitXOVER does not need most of these parameters!
git-svn-id: svn://10.0.0.236/trunk@17530 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-12 00:38:46 +00:00
alecf%netscape.com
67eef9e8c0 move to NSPR2
git-svn-id: svn://10.0.0.236/trunk@17529 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-12 00:38:14 +00:00
alecf%netscape.com
eb32e6bf84 data structure types have changed, and move XP_ASSERT to PR_ASSERT
git-svn-id: svn://10.0.0.236/trunk@17528 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-12 00:37:36 +00:00
alecf%netscape.com
0419a70e8a make net_NewsChunkSize global for now, so that we can change it from outside
the file


git-svn-id: svn://10.0.0.236/trunk@17527 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-12 00:36:49 +00:00
alecf%netscape.com
8c763dbcd0 this almost compiles now
git-svn-id: svn://10.0.0.236/trunk@17526 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-12 00:32:55 +00:00
rickg%netscape.com
cb2742db98 fixed a few parser problems having to do with dynamic enabling
git-svn-id: svn://10.0.0.236/trunk@17525 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-12 00:19:17 +00:00
alecf%netscape.com
9b37e362b4 update to NSPR2
git-svn-id: svn://10.0.0.236/trunk@17523 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-11 23:31:40 +00:00
alecf%netscape.com
8fe2086b64 updated to NSPR2
git-svn-id: svn://10.0.0.236/trunk@17522 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-11 23:30:16 +00:00
alecf%netscape.com
81694f575c adding new article set code
git-svn-id: svn://10.0.0.236/trunk@17521 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-11 23:25:32 +00:00
pavlov%pavlov.net
b53694a93e set event.point.[xy] to 0
git-svn-id: svn://10.0.0.236/trunk@17520 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-11 23:06:13 +00:00
alecf%netscape.com
3e7e911cdd changes to make it compile
git-svn-id: svn://10.0.0.236/trunk@17519 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-11 22:54:51 +00:00
buster%netscape.com
8a19fb26be shuffled around the responsibilities of core editing objects.
The key listener is now mostly a mapper of key events to editor actions.  Soon, this should be 100% true.
The editor builds transactions that are themselves intelligent. The editor makes very few DOM calls itself.
It relies on the transactions to do most of the actual editing.


git-svn-id: svn://10.0.0.236/trunk@17518 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-11 22:47:23 +00:00
despotdaemon%netscape.com
19f97e42a1 Pseudo-automatic update of changes made by bienvenu@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@17517 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-11 21:38:46 +00:00
despotdaemon%netscape.com
9f6e0a85d8 Pseudo-automatic update of changes made by leaf@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@17514 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-11 21:35:59 +00:00
despotdaemon%netscape.com
e804357187 Pseudo-automatic update of changes made by sudu@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@17513 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-11 21:22:45 +00:00
locka%iol.ie
b1b3f5f24e Added implementation of get_ReadyState
Overrode default InPlaceActivate method to fix broken containers


git-svn-id: svn://10.0.0.236/trunk@17511 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-11 21:08:54 +00:00
alecf%netscape.com
3e9bd176d9 adding new nsNNTPNewsgroupList and nsNNTPArticleList objects
git-svn-id: svn://10.0.0.236/trunk@17510 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-11 20:56:39 +00:00
alecf%netscape.com
aa16127a53 updated to add messenger-specific utility macros
git-svn-id: svn://10.0.0.236/trunk@17509 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-11 20:46:13 +00:00
despotdaemon%netscape.com
2d1e32ed00 Pseudo-automatic update of changes made by namachi@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@17508 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-11 20:22:11 +00:00
alecf%netscape.com
3198e5cd24 add error constant for mail/news
git-svn-id: svn://10.0.0.236/trunk@17507 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-11 20:15:17 +00:00
despotdaemon%netscape.com
03bcd515aa Pseudo-automatic update of changes made by terry@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@17506 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-11 20:14:34 +00:00
sfraser%netscape.com
926558813f Added new debug menu items, changed menus to be more similar to windows viewer.
git-svn-id: svn://10.0.0.236/trunk@17505 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-11 19:46:49 +00:00
sfraser%netscape.com
23f1bb6ead Added a couple of NS_PRECONDITIONSs in the event listener functions.
git-svn-id: svn://10.0.0.236/trunk@17504 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-11 19:46:09 +00:00
rickg%netscape.com
ed9e1fe3f0 fixed part of style/script bug in new pasring engine
git-svn-id: svn://10.0.0.236/trunk@17503 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-11 19:45:28 +00:00
troy%netscape.com
4c4c2ea13a Fix for bug #2285. Just reseting the mFlags isn't enough, because the PaintBackground()
member function ignores the flags and checks for a non-empty URL. This way is safer and
should work in all cases


git-svn-id: svn://10.0.0.236/trunk@17502 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-11 19:44:22 +00:00
alecf%netscape.com
d4019b7169 updated to match new interfaces, and some general cleanup
git-svn-id: svn://10.0.0.236/trunk@17501 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-11 19:20:59 +00:00
alecf%netscape.com
a508a227d6 merge in XOVER parser
git-svn-id: svn://10.0.0.236/trunk@17500 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-11 19:17:19 +00:00
alecf%netscape.com
45107eea52 rename nsINNTPArticleKeysState to nsINNTPArticleList
git-svn-id: svn://10.0.0.236/trunk@17499 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-11 19:16:52 +00:00
alecf%netscape.com
8535ef0c3b newly generated files from updated XPIDL parser
git-svn-id: svn://10.0.0.236/trunk@17498 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-11 19:16:09 +00:00
alecf%netscape.com
910429eee7 MsgNewsHost has a newsgroupList associated with it.
git-svn-id: svn://10.0.0.236/trunk@17497 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-11 19:14:03 +00:00
alecf%netscape.com
7b40f21a57 merged XOVER parser back into nsINNTPNewsgroupList
git-svn-id: svn://10.0.0.236/trunk@17496 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-11 19:13:16 +00:00
buster%netscape.com
97e2d5d092 implemented joinNode. expect this and similar methods to move into editor.cpp
git-svn-id: svn://10.0.0.236/trunk@17495 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-11 19:06:37 +00:00
rickg%netscape.com
02460caff3 fixed bug 2284, and brought demo7 back online
git-svn-id: svn://10.0.0.236/trunk@17494 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-11 19:00:07 +00:00
alecf%netscape.com
4e0af9a7d4 use C++ mode in emacs
git-svn-id: svn://10.0.0.236/trunk@17493 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-11 18:38:00 +00:00
cls%seawood.org
e0ba8b09c6 No need to create a bogus library in the header dir.
git-svn-id: svn://10.0.0.236/trunk@17492 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-11 17:51:24 +00:00
shaver%netscape.com
63a3cae583 Update to (and require!) libIDL 0.5.8.
Fix silly argument processing brokenness.
Prepare for IDL_tree_to_IDL when it arrives.
Proper basename stuff for #ifdef __gen_nsIFoo_h__ and others.
Handle empty interfaces.
Dead code trimming (ident, etc.).
Typedef support, including arrays.
nsVarArgs instead of ... in C++ headers.
Fix #include scanning bug that caused pain when we skipped an include that
had already been processed.


git-svn-id: svn://10.0.0.236/trunk@17491 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-11 16:56:45 +00:00
rickg%netscape.com
160a996665 fixes to bugs 2272 and 2273
git-svn-id: svn://10.0.0.236/trunk@17490 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-11 07:40:11 +00:00
rickg%netscape.com
0e0363a6bd fixed bugs 625 and 1521
git-svn-id: svn://10.0.0.236/trunk@17489 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-11 07:14:42 +00:00
grail%cafebabe.org
9cd45bdc69 Added XML parsing to build menus and changed dependency on
grendel.ui.Splitter to javax.swing.JSplitPane.

TODO:
1. Need to get sizing information for immediate children components of
JSplitPane.
2. Externalize XML parsing to an external object to build more than just
menus. Dialogs, frames, etc. would be really cool.


git-svn-id: svn://10.0.0.236/trunk@17488 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-11 07:01:27 +00:00
talisman%anamorphic.com
3f045241f5 oops... fixed a mistake I made last time (talisman)
git-svn-id: svn://10.0.0.236/trunk@17487 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-11 04:01:35 +00:00
pavlov%pavlov.net
ea54ed3088 strikethrough now shows...
git-svn-id: svn://10.0.0.236/trunk@17486 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-11 00:54:15 +00:00
talisman%anamorphic.com
1adf3ddb71 *** empty log message ***
git-svn-id: svn://10.0.0.236/trunk@17485 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-11 00:08:15 +00:00
despotdaemon%netscape.com
b9f8f12bdb Pseudo-automatic update of changes made by shaver@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@17484 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-10 23:31:01 +00:00
talisman%anamorphic.com
b01056fa69 General functionality and UI enhancements (global).
git-svn-id: svn://10.0.0.236/trunk@17483 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-10 22:31:08 +00:00
talisman%anamorphic.com
daf4c21cb2 New file - gives build instructions.
git-svn-id: svn://10.0.0.236/trunk@17482 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-10 22:29:35 +00:00
talisman%anamorphic.com
3888da36ad Added Spring, Collapsible, CollapsiblePanel to SRCS. Removed Util from SRCS (it's already in ui).
git-svn-id: svn://10.0.0.236/trunk@17481 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-10 22:17:04 +00:00
talisman%anamorphic.com
5f0317d1c2 Util.java really doesn't belong in widgets, since it's part of the ui package. Removed.
git-svn-id: svn://10.0.0.236/trunk@17480 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-10 22:16:00 +00:00
talisman%anamorphic.com
7fac94d0f4 *** empty log message ***
git-svn-id: svn://10.0.0.236/trunk@17479 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-10 22:14:13 +00:00
talisman%anamorphic.com
271084ac71 Modified to correctly catch MessagingExceptions instead of re-throwing them.
git-svn-id: svn://10.0.0.236/trunk@17478 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-10 22:09:06 +00:00
talisman%anamorphic.com
788095d952 Changes to get the folder tree displaying along with the current folder's list of messages.
git-svn-id: svn://10.0.0.236/trunk@17477 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-10 22:02:57 +00:00
talisman%anamorphic.com
94b8ac7cfa Temporarily hacked around a SecurityException when null Authenticator passed. **IMPORTANT** we need to remember to put the authentication stuff back before making a real release.
git-svn-id: svn://10.0.0.236/trunk@17476 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-10 22:01:20 +00:00
talisman%anamorphic.com
db479a82dc General UI enhancements.
git-svn-id: svn://10.0.0.236/trunk@17475 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-10 21:57:56 +00:00
talisman%anamorphic.com
0001b16786 Minor modifications to get the message display working. Hacked in a JEditorPane to provide -very basic- html display capability.
git-svn-id: svn://10.0.0.236/trunk@17474 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-10 21:55:57 +00:00
talisman%anamorphic.com
c272181df5 Mods to get the folder tree displaying correctly.
git-svn-id: svn://10.0.0.236/trunk@17473 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-10 21:52:11 +00:00
talisman%anamorphic.com
11e25ec707 Changed NSToolbar references to GrendelToolBar, IUICmd changed to UIAction.
git-svn-id: svn://10.0.0.236/trunk@17472 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-10 21:49:40 +00:00
talisman%anamorphic.com
8057b8be8a General UI enhancements.
git-svn-id: svn://10.0.0.236/trunk@17471 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-10 21:48:15 +00:00
talisman%anamorphic.com
43027a66aa Got this displaying properly when we load a set of mail folders.
git-svn-id: svn://10.0.0.236/trunk@17470 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-10 21:46:34 +00:00
talisman%anamorphic.com
15bf4f2fdf Added target run and set up vars to handle CLASSPATH.
git-svn-id: svn://10.0.0.236/trunk@17469 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-10 21:40:31 +00:00
talisman%anamorphic.com
905c70b0f1 Added code to look for and create if necessary a mail dir and folder in the user's home dir. This will need some modification to address x-platform homedir issues.
git-svn-id: svn://10.0.0.236/trunk@17468 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-10 21:37:14 +00:00
pavlov%pavlov.net
649a36d0af allow nsWindow's to take focus. this should fix problem for editor people
git-svn-id: svn://10.0.0.236/trunk@17467 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-10 18:48:05 +00:00
rpotts%netscape.com
f82b442b3c Changed to use the EventQueue service rather than the PL_InitializeEventsLib() and GetMainEventQueue() apis...
git-svn-id: svn://10.0.0.236/trunk@17466 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-10 08:18:25 +00:00
rickg%netscape.com
f8fb00ca59 fixed bug in Compare() and error in ToInteger()
git-svn-id: svn://10.0.0.236/trunk@17465 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-10 08:17:40 +00:00
rpotts%netscape.com
f7f7d95b74 overhaul of the EventQueue service...
git-svn-id: svn://10.0.0.236/trunk@17464 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-10 08:12:01 +00:00
rickg%netscape.com
c1bb351fdc re-enabled viewsource
git-svn-id: svn://10.0.0.236/trunk@17463 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-10 05:39:13 +00:00
pavlov%pavlov.net
890b0592ba halfway fix the excessive GC problem. more work on resizing
git-svn-id: svn://10.0.0.236/trunk@17462 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-09 21:16:20 +00:00
talisman%anamorphic.com
9d1ff5c821 Layout manager for toolbars. A little rough, but it's a start.
git-svn-id: svn://10.0.0.236/trunk@17461 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-09 19:58:09 +00:00
pavlov%pavlov.net
fc2138096e Resizing works.... somewhat. More to come
git-svn-id: svn://10.0.0.236/trunk@17460 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-09 17:41:20 +00:00
despotdaemon%netscape.com
cf3a317e91 Pseudo-automatic update of changes made by terry@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@17459 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-09 11:28:10 +00:00
talisman%anamorphic.com
a4be1febce Changed JToolBars to GrendelToolBars.
git-svn-id: svn://10.0.0.236/trunk@17458 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-09 08:44:30 +00:00
talisman%anamorphic.com
4aa2c5eea8 ImageIcon images for the CollapseButton.
git-svn-id: svn://10.0.0.236/trunk@17457 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-09 07:41:37 +00:00
talisman%anamorphic.com
8f8fa72183 Implements a component with no view but participates in layout - this is what
makes the Animation sit on the right-hand side of the toolbar panel.


git-svn-id: svn://10.0.0.236/trunk@17456 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-09 07:39:20 +00:00
talisman%anamorphic.com
1fecabe576 Subclass of JToolBar which has some convenience methods for layout.
git-svn-id: svn://10.0.0.236/trunk@17455 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-09 07:37:40 +00:00
talisman%anamorphic.com
70ee43eed4 Implementation of Collapsible interface. Provides collapsing toolbar behaviour.
May be useful for other collapsing items (if we make any).


git-svn-id: svn://10.0.0.236/trunk@17454 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-09 07:36:17 +00:00
talisman%anamorphic.com
1b18ab6a23 Interface which must be implemented for collapse behaviour.
git-svn-id: svn://10.0.0.236/trunk@17453 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-09 07:34:13 +00:00
talisman%anamorphic.com
6d919cbaef Added for class library version requirements.
git-svn-id: svn://10.0.0.236/trunk@17452 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-09 07:31:17 +00:00
talisman%anamorphic.com
ab86759584 Changed to add explicit CLASSPATH and some rule modification.
git-svn-id: svn://10.0.0.236/trunk@17451 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-09 07:27:54 +00:00
rpotts%netscape.com
f1bf3a2dfd Reworked the initialization of the PLEvent queue to use the new EventQueueService instead of calling PL_InitializeEventsLib(...)
git-svn-id: svn://10.0.0.236/trunk@17450 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-09 07:18:22 +00:00
grail%cafebabe.org
cb748a31e9 Code from Jeff to get ActionFactory and company all happy.
git-svn-id: svn://10.0.0.236/trunk@17449 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-09 06:06:14 +00:00
troy%netscape.com
73dcbfbee5 Hooked up marginwidth and marginheight attributes to change the 'margin'
property instead of the 'padding' property


git-svn-id: svn://10.0.0.236/trunk@17448 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-09 04:31:51 +00:00
grail%cafebabe.org
59023ea173 Old references to Orion, etc. ripped now. Replacements dropped it. It
compiles. Let the games begin.


git-svn-id: svn://10.0.0.236/trunk@17447 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-09 03:55:32 +00:00
mcmullen%netscape.com
b24197fa96 Fix for bug #2164. Balanced the NS_ADDREF and NS_RELEASE, which takes some doing, because it gets released in a module that did not add the reference (during Stop(), when all timers are released). This is bad design, methinks.
git-svn-id: svn://10.0.0.236/trunk@17446 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-09 02:47:34 +00:00
mcmullen%netscape.com
da1a7d5331 Remove illegal TextTxn:: within TextTxn class (this is illegal in C++ unless you have a nested class with the same name). This fixes Macintosh build bustage.
git-svn-id: svn://10.0.0.236/trunk@17445 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-09 02:41:35 +00:00
rickg%netscape.com
dfaa6e9b09 fixed unix build crash based on NS_DEBUG flag
git-svn-id: svn://10.0.0.236/trunk@17444 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-09 02:13:32 +00:00
kipp%netscape.com
36cc1ed161 Added in code from bug #1935 to improve auto-protocol handling on urls
git-svn-id: svn://10.0.0.236/trunk@17443 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-09 02:00:42 +00:00
rickg%netscape.com
192c334fda added htmlgeneration tool
git-svn-id: svn://10.0.0.236/trunk@17442 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-09 01:49:20 +00:00
troy%netscape.com
31fe96b5ba Turned off assert
git-svn-id: svn://10.0.0.236/trunk@17441 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-09 01:43:02 +00:00
dcone%netscape.com
9dd8a3d1db Added nsXMLTokenizer and nsHthmTokenizer
git-svn-id: svn://10.0.0.236/trunk@17440 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-09 01:20:52 +00:00
dcone%netscape.com
bda28e3c9e Changed include
git-svn-id: svn://10.0.0.236/trunk@17439 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-09 01:19:49 +00:00
dougt%netscape.com
4aebf56bff Added SilentDownload Preferences. Remove unused autoupdt.backgro*
git-svn-id: svn://10.0.0.236/trunk@17438 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-09 01:18:11 +00:00
dougt%netscape.com
f0390cbaba Added Byte-Range Support.
git-svn-id: svn://10.0.0.236/trunk@17437 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-09 01:16:40 +00:00
rickg%netscape.com
53ea652e5f merged parsertypes into nsIParser.h
git-svn-id: svn://10.0.0.236/trunk@17436 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-09 01:14:10 +00:00
rickg%netscape.com
977421c9eb sync up with mods to the parser
git-svn-id: svn://10.0.0.236/trunk@17435 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-09 01:11:37 +00:00
rickg%netscape.com
a8382eb7c5 modest improvements to string and deque
git-svn-id: svn://10.0.0.236/trunk@17434 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-09 01:09:39 +00:00
rickg%netscape.com
c8fc6237d4 A wad of changes to the parser. See my update
git-svn-id: svn://10.0.0.236/trunk@17433 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-09 01:09:02 +00:00
akkana%netscape.com
d67d163fe3 Add debug menu; see bug 2249
git-svn-id: svn://10.0.0.236/trunk@17432 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-09 00:35:19 +00:00
alecf%netscape.com
5e7d188dcb rename
nsIMsgNewsArticleList-> nsINNTPNewsgroupList
nsINNTPArticleKeysState -> nsINNTPArticleList


git-svn-id: svn://10.0.0.236/trunk@17431 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-09 00:29:21 +00:00
despotdaemon%netscape.com
4ba5317bfb Pseudo-automatic update of changes made by cyeh@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@17430 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-09 00:26:32 +00:00
despotdaemon%netscape.com
d273e05710 Pseudo-automatic update of changes made by cyeh@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@17429 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-09 00:24:50 +00:00
buster%netscape.com
be4b7d375b better code factoring, so split and join base methods can be reused
git-svn-id: svn://10.0.0.236/trunk@17428 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-09 00:24:48 +00:00
kipp%netscape.com
ab9a64b454 new
git-svn-id: svn://10.0.0.236/trunk@17427 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-09 00:18:08 +00:00
kipp%netscape.com
907e445ae7 Implement GetAreas; cleanup some whitespace; removed some out of date comments
git-svn-id: svn://10.0.0.236/trunk@17426 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-09 00:17:07 +00:00
kipp%netscape.com
71b47e4756 Removed a spurious Addref of an atom
git-svn-id: svn://10.0.0.236/trunk@17425 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-09 00:16:42 +00:00
alecf%netscape.com
4d41c9404b add nsINNTPArticleKeysState to the build
git-svn-id: svn://10.0.0.236/trunk@17424 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-09 00:16:41 +00:00
despotdaemon%netscape.com
148c970cbb Pseudo-automatic update of changes made by cyeh@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@17423 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-09 00:16:36 +00:00
kipp%netscape.com
375d1ffa3e Added some whitespace
git-svn-id: svn://10.0.0.236/trunk@17422 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-09 00:16:07 +00:00
kipp%netscape.com
b793ab7603 Reformatted a comment
git-svn-id: svn://10.0.0.236/trunk@17421 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-09 00:15:54 +00:00
alecf%netscape.com
96ea6b03e7 adding nsINNTPArticleKeysState for the first time - broke these three
methods out of nsIMsgNewsArticleList.idl


git-svn-id: svn://10.0.0.236/trunk@17420 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-09 00:15:46 +00:00
despotdaemon%netscape.com
5fe4fe9386 Pseudo-automatic update of changes made by cyeh@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@17419 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-09 00:15:20 +00:00
kipp%netscape.com
e14f3074db Store maps as nsIDOMHTMLMapElement instead of the obsolete nsIImageMap
git-svn-id: svn://10.0.0.236/trunk@17418 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-09 00:15:19 +00:00
kipp%netscape.com
eaf4ef5a49 Use dom content objects for map/area tags; add map to the content model
git-svn-id: svn://10.0.0.236/trunk@17417 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-09 00:14:53 +00:00
kipp%netscape.com
1e8f20f877 nuked
git-svn-id: svn://10.0.0.236/trunk@17416 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-09 00:14:17 +00:00
kipp%netscape.com
263cc7d9ae Removed a turd
git-svn-id: svn://10.0.0.236/trunk@17415 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-09 00:14:09 +00:00
kipp%netscape.com
4c2b7a7459 Reworked to use dom content objects for holding the raw map data and observering content changes and updating the 'compiled' map
git-svn-id: svn://10.0.0.236/trunk@17414 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-09 00:13:53 +00:00
kipp%netscape.com
43e27c5332 Use nsImageMap
git-svn-id: svn://10.0.0.236/trunk@17413 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-09 00:13:19 +00:00
kipp%netscape.com
c616a840d6 Changed over to using nsImageMap instead of nsIImageMap
git-svn-id: svn://10.0.0.236/trunk@17412 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-09 00:12:49 +00:00
kipp%netscape.com
180c1911ec Added new atom
git-svn-id: svn://10.0.0.236/trunk@17411 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-09 00:12:28 +00:00
despotdaemon%netscape.com
fe3c0c5b0f Pseudo-automatic update of changes made by cyeh@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@17410 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-09 00:11:48 +00:00
kipp%netscape.com
163cc2e69b Added defines and comments indicating which parts of the frames reflow state are reserved
git-svn-id: svn://10.0.0.236/trunk@17409 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-09 00:11:40 +00:00
kipp%netscape.com
60c4b45a54 Added missing forward decl of nsIAtom
git-svn-id: svn://10.0.0.236/trunk@17408 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-09 00:11:10 +00:00
despotdaemon%netscape.com
933341da74 Pseudo-automatic update of changes made by cyeh@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@17407 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-09 00:10:51 +00:00
despotdaemon%netscape.com
cc5514275a Pseudo-automatic update of changes made by cyeh@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@17406 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-09 00:07:41 +00:00
despotdaemon%netscape.com
9510d27748 Pseudo-automatic update of changes made by cyeh@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@17405 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-09 00:00:03 +00:00
despotdaemon%netscape.com
2348d08595 Pseudo-automatic update of changes made by cyeh@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@17404 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-08 23:59:05 +00:00
despotdaemon%netscape.com
ac31f2aef1 Pseudo-automatic update of changes made by cyeh@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@17403 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-08 23:55:40 +00:00
despotdaemon%netscape.com
f918a4d82b Pseudo-automatic update of changes made by cyeh@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@17402 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-08 23:53:20 +00:00
despotdaemon%netscape.com
fc5c6f3e0e Pseudo-automatic update of changes made by cyeh@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@17401 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-08 23:52:33 +00:00
despotdaemon%netscape.com
24921b08d0 Pseudo-automatic update of changes made by cyeh@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@17400 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-08 23:50:33 +00:00
despotdaemon%netscape.com
3a69773553 Pseudo-automatic update of changes made by cyeh@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@17399 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-08 23:42:48 +00:00
despotdaemon%netscape.com
cff2c2c582 Pseudo-automatic update of changes made by sudu@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@17398 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-08 23:16:01 +00:00
beard%netscape.com
588d9f328d Turned off call to NET_PollSockets() on XP_MAC, to fix link error, not really needed anyway.
git-svn-id: svn://10.0.0.236/trunk@17397 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-08 22:43:45 +00:00
mcmullen%netscape.com
6980f434b4 Renamed these, since everybody is calling it apprunner.
git-svn-id: svn://10.0.0.236/trunk@17396 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-08 22:35:47 +00:00
mcmullen%netscape.com
97fdad841c First Checked In.
git-svn-id: svn://10.0.0.236/trunk@17395 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-08 22:32:33 +00:00
mcmullen%netscape.com
ba184c3b57 Changed the name of XPAppViewer to apprunner, since that is what other platforms call it. Too many viewers spoil the broth.
git-svn-id: svn://10.0.0.236/trunk@17394 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-08 22:29:00 +00:00
wtc%netscape.com
c8cd5bfcd5 Bugzilla bug #2248: PR_ImportFile, PR_ImportTCPSocket, and
PR_ImportUDPSocket should initialize NSPR implicitly.  Thanks
to John McMullen <mcmullen@netscape.com> for the bug report
and fix.


git-svn-id: svn://10.0.0.236/trunk@17393 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-08 22:24:14 +00:00
dcone%netscape.com
a845fe996f Added splitelementtxn.cpp
git-svn-id: svn://10.0.0.236/trunk@17392 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-08 22:18:21 +00:00
buster%netscape.com
62f2a08600 SplitElementTxn implementation. Do only.
test with Control-S.


git-svn-id: svn://10.0.0.236/trunk@17391 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-08 22:16:22 +00:00
ftang%netscape.com
189d1720ed Ignore (NS_ERROR_FACTORY_EXISTS != res) return result
git-svn-id: svn://10.0.0.236/trunk@17390 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-08 22:02:41 +00:00
brade%netscape.com
2041e6a41f fix unnecessary ifdefs (and reduce Macintosh compiler warnings)
git-svn-id: svn://10.0.0.236/trunk@17389 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-08 21:53:11 +00:00
sfraser%netscape.com
c1c7c84e7d Fix for 2161 -- if nsView::GetViewFor() is called with a null widget, just return a null view.
git-svn-id: svn://10.0.0.236/trunk@17388 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-08 21:31:56 +00:00
joki%netscape.com
b39d75f877 Move focus shifting code from nsScrollingView.cpp to nsEventStateManager.cpp
git-svn-id: svn://10.0.0.236/trunk@17387 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-08 21:13:59 +00:00
radha%netscape.com
6324764a40 Use libwidgetgtk.so and libgfxgtk.so as default for WIDGET_DLL and
GFXWIN_DLL


git-svn-id: svn://10.0.0.236/trunk@17386 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-08 20:14:49 +00:00
radha%netscape.com
1eb75f8c27 Added TOOLKIT_CFLAGS to CFLAGS so that gtk/motif libraries are picked
up in nsSetupRegistry.cpp (for WIDGET_DLL and GFXWIN_DLL) based on what
MOZ_TOOLKIT is set to


git-svn-id: svn://10.0.0.236/trunk@17385 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-08 20:10:36 +00:00
wtc%netscape.com
b67bcf4843 Removed hardcoded AIX pathnames /usr/lpp/xlC from the makefiles,
because the new version of AIX xlC compilers (3.6.4) is installed
in a different directory (/usr/ibmcxx).


git-svn-id: svn://10.0.0.236/trunk@17384 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-08 19:51:14 +00:00
despotdaemon%netscape.com
a69758c914 Pseudo-automatic update of changes made by talisman@anamorphic.com.
git-svn-id: svn://10.0.0.236/trunk@17383 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-08 19:43:12 +00:00
karnaze%netscape.com
35bfe95ab7 dom table methods, moved align="char" data members from nsReflowState to nsHTMLReflowState
git-svn-id: svn://10.0.0.236/trunk@17382 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-08 18:57:40 +00:00
ftang%netscape.com
16dbd9c4a8 add unix makefile
git-svn-id: svn://10.0.0.236/trunk@17381 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-08 18:57:27 +00:00
ftang%netscape.com
89572dc342 add Makefile to call uconv
git-svn-id: svn://10.0.0.236/trunk@17380 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-08 18:55:54 +00:00
ftang%netscape.com
c58abca41f add directory description
git-svn-id: svn://10.0.0.236/trunk@17379 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-08 18:36:17 +00:00
despotdaemon%netscape.com
a328928280 Pseudo-automatic update of changes made by shaver@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@17378 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-08 17:25:29 +00:00
pavlov%pavlov.net
962ae76bc0 use GDK bit stuff for the alt/ctrl/shift mods
git-svn-id: svn://10.0.0.236/trunk@17377 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-08 15:55:52 +00:00
pavlov%pavlov.net
c8813f8fc8 remove unused code. fixed underlining.
git-svn-id: svn://10.0.0.236/trunk@17376 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-08 15:51:46 +00:00
ramiro%netscape.com
990a41d5fe Added view source ('cos it works!), fixed typo in Tools.
Thanks to Steve Morrison <smorrison@gte.com> for the patch.


git-svn-id: svn://10.0.0.236/trunk@17375 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-08 15:19:29 +00:00
pierre%netscape.com
ca37b268f7 Fixed bug in SetPosition. Thanks to Cyrus Harmon <cyrus@neomorphic.com>
git-svn-id: svn://10.0.0.236/trunk@17374 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-08 05:36:06 +00:00
val4%cornell.edu
9c3d464503 Even more error handling stuff. Will need to go thru the
file and double-check all error handlers.


git-svn-id: svn://10.0.0.236/trunk@17373 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-08 04:58:34 +00:00
troy%netscape.com
4ccdea739f Added support for 'right' and 'bottom' properties. Changed to using a
nsStyleSides struct to hold all the offsets


git-svn-id: svn://10.0.0.236/trunk@17372 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-08 04:47:46 +00:00
pierre%netscape.com
6a8ebab58d bumped up the memory partition of the optimized target to 10Mb
git-svn-id: svn://10.0.0.236/trunk@17371 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-08 03:53:59 +00:00
sfraser%netscape.com
092a294bbc Hack so that keycodes are returned on Mac (again! Buster wiped it out).
git-svn-id: svn://10.0.0.236/trunk@17370 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-08 03:39:55 +00:00
wtc%netscape.com
5d6d168bed The lm argument for _PR_SetLogModuleLevel is
shadowed by a local variable by the same name.  Rewrote the code to
make it more clear.  Thanks to Kathy Brade <brade@netscape.com> for
reporting this bug.


git-svn-id: svn://10.0.0.236/trunk@17369 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-08 03:38:51 +00:00
sfraser%netscape.com
fbe2455d8d Add SIOUX event handling in debug mode. Also remove a couple of unnecessary #defines and use the Universal Header versions.
git-svn-id: svn://10.0.0.236/trunk@17368 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-08 03:29:39 +00:00
sfraser%netscape.com
67f1bd08f8 Change 'memory' include to search in system path
git-svn-id: svn://10.0.0.236/trunk@17367 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-08 03:28:47 +00:00
sfraser%netscape.com
6c72708d72 Call SIOUX initialization in debug mode
git-svn-id: svn://10.0.0.236/trunk@17366 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-08 03:27:57 +00:00
sfraser%netscape.com
39eb289850 Add SIOUX initialization routine
git-svn-id: svn://10.0.0.236/trunk@17365 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-08 03:27:22 +00:00
sfraser%netscape.com
20a2c4f432 Added SIOUX files in the debug target, and made a new debug target with console stubs. Also turned on PPC struct alignment in all targets.
git-svn-id: svn://10.0.0.236/trunk@17364 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-08 03:26:55 +00:00
sfraser%netscape.com
d1c8376449 Change to use regular prefix configuration
git-svn-id: svn://10.0.0.236/trunk@17363 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-08 03:26:09 +00:00
sfraser%netscape.com
f81fc2c840 First Checked In.
git-svn-id: svn://10.0.0.236/trunk@17362 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-08 03:25:16 +00:00
wtc%netscape.com
b7f7196be3 md/_pth.h should be included after pthread.h.
git-svn-id: svn://10.0.0.236/trunk@17361 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-08 03:15:21 +00:00
sfraser%netscape.com
19ed51c4e1 Fix the damn asserts
git-svn-id: svn://10.0.0.236/trunk@17360 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-08 03:15:15 +00:00
troy%netscape.com
06af02477c Fix for bug #2040. Changed BODY to use margin and not padding now that #2054 is fixed
git-svn-id: svn://10.0.0.236/trunk@17359 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-08 02:51:07 +00:00
val4%cornell.edu
c60139781d More error handling code
git-svn-id: svn://10.0.0.236/trunk@17358 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-08 02:37:38 +00:00
val4%cornell.edu
beb1e2a4bd Some additional error messages
git-svn-id: svn://10.0.0.236/trunk@17357 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-08 02:03:43 +00:00
val4%cornell.edu
939e901bce *** empty log message ***
git-svn-id: svn://10.0.0.236/trunk@17356 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-08 02:03:09 +00:00
cls%seawood.org
edf72c7977 Explicitly cast pToolbarWindow to nsIWidget * to unconfuse old compilers.
git-svn-id: svn://10.0.0.236/trunk@17355 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-08 01:43:32 +00:00
buster%netscape.com
29389f0fcd fixed an uninitialized pointer problem
ctrl-ins appends an HR to the BODY


git-svn-id: svn://10.0.0.236/trunk@17354 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-08 01:41:34 +00:00
buster%netscape.com
136be95fe1 implemented do and undo for CreateElement
the test is INS key, it adds an HR


git-svn-id: svn://10.0.0.236/trunk@17353 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-08 01:30:53 +00:00
despotdaemon%netscape.com
d701b6973a Pseudo-automatic update of changes made by amusil@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@17352 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-08 01:21:12 +00:00
troy%netscape.com
cf5cfbf04e Fix for bug #2054. If the HTML element's background is 'transparent' then it
uses the BODY's background property


git-svn-id: svn://10.0.0.236/trunk@17351 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-08 01:14:59 +00:00
troy%netscape.com
18a677af22 Added BackgroundIsTransparent() member function to nsStyleColor
git-svn-id: svn://10.0.0.236/trunk@17350 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-08 01:13:34 +00:00
ftang%netscape.com
ca13a5ef65 change add the DLL name for Mac and UNIX and add placeholder for planned converters
git-svn-id: svn://10.0.0.236/trunk@17349 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-08 01:03:24 +00:00
leaf%mozilla.org
19dedb1939 mozilla/intl added per frank tang's request
git-svn-id: svn://10.0.0.236/trunk@17348 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-08 00:50:44 +00:00
ftang%netscape.com
72350d066b move to intl/unicharutil
git-svn-id: svn://10.0.0.236/trunk@17347 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-08 00:43:25 +00:00
ftang%netscape.com
87e2a4b54b move into intl/unicharutil
git-svn-id: svn://10.0.0.236/trunk@17346 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-08 00:42:14 +00:00
rpotts%netscape.com
0f2cf4f48b bug #2227 - NSPR is not being implicitly initialized when PR_CEnterMonitor() is called. This hack should be removed when NSPR is fixed.
git-svn-id: svn://10.0.0.236/trunk@17345 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-08 00:38:56 +00:00
ftang%netscape.com
a0b5009a3a move these into intl/unicharutil
git-svn-id: svn://10.0.0.236/trunk@17344 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-08 00:38:14 +00:00
ftang%netscape.com
838649dfee move these files to intl/unicharutil
git-svn-id: svn://10.0.0.236/trunk@17343 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-08 00:34:07 +00:00
rpotts%netscape.com
a706077c61 Bug fix from Davide Pasetto (dipo@sis.it) for nsWebShell::Init(...). I Also changed a bunch of checks against NS_OK to use the NS_SUCCEEDED() and NS_FAILED() macros...
git-svn-id: svn://10.0.0.236/trunk@17342 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-08 00:32:55 +00:00
wtc%netscape.com
1b15d81f48 Bugzilla bug #2227: PR_CEnterMonitor should initialize NSPR implicitly.
git-svn-id: svn://10.0.0.236/trunk@17341 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-08 00:31:15 +00:00
terry%netscape.com
79a67545f4 Oops; removed debugging printf.
git-svn-id: svn://10.0.0.236/trunk@17340 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-08 00:27:56 +00:00
terry%netscape.com
21aa4a2f9a Netscape has changed the way its internal LDAP is set up.
git-svn-id: svn://10.0.0.236/trunk@17339 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-08 00:27:15 +00:00
ftang%netscape.com
8b9aea19d5 move from modules into intl
git-svn-id: svn://10.0.0.236/trunk@17338 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-08 00:26:45 +00:00
ftang%netscape.com
d7c9639cc1 move from modules into intl
git-svn-id: svn://10.0.0.236/trunk@17337 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-08 00:20:08 +00:00
jband%netscape.com
bcf50862d1 calling XPCOM method from JS with two int params using hardcoded InterfaceInfo
git-svn-id: svn://10.0.0.236/trunk@17336 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-07 23:36:07 +00:00
despotdaemon%netscape.com
bd43b6a25d Pseudo-automatic update of changes made by grail@cafebabe.org.
git-svn-id: svn://10.0.0.236/trunk@17335 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-07 23:30:20 +00:00
terry%netscape.com
fa8e52aa86 Throw some freshmeat into the fray.
git-svn-id: svn://10.0.0.236/trunk@17334 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-07 23:21:44 +00:00
terry%netscape.com
7f62da4f83 Whoops. Do things in a better order, so we don't have uninitialized
variables.


git-svn-id: svn://10.0.0.236/trunk@17333 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-07 22:42:42 +00:00
dcone%netscape.com
21da573629 Added createelementtxn.cpp
git-svn-id: svn://10.0.0.236/trunk@17332 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-07 22:40:21 +00:00
buster%netscape.com
32c39f7e29 create element transaction WIP
git-svn-id: svn://10.0.0.236/trunk@17331 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-07 22:36:23 +00:00
terry%netscape.com
01e98927ec Tracks stocks, too.
git-svn-id: svn://10.0.0.236/trunk@17330 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-07 22:33:01 +00:00
waterson%netscape.com
05147c382f Made the aCopy parameter to nsString::Insert const to clear up some compiler warnings. a=rickg.
git-svn-id: svn://10.0.0.236/trunk@17329 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-07 22:19:57 +00:00
akkana%netscape.com
b29533962b Remove erroneous NOT_IMPLEMENTED return
git-svn-id: svn://10.0.0.236/trunk@17327 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-07 21:06:43 +00:00
akkana%netscape.com
005795626a 1965: Fix mouse-down events
git-svn-id: svn://10.0.0.236/trunk@17326 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-07 21:06:21 +00:00
law%netscape.com
bca7c818e7 Added new interface header; not yet building it
git-svn-id: svn://10.0.0.236/trunk@17325 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-07 21:04:21 +00:00
donm%netscape.com
cc8882b870 fixing includes for solaris. -donm
git-svn-id: svn://10.0.0.236/trunk@17324 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-07 21:03:42 +00:00
mcafee%netscape.com
b27f2edc57 Variable had wrong type (1229), thanks to tor@cs.brown.edu
git-svn-id: svn://10.0.0.236/trunk@17323 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-07 20:14:34 +00:00
waterson%netscape.com
5c782392db Use root node of LocalStore.rdf as the tree control's root. Added bookmarks data source to the DB.
git-svn-id: svn://10.0.0.236/trunk@17322 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-07 18:44:12 +00:00
waterson%netscape.com
a42211ad52 Fixed namespace stuff, added column info, added bookmarks data store.
git-svn-id: svn://10.0.0.236/trunk@17321 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-07 18:43:39 +00:00
waterson%netscape.com
d4089c1822 Put namespaces back (bug was in LocalStore.rdf). Fixed some bugs with RDF containers.
git-svn-id: svn://10.0.0.236/trunk@17320 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-07 18:43:03 +00:00
waterson%netscape.com
c3621304cb Un-hardcoded column info. This is now provided by a resource: RDF file (like LocalStore.rdf).
git-svn-id: svn://10.0.0.236/trunk@17319 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-07 18:42:14 +00:00
ftang%netscape.com
9e46d5912f add ATSUI hack. This hack could be turn off by comment out the
#define USE_ATSUI_HACK 

line.


git-svn-id: svn://10.0.0.236/trunk@17318 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-07 18:27:09 +00:00
ftang%netscape.com
e8296305ec add weak link to ATSUnicodeLib
git-svn-id: svn://10.0.0.236/trunk@17317 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-07 18:24:42 +00:00
dcone%netscape.com
ba58676aea Added deletettexttxn.cpp
git-svn-id: svn://10.0.0.236/trunk@17316 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-07 18:01:38 +00:00
buster%netscape.com
9a53de3e33 support for DeleteTextTxn, backspace and delete
git-svn-id: svn://10.0.0.236/trunk@17315 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-07 17:58:15 +00:00
buster%netscape.com
2659c27999 use base class Redo
git-svn-id: svn://10.0.0.236/trunk@17314 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-07 17:57:57 +00:00
buster%netscape.com
5bab9ec73f make Redo call Do by default
git-svn-id: svn://10.0.0.236/trunk@17313 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-07 17:57:16 +00:00
buster%netscape.com
7a9a74ed4f Delete Text Transaction initial implementation
git-svn-id: svn://10.0.0.236/trunk@17312 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-07 17:56:20 +00:00
dcone%netscape.com
90d8b8bcc8 Continued work on the Postscript Device and RenderingContexts.
Removed unessisary file, factory is not needed.


git-svn-id: svn://10.0.0.236/trunk@17311 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-07 14:50:53 +00:00
rpotts%netscape.com
4a5911d416 Changes for the new EventQueueService...
git-svn-id: svn://10.0.0.236/trunk@17309 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-07 07:47:25 +00:00
rpotts%netscape.com
90711db7da Changed over to the EventQueueService...
git-svn-id: svn://10.0.0.236/trunk@17308 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-07 07:15:02 +00:00
rpotts%netscape.com
ae0b875228 Added some null ptr tests to net new EventQueueService code...
git-svn-id: svn://10.0.0.236/trunk@17307 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-07 07:06:59 +00:00
troy%netscape.com
d1d8c0129f Changed to handle FrameRemoved reflow command for an absolutely positioned
child frame


git-svn-id: svn://10.0.0.236/trunk@17306 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-07 05:46:26 +00:00
waterson%netscape.com
e08cbc29b4 Added some comments to call out potential funkiness.
git-svn-id: svn://10.0.0.236/trunk@17305 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-07 05:29:31 +00:00
jband%netscape.com
50fff54810 int constants accessible from JS using hardcoded InterfaceInfo
git-svn-id: svn://10.0.0.236/trunk@17304 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-07 05:18:09 +00:00
troy%netscape.com
f1e9e67f66 Changed ContentRemoved() to also generate a reflow command for the placeholder
for an absolutely positioned frame. Also made sure the child list name is
properly set for the reflow command for the absolutely positioned frame


git-svn-id: svn://10.0.0.236/trunk@17303 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-07 05:03:53 +00:00
troy%netscape.com
0e2a9c299a Fixed FindFrameWithContent() to do a better job of recognizing placeholder
frames and skipping them


git-svn-id: svn://10.0.0.236/trunk@17302 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-07 04:47:43 +00:00
val4%cornell.edu
44f1a3899a Some fixes for native files. This shouldn't probably become exposed in the API...
Root.parent now should return null. A problem with mkdir fixed.


git-svn-id: svn://10.0.0.236/trunk@17301 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-07 04:41:20 +00:00
val4%cornell.edu
0e5fc4af58 Some pretty significant changes in terms of native file support, changed if(file->handle)
by if(file->isNative), etc. Made handle/nativehandle a union.  Added some warnings.


git-svn-id: svn://10.0.0.236/trunk@17300 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-07 04:17:23 +00:00
jband%netscape.com
401c294965 more stuff that doesn't yet work
git-svn-id: svn://10.0.0.236/trunk@17299 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-07 03:49:40 +00:00
despotdaemon%netscape.com
10ba72ee76 Pseudo-automatic update of changes made by kostello@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@17298 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-07 03:37:12 +00:00
mscott%netscape.com
b7692cd816 Don't try to build the test directory until we get something in there.
git-svn-id: svn://10.0.0.236/trunk@17297 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-07 03:35:32 +00:00
mscott%netscape.com
cd16235799 More changes to the nsProtocol stuff. Added initialization and a SendData method for writing to the output stream.
git-svn-id: svn://10.0.0.236/trunk@17296 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-07 03:34:10 +00:00
sfraser%netscape.com
6a67e54d34 Export the NSGetFactory method
git-svn-id: svn://10.0.0.236/trunk@17295 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-07 03:14:22 +00:00
sfraser%netscape.com
d86ab8df3a Added nsEventQueueService.cpp and nsXPComFactory.cpp
git-svn-id: svn://10.0.0.236/trunk@17294 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-07 03:14:02 +00:00
mscott%netscape.com
8fed1cb898 Build nsNNTPProtocol.
git-svn-id: svn://10.0.0.236/trunk@17293 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-07 02:49:23 +00:00
mscott%netscape.com
f860441730 Some core definitions that are pertinent only to our NNTP protocol implementation.
git-svn-id: svn://10.0.0.236/trunk@17292 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-07 02:48:51 +00:00
buster%netscape.com
061ed664e2 just documentation
git-svn-id: svn://10.0.0.236/trunk@17291 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-07 02:16:10 +00:00
mcmullen%netscape.com
4272dc5b57 Fix unused parameter warning.
git-svn-id: svn://10.0.0.236/trunk@17290 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-07 02:11:24 +00:00
kipp%netscape.com
64065d7a6d Applied patch from bug #1988 to improve the open-file dialog
git-svn-id: svn://10.0.0.236/trunk@17289 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-07 02:06:44 +00:00
kipp%netscape.com
3457e843ef Make it compile on windows
git-svn-id: svn://10.0.0.236/trunk@17288 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-07 01:46:22 +00:00
wtc%netscape.com
7d15051ae1 On AIX, removed the pthread_mutexattr_setkind_np call. The man page
says this function is provided only for compatibility with the DCE
threads and should not be used when writing new applications.


git-svn-id: svn://10.0.0.236/trunk@17287 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-07 01:33:57 +00:00
buster%netscape.com
67411e2c56 added InsertTextTxn.cpp
git-svn-id: svn://10.0.0.236/trunk@17286 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-07 01:28:34 +00:00
cata%netscape.com
f5e08862ab first check in unicode converter. Didn't build on Mac/UNIX yet. Didn't hookup with main
build process yet.


git-svn-id: svn://10.0.0.236/trunk@17285 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-07 01:23:22 +00:00
sfraser%netscape.com
d371d9c561 Added InsertTextTxn.cpp
git-svn-id: svn://10.0.0.236/trunk@17284 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-07 01:17:48 +00:00
sfraser%netscape.com
f2486eab07 Hack so that keycodes are returned on Mac
git-svn-id: svn://10.0.0.236/trunk@17283 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-07 01:17:20 +00:00
wtc%netscape.com
72f4b595ff Replaced the obsolete NSPR10-compatibility macros PR_LOG_DEFINE,
PR_LOG_BEGIN, and PR_LOG_END by their NSPR20 equivalents.


git-svn-id: svn://10.0.0.236/trunk@17282 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-07 01:08:00 +00:00
leaf%mozilla.org
436fa33c47 adding files in new directory
git-svn-id: svn://10.0.0.236/trunk@17281 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-07 01:07:03 +00:00
buster%netscape.com
9ead1505eb support for inserting text
git-svn-id: svn://10.0.0.236/trunk@17280 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-07 01:02:32 +00:00
buster%netscape.com
e617861340 support for removing attributes
git-svn-id: svn://10.0.0.236/trunk@17279 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-07 01:02:16 +00:00
karnaze%netscape.com
a7ffffa54d Preliminary changes to support align="char"
git-svn-id: svn://10.0.0.236/trunk@17278 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-07 01:00:07 +00:00
mscott%netscape.com
4f09c07271 Changing nsMsgCID.h to nsMsgBaseCID.h
git-svn-id: svn://10.0.0.236/trunk@17277 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-07 00:33:01 +00:00
guha%netscape.com
a95c4613a5 add nsIRDFHistory.h. Not yet in the make system
git-svn-id: svn://10.0.0.236/trunk@17276 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-07 00:01:44 +00:00
coop%netscape.com
52428363a1 Added binary file open as first step for creating typelib files.
git-svn-id: svn://10.0.0.236/trunk@17275 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-06 23:47:45 +00:00
mcmullen%netscape.com
67a2f24b86 Added a directory iterator class. Added canonification and recursive directory creation, and some other handy methods. Eventual goal: replace xp_file.h entirely.
git-svn-id: svn://10.0.0.236/trunk@17274 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-06 23:38:21 +00:00
locka%iol.ie
507c25df08 Fixed a problem with the default impl of GetClientSite
Added basic printer support


git-svn-id: svn://10.0.0.236/trunk@17273 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-06 22:38:24 +00:00
dcone%netscape.com
b9cd95595d added 2 files
nsImageInspectorDialog.cpp
nsTableInspectorDialog.cpp


git-svn-id: svn://10.0.0.236/trunk@17272 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-06 22:29:42 +00:00
coop%netscape.com
abf7eb5b73 Updated struc for ParamDescriptor
git-svn-id: svn://10.0.0.236/trunk@17271 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-06 22:07:16 +00:00
rods%netscape.com
416493c71f initial
git-svn-id: svn://10.0.0.236/trunk@17270 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-06 22:04:35 +00:00
rods%netscape.com
120d150a31 Added Table and Image Inspectors
git-svn-id: svn://10.0.0.236/trunk@17269 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-06 21:59:17 +00:00
mscott%netscape.com
ac699b3ffc More work on generating a nsNNTPProtocol instance.
git-svn-id: svn://10.0.0.236/trunk@17268 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-06 21:44:28 +00:00
terry%netscape.com
58ee54a3dc troy now owns layout.
git-svn-id: svn://10.0.0.236/trunk@17267 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-06 21:41:47 +00:00
ftang%netscape.com
0b95515322 Check in the pre build table based on UCDATA 1.9 and UnicodeData-2.1.8.txt
git-svn-id: svn://10.0.0.236/trunk@17266 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-06 21:28:12 +00:00
ftang%netscape.com
2a0dbb2a26 change make file so it will not automatic generate those dat file but have to do it with an table option
git-svn-id: svn://10.0.0.236/trunk@17265 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-06 21:27:04 +00:00
akkana%netscape.com
a846609e45 Fix Linux build
git-svn-id: svn://10.0.0.236/trunk@17264 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-06 21:18:47 +00:00
ftang%netscape.com
dff2d0d4ba add compiled data table based on UCDATA 1.9 and UnicodeData-2.1.5.txt
git-svn-id: svn://10.0.0.236/trunk@17263 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-06 20:57:02 +00:00
sfraser%netscape.com
e0e4d6b1c0 Added ChangeAttributeTxn.cpp and EditTxn.cpp
git-svn-id: svn://10.0.0.236/trunk@17262 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-06 20:34:04 +00:00
guha%netscape.com
63306ff75b try adding the resources again
git-svn-id: svn://10.0.0.236/trunk@17261 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-06 20:33:42 +00:00
sfraser%netscape.com
153c332fcd Change the fragment name from PLUGIN_DLL (???) to viewer
git-svn-id: svn://10.0.0.236/trunk@17260 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-06 20:32:45 +00:00
sfraser%netscape.com
97484d58c5 Fix the DLL name ENDER_DLL on Mac, and take out the #ifndef XP_MAC around the RegisterFactory for Ender. Also change XPCOM.DLL to XPCOM_DLL on Mac.
git-svn-id: svn://10.0.0.236/trunk@17259 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-06 20:32:11 +00:00
akkana%netscape.com
11d99751e8 Build EditTxn and ChangeAttributeTxn
git-svn-id: svn://10.0.0.236/trunk@17258 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-06 20:31:30 +00:00
buster%netscape.com
eaa343fa75 use Ender as the test editor
git-svn-id: svn://10.0.0.236/trunk@17257 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-06 20:31:08 +00:00
buster%netscape.com
88f1265869 attribute support
git-svn-id: svn://10.0.0.236/trunk@17256 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-06 20:30:35 +00:00
sfraser%netscape.com
79143d22b7 Fix the fragment name (change from xpcom to XPCOM_DLL)
git-svn-id: svn://10.0.0.236/trunk@17255 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-06 20:30:17 +00:00
buster%netscape.com
418dc949ad ChangedAttributeTxn implementation
base class EditTxn implementation


git-svn-id: svn://10.0.0.236/trunk@17254 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-06 20:30:13 +00:00
sfraser%netscape.com
c87bdac8bb File Removed.
git-svn-id: svn://10.0.0.236/trunk@17253 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-06 20:29:56 +00:00
buster%netscape.com
5ca13143ec support for ChangeAttributeTxn
git-svn-id: svn://10.0.0.236/trunk@17252 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-06 20:29:11 +00:00
guha%netscape.com
d77aae8c04 add some resources
git-svn-id: svn://10.0.0.236/trunk@17251 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-06 20:26:54 +00:00
brade%netscape.com
5ff262029e reduce compiler warnings on Macintosh by adding comparisons in while loops (around assignments)
git-svn-id: svn://10.0.0.236/trunk@17250 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-06 20:00:56 +00:00
brade%netscape.com
a360db05aa added #include and removed extra copy of prototype
git-svn-id: svn://10.0.0.236/trunk@17249 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-06 19:58:01 +00:00
brade%netscape.com
0b8f2a8127 reduce Macintosh compiler warnings by making function static/private
git-svn-id: svn://10.0.0.236/trunk@17248 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-06 19:55:57 +00:00
harishd%netscape.com
64fff4508d Added code to take care of CSS properties
that wouldn't allow negative values.


git-svn-id: svn://10.0.0.236/trunk@17247 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-06 19:25:25 +00:00
brade%netscape.com
1e8cf12dc5 reduce Macintosh compiler warnings by adding prototype
git-svn-id: svn://10.0.0.236/trunk@17246 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-06 18:53:59 +00:00
brade%netscape.com
e48babd69b reduce Macintosh compiler warnings byadding prototype
git-svn-id: svn://10.0.0.236/trunk@17245 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-06 18:52:58 +00:00
brade%netscape.com
c4842cd1a6 reduce Macintosh compiler warnings by making function static/private
git-svn-id: svn://10.0.0.236/trunk@17244 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-06 18:51:16 +00:00
brade%netscape.com
2ee0c72d8a reduce Macintosh compiler warnings by removing extra ,
git-svn-id: svn://10.0.0.236/trunk@17243 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-06 18:50:09 +00:00
brade%netscape.com
428d7418f0 reduce Macintosh compiler warnings by removing extra ;
git-svn-id: svn://10.0.0.236/trunk@17242 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-06 18:49:37 +00:00
brade%netscape.com
a4b6caedf2 reduce Macintosh compiler warnings by making functions static/private
git-svn-id: svn://10.0.0.236/trunk@17241 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-06 18:45:28 +00:00
brade%netscape.com
e1d099f21d reduce Macintosh compiler warnings by adding prototype
git-svn-id: svn://10.0.0.236/trunk@17240 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-06 18:44:59 +00:00
brade%netscape.com
5aed3ae866 reduce Macintosh compiler warnings by making function private
git-svn-id: svn://10.0.0.236/trunk@17239 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-06 18:43:39 +00:00
brade%netscape.com
2ff2921c1f reduce Macintosh compiler warnings by making functions private
git-svn-id: svn://10.0.0.236/trunk@17238 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-06 18:43:18 +00:00
brade%netscape.com
bde250680b reduce Macintosh compiler warnings by adding static to private function
git-svn-id: svn://10.0.0.236/trunk@17237 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-06 18:41:05 +00:00
brade%netscape.com
e4f050d6fc reduce Macintosh compiler warnings by adding prototypes
git-svn-id: svn://10.0.0.236/trunk@17236 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-06 18:39:52 +00:00
brade%netscape.com
c89f14f6ea reduce Macintosh compiler warnings by adding prototypes or making functions private
git-svn-id: svn://10.0.0.236/trunk@17235 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-06 18:38:54 +00:00
guha%netscape.com
ddb1eb942d More on the alloy prototype
git-svn-id: svn://10.0.0.236/trunk@17234 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-06 17:38:37 +00:00
vidur%netscape.com
beecca57f1 Fix for bug 1823. Added a toString method to the location object
git-svn-id: svn://10.0.0.236/trunk@17233 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-06 17:22:34 +00:00
despotdaemon%netscape.com
4158028b3d Pseudo-automatic update of changes made by brendan@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@17232 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-06 04:46:20 +00:00
despotdaemon%netscape.com
2c8b3e5c73 Pseudo-automatic update of changes made by brendan@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@17231 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-06 04:45:01 +00:00
troy%netscape.com
a058dad22b This time I think I got 'em in alphabetical order...
git-svn-id: svn://10.0.0.236/trunk@17230 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-06 04:41:47 +00:00
troy%netscape.com
58557ba9cd Did a better job of alphabetizing the source files
git-svn-id: svn://10.0.0.236/trunk@17229 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-06 04:39:33 +00:00
despotdaemon%netscape.com
58fad32972 Pseudo-automatic update of changes made by buster@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@17228 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-06 04:23:49 +00:00
despotdaemon%netscape.com
c305f0f5f8 Pseudo-automatic update of changes made by brendan@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@17227 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-06 04:00:49 +00:00
troy%netscape.com
c1acead14f Renamed nsFRameReflowState.cpp to nsHTMLReflowState.cpp
git-svn-id: svn://10.0.0.236/trunk@17226 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-06 03:46:55 +00:00
pavlov%pavlov.net
e63ac30622 finish menu code. thanks brad roberts <braddr@puremagic.com>
git-svn-id: svn://10.0.0.236/trunk@17225 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-06 02:54:04 +00:00
val4%cornell.edu
cf9125f987 Done going through the code! Now will need to add error handling,
tests, security.


git-svn-id: svn://10.0.0.236/trunk@17224 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-06 02:51:26 +00:00
val4%cornell.edu
d513985ecf Almost done with jsfile.c corrections, error handling, etc.
This version will compile but may not run.


git-svn-id: svn://10.0.0.236/trunk@17223 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-06 02:30:27 +00:00
vidur%netscape.com
14d3e56b03 Reverted temporary getAttribute/setAttribute fix
git-svn-id: svn://10.0.0.236/trunk@17222 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-06 02:26:43 +00:00
mcmullen%netscape.com
0497c7b872 As requested by Troy, added nsHTMLReflowState.cpp and removed nsFrameReflowState.cpp
git-svn-id: svn://10.0.0.236/trunk@17221 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-06 02:16:46 +00:00
pavlov%pavlov.net
68093fb37c remove debugging comment
git-svn-id: svn://10.0.0.236/trunk@17220 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-06 02:06:00 +00:00
vidur%netscape.com
2b6ecb6aa8 Fixed bug 1956. Generic jsval to nsISupports conversion routine checks for valid object.
git-svn-id: svn://10.0.0.236/trunk@17219 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-06 02:05:25 +00:00
ftang%netscape.com
9a8deed063 add files from UCDATA 1.9
git-svn-id: svn://10.0.0.236/trunk@17218 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-06 01:46:32 +00:00
jband%netscape.com
3b85fc3f20 added header comment
git-svn-id: svn://10.0.0.236/trunk@17217 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-06 01:42:11 +00:00
jband%netscape.com
e445b044dd Added primitive Win32 invoker. cleaned up a lot of trailing whitespace
git-svn-id: svn://10.0.0.236/trunk@17216 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-06 01:31:51 +00:00
peterl%netscape.com
dddd2fbded added GetStyleImpact
cleaned up api


git-svn-id: svn://10.0.0.236/trunk@17215 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-06 01:25:39 +00:00
peterl%netscape.com
4ebd31d6c5 fixed namespace used for attributes via the DOM apis
capture style hint data when setting style attribute


git-svn-id: svn://10.0.0.236/trunk@17214 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-06 01:24:49 +00:00
peterl%netscape.com
8d0ffda037 changed DOM attribute methods to return the return value from the underlying attribute mechanism
git-svn-id: svn://10.0.0.236/trunk@17213 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-06 01:20:54 +00:00
vidur%netscape.com
8bfeeda06f Fix for bug 1954. Cloned text nodes (and comments) carry along the original data
git-svn-id: svn://10.0.0.236/trunk@17212 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-06 00:57:17 +00:00
troy%netscape.com
6f4a4cca87 Fixed a problem with the pull_nglayout rule being recursively defined
git-svn-id: svn://10.0.0.236/trunk@17211 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-06 00:42:05 +00:00
terry%netscape.com
b07273385d karnaze now owns tables.
git-svn-id: svn://10.0.0.236/trunk@17209 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-06 00:35:24 +00:00
pavlov%pavlov.net
994fabcba7 fix menus.
git-svn-id: svn://10.0.0.236/trunk@17208 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-06 00:34:50 +00:00
vidur%netscape.com
0908ebd261 Work in progres to get out-of-line document.write working. Created Reset() method in nsDocument. Fix for bug 1668.
git-svn-id: svn://10.0.0.236/trunk@17207 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-06 00:32:41 +00:00
despotdaemon%netscape.com
d8242b7b6e Pseudo-automatic update of changes made by evaughan@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@17206 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-06 00:28:50 +00:00
harishd%netscape.com
ee030ba487 Added type ( test/css ) checking for STYLE tag
git-svn-id: svn://10.0.0.236/trunk@17205 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-06 00:19:46 +00:00
warren%netscape.com
c6ffa614fd Added check for null.
git-svn-id: svn://10.0.0.236/trunk@17204 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-06 00:06:14 +00:00
warren%netscape.com
7d4466c45a Added error checking.
git-svn-id: svn://10.0.0.236/trunk@17203 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-06 00:05:29 +00:00
kmcclusk%netscape.com
2a00ad3de1 Defaultchecked attribute is set to match the checked attribute just after
the radio button or checkbox element is created. Checkboxes and Radio buttons
maintain their current state using the checked attribute stored in the
content model. They no longer use the nsIWidget to maintain their current setting.
Checkboxes and Radio buttons now print correctly. (i.e checked/unchecked state matches the
screen.)


git-svn-id: svn://10.0.0.236/trunk@17202 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-06 00:02:27 +00:00
troy%netscape.com
641be3028f Replaced "maxSize" member if nsReflowState with "availableWidth" and
"availableHeight"


git-svn-id: svn://10.0.0.236/trunk@17201 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-05 23:31:18 +00:00
waterson%netscape.com
c236b76b0c Fixed LXR comments.
git-svn-id: svn://10.0.0.236/trunk@17200 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-05 23:29:50 +00:00
pinkerton%netscape.com
a6f5e31e7d Added toolbar demo to the tests submenu.
git-svn-id: svn://10.0.0.236/trunk@17199 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-05 23:12:01 +00:00
kipp%netscape.com
31c482e2a8 Use macros from nsTextFragment
git-svn-id: svn://10.0.0.236/trunk@17198 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-05 23:02:27 +00:00
kipp%netscape.com
39aadedaf7 Reinstated the last set of checkins that were backed out
git-svn-id: svn://10.0.0.236/trunk@17197 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-05 23:01:54 +00:00
kipp%netscape.com
e0acc8d3d0 Consolidated character set macros into this file
git-svn-id: svn://10.0.0.236/trunk@17196 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-05 23:01:32 +00:00
pinkerton%netscape.com
08658b989d handle toolbar demo file menu command.
git-svn-id: svn://10.0.0.236/trunk@17195 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-05 22:59:51 +00:00
pinkerton%netscape.com
8f7c09c770 register the toolbox in the widget dll.
git-svn-id: svn://10.0.0.236/trunk@17194 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-05 22:59:27 +00:00
pinkerton%netscape.com
93d3cb3b42 Respond to toolbar demo menu command to show a new window for testing out toolbars.
git-svn-id: svn://10.0.0.236/trunk@17193 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-05 22:59:02 +00:00
pinkerton%netscape.com
7c3eea677e added Toolbar Demo menu item
git-svn-id: svn://10.0.0.236/trunk@17192 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-05 22:58:35 +00:00
pinkerton%netscape.com
f17ee19665 add VIEWER_TOOLBARDEMO command id.
git-svn-id: svn://10.0.0.236/trunk@17191 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-05 22:58:22 +00:00
waterson%netscape.com
01a0925622 Added some comments.
git-svn-id: svn://10.0.0.236/trunk@17190 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-05 22:58:13 +00:00
waterson%netscape.com
41f0e26051 Fixed some indentation.
git-svn-id: svn://10.0.0.236/trunk@17189 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-05 22:54:37 +00:00
waterson%netscape.com
99edef5c4c Got rid of ConsoleOutputStream: musta been some cruft from the example code I copied...
git-svn-id: svn://10.0.0.236/trunk@17188 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-05 22:53:59 +00:00
waterson%netscape.com
1950374fbe Added LXR comments. Got rid of unnecessary #ifdefs and obsolete factory methods.
git-svn-id: svn://10.0.0.236/trunk@17187 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-05 22:02:56 +00:00
waterson%netscape.com
4995a4ea84 Added LXR comments.
git-svn-id: svn://10.0.0.236/trunk@17186 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-05 21:57:59 +00:00
waterson%netscape.com
82b1df53d0 Added LXR comments.
git-svn-id: svn://10.0.0.236/trunk@17185 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-05 21:36:05 +00:00
waterson%netscape.com
74c694c200 Added LXR comments.
git-svn-id: svn://10.0.0.236/trunk@17184 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-05 21:22:20 +00:00
dougt%netscape.com
70b72261c8 Exposing AreThereActiveConnections() from the nsNetServices class. This is
so that we can tell if netlib is busy without having to be compiled with it.


git-svn-id: svn://10.0.0.236/trunk@17183 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-05 21:11:42 +00:00
scc%netscape.com
ead2550eb0 defined NSCAP_NEED_UNUSED_VIRTUAL_IMPLEMENTATIONS for GNU 2.7 under linux. Fixed URL leading to the user manual. Noted that ramiro is working on getting all these special #defines handled by the configuration system instead.
git-svn-id: svn://10.0.0.236/trunk@17182 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-05 21:07:57 +00:00
waterson%netscape.com
844c8f946f Updated to use the new event queue service that Rick landed last night.
git-svn-id: svn://10.0.0.236/trunk@17181 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-05 21:07:41 +00:00
waterson%netscape.com
30209acd75 Added comments for LXR.
git-svn-id: svn://10.0.0.236/trunk@17180 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-05 21:07:09 +00:00
waterson%netscape.com
a0df425ac3 Fixed the last bug with my namespace hack. Added a bunch of comments.
git-svn-id: svn://10.0.0.236/trunk@17179 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-05 21:06:54 +00:00
brade%netscape.com
1e44ca3c18 fix build bustage...(bad #include)
git-svn-id: svn://10.0.0.236/trunk@17178 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-05 19:51:59 +00:00
troy%netscape.com
a7ee3cc2f2 Initial check-in
git-svn-id: svn://10.0.0.236/trunk@17177 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-05 19:44:41 +00:00
amusil%netscape.com
264a75c13f Fixing build bustage.
git-svn-id: svn://10.0.0.236/trunk@17176 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-05 18:48:03 +00:00
brade%netscape.com
8bbd874ef4 comment out line to get tree green again (amusil@netscape.com to fix in long run)
git-svn-id: svn://10.0.0.236/trunk@17175 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-05 18:32:29 +00:00
donm%netscape.com
afa12446af backing out changes against a long red tree. would like to clear
the hook.  -donm


git-svn-id: svn://10.0.0.236/trunk@17174 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-05 18:16:05 +00:00
donm%netscape.com
5ebbaccf7b fixing tree bustage due to #ifdef NSPR20 and missing prmacos.h.
This should be looked at again.  -donm


git-svn-id: svn://10.0.0.236/trunk@17173 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-05 18:08:23 +00:00
kipp%netscape.com
e320144878 Fix handling of removed-child incremental reflow to no longer crash (bug #1941); also disabled incremental behavior for remove and inserted for now so that layout looks correct
git-svn-id: svn://10.0.0.236/trunk@17172 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-05 17:50:41 +00:00
kipp%netscape.com
8756b851e1 Removed aPrevSibling from DoRemoveFrame's arg list
git-svn-id: svn://10.0.0.236/trunk@17171 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-05 17:49:44 +00:00
rpotts%netscape.com
0eadeaf837 Include the implementation of NS_SetupRegistry(...) from mozilla/webshell/tests/viewer/nsSetupRegistry.cpp rather than duplicating the code...
git-svn-id: svn://10.0.0.236/trunk@17160 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-05 10:39:04 +00:00
rpotts%netscape.com
7404fe4fa5 use the new EventQueueService to obtain the event queue used for marshalling data over to the UI thread...
git-svn-id: svn://10.0.0.236/trunk@17159 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-05 09:51:28 +00:00
rpotts%netscape.com
d71f0e04b2 Use the EventQueueService to get the event queue for the UI thread...
git-svn-id: svn://10.0.0.236/trunk@17158 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-05 09:46:33 +00:00
rpotts%netscape.com
f0d7f6fddb On windows call PL_InitializeEventsLib(...) until the new PL_event apis are available...
git-svn-id: svn://10.0.0.236/trunk@17157 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-05 09:44:28 +00:00
rpotts%netscape.com
d4874da99e do not call PL_InitializeEventsLib(...) any more. nsIEventQueueService::CreateThreadEventQueue(...) has this functionality now...
git-svn-id: svn://10.0.0.236/trunk@17156 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-05 09:42:22 +00:00
amusil%netscape.com
c774854dcf Removed plugin .cpp files - plugin functionality now exists in the plugin.mcp project.
git-svn-id: svn://10.0.0.236/trunk@17155 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-05 09:35:29 +00:00
amusil%netscape.com
b715d40019 Added plugin.shlb
git-svn-id: svn://10.0.0.236/trunk@17154 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-05 09:34:54 +00:00
amusil%netscape.com
6e42329df5 Added plugin.mcp project to the Mac build. plugin.shlb is now included in layout.mcp and plugin-related cpp files have been removed from viewer.mcp
git-svn-id: svn://10.0.0.236/trunk@17153 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-05 09:34:27 +00:00
amusil%netscape.com
3477339d79 First Checked In.
git-svn-id: svn://10.0.0.236/trunk@17152 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-05 09:10:46 +00:00
waterson%netscape.com
7b200af9a2 Bug fixes and enhancements to nsRDFStreamData source. Can almost round-trip RDF/XML now...
git-svn-id: svn://10.0.0.236/trunk@17151 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-05 08:44:40 +00:00
cls%seawood.org
2f83b9cfdb Fixed problem in fullcircle detection that was causing configure to break when using autoconf-19981231.
git-svn-id: svn://10.0.0.236/trunk@17146 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-05 07:16:18 +00:00
rpotts%netscape.com
ec65ee7ade Create an event queue via the EventQueueService for the UI thread...
git-svn-id: svn://10.0.0.236/trunk@17145 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-05 05:58:08 +00:00
rpotts%netscape.com
9493f3c102 Add the EventQueueService to the repository...
git-svn-id: svn://10.0.0.236/trunk@17144 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-05 05:51:30 +00:00
troy%netscape.com
dd7cc8fddc Improved GetAbsoluteContainingBlock() a bit. It still needs to handle scrolled
elements


git-svn-id: svn://10.0.0.236/trunk@17143 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-05 05:51:22 +00:00
rpotts%netscape.com
bfb6a305f7 On windows only, ignore the eventQ kept by the eventQ service... Until the event Q is created with PL_CreateNativeEventQueue(...) only the main event Q can be used...
git-svn-id: svn://10.0.0.236/trunk@17142 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-05 05:43:53 +00:00
rpotts%netscape.com
750b88f0de Added nsXPComFactory.cpp and nsEventQueueService.cpp to the windows build
git-svn-id: svn://10.0.0.236/trunk@17141 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-05 05:42:38 +00:00
waterson%netscape.com
aa2086117c Added docs on what this file is for.
git-svn-id: svn://10.0.0.236/trunk@17140 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-05 05:38:45 +00:00
waterson%netscape.com
a7958b582d Merge from RDF_122898_BRANCH. (This is not in the main build.)
git-svn-id: svn://10.0.0.236/trunk@17139 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-05 05:36:40 +00:00
pierre%netscape.com
b5170621b9 removed the handle locking/unlocking in Init()
git-svn-id: svn://10.0.0.236/trunk@17138 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-05 04:07:23 +00:00
waterson%netscape.com
801ab5428d Landed RDF_122898_BRANCH onto the trunk.
git-svn-id: svn://10.0.0.236/trunk@17137 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-05 03:53:15 +00:00
val4%cornell.edu
e8f8188954 Some more changes, there's not that much left. Need to figure out a
model for error reporting and security.


git-svn-id: svn://10.0.0.236/trunk@17136 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-05 03:51:30 +00:00
pierre%netscape.com
2266917d12 commented out an annoying assert
git-svn-id: svn://10.0.0.236/trunk@17135 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-05 03:51:17 +00:00
pierre%netscape.com
24e8e9d5cd Fixing the xpfeViewer build (which is now obsolete) just for the sake of it
git-svn-id: svn://10.0.0.236/trunk@17134 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-05 03:48:54 +00:00
pavlov%pavlov.net
d0aecad9d4 we now underline things.
git-svn-id: svn://10.0.0.236/trunk@17133 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-05 03:25:55 +00:00
val4%cornell.edu
50a1d9d4a7 I am half way through changing the file object error handling code and
generally cleaning everything up.


git-svn-id: svn://10.0.0.236/trunk@17129 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-05 02:18:26 +00:00
larryh%netscape.com
41ea29ef02 BugZilla 2131. Plus, fix undef symbol in Mac
git-svn-id: svn://10.0.0.236/trunk@17128 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-05 01:38:41 +00:00
val4%cornell.edu
595b3fc337 Netscape licence added
git-svn-id: svn://10.0.0.236/trunk@17127 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-05 01:08:45 +00:00
troy%netscape.com
4e4c0aad37 Cleaned up some old references to margins which aren't applicable to row group
frames and row frames (because internal table elements don't have margins)


git-svn-id: svn://10.0.0.236/trunk@17126 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-05 00:41:40 +00:00
briano%netscape.com
6e7d188d7b Fix for bugzilla#1316 in which both debug and optimization flags were being passed to the compiler when MOZ_DEBUG was defined.
git-svn-id: svn://10.0.0.236/trunk@17125 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-05 00:37:34 +00:00
larryh%netscape.com
2fb0355c6b BugZilla: 2131. BugSplat: 337698.
Thanks to "Adam Lock" <locka@iol.ie> for suggestions.
Thanks to Rick Potts for suggestions and critique of the design.


git-svn-id: svn://10.0.0.236/trunk@17124 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-05 00:08:28 +00:00
mscott%netscape.com
c1c89e5fd3 First checked in. These files are the foundation for our nntp protocol implementation.
git-svn-id: svn://10.0.0.236/trunk@17123 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-04 23:59:59 +00:00
amusil%netscape.com
c94b267b34 Temporary workaround so that plugins display correctly. This will change after support for
CSS borders and padding are added.


git-svn-id: svn://10.0.0.236/trunk@17122 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-04 23:45:38 +00:00
val4%cornell.edu
745be1fd7d Extended shell. Previously was part of the ns tree. See README.html for
more details.


git-svn-id: svn://10.0.0.236/trunk@17121 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-04 23:45:08 +00:00
amusil%netscape.com
ce0f3f26ce Added NPN_NewStream() functionality. Currently uses a temp file between the plugin stream and the target.
I will remove this file in-between as soon as I get a little more stream help from netlib.


git-svn-id: svn://10.0.0.236/trunk@17120 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-04 23:43:41 +00:00
briano%netscape.com
7e33a97efc First attempt at building on HP-UX again. Thanks to rkl@connect.org.uk for the patch, and for his amazing patience....
git-svn-id: svn://10.0.0.236/trunk@17119 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-04 23:17:01 +00:00
rpotts%netscape.com
2d510a5603 Added new headers to the EXPORT rule...
git-svn-id: svn://10.0.0.236/trunk@17118 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-04 23:08:44 +00:00
ftang%netscape.com
a03bd0610f add unix support
git-svn-id: svn://10.0.0.236/trunk@17113 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-04 22:36:45 +00:00
ftang%netscape.com
4dab9f4776 add export function
git-svn-id: svn://10.0.0.236/trunk@17110 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-04 22:34:43 +00:00
ftang%netscape.com
12bb169ebb add Makefile.in
git-svn-id: svn://10.0.0.236/trunk@17108 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-04 22:05:25 +00:00
locka%iol.ie
52b207f812 Bug 2111: Implemented temporary kludge fix pending ideas from others on the matter
git-svn-id: svn://10.0.0.236/trunk@17107 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-04 21:58:15 +00:00
ftang%netscape.com
a8e20395d0 uncomment nsRegistery::FreeLibrary line
git-svn-id: svn://10.0.0.236/trunk@17106 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-04 21:52:15 +00:00
pnunn%netscape.com
e0ccf1f37e Minor changes to address annoying compile warnings. pn
git-svn-id: svn://10.0.0.236/trunk@17104 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-04 20:04:49 +00:00
jfrancis%netscape.com
4a14e99dd5 satisfying compiler oddities
git-svn-id: svn://10.0.0.236/trunk@17101 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-04 17:44:20 +00:00
jfrancis%netscape.com
b14dce6190 bug fixing range gravity code; general cleanup
git-svn-id: svn://10.0.0.236/trunk@17097 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-04 16:48:33 +00:00
despotdaemon%netscape.com
2b02b5ea74 Pseudo-automatic update of changes made by brade@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@17096 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-04 16:41:14 +00:00
brade%netscape.com
d98b24c0f3 add typecasts to reduce warnings on Macintosh compiler (r/a mike mccabe)
git-svn-id: svn://10.0.0.236/trunk@17095 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-04 15:31:52 +00:00
jfrancis%netscape.com
e2914acc38 fixing build bustage
git-svn-id: svn://10.0.0.236/trunk@17094 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-04 15:24:31 +00:00
jfrancis%netscape.com
4cb9ee6bab disabling some range stuff while I fix it
git-svn-id: svn://10.0.0.236/trunk@17093 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-04 13:06:43 +00:00
rpotts%netscape.com
f611f3c664 Added the nsIEventQueueService IID...
git-svn-id: svn://10.0.0.236/trunk@17092 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-04 08:50:43 +00:00
rpotts%netscape.com
e9f86cd8cf This is the implementation of the EventQueue service...
git-svn-id: svn://10.0.0.236/trunk@17091 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-04 08:50:10 +00:00
rpotts%netscape.com
92a7c129df This is the implementation of NS_GetFactory(...) for the xpcom DLL.
git-svn-id: svn://10.0.0.236/trunk@17090 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-04 08:49:49 +00:00
rpotts%netscape.com
b8eeb8454d This is a templatized implementation of an XPCOM factory...
git-svn-id: svn://10.0.0.236/trunk@17089 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-04 08:44:26 +00:00
rpotts%netscape.com
6bce9e5b21 THis file contains the CLSIDs of components which can be created by the xpcom factory...
git-svn-id: svn://10.0.0.236/trunk@17088 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-04 08:43:52 +00:00
rpotts%netscape.com
a0f65d0e99 Interface to the EventQueue Service...
git-svn-id: svn://10.0.0.236/trunk@17087 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-04 08:43:12 +00:00
buster%netscape.com
3f8ad7598f fixed a crash in edit mode VK_BACK handling. uninitialized pointer.
git-svn-id: svn://10.0.0.236/trunk@17086 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-04 07:08:53 +00:00
troy%netscape.com
4d65b22403 Changed nsISpaceManager interface to conform to XP-COM conventions on
return values


git-svn-id: svn://10.0.0.236/trunk@17085 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-04 04:54:33 +00:00
jband%netscape.com
c759ddad43 minor fixes
git-svn-id: svn://10.0.0.236/trunk@17084 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-04 03:35:42 +00:00
jband%netscape.com
d95c559650 type names less generic
git-svn-id: svn://10.0.0.236/trunk@17083 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-04 03:30:09 +00:00
jband%netscape.com
8897045308 Initial checkin of XPConnect. This is not yet at all functional nor anywhere near finished.
git-svn-id: svn://10.0.0.236/trunk@17082 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-04 03:14:01 +00:00
buster%netscape.com
56a7cf3ab3 fixed bug 1999, frame="void" was removing cell borders as well as the table frame
git-svn-id: svn://10.0.0.236/trunk@17081 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-03 22:30:23 +00:00
buster%netscape.com
535e4c1b38 swirly new collapsing border example added
git-svn-id: svn://10.0.0.236/trunk@17080 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-03 20:45:05 +00:00
buster%netscape.com
8d76cca127 comments, so many comments!
git-svn-id: svn://10.0.0.236/trunk@17079 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-03 19:23:21 +00:00
buster%netscape.com
f409ad31b4 preliminary work for cell inheritence of valign and halign attributes from col(group) and row(group)
according to css 2 spec


git-svn-id: svn://10.0.0.236/trunk@17078 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-03 19:22:40 +00:00
buster%netscape.com
82750b9744 fixed a bug in fixed layout initial reflow with spanning cells
git-svn-id: svn://10.0.0.236/trunk@17077 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-03 19:20:13 +00:00
jfrancis%netscape.com
d1bebf1bc5 adding range gravity for dom text nodes
git-svn-id: svn://10.0.0.236/trunk@17076 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-03 14:29:54 +00:00
troy%netscape.com
1c810256bf Moved enum and replaced it with #defines
git-svn-id: svn://10.0.0.236/trunk@17075 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-03 00:31:46 +00:00
troy%netscape.com
99d2f51f2c Fixe for test8 hitting an assert
git-svn-id: svn://10.0.0.236/trunk@17074 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-03 00:15:56 +00:00
troy%netscape.com
f16883b846 Changed comment to reflect the current state of the tree
git-svn-id: svn://10.0.0.236/trunk@17073 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-02 23:05:08 +00:00
troy%netscape.com
748bda0c54 Changed computed width calculation for internal table elements to take
border/padding into account


git-svn-id: svn://10.0.0.236/trunk@17072 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-02 22:54:12 +00:00
troy%netscape.com
b5bffb2735 Added logic to make sure that internal table elements have reasonable
values for the computed width/height


git-svn-id: svn://10.0.0.236/trunk@17071 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-02 21:03:51 +00:00
troy%netscape.com
0676951248 Added :CELL-CONTENT rule for the area-frame that's inside the table cell.
Sets the 'display' property to 'block' to override the default value of
'inline'


git-svn-id: svn://10.0.0.236/trunk@17070 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-02 21:01:37 +00:00
troy%netscape.com
b924e4baa8 Changed CreatePlaceholderFrame() to use a pseudo element style context
(:PLACEHOLDER-FRAME) for the placeholder frame. This way it looks like an
inline static frame with a specified size of (0, 0)


git-svn-id: svn://10.0.0.236/trunk@17069 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-02 20:51:43 +00:00
troy%netscape.com
ca81e6912a Fix for bug 2109. If the child's maxSize.width is smaller than the containing
block's computed width then use it instead


git-svn-id: svn://10.0.0.236/trunk@17068 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-02 19:21:32 +00:00
val4%cornell.edu
58dd6fa960 Changes in the way error reporting works. Removed JS_ReportOutOfMemory
because JS_malloc calls it on failure. Removed checks for NULL returned
from JS_GetInstancePrivate because we have a check in JS_SetPrivate.


git-svn-id: svn://10.0.0.236/trunk@17066 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-02 04:02:36 +00:00
val4%cornell.edu
29a57fc9cb Lots of changes in implementation of various functions and formatting.
The only major feature added in support of pipes, it hasn't been tested
yet.


git-svn-id: svn://10.0.0.236/trunk@17065 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-01 04:37:28 +00:00
leaf%mozilla.org
2bb3760815 applying patches from Joe Keane <jgk@jgk.org> changing gets to fgets
git-svn-id: svn://10.0.0.236/trunk@17064 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-01 02:47:52 +00:00
ftang%netscape.com
a41ba28081 temp turn off self reg on UNIX
git-svn-id: svn://10.0.0.236/trunk@17063 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-01 01:29:12 +00:00
terry%netscape.com
243249521d Sleezy hack to always make "cvs" come out as the first repository.
git-svn-id: svn://10.0.0.236/trunk@17060 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-01 00:44:59 +00:00
ftang%netscape.com
d9019b2386 use NS_FAILED(res) to replace bad (NS_OK != res)
git-svn-id: svn://10.0.0.236/trunk@17059 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-01 00:35:26 +00:00
terry%netscape.com
05bf72d1e9 Added ability to search for the partition that owns a given file.
git-svn-id: svn://10.0.0.236/trunk@17058 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-01 00:34:38 +00:00
terry%netscape.com
4404aa487d Get rid of a harmless warning message.
git-svn-id: svn://10.0.0.236/trunk@17057 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-01 00:07:21 +00:00
morse%netscape.com
5ec9a17505 put back fix for cookie bug
git-svn-id: svn://10.0.0.236/trunk@17056 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-01 00:06:00 +00:00
despotdaemon%netscape.com
0cec25a85d Pseudo-automatic update of changes made by scc@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@17055 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-31 23:33:07 +00:00
leaf%mozilla.org
3a16ac0a92 fixed mispelled greetings and added some.
git-svn-id: svn://10.0.0.236/trunk@17054 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-31 23:29:48 +00:00
terry%netscape.com
2f67b6c5a1 raptor => SeaMonkey.
git-svn-id: svn://10.0.0.236/trunk@17053 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-31 23:27:49 +00:00
troy%netscape.com
88546760e9 Changed InitConstraints() to handle inline, block-level, and floated elements
(replaced and non-replaced)


git-svn-id: svn://10.0.0.236/trunk@17052 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-31 23:07:00 +00:00
donm%netscape.com
527c480a9e backing out tree busting changes. -donm
git-svn-id: svn://10.0.0.236/trunk@17051 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-31 22:44:19 +00:00
coop%netscape.com
3bf81d55cf Added reference to xpidl_typelib.h
git-svn-id: svn://10.0.0.236/trunk@17050 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-31 22:11:39 +00:00
coop%netscape.com
bdbe9a1b5b Initial pass at declarations required for building typelib files.
git-svn-id: svn://10.0.0.236/trunk@17049 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-31 22:11:05 +00:00
terry%netscape.com
4aa2b0ed83 When creating a new tinderbox tree, give a chance to specify the
repository it uses.


git-svn-id: svn://10.0.0.236/trunk@17046 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-31 21:33:19 +00:00
morse%netscape.com
592e6c3aa3 make parameters consistent
git-svn-id: svn://10.0.0.236/trunk@17045 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-31 21:26:31 +00:00
morse%netscape.com
4f3a18180e fix bug 329293 -- 2-dot cookie bug
git-svn-id: svn://10.0.0.236/trunk@17044 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-31 21:25:58 +00:00
leaf%mozilla.org
b4ca26d112 fixing clobber rule
git-svn-id: svn://10.0.0.236/trunk@17043 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-31 20:17:37 +00:00
leaf%mozilla.org
5384748984 readding the clobber_all rule... *grumble* *grumble*
git-svn-id: svn://10.0.0.236/trunk@17041 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-31 19:55:05 +00:00
terry%netscape.com
9f7db4a504 Track mozilla.org news. Whenever a newsitem appears in anything, tell
the channel about it.  Also, now checks everything once an hour.


git-svn-id: svn://10.0.0.236/trunk@17039 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-31 18:38:54 +00:00
val4%cornell.edu
87316fb0e5 The following changes were made:
jsfile.h
 - NewFileObject function exposed
jsfile.c
 - Added .msg-style error support of error reporting
 - ucs2 changed to binary
 - input/output/error properties are created


git-svn-id: svn://10.0.0.236/trunk@17038 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-31 05:58:26 +00:00
troy%netscape.com
008a69b28f Better computation of computed width and height and margins for block-level
elements


git-svn-id: svn://10.0.0.236/trunk@17037 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-31 05:35:38 +00:00
jfrancis%netscape.com
f5031101fd Adding Range to repository & layout factory
git-svn-id: svn://10.0.0.236/trunk@17036 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-31 02:32:28 +00:00
ramiro%netscape.com
f84c6c743c Fix a dumb else then screwup.
git-svn-id: svn://10.0.0.236/trunk@17035 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-31 02:29:06 +00:00
ramiro%netscape.com
7beee88783 Added a script to regenerate a single Makefile from a Makefile.in using
the config.status script.


git-svn-id: svn://10.0.0.236/trunk@17034 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-31 02:27:25 +00:00
akkana%netscape.com
d823abaaa3 Only build editor if MOZ_EDITOR is defined
git-svn-id: svn://10.0.0.236/trunk@17019 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-31 00:18:40 +00:00
buster%netscape.com
6df6114357 collapsing border bug fixes
git-svn-id: svn://10.0.0.236/trunk@17017 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-30 23:23:45 +00:00
timm%netscape.com
4cd964039a new checkins for free source CCK
git-svn-id: svn://10.0.0.236/trunk@17016 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-30 23:03:13 +00:00
ftang%netscape.com
2c3827d8ca Change setting
git-svn-id: svn://10.0.0.236/trunk@17015 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-30 22:51:55 +00:00
ftang%netscape.com
e387be988a temp fix for mac problem by comment out nsRepository::FreeLibraries
git-svn-id: svn://10.0.0.236/trunk@17014 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-30 22:51:08 +00:00
buster%netscape.com
026f6d379d empty cells now are sized correctly.
git-svn-id: svn://10.0.0.236/trunk@17013 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-30 22:41:08 +00:00
buster%netscape.com
9864b12d26 collapsing borders with odd width have correct width now
git-svn-id: svn://10.0.0.236/trunk@17012 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-30 22:40:36 +00:00
buster%netscape.com
92257be8b3 right dashed borders now work
dashed borders along a span now mostly work


git-svn-id: svn://10.0.0.236/trunk@17011 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-30 22:39:49 +00:00
vidur%netscape.com
c94d23dc13 Separated class intialization from name registration in namespace management code
git-svn-id: svn://10.0.0.236/trunk@17010 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-30 21:35:35 +00:00
waterson%netscape.com
19d9cc2d75 Okay, try #2. Fix Win95/98 build bustage.
git-svn-id: svn://10.0.0.236/trunk@17009 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-30 21:25:47 +00:00
ftang%netscape.com
aee1370842 First Checked In.
git-svn-id: svn://10.0.0.236/trunk@17008 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-30 21:10:39 +00:00
ftang%netscape.com
f4d52efe5b test the result for all the return vaule from nsRepository
git-svn-id: svn://10.0.0.236/trunk@17007 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-30 21:06:18 +00:00
leaf%mozilla.org
4965267284 backing out removal of nsInMemoryDataSource.obj
git-svn-id: svn://10.0.0.236/trunk@17005 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-30 20:00:59 +00:00
ftang%netscape.com
6adda3e963 Add some code for mac
git-svn-id: svn://10.0.0.236/trunk@17004 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-30 19:49:57 +00:00
brade%netscape.com
aea5c2aaca remove paths for mozilla/modules/xlate since it isn't needed nor available from the current CVS module
git-svn-id: svn://10.0.0.236/trunk@17003 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-30 19:40:17 +00:00
despotdaemon%netscape.com
1f784a84d0 Pseudo-automatic update of changes made by terry@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@17002 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-30 19:19:31 +00:00
dougt%netscape.com
60826ccda8 Removing AutoUpdate from Netlib.
git-svn-id: svn://10.0.0.236/trunk@17001 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-30 19:09:39 +00:00
waterson%netscape.com
7cf55635ec Fix Win95 build bustage.
git-svn-id: svn://10.0.0.236/trunk@16999 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-30 17:52:01 +00:00
troy%netscape.com
c22f41cbf9 Changed width/height constraints in nsHTMLReflowState struct
git-svn-id: svn://10.0.0.236/trunk@16998 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-30 17:50:00 +00:00
despotdaemon%netscape.com
4659feb84c Pseudo-automatic update of changes made by terry@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@16997 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-30 16:18:58 +00:00
brade%netscape.com
0b4a44f926 make several functions PRIVATE to reduce compiler warnings on Macintosh
git-svn-id: svn://10.0.0.236/trunk@16996 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-30 16:06:22 +00:00
brade%netscape.com
5df088c603 add #includes and prototypes to reduce compiler warnings on Macintosh
git-svn-id: svn://10.0.0.236/trunk@16995 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-30 16:05:27 +00:00
brade%netscape.com
de46138715 add prototype and PRIVATE to several functions to reduce compiler warnings on Macintosh
git-svn-id: svn://10.0.0.236/trunk@16994 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-30 16:03:43 +00:00
brade%netscape.com
363efbac97 add prototype for net_ReleaseContext to reduce compiler warnings on Macintosh
git-svn-id: svn://10.0.0.236/trunk@16993 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-30 16:01:54 +00:00
brade%netscape.com
c6a16212fc add prototypes to reduce compiler warnings on Macintosh
git-svn-id: svn://10.0.0.236/trunk@16992 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-30 16:00:57 +00:00
brade%netscape.com
06b8ec5269 add prototype for NET_FindProxyInJSC to reduce compiler warnings on Macintosh.
git-svn-id: svn://10.0.0.236/trunk@16991 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-30 16:00:01 +00:00
jfrancis%netscape.com
9a6867b7e9 more dom range gravity work
git-svn-id: svn://10.0.0.236/trunk@16990 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-30 08:28:16 +00:00
buster%netscape.com
05fedad27b collapsing border computation and conflict resolution
git-svn-id: svn://10.0.0.236/trunk@16989 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-30 06:48:15 +00:00
buster%netscape.com
cca2fe54e4 CSS2 table collapsing border rendering
git-svn-id: svn://10.0.0.236/trunk@16988 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-30 06:47:26 +00:00
buster%netscape.com
40cc77a614 added mInsideNeighbor to nsBorderEdge, allowing fast access for an outside edge to
it's neighboring inside edge.  value is undefined for inside edges.


git-svn-id: svn://10.0.0.236/trunk@16987 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-30 06:46:35 +00:00
vidur%netscape.com
526d71ae38 Fixed early initialization problem in script namespace management
git-svn-id: svn://10.0.0.236/trunk@16985 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-30 02:46:36 +00:00
beard%netscape.com
d8ba29c639 backed out SingleSign/CookieManagement changes
git-svn-id: svn://10.0.0.236/trunk@16984 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-30 02:26:02 +00:00
morse%netscape.com
e6905cd686 fix mac bustage
git-svn-id: svn://10.0.0.236/trunk@16983 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-30 02:25:05 +00:00
beard%netscape.com
4d29b4ba1b Turning on CookieManagement/SingleSignon on Mac.
git-svn-id: svn://10.0.0.236/trunk@16982 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-30 01:47:23 +00:00
beard%netscape.com
050ebec5db Backed out change for mac bustage.
git-svn-id: svn://10.0.0.236/trunk@16981 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-30 01:45:39 +00:00
val4%cornell.edu
88a1b143d1 The following changes were made:
- Changed the DLL export macros JS_EXTERN_API, etc. to conform with the
  current standards
- Updates the docs in README.html
- Updated the include locations and the MSDEV project to make
  the build process easier.
- Managed to build PerlConnect with Perl 5.005_02. It's not compatible
  with previous versions. Don't use ActivePerl! It probably won't work!
- There is a fix to js.c which I am going to chech in a bit later.


git-svn-id: svn://10.0.0.236/trunk@16979 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-30 01:36:55 +00:00
morse%netscape.com
281d6445b1 fix mac bustage
git-svn-id: svn://10.0.0.236/trunk@16977 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-30 01:29:54 +00:00
despotdaemon%netscape.com
1d011cec19 Pseudo-automatic update of changes made by terry@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@16976 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-30 01:01:15 +00:00
ramiro%netscape.com
396e5e417f cvsignore FilesTest.
git-svn-id: svn://10.0.0.236/trunk@16975 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-30 00:38:50 +00:00
ramiro%netscape.com
2968376436 Ignore generated files.
git-svn-id: svn://10.0.0.236/trunk@16974 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-30 00:38:23 +00:00
morse%netscape.com
b81dca611d changes needed for privacy module
git-svn-id: svn://10.0.0.236/trunk@16973 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-30 00:22:55 +00:00
morse%netscape.com
ab6c2fa557 interfaces for routines need by privacy module
git-svn-id: svn://10.0.0.236/trunk@16972 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-30 00:20:46 +00:00
rpotts%netscape.com
c01cd564e1 Removed browser dependancies that are not checked in yet...
git-svn-id: svn://10.0.0.236/trunk@16971 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-30 00:09:03 +00:00
rpotts%netscape.com
00bb487c0e Added support for terminating the app when all of the top level windows have been closed...
git-svn-id: svn://10.0.0.236/trunk@16970 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-30 00:03:52 +00:00
rpotts%netscape.com
26f914fde9 changed to use nscore.h for the NS_APPSHELL definition...
git-svn-id: svn://10.0.0.236/trunk@16969 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-30 00:03:00 +00:00
rpotts%netscape.com
9a987c1346 Added an entry for the application shell...
git-svn-id: svn://10.0.0.236/trunk@16968 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-29 23:59:23 +00:00
leaf%mozilla.org
b664c8d070 adding mozilla/modules/libpref/unicharutil as per frank tang's request
git-svn-id: svn://10.0.0.236/trunk@16967 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-29 23:48:10 +00:00
rpotts%netscape.com
e4aeef3417 added new factories from webshell/viewer/nsSetupRegistry.cpp
git-svn-id: svn://10.0.0.236/trunk@16966 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-29 23:32:11 +00:00
ftang%netscape.com
4ea7326030 1st check in. It build on Window. It does not build on UNIX and macintosh yet.
It is not hook up with build system yet. Read note.txt first.


git-svn-id: svn://10.0.0.236/trunk@16965 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-29 23:28:05 +00:00
beard%netscape.com
435e568120 Creates a new window with "_new" target.
git-svn-id: svn://10.0.0.236/trunk@16960 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-29 22:37:55 +00:00
beard%netscape.com
79f4ee31da Document base changes.
git-svn-id: svn://10.0.0.236/trunk@16959 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-29 22:36:41 +00:00
beard%netscape.com
9e4c52a9f9 Class loader utilities.
git-svn-id: svn://10.0.0.236/trunk@16958 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-29 22:36:11 +00:00
beard%netscape.com
a7dc225454 Pro 4 format.
git-svn-id: svn://10.0.0.236/trunk@16957 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-29 22:35:01 +00:00
beard%netscape.com
80dfd8f7b5 Class loader, security context stuff, codebase principal.
git-svn-id: svn://10.0.0.236/trunk@16955 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-29 22:31:18 +00:00
blizzard%appliedtheory.com
39c0e61381 patch from Brian Ryner <bryner@uiuc.edu> for scaling fonts a little
better.


git-svn-id: svn://10.0.0.236/trunk@16945 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-29 21:08:11 +00:00
jfrancis%netscape.com
0ee5686b8c removing nsAbsoluteFrame.cpp, since it seems to have disappeared.
git-svn-id: svn://10.0.0.236/trunk@16935 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-29 07:24:32 +00:00
beard%netscape.com
3826ef37b1 Removed nsBodyFrame.cpp per Troy's request.
git-svn-id: svn://10.0.0.236/trunk@16934 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-29 06:08:02 +00:00
troy%netscape.com
2927e0972f Fixed it up to compile, because the Mac is still building it...
git-svn-id: svn://10.0.0.236/trunk@16933 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-29 05:54:59 +00:00
troy%netscape.com
e56c93f6f8 Fixed it up to compile again, because the Mac is still building it...
git-svn-id: svn://10.0.0.236/trunk@16932 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-29 05:53:54 +00:00
troy%netscape.com
d12c228d7d Fixed it so XML documents display again
git-svn-id: svn://10.0.0.236/trunk@16931 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-29 05:51:11 +00:00
troy%netscape.com
1113a62e37 Removed debug output that was probably checked in by mistake
git-svn-id: svn://10.0.0.236/trunk@16930 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-29 05:37:11 +00:00
troy%netscape.com
798ca8add0 Fixed a problem with absolutely positioned tables not working properly
git-svn-id: svn://10.0.0.236/trunk@16929 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-29 05:35:42 +00:00
troy%netscape.com
38a8b5ecdb Changed some of the member functions to conform to XP-COM conventions for
returning a nsresult


git-svn-id: svn://10.0.0.236/trunk@16928 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-29 04:56:31 +00:00
troy%netscape.com
43b0f05bb3 Renamed FindFrameWithContent() to GetPrimaryFrameFor()
git-svn-id: svn://10.0.0.236/trunk@16927 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-29 04:45:18 +00:00
rpotts%netscape.com
6a46e826d5 Fixed the firing of the OnConnectionsComplete(...) notification so it worked correctly in framesets...
git-svn-id: svn://10.0.0.236/trunk@16926 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-29 04:45:00 +00:00
beard%netscape.com
9313e8f0c4 Was using unitialized variables for default dimensions of newly created window. Now attempts to at least inherit position from creating window.
git-svn-id: svn://10.0.0.236/trunk@16925 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-29 03:53:07 +00:00
troy%netscape.com
9a7f94d20b Moved logic that deals with moving absolutely positioned frames out of the
flow to the frame construction code


git-svn-id: svn://10.0.0.236/trunk@16924 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-29 03:38:16 +00:00
troy%netscape.com
eb80b6fbaa Fixed memory leak in nsHttpUrlImpl::SetSpec()
git-svn-id: svn://10.0.0.236/trunk@16923 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-29 01:32:39 +00:00
troy%netscape.com
62065135d1 Fixed memory leak in NS_MakeAbsoluteURL()
git-svn-id: svn://10.0.0.236/trunk@16920 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-29 01:22:57 +00:00
blizzard%appliedtheory.com
b77dcba831 don't return the address of something allocated on the stack
git-svn-id: svn://10.0.0.236/trunk@16918 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-29 01:07:35 +00:00
troy%netscape.com
cdbdb080a4 Fixed memory leak in ToString()
git-svn-id: svn://10.0.0.236/trunk@16917 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-29 01:03:26 +00:00
mcmullen%netscape.com
4bbbe1f26f Simplify the console case, so that Windows does not think it has to compile with exception handling.
git-svn-id: svn://10.0.0.236/trunk@16914 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-29 00:24:32 +00:00
rpotts%netscape.com
f8bbc3023a Fire the OnSubmit event on the form not the input field...
git-svn-id: svn://10.0.0.236/trunk@16911 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-28 21:28:53 +00:00
cls%seawood.org
dbbb4b4485 Ok, after further thought, the last attempt wasn't going to work as the mac project files were not updated so we'll just put Guha's stuff in ifdefs.
git-svn-id: svn://10.0.0.236/trunk@16909 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-28 06:05:14 +00:00
cls%seawood.org
610c12c402 Oops, forgot about the headers.
git-svn-id: svn://10.0.0.236/trunk@16908 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-28 05:34:13 +00:00
cls%seawood.org
259c5306a9 Attempting to fix the change from using nsMemoryDataSource.cpp to using nsInMemoryDataSource.cpp.
git-svn-id: svn://10.0.0.236/trunk@16907 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-28 04:12:55 +00:00
guha%netscape.com
ba7c870812 adding a method to nsIRDFCursor.cpp
git-svn-id: svn://10.0.0.236/trunk@16906 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-27 20:35:46 +00:00
nisheeth%netscape.com
97dde67cba Definition and implementation of nsXSLContentSink. The XSL content sink
is instantiated for an XSL stylesheet and constructs
the XSL rule model as the stylesheet gets parsed by the parser.

Checking in the first cut.  These files are not part of the build yet.  Just
checking in so that they get backed up while I am away on my 3 week vacation.


git-svn-id: svn://10.0.0.236/trunk@16905 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-27 08:48:00 +00:00
nisheeth%netscape.com
02896f6428 Checking in initial tests for the first XSL prototype.
git-svn-id: svn://10.0.0.236/trunk@16904 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-27 08:25:54 +00:00
nisheeth%netscape.com
63b7e2f477 Adding code protected by an ifdef for making the XML content sink initiate
the load of an XSL stylesheet when it sees a stylesheet PI with an XSL
content type.


git-svn-id: svn://10.0.0.236/trunk@16903 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-27 08:24:04 +00:00
locka%iol.ie
2693122d24 Added extra debugging
git-svn-id: svn://10.0.0.236/trunk@16902 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-26 12:16:12 +00:00
locka%iol.ie
9b4f53f45c Updated method prototype after changes to nsIStreamObserver
git-svn-id: svn://10.0.0.236/trunk@16901 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-26 12:15:56 +00:00
locka%iol.ie
768bc13f55 Changed threading model
git-svn-id: svn://10.0.0.236/trunk@16900 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-26 12:14:46 +00:00
val4%cornell.edu
841874f176 Added support for dir["file"] syntax.
git-svn-id: svn://10.0.0.236/trunk@16899 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-25 02:31:49 +00:00
beard%netscape.com
b07aeb07ee Cleaned up non-debug access paths, made them consistent with debug access paths.
git-svn-id: svn://10.0.0.236/trunk@16898 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-25 00:31:17 +00:00
srinivas%netscape.com
fd610fd1a6 Fix compiler warnings on Mac; checkin for brade
git-svn-id: svn://10.0.0.236/trunk@16897 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-24 22:03:37 +00:00
guha%netscape.com
0ec87b1f76 move mail data source
git-svn-id: svn://10.0.0.236/trunk@16896 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-24 21:47:24 +00:00
pavlov%pavlov.net
5ab3cf2e4d yet another attempt to get resizing working
git-svn-id: svn://10.0.0.236/trunk@16895 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-24 21:06:27 +00:00
beard%netscape.com
c993029597 Added "compile_script()" which compiles a text-based AppleScript into a compiled form which runs faster. _useManifestoLib() now ensures that the compiled script is up-to-date with the text script.
git-svn-id: svn://10.0.0.236/trunk@16894 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-24 19:35:20 +00:00
beard%netscape.com
352c247c47 Working around IDE 3.X bug, looping over target files until error encountered, filtering by file type, not using IDE's file type, too slow.
git-svn-id: svn://10.0.0.236/trunk@16893 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-24 19:32:21 +00:00
beard%netscape.com
02f470b3f3 Updated to enumerate target files until error encountered, use 3.3 IDE.
git-svn-id: svn://10.0.0.236/trunk@16892 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-24 19:30:15 +00:00
despotdaemon%netscape.com
a13f1f35ed Pseudo-automatic update of changes made by cathleen@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@16891 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-24 19:03:13 +00:00
despotdaemon%netscape.com
bfc4e23f90 Pseudo-automatic update of changes made by leaf@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@16890 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-24 19:00:58 +00:00
dcone%netscape.com
d6f004b496 Cleanup of the ps directory, incremental changes
git-svn-id: svn://10.0.0.236/trunk@16889 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-24 15:25:04 +00:00
despotdaemon%netscape.com
5e1d692eb5 Pseudo-automatic update of changes made by cathleen@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@16888 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-24 09:40:53 +00:00
waterson%netscape.com
4b67d52cbd Initial revision.
git-svn-id: svn://10.0.0.236/trunk@16887 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-24 08:26:27 +00:00
waterson%netscape.com
7619dd2856 Obsolete.
git-svn-id: svn://10.0.0.236/trunk@16886 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-24 08:22:17 +00:00
waterson%netscape.com
3a99cc7efe Updated to use new RDF build structure.
git-svn-id: svn://10.0.0.236/trunk@16885 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-24 08:14:01 +00:00
waterson%netscape.com
35517fc61d Updated test for recent changes.
git-svn-id: svn://10.0.0.236/trunk@16884 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-24 08:13:29 +00:00
waterson%netscape.com
130cdcb69d Change to new RDF build structure.
git-svn-id: svn://10.0.0.236/trunk@16883 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-24 08:11:35 +00:00
waterson%netscape.com
90d3e47bd9 Change to new RDF tree structure
git-svn-id: svn://10.0.0.236/trunk@16882 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-24 08:10:45 +00:00
waterson%netscape.com
a6c2c792e7 Changed to new RDF tree structure.
git-svn-id: svn://10.0.0.236/trunk@16881 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-24 08:09:59 +00:00
waterson%netscape.com
56df9f36cf Fixed implementation include paths.
git-svn-id: svn://10.0.0.236/trunk@16880 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-24 07:27:25 +00:00
waterson%netscape.com
73017c20d2 Added NS_RDFSIMPLECONTENTSINK_CID.
git-svn-id: svn://10.0.0.236/trunk@16879 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-24 06:58:05 +00:00
waterson%netscape.com
955afb839b Fixed #ifdefs.
git-svn-id: svn://10.0.0.236/trunk@16878 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-24 06:57:46 +00:00
waterson%netscape.com
a3a4d647c6 Made Init() an official member of the nsIRDFContentSink interface.
git-svn-id: svn://10.0.0.236/trunk@16877 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-24 06:57:19 +00:00
waterson%netscape.com
ce8208c68b Added nsStreamDataSource.
git-svn-id: svn://10.0.0.236/trunk@16876 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-24 06:56:49 +00:00
waterson%netscape.com
c9671e9bba Fixed up include paths to get implementation headers.
git-svn-id: svn://10.0.0.236/trunk@16875 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-24 06:39:28 +00:00
waterson%netscape.com
d42567e422 Fixed CID header file.
git-svn-id: svn://10.0.0.236/trunk@16874 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-24 06:33:16 +00:00
waterson%netscape.com
769cf19111 Bad idea.
git-svn-id: svn://10.0.0.236/trunk@16873 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-24 06:31:10 +00:00
waterson%netscape.com
854344e782 Removed nsRDFBaseFactory.cpp.
git-svn-id: svn://10.0.0.236/trunk@16872 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-24 06:30:09 +00:00
waterson%netscape.com
1becd370fb Remove nsRDFContentFactory.cpp
git-svn-id: svn://10.0.0.236/trunk@16871 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-24 06:29:03 +00:00
waterson%netscape.com
ce4b84fbcc Fixed DEPTH variable.
git-svn-id: svn://10.0.0.236/trunk@16870 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-24 06:26:56 +00:00
waterson%netscape.com
74e221710e Changed to a static library for now.
git-svn-id: svn://10.0.0.236/trunk@16869 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-24 06:22:21 +00:00
waterson%netscape.com
0fcb272584 Initial revision. Separated from mozilla/rdf/src, etc. Not yet in the build.
git-svn-id: svn://10.0.0.236/trunk@16868 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-24 06:20:35 +00:00
waterson%netscape.com
21d167e225 Corrected DEPTH variable.
git-svn-id: svn://10.0.0.236/trunk@16867 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-24 05:07:15 +00:00
waterson%netscape.com
114c1127fd Initial revision. Separated from mozilla/rdf/include. Not yet in the build.
git-svn-id: svn://10.0.0.236/trunk@16866 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-24 05:07:14 +00:00
pavlov%pavlov.net
b7cd0f30a4 fix build, more event cleanups
git-svn-id: svn://10.0.0.236/trunk@16865 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-24 02:46:34 +00:00
pavlov%pavlov.net
1ad5e7564c remove lots and lots and lots and lots of excess code that isn't used.
fix up a few events


git-svn-id: svn://10.0.0.236/trunk@16864 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-24 02:10:49 +00:00
alecf%netscape.com
00c4f31a6b add NPL and comment for LXR
git-svn-id: svn://10.0.0.236/trunk@16863 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-24 01:07:29 +00:00
alecf%netscape.com
5f528c9225 use new RFC822 parser & factory
use new XPCOM offline state
fix PR_smprintf formatting


git-svn-id: svn://10.0.0.236/trunk@16862 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-24 01:07:12 +00:00
alecf%netscape.com
d3a641e794 add comments to IDL files so they show up in LXR
add new newsgroup attribute to offline interface


git-svn-id: svn://10.0.0.236/trunk@16861 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-24 00:55:13 +00:00
mcmullen%netscape.com
d2ec0bdc12 Allow partial paths.
git-svn-id: svn://10.0.0.236/trunk@16860 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-24 00:01:32 +00:00
guha%netscape.com
8ba2307295 beginnings of rdf mail data source implementation. Not
yet in makefiles


git-svn-id: svn://10.0.0.236/trunk@16859 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-23 22:44:27 +00:00
mcmullen%netscape.com
a9cb9f0b22 Made this stuff do something sensible for Macintosh. The part about logging the error is temporary.
git-svn-id: svn://10.0.0.236/trunk@16858 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-23 22:13:47 +00:00
mcmullen%netscape.com
e36cad9a5c Just fixed a warning.
git-svn-id: svn://10.0.0.236/trunk@16857 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-23 22:09:09 +00:00
fur%netscape.com
7f437ecbfe + Flush HTML method dump file after writing it. Otherwise, the file is
truncated if EF dies while compiling.

+ Print a placeholder disassembled instruction rather than assert-botching,
  so that the -html option still works.


git-svn-id: svn://10.0.0.236/trunk@16856 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-23 20:21:58 +00:00
fur%netscape.com
99d79a713c Flush HTML method dump file after writing it. Otherwise, the file is truncated
if EF dies while compiling.


git-svn-id: svn://10.0.0.236/trunk@16855 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-23 20:19:49 +00:00
fur%netscape.com
ca361d5346 Eliminate double declaration of variable
git-svn-id: svn://10.0.0.236/trunk@16854 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-23 20:15:57 +00:00
fur%netscape.com
d3c0cc39b7 Do classname-mangling correctly (or at least closer to correct, since
the code still does not handle unicode characters).


git-svn-id: svn://10.0.0.236/trunk@16853 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-23 20:15:07 +00:00
fur%netscape.com
2e24b50dbc Added stubs for missing native methods.
git-svn-id: svn://10.0.0.236/trunk@16852 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-23 20:14:13 +00:00
fur%netscape.com
347d867084 Closer to building packages again in the new mozilla world.
git-svn-id: svn://10.0.0.236/trunk@16851 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-23 20:12:59 +00:00
fur%netscape.com
cf06946888 Check-in rth's support for 64-bit arithmetic, with a few mods to make it build
on Win32.


git-svn-id: svn://10.0.0.236/trunk@16850 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-23 20:11:59 +00:00
terry%netscape.com
db39d66d1f Fixed bug 2049 -- added link to rebuild the guilty column.
git-svn-id: svn://10.0.0.236/trunk@16849 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-23 17:52:37 +00:00
buster%netscape.com
d9d5b90bed added mOutsideEdge to nsBorderEdges
git-svn-id: svn://10.0.0.236/trunk@16848 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-23 15:49:48 +00:00
buster%netscape.com
217aa922ce DrawBorderEdge fixes
git-svn-id: svn://10.0.0.236/trunk@16847 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-23 15:48:50 +00:00
buster%netscape.com
0b215739a8 WIP for collapsing borders
git-svn-id: svn://10.0.0.236/trunk@16846 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-23 15:47:43 +00:00
brade%netscape.com
1d4512da96 comment out line which builds clientStubs
git-svn-id: svn://10.0.0.236/trunk@16845 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-23 15:10:40 +00:00
brade%netscape.com
78a76913b4 add prototype for NET_DumpDecoders to reduce Mac compiler warnings
git-svn-id: svn://10.0.0.236/trunk@16844 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-23 14:38:38 +00:00
brade%netscape.com
fb9c62c186 add prototypes for net_process_net_timer_callback and net_process_slow_net_timer_callback to reduce Mac compiler warnings
git-svn-id: svn://10.0.0.236/trunk@16843 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-23 14:37:44 +00:00
brade%netscape.com
3e7c8545c0 add prototypes for NET_FindURLInMemCache, NET_DisplayMemCacheInfoAsHTML, and NET_InitMemCacProtocol to reduce Mac compiler warnings
git-svn-id: svn://10.0.0.236/trunk@16842 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-23 14:37:03 +00:00
brade%netscape.com
5328d4b161 add prototypes for NET_DisableGetURL, net_CallExitRoutine, net_get_protocol_impl, and net_MailtoLoad to reduce Mac compiler warnings
git-svn-id: svn://10.0.0.236/trunk@16841 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-23 14:36:13 +00:00
brade%netscape.com
f3ed098831 add prototypes for NET_OpenExtCacheFAT, NET_FindURLInExtCache, CACHE_CloseAllOpenSARCache, and CACHE_OpenAllSARCache to reduce Mac compiler warnings
git-svn-id: svn://10.0.0.236/trunk@16840 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-23 14:35:09 +00:00
brade%netscape.com
9f90b6f237 add prototypes for NET_FirstCacheObject, NET_NextCacheObject, and NET_GetMaxDiskCacheSize to reduce Mac compiler warnings
git-svn-id: svn://10.0.0.236/trunk@16839 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-23 14:34:22 +00:00
brade%netscape.com
80fd5be2e5 add prototypes for net_http_password_data_interp, NET_DeleteCookie and NET_DisplayCookieInfoAsHTML (reduce Mac compiler warnings)
git-svn-id: svn://10.0.0.236/trunk@16838 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-23 14:33:41 +00:00
brade%netscape.com
3b905ac208 change NET_InitRDFCookieResources from PUBLIC to PRIVATE since it isn't needed anymore
git-svn-id: svn://10.0.0.236/trunk@16837 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-23 14:32:48 +00:00
brade%netscape.com
23c492b7b6 return PR_TRUE in NET_RegisterAboutProtocol to reduce Mac compiler warnings
git-svn-id: svn://10.0.0.236/trunk@16836 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-23 14:31:48 +00:00
cltbld%netscape.com
4a5704d1c0 initial steps toward moving cvs pull information out of nglayout.mak.
Also, change pull_all to pull using module information instead of
each directory individually.


git-svn-id: svn://10.0.0.236/trunk@16835 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-23 11:01:34 +00:00
sar%netscape.com
57f09eedf2 moving client.mk and client.mak into the Core SeamonkeyModule so that they are available across the board.
git-svn-id: svn://10.0.0.236/trunk@16834 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-23 10:29:17 +00:00
pierre%netscape.com
3e235bca21 Export the 2 functions to fix link errors in embedding applications
git-svn-id: svn://10.0.0.236/trunk@16833 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-23 06:54:37 +00:00
pavlov%pavlov.net
76ecad404b comment something out
git-svn-id: svn://10.0.0.236/trunk@16832 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-23 04:17:30 +00:00
pavlov%pavlov.net
e650117c4c Redo all the evil event handling. We still do not resize properly, but I am
getting closer.


git-svn-id: svn://10.0.0.236/trunk@16831 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-23 03:31:15 +00:00
pollmann%netscape.com
27cc3295b1 Implemented onChange and selectedIndex for the HTMLSelectElement
git-svn-id: svn://10.0.0.236/trunk@16830 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-23 03:02:57 +00:00
alecf%netscape.com
aa06f7666a add --eanble-mailnews and --enable-ldap switches, and depricate MOZ_DARK
git-svn-id: svn://10.0.0.236/trunk@16829 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-23 00:48:52 +00:00
cyeh%netscape.com
8f48bade9b adding mozilla/mailnews to SeaMonkeyMailNews module per alecf
git-svn-id: svn://10.0.0.236/trunk@16828 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-23 00:24:42 +00:00
leaf%mozilla.org
30f91343e8 fixed duplicate inclusion.
git-svn-id: svn://10.0.0.236/trunk@16827 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-23 00:07:19 +00:00
waterson%netscape.com
02b9d03af9 Whoops. Guess I missed one.
git-svn-id: svn://10.0.0.236/trunk@16826 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-22 22:50:08 +00:00
waterson%netscape.com
67bd8fc314 Removed nsIRDFRegistry: it was never used.
git-svn-id: svn://10.0.0.236/trunk@16825 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-22 22:30:41 +00:00
waterson%netscape.com
f96cfdb03e Removed nsRDFRegistryImpl: it was never used.
git-svn-id: svn://10.0.0.236/trunk@16824 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-22 22:28:58 +00:00
waterson%netscape.com
94d75018a0 Removed nsRDFRegistryImpl. It was never used.
git-svn-id: svn://10.0.0.236/trunk@16823 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-22 22:26:15 +00:00
vidur%netscape.com
4ef7dcc47f Added script namespace management mechanism. This allows external native code to add symbols and constructors to the script global namespace. Added IID() static method generation to IDL generator.
git-svn-id: svn://10.0.0.236/trunk@16821 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-22 22:03:20 +00:00
cltbld%netscape.com
16ba8ffa10 add files for vidur
git-svn-id: svn://10.0.0.236/trunk@16820 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-22 21:47:35 +00:00
alecf%netscape.com
0a3fd98778 for now, export the implementation header file so we can get
to the factory. Bleah.


git-svn-id: svn://10.0.0.236/trunk@16819 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-22 21:12:21 +00:00
alecf%netscape.com
7c37687daa add new offline state interface
git-svn-id: svn://10.0.0.236/trunk@16818 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-22 21:11:32 +00:00
law%netscape.com
de264087db Add nsFile* to Windows build
git-svn-id: svn://10.0.0.236/trunk@16817 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-22 20:06:56 +00:00
law%netscape.com
d7dd1472e3 Add nsFile* to Windows build
git-svn-id: svn://10.0.0.236/trunk@16816 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-22 20:01:41 +00:00
brade%netscape.com
e53697af51 add include to reduce warnings on Macintosh compiler
git-svn-id: svn://10.0.0.236/trunk@16815 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-22 19:14:13 +00:00
troy%netscape.com
cf13a281b8 Added comment to strdup() noting that t he caller must use delete[]
to free the memory


git-svn-id: svn://10.0.0.236/trunk@16814 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-22 19:01:14 +00:00
brade%netscape.com
63312a2e66 add return value (reviewed mjudge@netscape.com)
git-svn-id: svn://10.0.0.236/trunk@16813 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-22 18:58:25 +00:00
troy%netscape.com
8d6a89039a Fixed two memory leaks of the status msg (Unicode string) in OnStopBindingProxyEvent
and OnStatusProxyEvent


git-svn-id: svn://10.0.0.236/trunk@16812 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-22 18:49:12 +00:00
guha%netscape.com
c01e30e606 Better names, classify Assertion (this file not yet in build system)
git-svn-id: svn://10.0.0.236/trunk@16811 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-22 18:27:02 +00:00
troy%netscape.com
48f492804b Fixed QueryInterface() so it doesn't do a AddRef() for interface NS_ISTHREADSAFE_IID.
This fixes a DEBUG (only) memory leak of the object which in turn causes the web shell
(and the whole world) to leak


git-svn-id: svn://10.0.0.236/trunk@16810 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-22 18:22:40 +00:00
despotdaemon%netscape.com
07b775d330 Pseudo-automatic update of changes made by jefft@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@16809 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-22 18:08:02 +00:00
despotdaemon%netscape.com
3fe72dbff2 Pseudo-automatic update of changes made by jefft@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@16808 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-22 18:06:35 +00:00
fur%netscape.com
5cb83ab7ee Fixed incorrect assumption that the extra_field_length value in the central
directory record  was the same as the extra_field_length in the corresponding
local file header record.


git-svn-id: svn://10.0.0.236/trunk@16807 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-22 18:01:28 +00:00
pierre%netscape.com
4944d0ea91 moved nsRefData to nsMacMessageSink.h
git-svn-id: svn://10.0.0.236/trunk@16806 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-22 06:38:00 +00:00
pierre%netscape.com
2f9eda3303 defined the Raptor windowKind bit and moved nsRefData to nsMacMessageSink.h
git-svn-id: svn://10.0.0.236/trunk@16805 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-22 06:37:46 +00:00
pierre%netscape.com
6d4cb77b68 Handle the Raptor windowKind bit
git-svn-id: svn://10.0.0.236/trunk@16804 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-22 06:37:32 +00:00
troy%netscape.com
bf0de58b71 Fix for bug #1924
git-svn-id: svn://10.0.0.236/trunk@16803 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-22 05:02:46 +00:00
alecf%netscape.com
dd443cbb06 removal of SetNewsgroupPassword / GetNewsgroupPassword - start using the new API
git-svn-id: svn://10.0.0.236/trunk@16802 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-22 04:59:39 +00:00
alecf%netscape.com
10eb6321ce update nsIMsgNewsHost to deal with newsgroups directly rather than as group names
git-svn-id: svn://10.0.0.236/trunk@16801 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-22 04:34:11 +00:00
alecf%netscape.com
e62164115b rename nsINet->nsIMsg
remove pretty name attribute (host keeps track of that)
add name attribute (to replace group_name in NewsConData in netlib)
add IsOfflineArticle


git-svn-id: svn://10.0.0.236/trunk@16800 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-22 04:33:37 +00:00
sar%netscape.com
c820a1c9c7 bring SeamonkeyCore and SeaMonkeyLayout up to par with nglayout.mak
git-svn-id: svn://10.0.0.236/trunk@16799 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-22 04:09:18 +00:00
troy%netscape.com
d76ca7e7fd Fix for bug #1942. Also made it so we respect 'width' and 'height' properties
specified on the HTML element


git-svn-id: svn://10.0.0.236/trunk@16798 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-22 03:49:04 +00:00
waterson%netscape.com
204327240f Changes to get this thing building. It's still not in the main build yet.
git-svn-id: svn://10.0.0.236/trunk@16797 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-22 03:05:30 +00:00
waterson%netscape.com
1c136e6574 Added EqualsNode() method to nsIRDFNode, modified nsIRDFLiteral's Equals() to EqualsLiteral().
git-svn-id: svn://10.0.0.236/trunk@16796 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-22 03:04:45 +00:00
terry%netscape.com
bc73cb575d Can now optionally put the tinderbox directory on the command line.
git-svn-id: svn://10.0.0.236/trunk@16795 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-22 02:23:13 +00:00
alecf%netscape.com
c9dd100667 News Hosts and Article Lists are now XPComified.
git-svn-id: svn://10.0.0.236/trunk@16794 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-22 02:14:08 +00:00
alecf%netscape.com
fe9d54682f modifications to support XPCOMifying mknews.cpp
git-svn-id: svn://10.0.0.236/trunk@16793 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-22 02:13:38 +00:00
pierre%netscape.com
df16f1e7d5 File Removed.
git-svn-id: svn://10.0.0.236/trunk@16792 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-22 02:04:26 +00:00
pierre%netscape.com
b650c4c03e Fixed for the Mac
git-svn-id: svn://10.0.0.236/trunk@16791 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-22 02:02:24 +00:00
waterson%netscape.com
89b8ac957e Obsolete.
git-svn-id: svn://10.0.0.236/trunk@16790 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-22 01:46:03 +00:00
despotdaemon%netscape.com
9335c0e1c3 Pseudo-automatic update of changes made by trudelle@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@16789 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-22 01:36:46 +00:00
law%netscape.com
2510e8fc62 Implemented (almost)
git-svn-id: svn://10.0.0.236/trunk@16788 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-22 01:25:46 +00:00
despotdaemon%netscape.com
ae45b63453 Pseudo-automatic update of changes made by val4@cornell.edu.
git-svn-id: svn://10.0.0.236/trunk@16787 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-22 01:20:17 +00:00
waterson%netscape.com
ccd004b025 Modified cursors to return NS_ERROR_RDF_CURSOR_EMPTY when the cursor is empty, rather than NS_ERROR_UNEXPECTED. Miscellaneous bug fixes related to new cursors.
git-svn-id: svn://10.0.0.236/trunk@16786 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-22 01:12:45 +00:00
waterson%netscape.com
682406d7b4 Added NS_ERROR_RDF_CURSOR_EMPTY error code to be returned from nsIRDFCursor::Advance() when nothing is left in the cursor.
git-svn-id: svn://10.0.0.236/trunk@16785 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-22 01:12:01 +00:00
waterson%netscape.com
d45d06ee56 Added RDF module.
git-svn-id: svn://10.0.0.236/trunk@16784 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-22 01:11:18 +00:00
despotdaemon%netscape.com
ec8c30d2c3 Pseudo-automatic update of changes made by terry@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@16783 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-22 00:38:25 +00:00
waterson%netscape.com
93ad905243 New cursor interfaces.
git-svn-id: svn://10.0.0.236/trunk@16782 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-21 23:56:31 +00:00
scc%netscape.com
e9d8de921a added |dont_QueryInterface| facility, re-added the NS_ADDREF macros, though conditionally
git-svn-id: svn://10.0.0.236/trunk@16781 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-21 23:26:39 +00:00
alecf%netscape.com
2c81f40268 jefft@netscape.com's changes to eliminate calls to libmsg/libmime when composing
a cancel message


git-svn-id: svn://10.0.0.236/trunk@16780 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-21 22:47:04 +00:00
alecf%netscape.com
7325e15f1a don't go into public yet
git-svn-id: svn://10.0.0.236/trunk@16779 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-21 22:45:56 +00:00
alecf%netscape.com
a6d3000998 libmsg interfaces moved to mailnews/news/public
git-svn-id: svn://10.0.0.236/trunk@16778 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-21 22:32:34 +00:00
alecf%netscape.com
a3e035ac09 adding libnet->libmsg interfaces, including both IDL and C++ headers because
xpidl only runs on unix right now.


git-svn-id: svn://10.0.0.236/trunk@16777 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-21 22:24:51 +00:00
alecf%netscape.com
4089c941fd Don't complain about Makefile
git-svn-id: svn://10.0.0.236/trunk@16776 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-21 22:16:01 +00:00
dcone%netscape.com
827bb7fd06 Took out files no longer needed for ps, updated all the files for postscript support
git-svn-id: svn://10.0.0.236/trunk@16775 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-21 22:13:04 +00:00
alecf%netscape.com
5566c7e8db *** empty log message ***
git-svn-id: svn://10.0.0.236/trunk@16774 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-21 22:12:02 +00:00
pinkerton%netscape.com
face2561d4 Get rid of obsolete interfaces.
git-svn-id: svn://10.0.0.236/trunk@16773 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-21 21:54:29 +00:00
pinkerton%netscape.com
0988604c10 Decouple the toolbars from the toolbox once and for all. Implement collapsing/expanding toolbars with new grippy mechanism.
git-svn-id: svn://10.0.0.236/trunk@16772 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-21 21:54:17 +00:00
pinkerton%netscape.com
f7a51c375f use mozilla.org as the main page because the other was too flashy.
git-svn-id: svn://10.0.0.236/trunk@16771 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-21 21:53:13 +00:00
cls%seawood.org
fe4f265208 Use OS_CFLAGS to set debugging flags as CFLAGS gets overwritten later.
git-svn-id: svn://10.0.0.236/trunk@16770 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-21 21:34:17 +00:00
mscott%netscape.com
89350411d8 Moved nsIMsgRFC822Parser into mailnews/base/public.
git-svn-id: svn://10.0.0.236/trunk@16769 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-21 21:24:41 +00:00
mscott%netscape.com
75ca5cb9f4 Adding public to list of directories built by mailnews.
git-svn-id: svn://10.0.0.236/trunk@16768 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-21 21:24:10 +00:00
mscott%netscape.com
794cd7a4b6 These files now live in mailnews/base/public.
git-svn-id: svn://10.0.0.236/trunk@16767 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-21 21:20:48 +00:00
mscott%netscape.com
2758f89379 First checked in.
git-svn-id: svn://10.0.0.236/trunk@16766 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-21 21:13:57 +00:00
mscott%netscape.com
5ecc02dcbc First added. No files are currently in mailnews/news/public yet.
git-svn-id: svn://10.0.0.236/trunk@16765 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-21 21:12:35 +00:00
mscott%netscape.com
8adeb7c77a Added build and test directories to mailnews/base.
git-svn-id: svn://10.0.0.236/trunk@16764 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-21 21:06:36 +00:00
buster%netscape.com
324a98029b WIP for collapsing borders.
git-svn-id: svn://10.0.0.236/trunk@16763 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-21 19:20:37 +00:00
brade%netscape.com
0aa0c6bd79 attempt to fix build bustage
git-svn-id: svn://10.0.0.236/trunk@16762 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-21 18:56:03 +00:00
buster%netscape.com
9a780dd772 collapsing borders now do rounding of odd-thickness borders correctly
at the pixel level.  The odd pixel is always given to the right and bottom
cell borders whenever possible, and to the top and left table border otherwise.


git-svn-id: svn://10.0.0.236/trunk@16761 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-21 18:54:23 +00:00
cyeh%netscape.com
d076c965b5 if you don't define MOZ_LITE, MOZ_MEDIUM, or MOZ_DARK, don't define
any of the feature #ifdefs by default.
these will probably go away and die eventually.


git-svn-id: svn://10.0.0.236/trunk@16760 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-21 18:38:53 +00:00
peterl%netscape.com
8e05bf08c4 fix a ref counting bug with class atoms
git-svn-id: svn://10.0.0.236/trunk@16759 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-21 18:38:44 +00:00
troy%netscape.com
e14ddad715 Renamed NS_NewHTMLFrame() to NS_NewRootFrame()
git-svn-id: svn://10.0.0.236/trunk@16758 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-21 18:22:44 +00:00
mscott%netscape.com
f2861e4e64 First checked in.
git-svn-id: svn://10.0.0.236/trunk@16757 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-21 17:57:13 +00:00
mscott%netscape.com
aa4a05c843 First checked in.
git-svn-id: svn://10.0.0.236/trunk@16756 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-21 17:51:08 +00:00
rods%netscape.com
73a072a8c0 Added several enums for form's controls
git-svn-id: svn://10.0.0.236/trunk@16755 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-21 16:53:49 +00:00
rods%netscape.com
7acb8d2cbf Changed constants to use LookAndFeel values.
git-svn-id: svn://10.0.0.236/trunk@16754 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-21 16:52:57 +00:00
rods%netscape.com
2fb4a870a1 Added in NS_RELEASE of LookAndFeel object
git-svn-id: svn://10.0.0.236/trunk@16753 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-21 16:52:17 +00:00
brade%netscape.com
604c5ec81e have SetAlignment return NS_OK (reduce Mac compiler warnings)
git-svn-id: svn://10.0.0.236/trunk@16752 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-21 16:51:19 +00:00
vidur%netscape.com
08b60c2fa0 Ongoing work on mechanism for introducing global names into a script namespace
git-svn-id: svn://10.0.0.236/trunk@16751 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-21 16:51:10 +00:00
brade%netscape.com
30676ade73 reduce Mac compiler warnings by commenting out unused local variables
git-svn-id: svn://10.0.0.236/trunk@16750 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-21 16:48:35 +00:00
brade%netscape.com
a6eccb520c add XP_MAC to the ifdef around dbopen (was in macToBeImplemented.cp)
git-svn-id: svn://10.0.0.236/trunk@16749 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-21 16:46:17 +00:00
brade%netscape.com
1d1b53c90d added XP_FileReadLine and FE_FileType (formerly in macToBeImplemented.cp)
git-svn-id: svn://10.0.0.236/trunk@16748 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-21 16:46:10 +00:00
brade%netscape.com
ae1573ae1b remove all functions (move to nsNetStubs.cpp and nsMacFile.cp)
git-svn-id: svn://10.0.0.236/trunk@16747 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-21 16:46:03 +00:00
brade%netscape.com
f7d614172a remove extra comma to reduce Macintosh compiler warnings
git-svn-id: svn://10.0.0.236/trunk@16746 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-21 16:40:46 +00:00
brade%netscape.com
eea6e4ca83 remove extra comma to reduce warnings on Mac
git-svn-id: svn://10.0.0.236/trunk@16745 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-21 16:39:17 +00:00
rods%netscape.com
3d2ee270ed Added better default processing of hint
git-svn-id: svn://10.0.0.236/trunk@16744 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-21 13:29:32 +00:00
peterl%netscape.com
406de8984a fixed a crasher when mapping list or table style with a null parent context
git-svn-id: svn://10.0.0.236/trunk@16743 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-21 07:48:12 +00:00
buster%netscape.com
f0d639e1bc beginnings of collapsing borders now implemented. Doesn't work for spanning cells yet,
and doesn't measure borders where the width changes along a shared edge yet.


git-svn-id: svn://10.0.0.236/trunk@16742 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-21 06:38:18 +00:00
buster%netscape.com
49403601af fixes for PaintBorderEdges
git-svn-id: svn://10.0.0.236/trunk@16741 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-21 06:37:10 +00:00
buster%netscape.com
2b86e9ad34 added mLength to nsBorderEdge
git-svn-id: svn://10.0.0.236/trunk@16740 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-21 06:35:45 +00:00
peterl%netscape.com
7397117a9f fix spelling
fix namespace of HTML element's attributes


git-svn-id: svn://10.0.0.236/trunk@16739 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-21 05:59:40 +00:00
peterl%netscape.com
3fa2aa8cd6 fix spelling
git-svn-id: svn://10.0.0.236/trunk@16738 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-21 05:58:58 +00:00
peterl%netscape.com
7caa8001b4 fix spelling
moved inline automatic key object out of line for buggy unix compilers


git-svn-id: svn://10.0.0.236/trunk@16737 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-21 05:58:31 +00:00
peterl%netscape.com
e734385812 added support for the 'xmlns' pseudo namespace
git-svn-id: svn://10.0.0.236/trunk@16736 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-21 05:56:51 +00:00
peterl%netscape.com
b20028be50 rename string key to make buggy unix compilers happy
git-svn-id: svn://10.0.0.236/trunk@16735 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-21 05:55:44 +00:00
troy%netscape.com
53950b34bb Changed the frame hierarchy, and changed how scrolling works. Also added
nsAreaFrame which replaces nsBodyFrame which is no longer used


git-svn-id: svn://10.0.0.236/trunk@16734 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-20 23:29:47 +00:00
guha%netscape.com
09258f3d67 more of in-memory data source.
Not yet in build system


git-svn-id: svn://10.0.0.236/trunk@16733 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-20 19:49:10 +00:00
pierre%netscape.com
e7b77e958f Fix forms: XP_MAC code was missing in GetHorizontalInsidePadding and GetVerticalInsidePadding
git-svn-id: svn://10.0.0.236/trunk@16732 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-20 13:18:10 +00:00
pierre%netscape.com
16d2b789af Remove 'mBounds' that was hidding a recently added member variable with the same name in nsBaseWidget
git-svn-id: svn://10.0.0.236/trunk@16731 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-20 13:16:48 +00:00
pierre%netscape.com
c64aa75ac1 Improve performance on Mac: make the root view invisible
git-svn-id: svn://10.0.0.236/trunk@16730 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-20 13:16:13 +00:00
pierre%netscape.com
1a1dd95f2b Improve performance on Mac: disable the Composite timer (temporary code - see comments)
git-svn-id: svn://10.0.0.236/trunk@16729 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-20 13:15:41 +00:00
pierre%netscape.com
9fe6003b44 Added a reminder to not always pass the entire widget rect in NS_PAINT_EVENTs
git-svn-id: svn://10.0.0.236/trunk@16728 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-20 13:14:29 +00:00
ramiro%netscape.com
716994af04 Ignore generated Makefile.
git-svn-id: svn://10.0.0.236/trunk@16727 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-20 08:27:09 +00:00
ramiro%netscape.com
a677499a6f Renamed 'main' to 'scribble'.
git-svn-id: svn://10.0.0.236/trunk@16726 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-20 08:22:02 +00:00
guha%netscape.com
456e939d21 the new in-memory data source.
Not yet in the makefiles


git-svn-id: svn://10.0.0.236/trunk@16725 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-20 01:45:42 +00:00
peterl%netscape.com
d3408b8d1d sync to new attribute api
git-svn-id: svn://10.0.0.236/trunk@16724 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-20 01:35:57 +00:00
peterl%netscape.com
52a0043631 sync to new attribute api
git-svn-id: svn://10.0.0.236/trunk@16723 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-20 01:21:23 +00:00
peterl%netscape.com
739473adbe attribute selector work
git-svn-id: svn://10.0.0.236/trunk@16722 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-20 01:19:22 +00:00
peterl%netscape.com
9fc5474ec3 fix equals to not be case sensative
git-svn-id: svn://10.0.0.236/trunk@16721 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-20 01:18:47 +00:00
peterl%netscape.com
383389930f sync to new attribute api
added multiple class support


git-svn-id: svn://10.0.0.236/trunk@16720 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-20 01:17:50 +00:00
peterl%netscape.com
60f703edc5 implement multiple class support
implement attribute selector support


git-svn-id: svn://10.0.0.236/trunk@16719 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-20 01:17:05 +00:00
peterl%netscape.com
6afb1d76a9 added case sensativity flag to attribute selectors
git-svn-id: svn://10.0.0.236/trunk@16718 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-20 01:16:20 +00:00
peterl%netscape.com
6a9c1924cc fixes to attribute selector parsing
git-svn-id: svn://10.0.0.236/trunk@16717 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-20 01:15:18 +00:00
peterl%netscape.com
b3da4ac017 fix background flags initial value
tweak table inheritance quirk


git-svn-id: svn://10.0.0.236/trunk@16716 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-20 01:11:36 +00:00
peterl%netscape.com
b9266d33d7 made get strength const
git-svn-id: svn://10.0.0.236/trunk@16715 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-20 01:08:31 +00:00
peterl%netscape.com
6c56fda631 changed attribute api to take atoms & namespace
git-svn-id: svn://10.0.0.236/trunk@16714 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-20 01:08:13 +00:00
peterl%netscape.com
018edaedaa sync to new attribute api
implement local attribute storage with namespace support


git-svn-id: svn://10.0.0.236/trunk@16713 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-20 01:07:21 +00:00
ramiro%netscape.com
8b1319e1ac Comment out the GARBAGE entry for generated files.
nsHTMLTags.h nsHTMLTags.cpp nsHTMLEntities.cpp were being treated as
GARBAGE since they are generated.  But, they are also checked in to the
repository, which breaks clobber builds.


git-svn-id: svn://10.0.0.236/trunk@16712 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-20 01:04:40 +00:00
guha%netscape.com
380bc170be More for OpenDir
git-svn-id: svn://10.0.0.236/trunk@16711 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-20 00:16:45 +00:00
pavlov%pavlov.net
c5e9de682e we require gtk 1.1.6 now
git-svn-id: svn://10.0.0.236/trunk@16710 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-19 20:10:31 +00:00
pavlov%pavlov.net
8b89e99baf fix crash
git-svn-id: svn://10.0.0.236/trunk@16709 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-19 20:02:31 +00:00
pavlov%pavlov.net
96867d96c4 require 1.1.6 instead of 1.1.9 (which replaced 1.1.5)
git-svn-id: svn://10.0.0.236/trunk@16708 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-19 20:01:39 +00:00
pavlov%pavlov.net
2920c69b1b require GTK 1.1.9
git-svn-id: svn://10.0.0.236/trunk@16707 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-19 18:04:31 +00:00
pavlov%pavlov.net
6964b62775 lots and lots of code cleanup.
git-svn-id: svn://10.0.0.236/trunk@16706 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-19 18:04:06 +00:00
pavlov%pavlov.net
061f365e37 s/ :: /::/
git-svn-id: svn://10.0.0.236/trunk@16705 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-19 18:01:17 +00:00
michaelp%netscape.com
9708832dd7 the corner view works again, and thanks to michael.lowe@bigfoot.com it paints
in the correct system specified "background" color.


git-svn-id: svn://10.0.0.236/trunk@16704 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-19 06:20:36 +00:00
alecf%netscape.com
c164c7f97a drum roll please...
...and tonight, for your enjoyment, we present mail/news's fourth
entry to mozilla.org!


git-svn-id: svn://10.0.0.236/trunk@16703 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-19 02:35:13 +00:00
vidur%netscape.com
21d61ca5f1 Script global namespace management.
git-svn-id: svn://10.0.0.236/trunk@16702 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-19 02:11:17 +00:00
alecf%netscape.com
8f5fd569ee XPCOMify access to nsIMsgXOVERParser
git-svn-id: svn://10.0.0.236/trunk@16701 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-19 01:59:32 +00:00
alecf%netscape.com
970293ac91 update makefiles to reflect XPComification
git-svn-id: svn://10.0.0.236/trunk@16700 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-19 01:59:07 +00:00
alecf%netscape.com
82ccb59aef Add the NPL
git-svn-id: svn://10.0.0.236/trunk@16699 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-19 01:48:35 +00:00
alecf%netscape.com
9bbcaed4ae update interfaces slightly to include nsISupports and use it
git-svn-id: svn://10.0.0.236/trunk@16698 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-19 01:19:51 +00:00
mscott%netscape.com
892eb98fdb Just created.
git-svn-id: svn://10.0.0.236/trunk@16697 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-19 01:07:40 +00:00
akkana%netscape.com
c72b56daa3 Turn on debug by default
git-svn-id: svn://10.0.0.236/trunk@16696 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-19 00:10:52 +00:00
hyatt%netscape.com
39846f5631 Implemented expanding/collapsing nodes in the tree view AND implemented
selection in the tree view.


git-svn-id: svn://10.0.0.236/trunk@16695 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-18 23:57:11 +00:00
hyatt%netscape.com
0ca9be168d Patching GetAttribute (the default was returning a value that indicated that the
attribute was present, and it should have been returning NOT THERE as a default).


git-svn-id: svn://10.0.0.236/trunk@16694 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-18 23:56:37 +00:00
mcmullen%netscape.com
33b627e518 Added an NS_BASE for windows.
git-svn-id: svn://10.0.0.236/trunk@16693 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-18 23:30:44 +00:00
akkana%netscape.com
527d116f03 Add -ljsurl -- needed for linux build
git-svn-id: svn://10.0.0.236/trunk@16692 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-18 23:13:58 +00:00
akkana%netscape.com
ef0129559b Add a comment explaining ComparePoints
git-svn-id: svn://10.0.0.236/trunk@16691 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-18 23:13:25 +00:00
akkana%netscape.com
4ee0d91310 Fix startup crash -- when setting one endpoint with the other one null, collapse the range
git-svn-id: svn://10.0.0.236/trunk@16690 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-18 23:12:29 +00:00
alecf%netscape.com
00d20bc63a XPCOMify news hosts by using nsIMsgNewsHost instead of MSG_NewsHost
git-svn-id: svn://10.0.0.236/trunk@16689 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-18 23:07:08 +00:00
mcmullen%netscape.com
a4ac66b40a Rewrote the stream stuff to be simple, since Unix build environment cannot even handle ostream and istream. This builds and runs correctly on Linux and Macintosh now.
git-svn-id: svn://10.0.0.236/trunk@16688 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-18 23:06:54 +00:00
alecf%netscape.com
fe18aadf26 placeholder IDLs (eventually to go into libmsg)
git-svn-id: svn://10.0.0.236/trunk@16687 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-18 23:02:02 +00:00
mcmullen%netscape.com
4f05dc99af First Checked In.
git-svn-id: svn://10.0.0.236/trunk@16686 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-18 22:38:28 +00:00
terry%netscape.com
3f9c05e76a In the list of users, the voucher now shows up as an email address,
rather than a id number.


git-svn-id: svn://10.0.0.236/trunk@16685 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-18 22:37:43 +00:00
pierre%netscape.com
1ef11a145a Added layout/html/base/src/nsAreaFrame.cpp per Troy's request
git-svn-id: svn://10.0.0.236/trunk@16684 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-18 22:34:29 +00:00
kipp%netscape.com
e5e296e58c Implement GetSkipSides so that continued inline frames render properly
git-svn-id: svn://10.0.0.236/trunk@16683 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-18 22:12:42 +00:00
kipp%netscape.com
275833b30d Display inline borders/background during content painting, not during background painting (per css2 spec)
git-svn-id: svn://10.0.0.236/trunk@16682 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-18 22:12:15 +00:00
donm%netscape.com
8d025021af making --with-static-gtk work for apprunner.
git-svn-id: svn://10.0.0.236/trunk@16681 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-18 21:58:57 +00:00
terry%netscape.com
9cf5b1d99d Added xpidl.
git-svn-id: svn://10.0.0.236/trunk@16680 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-18 21:16:34 +00:00
akkana%netscape.com
4b24d97a17 Attempt to patch mac build error
git-svn-id: svn://10.0.0.236/trunk@16679 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-18 21:04:33 +00:00
vidur%netscape.com
648ad628b7 Added IID for nsIUnicharStreamLoader
git-svn-id: svn://10.0.0.236/trunk@16678 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-18 19:38:19 +00:00
karnaze%netscape.com
b22c5ee5b9 changed to use rowIndex and sectionRowIndex
git-svn-id: svn://10.0.0.236/trunk@16677 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-18 19:03:33 +00:00
michaelp%netscape.com
440e801148 Fixed default hint for attribute changed - it wasn't being set.
Special-cased SRC attribute for nsHTMLImageElement.


git-svn-id: svn://10.0.0.236/trunk@16676 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-18 19:02:36 +00:00
troy%netscape.com
90fa7951a8 Added nsAreaFrame.cpp
git-svn-id: svn://10.0.0.236/trunk@16675 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-18 17:59:13 +00:00
troy%netscape.com
b47c186427 Initial check-in
git-svn-id: svn://10.0.0.236/trunk@16674 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-18 17:54:54 +00:00
kipp%netscape.com
d3035fbd10 Fixed numerous compiler warnings (hopefully) from the mac build
git-svn-id: svn://10.0.0.236/trunk@16673 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-18 17:34:34 +00:00
troy%netscape.com
f02e1a1119 Minor cleanup
git-svn-id: svn://10.0.0.236/trunk@16672 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-18 17:33:23 +00:00
terry%netscape.com
ce7e27ef33 Whoops! Peers names and email addresses were being mismatched.
git-svn-id: svn://10.0.0.236/trunk@16671 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-18 17:32:24 +00:00
shaver%netscape.com
eca2711718 invoke -> typelib
git-svn-id: svn://10.0.0.236/trunk@16670 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-18 17:12:07 +00:00
karnaze%netscape.com
a752804b3a added remaining dom methods
git-svn-id: svn://10.0.0.236/trunk@16669 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-18 17:05:17 +00:00
dcone%netscape.com
cec5e973ac Renamed files for the Postscript directory in GFX
git-svn-id: svn://10.0.0.236/trunk@16668 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-18 16:36:47 +00:00
rods%netscape.com
504aaf12bd Add <LABEL> tags arounf checkboxes and radiobuttons
git-svn-id: svn://10.0.0.236/trunk@16667 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-18 16:24:53 +00:00
kipp%netscape.com
eaee82d4b3 Revised frame Paint API
git-svn-id: svn://10.0.0.236/trunk@16666 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-18 15:54:23 +00:00
rods%netscape.com
8f45a6eabc Added <LABEL> tag to all the checkboxes and radiobuttons.
git-svn-id: svn://10.0.0.236/trunk@16665 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-18 15:35:38 +00:00
pierre%netscape.com
332b42bb81 Update() no longer passes the rendering context to the children
git-svn-id: svn://10.0.0.236/trunk@16664 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-18 13:34:39 +00:00
pierre%netscape.com
8f2719f5aa Update() no longer passes the rendering context to the children and ignore invisible widgets
git-svn-id: svn://10.0.0.236/trunk@16663 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-18 13:34:22 +00:00
pierre%netscape.com
d644ebc792 Enable double buffering on Mac
git-svn-id: svn://10.0.0.236/trunk@16662 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-18 13:33:55 +00:00
pierre%netscape.com
406ce1034d Fixed/implemented offscreen drawings - numerous changes
git-svn-id: svn://10.0.0.236/trunk@16661 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-18 13:33:31 +00:00
pierre%netscape.com
c29cc486d3 Fixed continuous drawing of controls by doing a ValidRect after DrawControl
git-svn-id: svn://10.0.0.236/trunk@16660 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-18 13:29:39 +00:00
pierre%netscape.com
fc485403b5 Call DeviceContextImpl::Init() just because Windows does it
git-svn-id: svn://10.0.0.236/trunk@16659 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-18 13:29:06 +00:00
jfrancis%netscape.com
fe1969d001 More range gravity work
git-svn-id: svn://10.0.0.236/trunk@16657 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-18 09:32:40 +00:00
jfrancis%netscape.com
ec9059a86a More range gravity work
git-svn-id: svn://10.0.0.236/trunk@16656 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-18 09:28:55 +00:00
troy%netscape.com
1084cdf38d Fixed a compiler warning by include nsHTMLParts.h
git-svn-id: svn://10.0.0.236/trunk@16653 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-18 05:52:05 +00:00
troy%netscape.com
9c2ff0a7c5 Fixed a couple of compiler wanrings by including nsHTMLParts.h
git-svn-id: svn://10.0.0.236/trunk@16652 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-18 05:50:19 +00:00
troy%netscape.com
c20c8a8180 Fixed a compiler warning where there was an extra ',' after an enum
identifier


git-svn-id: svn://10.0.0.236/trunk@16651 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-18 05:46:00 +00:00
troy%netscape.com
0985cec450 Fixed a compiler warning by including nsHTMLParts.h
git-svn-id: svn://10.0.0.236/trunk@16650 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-18 05:44:26 +00:00
waterson%netscape.com
dac9ae77a4 RDF interface changes.
git-svn-id: svn://10.0.0.236/trunk@16649 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-18 05:38:59 +00:00
waterson%netscape.com
f51e5e8b7e Incorporate comments from guha, jband, etc. Differentiate between resources and literals, make core interfaces comply with XPCOM stuff.
git-svn-id: svn://10.0.0.236/trunk@16648 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-18 05:38:24 +00:00
troy%netscape.com
abce0b152c Eliminated a bunch of code now that CreateViewForFrame() takes care of calling
SetScrolledView()


git-svn-id: svn://10.0.0.236/trunk@16647 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-18 05:26:16 +00:00
troy%netscape.com
cb9f7f7608 Changed CreateViewForFrame() to check whether the parent view is a scrolling
view and if so use SetScrolledView() instead of the view manager's InsertChild().
This ensures that the scrolled frame's view is inserted as a child of the clip
view during the view initialization stage


git-svn-id: svn://10.0.0.236/trunk@16646 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-18 05:25:36 +00:00
troy%netscape.com
2bada305e0 Reverted back to previous revision, because I came up with a cleaner
solution


git-svn-id: svn://10.0.0.236/trunk@16645 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-18 05:23:40 +00:00
alecf%netscape.com
c1c9a2b786 start pluggin in XPCOM calls for nsIMsgXOVERParser and nsIMsgNewsArticleList
git-svn-id: svn://10.0.0.236/trunk@16644 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-18 05:21:44 +00:00
troy%netscape.com
f5bb9f4438 Re-ordered the call to set the scroll frame's initial child list so that
the XML demos work again. This is really a temporary change until things
get fixed right...


git-svn-id: svn://10.0.0.236/trunk@16643 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-18 04:59:14 +00:00
shaver%netscape.com
2d0eafe945 need these libs to link apprunner
git-svn-id: svn://10.0.0.236/trunk@16642 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-18 04:47:26 +00:00
alecf%netscape.com
a54fa61041 use #defines instead of hardcoded response codes
git-svn-id: svn://10.0.0.236/trunk@16641 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-18 04:22:23 +00:00
sdagley%netscape.com
e744a5d305 Added nsNetStreamLoader.cpp to project for vidur
git-svn-id: svn://10.0.0.236/trunk@16640 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-18 04:08:39 +00:00
scc%netscape.com
a5e6d7e9b5 NSCAP_FEATURE_DONT_ADDREF is no longer optional, and the symbol has gone away. This facility turns out to be needed. Also catch the case when operator= is called on a dereferenced smart pointer. Fixed some documentation.
git-svn-id: svn://10.0.0.236/trunk@16638 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-18 03:45:44 +00:00
scc%netscape.com
46ba36922f NSCAP_FEATURE_DONT_ADDREF is no longer optional, and the symbol has gone away. This facility turns out to be needed.
git-svn-id: svn://10.0.0.236/trunk@16637 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-18 03:44:51 +00:00
scc%netscape.com
d20b401d1b Added static IID() method. This member function will be generated automatically in the future.
git-svn-id: svn://10.0.0.236/trunk@16636 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-18 03:43:29 +00:00
troy%netscape.com
8c848640b3 Changed static casts so they compiled under VC 6.0
git-svn-id: svn://10.0.0.236/trunk@16635 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-18 03:29:51 +00:00
shaver%netscape.com
831aebce72 resprinkle NO_STATIC_LIB, but spare libpng so that viewer is cool. Also, repair some viewer/apprunner link foibles
git-svn-id: svn://10.0.0.236/trunk@16634 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-18 02:55:23 +00:00
blizzard%appliedtheory.com
c30a7ff7e5 Saner nsTimer implementation for gtk. This probably still isn't right
but it works a lot better.  Also, work around getting really strange
timeouts and print an error when you get one.


git-svn-id: svn://10.0.0.236/trunk@16633 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-18 02:55:20 +00:00
blizzard%appliedtheory.com
655a1097a6 only destroy the widget if it has actually been created
git-svn-id: svn://10.0.0.236/trunk@16632 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-18 02:52:55 +00:00
jfrancis%netscape.com
300be32995 More range gravity work
git-svn-id: svn://10.0.0.236/trunk@16631 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-18 02:51:34 +00:00
alecf%netscape.com
d062db000f fix warnings/format problems
git-svn-id: svn://10.0.0.236/trunk@16630 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-18 02:48:57 +00:00
alecf%netscape.com
41a04a213e add new mknews rosetta stuff
git-svn-id: svn://10.0.0.236/trunk@16626 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-18 01:50:43 +00:00
vidur%netscape.com
806d3c5bf2 Added asynchronous script and style loading to XML. Moved out stream loader to netlib.
git-svn-id: svn://10.0.0.236/trunk@16625 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-18 01:36:41 +00:00
vidur%netscape.com
9b098a8dba Added stream loader
git-svn-id: svn://10.0.0.236/trunk@16624 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-18 01:34:30 +00:00
waterson%netscape.com
119c41470d Fix build bustage.
git-svn-id: svn://10.0.0.236/trunk@16623 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-18 01:33:26 +00:00
waterson%netscape.com
a6e303e89e Added IID() method to fix build bustage.
git-svn-id: svn://10.0.0.236/trunk@16622 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-18 01:33:04 +00:00
mjudge%netscape.com
275f8a3a95 fixing build
git-svn-id: svn://10.0.0.236/trunk@16621 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-18 01:09:11 +00:00
davidm%netscape.com
b6db010663 Fix problems with multiple windows leaking the event queue
git-svn-id: svn://10.0.0.236/trunk@16620 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-17 23:10:42 +00:00
buster%netscape.com
bb9c01d77b WIP on border collapsing
git-svn-id: svn://10.0.0.236/trunk@16619 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-17 22:59:40 +00:00
buster%netscape.com
32c13321e7 added PainBorderSegments
git-svn-id: svn://10.0.0.236/trunk@16618 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-17 22:58:51 +00:00
buster%netscape.com
4f61c6e05f added nsBorderEdge and nsBorderEdges
git-svn-id: svn://10.0.0.236/trunk@16617 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-17 22:58:23 +00:00
hyatt%netscape.com
906a026df1 Fixing Pink's build bustage.
git-svn-id: svn://10.0.0.236/trunk@16616 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-17 22:48:36 +00:00
alecf%netscape.com
9cd50c590e remove old broken mknews
git-svn-id: svn://10.0.0.236/trunk@16615 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-17 22:45:48 +00:00
alecf%netscape.com
d9196c8135 switch over to new C++ versions of news
git-svn-id: svn://10.0.0.236/trunk@16614 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-17 22:45:08 +00:00
alecf%netscape.com
cee6075cda first insert of mknews (C++ version) into netlib from Nova
git-svn-id: svn://10.0.0.236/trunk@16613 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-17 22:44:04 +00:00
troy%netscape.com
9debb42671 Backed the change back out
git-svn-id: svn://10.0.0.236/trunk@16612 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-17 22:25:59 +00:00
pnunn%netscape.com
26e8b90813 Bugzilla#1971: Jpeg files larger than max size not handled properly. -pnunn
git-svn-id: svn://10.0.0.236/trunk@16611 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-17 22:16:27 +00:00
pinkerton%netscape.com
887cbb215b using nsCOMPtr and grippies are now drawn by hand so we can get the right look and scaling. Separation of grippies from toolbar in place with ifdefs.
git-svn-id: svn://10.0.0.236/trunk@16610 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-17 22:15:48 +00:00
akkana%netscape.com
eeeb204407 update the branch of nsprpub we're pulling
git-svn-id: svn://10.0.0.236/trunk@16609 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-17 22:15:22 +00:00
pinkerton%netscape.com
d43795a7a8 using nsCOMPtr
git-svn-id: svn://10.0.0.236/trunk@16608 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-17 22:15:09 +00:00
pinkerton%netscape.com
8da08e85fc using nsCOMPtr and preparing for separation from grippy and toolbar manager with ifdefs.
git-svn-id: svn://10.0.0.236/trunk@16607 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-17 22:14:28 +00:00
pinkerton%netscape.com
fdae4db922 removed obsolete event handlers.
git-svn-id: svn://10.0.0.236/trunk@16606 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-17 22:13:58 +00:00
pinkerton%netscape.com
839dd30dcf inserted IID() method for use with nsCOMPtr.
git-svn-id: svn://10.0.0.236/trunk@16605 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-17 22:13:41 +00:00
hyatt%netscape.com
3a0aa5a0b5 Paving the way for the implementation of expanding/collapsing folders.
git-svn-id: svn://10.0.0.236/trunk@16604 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-17 22:11:51 +00:00
law%netscape.com
34407e985d *** empty log message ***
git-svn-id: svn://10.0.0.236/trunk@16603 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-17 21:56:06 +00:00
troy%netscape.com
16badfe907 Changed Paint() to only paing the border if the style info says we're visible
git-svn-id: svn://10.0.0.236/trunk@16602 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-17 21:34:41 +00:00
despotdaemon%netscape.com
e534e78497 Pseudo-automatic update of changes made by paulmac@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@16601 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-17 20:47:01 +00:00
scc%netscape.com
261d8c4bf9 Fixed build bustage (bad access paths)
git-svn-id: svn://10.0.0.236/trunk@16600 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-17 19:47:47 +00:00
alecf%netscape.com
b2644a7deb certain methods were not spitting out = 0 at the end of the header
git-svn-id: svn://10.0.0.236/trunk@16599 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-17 19:39:10 +00:00
mjudge%netscape.com
3d5e302f6d removing files from repository
git-svn-id: svn://10.0.0.236/trunk@16598 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-17 19:39:02 +00:00
scc%netscape.com
bc7994a1ef enabled the dont_AddRef feature, for when functions return an already AddRefed result, e.g. |mSmartPtr = dont_AddRef(GetThing());|
git-svn-id: svn://10.0.0.236/trunk@16597 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-17 19:32:00 +00:00
scc%netscape.com
a09cdf1a14 COM_auto_ptr --> nsCOMPtr
git-svn-id: svn://10.0.0.236/trunk@16596 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-17 19:27:29 +00:00
mjudge%netscape.com
28a5884fce changing COM_auto_ptr to nsCOMPtr.h
git-svn-id: svn://10.0.0.236/trunk@16595 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-17 19:26:17 +00:00
mjudge%netscape.com
e0271df732 changing auto ptr to use the new header
git-svn-id: svn://10.0.0.236/trunk@16594 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-17 19:25:32 +00:00
scc%netscape.com
82b43093b4 First Checked In.
git-svn-id: svn://10.0.0.236/trunk@16593 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-17 19:21:58 +00:00
slamm%netscape.com
cfc5177808 Turn off frames for build log. Frames are evil.
git-svn-id: svn://10.0.0.236/trunk@16592 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-17 19:16:35 +00:00
scc%netscape.com
113beb03ea First Checked In.
git-svn-id: svn://10.0.0.236/trunk@16591 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-17 19:12:45 +00:00
kipp%netscape.com
1601fdb733 Disabled skid marks
git-svn-id: svn://10.0.0.236/trunk@16590 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-17 19:10:53 +00:00
kipp%netscape.com
396fe5cf50 Partial whack at supporting more accurate max-element-size computations
git-svn-id: svn://10.0.0.236/trunk@16589 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-17 18:55:42 +00:00
kipp%netscape.com
c84da05ca6 nuked some tabs; added in comment to note where max-element-size computation should be fixed up
git-svn-id: svn://10.0.0.236/trunk@16588 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-17 18:55:13 +00:00
kipp%netscape.com
59fd0fcd5b Added set/get empty line methods (currently unused)
git-svn-id: svn://10.0.0.236/trunk@16587 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-17 18:54:40 +00:00
kipp%netscape.com
5a88b6edb8 Add in border and padding to get the max-element-size right
git-svn-id: svn://10.0.0.236/trunk@16586 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-17 18:54:22 +00:00
kipp%netscape.com
fbc5369c73 Add in margin top and bottom to max-element-size height
git-svn-id: svn://10.0.0.236/trunk@16585 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-17 18:54:07 +00:00
kipp%netscape.com
7f10d74dd3 Added the AddBorderPaddingToMaxElementSize method to make it easy for implementors to get it right
git-svn-id: svn://10.0.0.236/trunk@16584 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-17 18:53:14 +00:00
kipp%netscape.com
025e0d4ba8 Factor in margins into in-flow-bounds rect; update max-element-size to include the margins around the block element
git-svn-id: svn://10.0.0.236/trunk@16583 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-17 18:52:45 +00:00
kipp%netscape.com
c5f1d3ba49 Clean up max-element-size computations; added code to remove empty lines (disabled for now)
git-svn-id: svn://10.0.0.236/trunk@16582 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-17 18:52:10 +00:00
kipp%netscape.com
0dcc919b64 Added methods for get floater info in the band and a method to compute the impact on the max-element-size of the floaters
git-svn-id: svn://10.0.0.236/trunk@16581 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-17 18:50:45 +00:00
kipp%netscape.com
48aa04cc90 Made nsBandTrapezoid::GetRect const
git-svn-id: svn://10.0.0.236/trunk@16580 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-17 18:49:39 +00:00
rods%netscape.com
5b9e4e49dd Added LBS_EXTENDEDSEL flag to get the proper MULTIPLE seleciton behavior
git-svn-id: svn://10.0.0.236/trunk@16579 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-17 18:44:52 +00:00
beard%netscape.com
abf0e29960 Added mPluginPort, which is either the assigned port, or an empty one shared among all plugin instances. This should inhibit drawing when an applet leaves the current page. Added explicit releaseFrames(), called by MRJContext's destructor, so that any frames owned by the applet will be disconnected from the C++ objects before the objects go away.
git-svn-id: svn://10.0.0.236/trunk@16578 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-17 18:22:22 +00:00
beard%netscape.com
ae484588d7 Added mPluginPort, which is either the assigned port, or an empty one shared among all plugin instances. This should inhibit drawing when an applet leaves the current page.
git-svn-id: svn://10.0.0.236/trunk@16577 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-17 18:20:42 +00:00
beard%netscape.com
36d1bb04a4 Added the initial reference count. Might want to revisit this, should realy tie lifetime of the plugin itself to the CFM library.
git-svn-id: svn://10.0.0.236/trunk@16576 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-17 18:19:40 +00:00
beard%netscape.com
148860a0e0 Converted to Pro 4 format.
git-svn-id: svn://10.0.0.236/trunk@16575 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-17 18:18:46 +00:00
shaver%netscape.com
1919fa1881 add webshell/tests/viewer/public/Makefile to let viewer build again
git-svn-id: svn://10.0.0.236/trunk@16574 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-17 17:43:17 +00:00
rods%netscape.com
92cead7b60 Fixed a bug I created in GetStyleHintForAttributeChange
git-svn-id: svn://10.0.0.236/trunk@16573 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-17 16:38:43 +00:00
dcone%netscape.com
90d3cc2f62 Added a manifest from viewer, and samples from resources for Rods changes
git-svn-id: svn://10.0.0.236/trunk@16571 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-17 16:15:45 +00:00
dcone%netscape.com
bebabe6f2e updated rods changes
git-svn-id: svn://10.0.0.236/trunk@16570 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-17 16:14:58 +00:00
dcone%netscape.com
182bc0bdba First Checked In.
git-svn-id: svn://10.0.0.236/trunk@16569 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-17 16:14:18 +00:00
kin%netscape.com
f76447a07f Modified file so that txmgr only gets built if MOZ_EDITOR is defined. This fixes
build bustage for people who want to build gecko without pulling the editor
directory.


git-svn-id: svn://10.0.0.236/trunk@16568 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-17 15:53:55 +00:00
rods%netscape.com
6a3999f05a Added HTML dialog support for "Find" and "PrintSetup"
git-svn-id: svn://10.0.0.236/trunk@16567 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-17 15:52:48 +00:00
rods%netscape.com
53c8b2569f Added processing hint for the "value" attribute
git-svn-id: svn://10.0.0.236/trunk@16566 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-17 15:27:01 +00:00
jfrancis%netscape.com
1de3312ae2 ok, so I forgot about rdf content. Now it has range gravity hooks, which do nothing.
git-svn-id: svn://10.0.0.236/trunk@16565 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-17 08:31:33 +00:00
buster%netscape.com
7dbb291b72 more WIP, no new code operational
git-svn-id: svn://10.0.0.236/trunk@16564 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-17 07:56:24 +00:00
jfrancis%netscape.com
214410065f Adding support for notifying content that it harbors a DOMRange.
git-svn-id: svn://10.0.0.236/trunk@16563 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-17 07:22:28 +00:00
buster%netscape.com
acd2f83b0d WIP collapsing border implementation
added CompareBorderStyles, GetWidthForSide, ComputeCollapsedBorderSegment
we're now computing the left edge segments somewhat correctly.


git-svn-id: svn://10.0.0.236/trunk@16562 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-17 07:04:42 +00:00
6960 changed files with 1706375 additions and 24 deletions

40
mozilla/LEGAL Normal file
View File

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

421
mozilla/LICENSE Normal file
View File

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

96
mozilla/Makefile.in Normal file
View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

7
mozilla/aclocal.m4 vendored Normal file
View File

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

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

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

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,17 @@
# target: baseDebug.shlb
mozilla/base/src/mac/nsTimerMac.cpp
mozilla/base/src/nsArena.cpp
mozilla/base/src/nsAtomTable.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/nsSizeOfHandler.cpp
mozilla/base/src/nsString.cpp
mozilla/base/src/nsUnicharBuffer.cpp
mozilla/base/src/nsUnicharInputStream.cpp
mozilla/base/src/nsVoidArray.cpp

View File

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

View File

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

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

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

View File

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

View File

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

View File

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

View File

@@ -0,0 +1,60 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
/* 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"
/* 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
char * nsEscape(const char * str, nsEscapeMask mask);
/* Caller must use delete [] on the result */
char * nsUnescape(char * str);
/* decode % escaped hex codes into character values,
* modifies the parameter, returns the same buffer
*/
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.
*/
PRInt32 nsUnescapeCount (char * str);
/* decode % escaped hex codes into character values,
* modifies the parameter buffer, returns the length of the result
* (result may contain \0's).
*/
#ifdef __cplusplus
}
#endif
#endif // _ESCAPE_H_

View File

@@ -0,0 +1,408 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
// 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, nsNativeFileSpec.
//
// 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
//
// nsNativeFileSpec 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"
//========================================================================================
// 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
#else
#define NS_NAMESPACE_PROTOTYPE static
#define NS_NAMESPACE struct
#define NS_NAMESPACE_END ;
#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 nsFilePath; // This can be passed to NSPR file I/O routines.
class nsFileURL;
class nsNativeFileSpec;
#define kFileURLPrefix "file://"
#define kFileURLPrefixLength (7)
class nsBasicOutStream;
//========================================================================================
class NS_BASE nsNativeFileSpec
// This is whatever each platform really prefers to describe files as. Declared first
// because the other two types have an embeded nsNativeFileSpec object.
//========================================================================================
{
public:
nsNativeFileSpec();
explicit nsNativeFileSpec(const char* inString, bool inCreateDirs = false);
explicit nsNativeFileSpec(const nsFilePath& inPath);
explicit nsNativeFileSpec(const nsFileURL& inURL);
nsNativeFileSpec(const nsNativeFileSpec& inPath);
virtual ~nsNativeFileSpec();
void operator = (const char* inPath);
void operator = (const nsFilePath& inPath);
void operator = (const nsFileURL& inURL);
void operator = (const nsNativeFileSpec& 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.
nsNativeFileSpec(
short vRefNum,
long parID,
ConstStr255Param name);
nsNativeFileSpec(const FSSpec& inSpec)
: mSpec(inSpec), mError(noErr) {}
operator FSSpec* () { return &mSpec; }
operator const FSSpec* const () { return &mSpec; }
operator FSSpec& () { return mSpec; }
operator const FSSpec& () const { return mSpec; }
OSErr Error() const { return mError; }
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(bool& 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.
#ifdef XP_MAC
bool Valid() const { return mError == noErr; }
#else
bool Valid() const { return true; } // Fixme.
#endif // XP_MAC
friend NS_BASE nsBasicOutStream& operator << (
nsBasicOutStream& s,
const nsNativeFileSpec& spec);
//--------------------------------------------------
// 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(nsNativeFileSpec& 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 --() ?
nsNativeFileSpec 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);
bool IsDirectory() const;
// More stringent than Exists()
bool IsFile() const;
// More stringent than Exists()
bool Exists() const;
//--------------------------------------------------
// Creation and deletion of objects. These can modify the disk.
//--------------------------------------------------
void CreateDirectory(int mode = 0700 /* for unix */);
void Delete(bool inRecursive);
//--------------------------------------------------
// Data
//--------------------------------------------------
private:
friend class nsFilePath;
#ifdef XP_MAC
FSSpec mSpec;
OSErr mError;
#else
char* mPath;
#endif
}; // class 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);
explicit nsFileURL(const char* inString, bool inCreateDirs = false);
explicit nsFileURL(const nsFilePath& inPath);
explicit nsFileURL(const nsNativeFileSpec& 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 nsNativeFileSpec& inOther);
friend NS_BASE nsBasicOutStream& operator << (
nsBasicOutStream& s, const nsFileURL& spec);
#ifdef XP_MAC
// Accessor to allow quick assignment to a mNativeFileSpec
const nsNativeFileSpec& GetNativeSpec() const { return mNativeFileSpec; }
#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 nsNativeFileSpec, too.
nsNativeFileSpec mNativeFileSpec;
#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);
explicit nsFilePath(const char* inString, bool inCreateDirs = false);
explicit nsFilePath(const nsFileURL& inURL);
explicit nsFilePath(const nsNativeFileSpec& 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 nsNativeFileSpec& inOther);
#ifdef XP_MAC
public:
// Accessor to allow quick assignment to a mNativeFileSpec
const nsNativeFileSpec& GetNativeSpec() const { return mNativeFileSpec; }
#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 nsNativeFileSpec, too.
nsNativeFileSpec mNativeFileSpec;
#endif
}; // class nsFilePath
//========================================================================================
class NS_BASE nsDirectoryIterator
// Example:
//
// nsNativeFileSpec parentDir(...); // directory over whose children we shall iterate
// for (nsDirectoryIterator i(parentDir); i; i++)
// {
// // do something with (const nsNativeFileSpec&)i
// }
//
// or:
//
// for (nsDirectoryIterator i(parentDir, false); i; i--)
// {
// // do something with (const nsNativeFileSpec&)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 nsNativeFileSpec& parent,
int iterateDirection = +1);
#ifndef XP_MAC
// Macintosh currently doesn't allocate, so needn't clean up.
virtual ~nsDirectoryIterator();
#endif
operator bool() 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 nsNativeFileSpec&() { return mCurrent; }
private:
nsNativeFileSpec mCurrent;
bool mExists;
#if defined(XP_UNIX)
DIR* mDir;
#elif defined(XP_PC)
PRDir* mDir; // XXX why not use PRDir for Unix & Mac, too?
#elif defined(XP_MAC)
OSErr SetToIndex();
short mIndex;
short mMaxIndex;
#endif
}; // class nsDirectoryIterator
#endif // _FILESPEC_H_

View File

@@ -0,0 +1,332 @@
/* -*- 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:
//
// single-byte char:
//
// nsInputFileStream, nsOutputFileStream
//
// 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:
//
// nsFilePath myPath("/Development/iotest.txt");
//
// nsOutputFileStream testStream(myPath);
// testStream << "Hello World" << nsEndl;
//
// 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
#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 nsBasicFileStream
//========================================================================================
{
public:
nsBasicFileStream();
nsBasicFileStream(PRFileDesc* desc, int nsprMode);
nsBasicFileStream(
const nsFilePath& inFile,
int nsprMode,
PRIntn accessMode);
virtual ~nsBasicFileStream();
inline PRBool is_open() const { return mFileDesc != 0; }
void open(
const nsFilePath& inFile,
int nsprMode,
PRIntn accessMode);
void close();
PRIntn tell() const;
void seek(PRInt32 offset) { seek(PR_SEEK_SET, offset); }
void seek(PRSeekWhence whence, PRInt32 offset);
PRBool eof() const { return mEOF; }
PRBool failed() const { return mFailed; }
// call PR_GetError() for details
protected:
PRFileDesc* GetFileDescriptor() const { return mFileDesc; }
protected:
friend class nsBasicInStream;
friend class nsBasicOutStream;
PRFileDesc* mFileDesc;
int mNSPRMode;
PRBool mFailed;
PRBool mEOF;
}; // class nsBasicFileStream
//========================================================================================
class NS_BASE nsBasicInStream
//========================================================================================
{
protected:
nsBasicInStream(nsBasicFileStream& inStream, istream* stream);
public:
nsBasicInStream& operator >> (nsBasicInStream& (*pf)(nsBasicInStream&))
{
return pf(*this);
}
void get(char& c);
PRInt32 read(void* s, PRInt32 n);
PRBool readline(char* s, PRInt32 n);
// Result always null-terminated
// false result indicates line was truncated
// to fit buffer, or an error occurred.
// Input streamers. Add more as needed
nsBasicInStream& operator >> (char& ch);
istream* GetStandardStream() const { return mStdStream; }
protected:
nsBasicFileStream& mBase;
istream* mStdStream;
}; // class nsBasicInStream
//========================================================================================
class NS_BASE nsBasicOutStream
//========================================================================================
{
protected:
nsBasicOutStream(nsBasicFileStream& inStream, ostream* stream);
public:
nsBasicOutStream& operator << (nsBasicOutStream& (*pf)(nsBasicOutStream&))
{
return pf(*this);
}
void put(char c);
PRInt32 write(const void* s, PRInt32 n);
void flush();
// Output streamers. Add more as needed
nsBasicOutStream& operator << (const char* buf);
nsBasicOutStream& operator << (char ch);
nsBasicOutStream& operator << (short val);
nsBasicOutStream& operator << (unsigned short val);
nsBasicOutStream& operator << (long val);
nsBasicOutStream& operator << (unsigned long val);
ostream* GetStandardStream() const { return mStdStream; }
protected:
nsBasicFileStream& mBase;
ostream* mStdStream;
}; // class nsBasicOutStream
//========================================================================================
class NS_BASE nsInputFileStream
//========================================================================================
: public nsBasicFileStream
, public nsBasicInStream
{
public:
enum { kDefaultMode = PR_RDONLY };
nsInputFileStream(istream* stream = CONSOLE_IN);
nsInputFileStream(
const nsFilePath& inFile,
int nsprMode = kDefaultMode,
PRIntn accessMode = 00700) // <- OCTAL
: nsBasicFileStream(inFile, nsprMode, accessMode)
, nsBasicInStream(*this, 0)
{}
void open(
const nsFilePath& inFile,
int nsprMode = kDefaultMode,
PRIntn accessMode = 00700) // <- OCTAL
{
nsBasicFileStream::open(inFile, nsprMode, accessMode);
}
private:
nsInputFileStream& operator >> (char* buf); // TOO DANGEROUS. DON'T DEFINE.
}; // class nsInputFileStream
//========================================================================================
class NS_BASE nsOutputFileStream
//========================================================================================
: public nsBasicFileStream
, public nsBasicOutStream
{
public:
enum { kDefaultMode = (PR_WRONLY | PR_CREATE_FILE | PR_TRUNCATE) };
nsOutputFileStream(ostream* stream = CONSOLE_OUT);
nsOutputFileStream(
const nsFilePath& inFile,
int nsprMode = kDefaultMode,
PRIntn accessMode = 00700) // <- OCTAL
: nsBasicFileStream(inFile, nsprMode, accessMode)
, nsBasicOutStream(*this, 0)
{}
inline void open(
const nsFilePath& inFile,
int nsprMode = kDefaultMode,
PRIntn accessMode = 00700) // <- OCTAL
{
nsBasicFileStream::open(inFile, nsprMode, accessMode);
}
}; // class nsOutputFileStream
//========================================================================================
class NS_BASE nsIOFileStream
//========================================================================================
: public nsBasicFileStream
, public nsBasicOutStream
, public nsBasicInStream
{
public:
enum { kDefaultMode = (PR_RDWR | PR_CREATE_FILE) };
nsIOFileStream(
const nsFilePath& inFile,
int nsprMode = kDefaultMode,
PRIntn accessMode = 00700) // <- OCTAL
: nsBasicFileStream(inFile, nsprMode, accessMode)
, nsBasicInStream(*this, 0)
, nsBasicOutStream(*this, 0)
{}
inline void open(
const nsFilePath& inFile,
int nsprMode = kDefaultMode,
PRIntn accessMode = 00700) // <- OCTAL
{
nsBasicFileStream::open(inFile, nsprMode, accessMode);
}
}; // class nsIOFileStream
//========================================================================================
// Manipulators
//========================================================================================
NS_BASE nsBasicOutStream& nsEndl(nsBasicOutStream& os);
#endif /* _FILESTREAM_H_ */

View File

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

View File

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

View File

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

View File

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

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

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

View File

@@ -0,0 +1,85 @@
#!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 \
nsBTree.cpp \
nsByteBuffer.cpp \
nsCRT.cpp \
nsDeque.cpp \
nsEscape.cpp \
nsFileSpec.cpp \
nsFileStream.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

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

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

@@ -0,0 +1,851 @@
/* -*- 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>
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);
bool 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 == NULL)
return NULL;
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 = NULL;
char * finalPath = NULL;
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();
nsNativeFileSpec dstDirSpec(sAliasHavenVRefNum, sAliasHavenDirID, "\p");
// Make sure its name is unique
nsNativeFileSpec 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
//----------------------------------------------------------------------------------------
bool 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 == NULL)
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 = NULL;
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, NULL, 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 nsNativeFileSpec implementation
//========================================================================================
//----------------------------------------------------------------------------------------
nsNativeFileSpec::nsNativeFileSpec()
//----------------------------------------------------------------------------------------
: mError(noErr)
{
mSpec.name[0] = '\0';
}
//----------------------------------------------------------------------------------------
nsNativeFileSpec::nsNativeFileSpec(const nsNativeFileSpec& inSpec)
//----------------------------------------------------------------------------------------
: mSpec(inSpec.mSpec)
, mError(inSpec.Error())
{
}
//----------------------------------------------------------------------------------------
nsNativeFileSpec::nsNativeFileSpec(const char* inString, bool inCreateDirs)
//----------------------------------------------------------------------------------------
{
mError = MacFileHelpers::FSSpecFromFullUnixPath(
inString, mSpec, true, true, inCreateDirs);
// allow a partial path, create as necessary
if (mError == fnfErr)
mError = noErr;
} // nsNativeFileSpec::nsNativeFileSpec
//----------------------------------------------------------------------------------------
nsNativeFileSpec::nsNativeFileSpec(
short vRefNum,
long parID,
ConstStr255Param name)
//----------------------------------------------------------------------------------------
{
mError = ::FSMakeFSSpec(vRefNum, parID, name, &mSpec);
if (mError == fnfErr)
mError = noErr;
}
//----------------------------------------------------------------------------------------
nsNativeFileSpec::nsNativeFileSpec(const nsFilePath& inPath)
//----------------------------------------------------------------------------------------
{
*this = inPath.GetNativeSpec();
}
//----------------------------------------------------------------------------------------
nsBasicOutStream& operator << (nsBasicOutStream& s, const nsNativeFileSpec& spec)
//----------------------------------------------------------------------------------------
{
s << spec.mSpec.vRefNum << ", " << spec.mSpec.parID << ", \"";
s.write((const char*)&spec.mSpec.name[1], spec.mSpec.name[0]);
return s << "\"";
} // nsOutputFileStream& operator << (nsOutputFileStream&, const nsNativeFileSpec&)
//----------------------------------------------------------------------------------------
void nsNativeFileSpec::operator = (const char* inString)
//----------------------------------------------------------------------------------------
{
mError = MacFileHelpers::FSSpecFromFullUnixPath(inString, mSpec, true);
} // nsNativeFileSpec::operator =
//----------------------------------------------------------------------------------------
void nsNativeFileSpec::operator = (const nsNativeFileSpec& inSpec)
//----------------------------------------------------------------------------------------
{
mSpec = inSpec.mSpec;
mError = inSpec.Error();
} // nsNativeFileSpec::operator =
//----------------------------------------------------------------------------------------
void nsNativeFileSpec::operator = (const nsFilePath& inPath)
//----------------------------------------------------------------------------------------
{
*this = inPath.GetNativeSpec();
} // nsNativeFileSpec::operator =
//----------------------------------------------------------------------------------------
bool nsNativeFileSpec::Exists() const
//----------------------------------------------------------------------------------------
{
FSSpec temp;
return ::FSMakeFSSpec(mSpec.vRefNum, mSpec.parID, mSpec.name, &temp) == noErr;
} // nsNativeFileSpec::operator =
//----------------------------------------------------------------------------------------
void nsNativeFileSpec::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 = FSMakeFSSpec(mSpec.vRefNum, mSpec.parID, partialPath, &mSpec);
} // nsNativeFileSpec::SetLeafName
//----------------------------------------------------------------------------------------
char* nsNativeFileSpec::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);
} // nsNativeFileSpec::GetLeafName
//----------------------------------------------------------------------------------------
void nsNativeFileSpec::MakeAliasSafe()
//----------------------------------------------------------------------------------------
{
mError = MacFileHelpers::MakeAliasSafe(mSpec);
} // nsNativeFileSpec::MakeAliasSafe
//----------------------------------------------------------------------------------------
void nsNativeFileSpec::MakeUnique(ConstStr255Param inSuggestedLeafName)
//----------------------------------------------------------------------------------------
{
if (inSuggestedLeafName[0] > 0)
MacFileHelpers::PLstrcpy(mSpec.name, inSuggestedLeafName);
MakeUnique();
} // nsNativeFileSpec::MakeUnique
//----------------------------------------------------------------------------------------
void nsNativeFileSpec::ResolveAlias(bool& wasAliased)
//----------------------------------------------------------------------------------------
{
Boolean wasAliased2;
mError = MacFileHelpers::ResolveAliasFile(mSpec, wasAliased2);
wasAliased = (wasAliased2 != false);
} // nsNativeFileSpec::ResolveAlias
//----------------------------------------------------------------------------------------
bool nsNativeFileSpec::IsFile() const
//----------------------------------------------------------------------------------------
{
long dirID;
Boolean isDirectory;
return (noErr == FSpGetDirectoryID(&mSpec, &dirID, &isDirectory) && !isDirectory);
} // nsNativeFileSpec::IsFile
//----------------------------------------------------------------------------------------
bool nsNativeFileSpec::IsDirectory() const
//----------------------------------------------------------------------------------------
{
long dirID;
Boolean isDirectory;
return (noErr == FSpGetDirectoryID(&mSpec, &dirID, &isDirectory) && isDirectory);
} // nsNativeFileSpec::IsDirectory
//----------------------------------------------------------------------------------------
void nsNativeFileSpec::GetParent(nsNativeFileSpec& outSpec) const
//----------------------------------------------------------------------------------------
{
if (mError == noErr)
outSpec.mError = FSMakeFSSpec(mSpec.vRefNum, mSpec.parID, NULL, outSpec);
} // nsNativeFileSpec::GetParent
//----------------------------------------------------------------------------------------
void nsNativeFileSpec::operator += (const char* inRelativePath)
//----------------------------------------------------------------------------------------
{
long dirID;
Boolean isDirectory;
mError = FSpGetDirectoryID(&mSpec, &dirID, &isDirectory);
if (mError == noErr && isDirectory)
{
mError = FSMakeFSSpec(mSpec.vRefNum, dirID, "\pG'day", *this);
if (mError == noErr)
SetLeafName(inRelativePath);
}
} // nsNativeFileSpec::operator +=
//----------------------------------------------------------------------------------------
void nsNativeFileSpec::CreateDirectory(int /* unix mode */)
//----------------------------------------------------------------------------------------
{
long ignoredDirID;
FSpDirCreate(&mSpec, smCurrentScript, &ignoredDirID);
} // nsNativeFileSpec::CreateDirectory
//----------------------------------------------------------------------------------------
void nsNativeFileSpec::Delete(bool inRecursive)
//----------------------------------------------------------------------------------------
{
if (inRecursive)
{
// MoreFilesExtras
mError = DeleteDirectory(
mSpec.vRefNum,
mSpec.parID,
const_cast<unsigned char*>(mSpec.name));
}
else
mError = FSpDelete(&mSpec);
} // nsNativeFileSpec::Delete
//========================================================================================
// Macintosh nsFilePath implementation
//========================================================================================
//----------------------------------------------------------------------------------------
nsFilePath::nsFilePath(const char* inString, bool inCreateDirs)
//----------------------------------------------------------------------------------------
: mPath(nsnull)
, mNativeFileSpec(inString, inCreateDirs)
{
// Make canonical and absolute.
char * path = MacFileHelpers::PathNameFromFSSpec( mNativeFileSpec, TRUE );
mPath = MacFileHelpers::EncodeMacPath(path, true, true);
}
//----------------------------------------------------------------------------------------
nsFilePath::nsFilePath(const nsNativeFileSpec& inSpec)
//----------------------------------------------------------------------------------------
: mNativeFileSpec(inSpec)
{
char * path = MacFileHelpers::PathNameFromFSSpec( inSpec.mSpec, TRUE );
mPath = MacFileHelpers::EncodeMacPath(path, true, true);
}
//----------------------------------------------------------------------------------------
void nsFilePath::operator = (const nsNativeFileSpec& inSpec)
//----------------------------------------------------------------------------------------
{
delete [] mPath;
char * path = MacFileHelpers::PathNameFromFSSpec( inSpec.mSpec, TRUE );
mPath = MacFileHelpers::EncodeMacPath(path, true, true);
mNativeFileSpec = inSpec;
} // nsFilePath::operator =
//========================================================================================
// nsFileURL implementation
//========================================================================================
//----------------------------------------------------------------------------------------
nsFileURL::nsFileURL(const char* inString, bool inCreateDirs)
//----------------------------------------------------------------------------------------
: mURL(nsnull)
, mNativeFileSpec(inString + kFileURLPrefixLength, inCreateDirs)
{
NS_ASSERTION(strstr(inString, kFileURLPrefix) == inString, "Not a URL!");
// Make canonical and absolute.
char* path = MacFileHelpers::PathNameFromFSSpec( mNativeFileSpec, 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 nsNativeFileSpec& 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.nsNativeFileSpec::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.nsNativeFileSpec::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 = NULL;
dipb->ioFDirIndex = mIndex;
// Sorry about this, there seems to be a bug in CWPro 4:
FSSpec& currentSpec = mCurrent.nsNativeFileSpec::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

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

View File

@@ -0,0 +1,326 @@
/* -*- 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
//========================================================================================
{
private:
nsTimerCallbackFunc mCallbackFunc;
nsITimerCallback * mCallbackObject;
void * mClosure;
PRUint32 mDelay;
PRUint32 mFireTime; // Timer should fire when TickCount >= this number
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;
list<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)
#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()
{
}
TimerPeriodical::~TimerPeriodical()
{
PR_ASSERT(mTimers.size() == 0);
}
nsresult TimerPeriodical::AddTimer( TimerImpl * aTimer)
{
// make sure it's not already there
mTimers.remove(aTimer);
mTimers.push_back(aTimer);
StartRepeating();
return NS_OK;
}
nsresult TimerPeriodical::RemoveTimer( TimerImpl * aTimer)
{
mTimers.remove(aTimer);
if ( mTimers.size() == 0 )
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)
{
list<TimerImpl*>::iterator iter = mTimers.begin();
list<TimerImpl*> fireList;
while (iter != mTimers.end())
{
TimerImpl* timer = *iter;
NS_ASSERTION(timer->IsGoodTimer(), "Bad timer!");
if (timer->GetFireTime() <= inMacEvent.when)
{
mTimers.erase(iter++);
NS_ADDREF(timer);
fireList.push_back(timer);
}
else
{
iter++;
}
}
if ( mTimers.size() == 0 )
StopRepeating();
for (iter=fireList.begin(); iter!=fireList.end(); iter++)
{
(*iter)->Fire();
NS_RELEASE(*iter);
}
}
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

@@ -0,0 +1,108 @@
#!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 \
$(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 \
$(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
LINCS=-I$(PUBLIC)\xpcom -I$(PUBLIC)\netlib \
-I$(PUBLIC)\raptor
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

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

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

View File

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

View File

@@ -0,0 +1,154 @@
/* -*- 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);
}
PRInt32 uslen;
PRUint32 hashCode = nsCRT::HashValue(us, &uslen);
PLHashEntry** hep = PL_HashTableRawLookup(gAtomHashTable, hashCode, us);
PLHashEntry* he = *hep;
if (nsnull != he) {
nsIAtom* id = (nsIAtom*) he->value;
NS_ADDREF(id);
return id;
}
AtomImpl* id = new(us, uslen) AtomImpl();
PL_HashTableRawAdd(gAtomHashTable, hep, hashCode, id->mString, id);
NS_ADDREF(id);
return id;
}
NS_BASE nsrefcnt NS_GetNumberOfAtoms(void)
{
if (nsnull != gAtomHashTable) {
NS_PRECONDITION(nsrefcnt(gAtomHashTable->nentries) == gAtoms, "bad atom table");
}
return gAtoms;
}

View File

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

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

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

View File

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

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

View File

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

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

@@ -0,0 +1,409 @@
/* -*- 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"
// 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) < 256) ? PRUnichar(kUpper2Lower[_ucs2]) : _ToLower(_ucs2))
#define TOUPPER(_ucs2) \
(((_ucs2) < 256) ? PRUnichar(kLower2Upper[_ucs2]) : _ToUpper(_ucs2))
static PRUnichar _ToLower(PRUnichar aChar)
{
// XXX need i18n code here
return aChar;
}
static PRUnichar _ToUpper(PRUnichar aChar)
{
// XXX need i18n code here
return aChar;
}
//----------------------------------------------------------------------
PRUnichar nsCRT::ToUpper(PRUnichar aChar)
{
return TOUPPER(aChar);
}
PRUnichar nsCRT::ToLower(PRUnichar aChar)
{
return TOLOWER(aChar);
}
PRInt32 nsCRT::strlen(const PRUnichar* s)
{
PRInt32 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, PRInt32 n)
{
if(s1 && s2) {
if(0<n) {
while (--n >= 0) {
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 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, PRInt32 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, PRInt32 n)
{
if(s1 && s2) {
if(0<n){
while (--n >= 0) {
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 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, PRInt32 n)
{
if(s1 && s2){
if(0<n){
while (--n >= 0) {
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;
}
}
}
return 0;
}
PRUnichar* nsCRT::strdup(const PRUnichar* str)
{
PRInt32 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, PRInt32* uslenp)
{
PRUint32 rv = 0;
PRInt32 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);
}

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

@@ -0,0 +1,123 @@
/* -*- 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"
/// 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, PRInt32 aCount) {
::memcpy(aDest, aSrc, (size_t)aCount);
}
static void memmove(void* aDest, const void* aSrc, PRInt32 aCount) {
::memmove(aDest, aSrc, (size_t)aCount);
}
static void memset(void* aDest, PRUint8 aByte, PRInt32 aCount) {
::memset(aDest, aByte, aCount);
}
static void zero(void* aDest, PRInt32 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 PRInt32 strlen(const char* s) {
return PRInt32(::strlen(s));
}
/// Compare s1 and s2.
static PRInt32 strcmp(const char* s1, const char* s2) {
return PRInt32(PL_strcmp(s1, s2));
}
/// 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, PRInt32 aMaxLen) {
return PRInt32(PL_strncasecmp(s1, s2, aMaxLen));
}
static char* strdup(const char* str) {
return PL_strdup(str);
}
/// Like strlen except for ucs2 strings
static PRInt32 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,
PRInt32 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,
PRInt32 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,
PRInt32 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,
PRInt32 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, PRInt32* 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

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

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

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

@@ -0,0 +1,152 @@
/* -*- 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 '%'
//----------------------------------------------------------------------------------------
char* nsEscape(const char * str, nsEscapeMask mask)
//----------------------------------------------------------------------------------------
{
if(!str)
return NULL;
return nsEscapeCount(str, (PRInt32)PL_strlen(str), mask, NULL);
}
//----------------------------------------------------------------------------------------
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;
}
//----------------------------------------------------------------------------------------
char* nsUnescape(char * str)
//----------------------------------------------------------------------------------------
{
nsUnescapeCount(str);
return str;
}
//----------------------------------------------------------------------------------------
PRInt32 nsUnescapeCount(char * str)
//----------------------------------------------------------------------------------------
{
register char *src = str;
register char *dst = str;
while (*src)
if (*src != HEX_ESCAPE)
{
*dst++ = *src++;
}
else
{
src++; /* walk over escape */
if (*src)
{
*dst = UNHEX(*src) << 4;
src++;
}
if (*src)
{
*dst = (*dst + UNHEX(*src));
src++;
}
dst++;
}
*dst = 0;
return (int)(dst - str);
} /* NET_UnEscapeCnt */

View File

@@ -0,0 +1,579 @@
/* -*- 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 <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, bool 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
//----------------------------------------------------------------------------------------
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 NULL;
strcpy(newPath, inString);
return newPath;
} // nsFileSpecHelpers::StringDup
//----------------------------------------------------------------------------------------
char* nsFileSpecHelpers::AllocCat(
const char* inString1,
const char* inString2)
//----------------------------------------------------------------------------------------
{
if (!inString1)
return inString2 ? StringDup(inString2) : (char*)NULL;
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*)NULL;
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);
*(++lastSeparator) = '\0'; // strip the current leaf name
int newLength = lastSeparator - ioPath + strlen(inLeafName);
if (newLength > oldLength)
{
char* newPath = StringDup(ioPath, newLength + 1);
delete [] ioPath;
ioPath = newPath;
}
strcat(ioPath, inLeafName);
} // nsNativeFileSpec::LeafReplace
//----------------------------------------------------------------------------------------
char* nsFileSpecHelpers::GetLeaf(const char* inPath, char inSeparator)
// Returns a pointer to an allocated string representing the leaf.
//----------------------------------------------------------------------------------------
{
if (!inPath)
return NULL;
char* lastSeparator = strrchr(inPath, inSeparator);
if (lastSeparator)
return StringDup(++lastSeparator);
return StringDup(inPath);
} // nsNativeFileSpec::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';
nsNativeFileSpec spec(nsFilePath(pathCopy, 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;
} // nsNativeFileSpec::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, bool 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
, mNativeFileSpec(inOther.GetNativeSpec())
#endif
{
} // nsFileURL::nsFileURL
//----------------------------------------------------------------------------------------
nsFileURL::nsFileURL(const nsFilePath& inOther)
//----------------------------------------------------------------------------------------
: mURL(nsFileSpecHelpers::AllocCat(kFileURLPrefix, (const char*)inOther))
#ifdef XP_MAC
, mNativeFileSpec(inOther.GetNativeSpec())
#endif
{
} // nsFileURL::nsFileURL
//----------------------------------------------------------------------------------------
nsFileURL::nsFileURL(const nsNativeFileSpec& inOther)
: mURL(nsFileSpecHelpers::AllocCat(kFileURLPrefix, (const char*)nsFilePath(inOther)))
#ifdef XP_MAC
, mNativeFileSpec(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
mNativeFileSpec = inString + kFileURLPrefixLength;
#endif
} // nsFileURL::operator =
//----------------------------------------------------------------------------------------
void nsFileURL::operator = (const nsFileURL& inOther)
//----------------------------------------------------------------------------------------
{
mURL = nsFileSpecHelpers::StringAssign(mURL, inOther.mURL);
#ifdef XP_MAC
mNativeFileSpec = inOther.GetNativeSpec();
#endif
} // nsFileURL::operator =
//----------------------------------------------------------------------------------------
void nsFileURL::operator = (const nsFilePath& inOther)
//----------------------------------------------------------------------------------------
{
delete [] mURL;
mURL = nsFileSpecHelpers::AllocCat(kFileURLPrefix, (const char*)inOther);
#ifdef XP_MAC
mNativeFileSpec = inOther.GetNativeSpec();
#endif
} // nsFileURL::operator =
//----------------------------------------------------------------------------------------
void nsFileURL::operator = (const nsNativeFileSpec& inOther)
//----------------------------------------------------------------------------------------
{
delete [] mURL;
mURL = nsFileSpecHelpers::AllocCat(kFileURLPrefix, (const char*)nsFilePath(inOther));
#ifdef XP_MAC
mNativeFileSpec = inOther;
#endif
} // nsFileURL::operator =
//----------------------------------------------------------------------------------------
nsBasicOutStream& operator << (nsBasicOutStream& s, const nsFileURL& url)
//----------------------------------------------------------------------------------------
{
return (s << url.mURL);
}
//========================================================================================
// nsFilePath implementation
//========================================================================================
#ifndef XP_MAC
//----------------------------------------------------------------------------------------
nsFilePath::nsFilePath(const char* inString, bool 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
, mNativeFileSpec(inOther.GetNativeSpec())
#endif
{
}
#ifdef XP_UNIX
//----------------------------------------------------------------------------------------
nsFilePath::nsFilePath(const nsNativeFileSpec& inOther)
//----------------------------------------------------------------------------------------
: mPath(nsFileSpecHelpers::StringDup(inOther.mPath))
{
}
#endif // XP_UNIX
//----------------------------------------------------------------------------------------
nsFilePath::~nsFilePath()
//----------------------------------------------------------------------------------------
{
delete [] mPath;
}
#ifdef XP_UNIX
//----------------------------------------------------------------------------------------
void nsFilePath::operator = (const nsNativeFileSpec& 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
mNativeFileSpec = inString;
nsFileSpecHelpers::StringAssign(mPath, (const char*)nsFilePath(mNativeFileSpec));
#else
#ifdef XP_PC
nsFileSpecHelpers::UnixToNative(mPath);
#endif
// Make canonical and absolute.
nsFileSpecHelpers::Canonify(mPath, 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
mNativeFileSpec = inOther.GetNativeSpec();
#endif
}
//========================================================================================
// nsNativeFileSpec implementation
//========================================================================================
#ifndef XP_MAC
//----------------------------------------------------------------------------------------
nsNativeFileSpec::nsNativeFileSpec()
//----------------------------------------------------------------------------------------
: mPath(NULL)
{
}
#endif
//----------------------------------------------------------------------------------------
nsNativeFileSpec::nsNativeFileSpec(const nsFileURL& inURL)
//----------------------------------------------------------------------------------------
#ifndef XP_MAC
: mPath(NULL)
#endif
{
*this = nsFilePath(inURL); // convert to unix path first
}
//----------------------------------------------------------------------------------------
void nsNativeFileSpec::MakeUnique(const char* inSuggestedLeafName)
//----------------------------------------------------------------------------------------
{
if (inSuggestedLeafName && *inSuggestedLeafName)
SetLeafName(inSuggestedLeafName);
MakeUnique();
} // nsNativeFileSpec::MakeUnique
//----------------------------------------------------------------------------------------
void nsNativeFileSpec::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;
} // nsNativeFileSpec::MakeUnique
//----------------------------------------------------------------------------------------
void nsNativeFileSpec::operator = (const nsFileURL& inURL)
//----------------------------------------------------------------------------------------
{
*this = nsFilePath(inURL); // convert to unix path first
}
//========================================================================================
// UNIX & WIN nsNativeFileSpec implementation
//========================================================================================
#ifdef XP_UNIX
//----------------------------------------------------------------------------------------
nsNativeFileSpec::nsNativeFileSpec(const nsFilePath& inPath)
//----------------------------------------------------------------------------------------
: mPath(nsFileSpecHelpers::StringDup((const char*)inPath))
{
}
#endif // XP_UNIX
#ifdef XP_UNIX
//----------------------------------------------------------------------------------------
void nsNativeFileSpec::operator = (const nsFilePath& inPath)
//----------------------------------------------------------------------------------------
{
nsFileSpecHelpers::StringAssign(mPath, (const char*)inPath);
}
#endif //XP_UNIX
#if defined(XP_UNIX) || defined(XP_PC)
//----------------------------------------------------------------------------------------
nsNativeFileSpec::nsNativeFileSpec(const nsNativeFileSpec& inSpec)
//----------------------------------------------------------------------------------------
: mPath(nsFileSpecHelpers::StringDup(inSpec.mPath))
{
}
#endif //XP_UNIX
#if defined(XP_UNIX) || defined(XP_PC)
//----------------------------------------------------------------------------------------
nsNativeFileSpec::nsNativeFileSpec(const char* inString, bool inCreateDirs)
//----------------------------------------------------------------------------------------
: mPath(nsFileSpecHelpers::StringDup(inString))
{
// Make canonical and absolute.
nsFileSpecHelpers::Canonify(mPath, inCreateDirs);
}
#endif //XP_UNIX,PC
//----------------------------------------------------------------------------------------
nsNativeFileSpec::~nsNativeFileSpec()
//----------------------------------------------------------------------------------------
{
#ifndef XP_MAC
delete [] mPath;
#endif
}
#if defined(XP_UNIX) || defined(XP_PC)
//----------------------------------------------------------------------------------------
void nsNativeFileSpec::operator = (const nsNativeFileSpec& inSpec)
//----------------------------------------------------------------------------------------
{
mPath = nsFileSpecHelpers::StringAssign(mPath, inSpec.mPath);
}
#endif //XP_UNIX
#if defined(XP_UNIX) || defined(XP_PC)
//----------------------------------------------------------------------------------------
void nsNativeFileSpec::operator = (const char* inString)
//----------------------------------------------------------------------------------------
{
mPath = nsFileSpecHelpers::StringAssign(mPath, inString);
// Make canonical and absolute.
nsFileSpecHelpers::Canonify(mPath, true /* XXX? */);
}
#endif //XP_UNIX
#if (defined(XP_UNIX) || defined(XP_PC))
//----------------------------------------------------------------------------------------
nsBasicOutStream& operator << (nsBasicOutStream& s, const nsNativeFileSpec& spec)
//----------------------------------------------------------------------------------------
{
return (s << (const char*)spec.mPath);
}
#endif // DEBUG && XP_UNIX
//----------------------------------------------------------------------------------------
nsNativeFileSpec nsNativeFileSpec::operator + (const char* inRelativePath) const
//----------------------------------------------------------------------------------------
{
nsNativeFileSpec result = *this;
result += inRelativePath;
return result;
} // nsNativeFileSpec::operator +

View File

@@ -0,0 +1,460 @@
/* -*- 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>
#ifdef XP_MAC
#include <Errors.h>
#endif
//========================================================================================
// nsBasicFileStream
//========================================================================================
//----------------------------------------------------------------------------------------
nsBasicFileStream::nsBasicFileStream()
//----------------------------------------------------------------------------------------
: mFileDesc(0)
, mNSPRMode(0)
, mFailed(false)
, mEOF(false)
{
}
//----------------------------------------------------------------------------------------
nsBasicFileStream::nsBasicFileStream(
const nsFilePath& inFile,
int nsprMode,
PRIntn accessMode)
//----------------------------------------------------------------------------------------
: mFileDesc(0)
, mNSPRMode(0)
, mFailed(false)
, mEOF(false)
{
open(inFile, nsprMode, accessMode);
}
//----------------------------------------------------------------------------------------
nsBasicFileStream::nsBasicFileStream(PRFileDesc* desc, int nsprMode)
//----------------------------------------------------------------------------------------
: mFileDesc(desc)
, mNSPRMode(nsprMode)
, mFailed(false)
, mEOF(false)
{
}
//----------------------------------------------------------------------------------------
nsBasicFileStream::~nsBasicFileStream()
//----------------------------------------------------------------------------------------
{
close();
}
//----------------------------------------------------------------------------------------
void nsBasicFileStream::open(
const nsFilePath& inFile,
int nsprMode,
PRIntn accessMode)
//----------------------------------------------------------------------------------------
{
if (mFileDesc)
return;
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;
#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.GetNativeSpec().Error() != noErr)
return;
OSErr err = noErr;
#if DEBUG
const OSType kCreator = 'CWIE';
#else
const OSType kCreator = 'MOSS';
#endif
nsNativeFileSpec nativeSpec = inFile.GetNativeSpec();
FSSpec* spec = (FSSpec*)nativeSpec;
if (nsprMode & PR_CREATE_FILE)
err = FSpCreate(spec, kCreator, 'TEXT', 0);
if (err == dupFNErr)
err = noErr;
if (err != noErr)
return;
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;
if ((mFileDesc = PR_ImportFile(refnum)) == 0)
return;
#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*)nsNativeFileSpec(inFile), nsprMode, accessMode)) == 0)
return;
#endif
mNSPRMode = nsprMode;
} // nsFileStreamHelpers::open
//----------------------------------------------------------------------------------------
void nsBasicFileStream::close()
// Must precede the destructor because both are inline.
//----------------------------------------------------------------------------------------
{
if (mFileDesc==PR_STDIN || mFileDesc==PR_STDOUT || mFileDesc==PR_STDERR || mFileDesc == 0)
return;
if (PR_Close(mFileDesc) == PR_SUCCESS)
mFileDesc = 0;
} // nsBasicFileStream::close
//----------------------------------------------------------------------------------------
void nsBasicFileStream::seek(PRSeekWhence whence, PRInt32 offset)
// Must precede the destructor because both are inline.
//----------------------------------------------------------------------------------------
{
if (mFileDesc==PR_STDIN || mFileDesc==PR_STDOUT || mFileDesc==PR_STDERR || mFileDesc == 0)
return;
mFailed = false; // reset on a seek.
mEOF = 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 = true;
}
else if (newPosition >= fileSize)
{
newPosition = fileSize;
mEOF = true;
}
if (PR_Seek(mFileDesc, newPosition, PR_SEEK_SET) < 0)
mFailed = true;
} // nsBasicFileStream::seek
//----------------------------------------------------------------------------------------
PRIntn nsBasicFileStream::tell() const
// Must precede the destructor because both are inline.
//----------------------------------------------------------------------------------------
{
if (mFileDesc==PR_STDIN || mFileDesc==PR_STDOUT || mFileDesc==PR_STDERR || mFileDesc == 0)
return -1;
return PR_Seek(mFileDesc, 0, PR_SEEK_CUR);
} // nsBasicFileStream::tell
//========================================================================================
// nsBasicInStream
//========================================================================================
//----------------------------------------------------------------------------------------
nsBasicInStream::nsBasicInStream(nsBasicFileStream& inBasicStream, istream* inStream)
//----------------------------------------------------------------------------------------
: mBase(inBasicStream)
, mStdStream(inStream)
{
}
//----------------------------------------------------------------------------------------
void nsBasicInStream::get(char& c)
//----------------------------------------------------------------------------------------
{
read(&c, sizeof(char));
}
//----------------------------------------------------------------------------------------
PRBool nsBasicInStream::readline(char* s, PRInt32 n)
// This will truncate if the buffer is too small. Result will always be null-terminated.
//----------------------------------------------------------------------------------------
{
PRBool bufferLargeEnough = true; // result
if (!s || !n)
return true;
PRIntn position = mBase.tell();
if (position < 0)
return false;
PRInt32 bytesRead = read(s, n - 1);
if (mBase.failed())
return false;
s[bytesRead] = '\0'; // always terminate at the end of the buffer
char* tp = strpbrk(s, "\n\r");
if (tp)
{
char ch = *tp;
*tp++ = '\0'; // terminate at the newline, then skip past it
if ((ch == '\n' && *tp == '\r') || (ch == '\r' && *tp == '\n'))
tp++; // possibly a pair.
bytesRead = (tp - s);
}
else if (!mBase.eof())
bufferLargeEnough = false;
position += bytesRead;
mBase.seek(position);
return bufferLargeEnough;
} // nsBasicInStream::getline
//----------------------------------------------------------------------------------------
PRInt32 nsBasicInStream::read(void* s, PRInt32 n)
//----------------------------------------------------------------------------------------
{
#ifndef NS_USE_PR_STDIO
// Calling PR_Read on stdin is sure suicide on Macintosh.
if (GetStandardStream())
{
GetStandardStream()->read((char*)s, n);
return n;
}
#endif
if (!mBase.is_open() || mBase.failed())
return -1;
PRInt32 bytesRead = PR_Read(mBase.GetFileDescriptor(), s, n);
if (bytesRead < 0)
mBase.mFailed = true;
else if (bytesRead < n)
mBase.mEOF = true;
return bytesRead;
}
//----------------------------------------------------------------------------------------
nsBasicInStream& nsBasicInStream::operator >> (char& c)
//----------------------------------------------------------------------------------------
{
get(c);
return *this;
}
//========================================================================================
// nsInputFileStream
//========================================================================================
//----------------------------------------------------------------------------------------
nsInputFileStream::nsInputFileStream(istream* stream)
//----------------------------------------------------------------------------------------
#ifndef NS_USE_PR_STDIO
: nsBasicFileStream(0, kDefaultMode)
, nsBasicInStream(*this, stream)
#else
: nsBasicFileStream(PR_STDIN, kDefaultMode)
, nsBasicInStream(*this, 0)
#endif
{
}
//========================================================================================
// nsBasicOutStream
//========================================================================================
//----------------------------------------------------------------------------------------
nsBasicOutStream::nsBasicOutStream(nsBasicFileStream& inBase, ostream* stream)
//----------------------------------------------------------------------------------------
: mBase(inBase)
, mStdStream(stream)
{
}
//----------------------------------------------------------------------------------------
void nsBasicOutStream::put(char c)
//----------------------------------------------------------------------------------------
{
write(&c, sizeof(c));
}
//----------------------------------------------------------------------------------------
PRInt32 nsBasicOutStream::write(const void* s, PRInt32 n)
//----------------------------------------------------------------------------------------
{
#ifndef NS_USE_PR_STDIO
// Calling PR_Write on stdout is sure suicide.
if (mStdStream)
{
mStdStream->write((const char*)s, n);
return n;
}
#endif
if (!mBase.mFileDesc || mBase.failed())
return -1;
PRInt32 bytesWrit = PR_Write(mBase.mFileDesc, s, n);
if (bytesWrit != n)
mBase.mFailed = true;
return bytesWrit;
}
//----------------------------------------------------------------------------------------
nsBasicOutStream& nsBasicOutStream::operator << (char c)
//----------------------------------------------------------------------------------------
{
put(c);
return *this;
}
//----------------------------------------------------------------------------------------
nsBasicOutStream& nsBasicOutStream::operator << (const char* s)
//----------------------------------------------------------------------------------------
{
write(s, strlen(s));
return *this;
}
//----------------------------------------------------------------------------------------
nsBasicOutStream& nsBasicOutStream::operator << (short val)
//----------------------------------------------------------------------------------------
{
char buf[30];
sprintf(buf, "%d", val);
return *this << buf;
}
//----------------------------------------------------------------------------------------
nsBasicOutStream& nsBasicOutStream::operator << (unsigned short val)
//----------------------------------------------------------------------------------------
{
char buf[30];
sprintf(buf, "%ud", val);
return *this << buf;
}
//----------------------------------------------------------------------------------------
nsBasicOutStream& nsBasicOutStream::operator << (long val)
//----------------------------------------------------------------------------------------
{
char buf[30];
sprintf(buf, "%ld", val);
return *this << buf;
}
//----------------------------------------------------------------------------------------
nsBasicOutStream& nsBasicOutStream::operator << (unsigned long val)
//----------------------------------------------------------------------------------------
{
char buf[30];
sprintf(buf, "%uld", val);
return *this << buf;
}
//----------------------------------------------------------------------------------------
void nsBasicOutStream::flush()
// Must precede the destructor because both are inline.
//----------------------------------------------------------------------------------------
{
#ifndef NS_USE_PR_STDIO
if (mStdStream)
{
mStdStream->flush();
return;
}
#endif
if (mBase.mFileDesc == 0)
return;
PRBool itFailed = PR_Sync(mBase.mFileDesc) != PR_SUCCESS;
#ifdef XP_MAC
// On unix, it seems to fail always.
if (itFailed)
mBase.mFailed = true;
#endif
} // nsBasicOutStream::flush
//========================================================================================
// nsOutputFileStream
//========================================================================================
//----------------------------------------------------------------------------------------
nsOutputFileStream::nsOutputFileStream(ostream* stream)
//----------------------------------------------------------------------------------------
#ifndef NS_USE_PR_STDIO
: nsBasicFileStream(0, kDefaultMode)
, nsBasicOutStream(*this, stream)
#else
: nsBasicFileStream(PR_STDOUT, kDefaultMode)
, nsBasicOutStream(*this, 0)
#endif
{
}
//========================================================================================
// Manipulators
//========================================================================================
//----------------------------------------------------------------------------------------
nsBasicOutStream& nsEndl(nsBasicOutStream& os)
//----------------------------------------------------------------------------------------
{
#ifndef NS_USE_PR_STDIO
// Calling PR_Write on stdout is sure suicide on Macintosh.
ostream* stream = os.GetStandardStream();
if (stream)
{
*stream << std::endl;
return os;
}
#endif
os.put('\n');
os.flush();
return os;
}

View File

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

View File

@@ -0,0 +1,77 @@
/* -*- 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:
/**
* Translate the unicode string into the stringbuf.
*/
virtual void ToString(nsString& aString) const = 0;
/**
* Return a pointer to a zero terminated unicode string.
*/
virtual const PRUnichar* GetUnicode() const = 0;
/**
* Add the size, in bytes, of the atom to the handler.
*/
NS_IMETHOD SizeOf(nsISizeOfHandler* aHandler) const = 0;
};
/**
* Find an atom that matches the given iso-latin1 C string. The
* C string is translated into it's unicode equivalent.
*/
extern NS_BASE nsIAtom* NS_NewAtom(const char* isolatin1);
/**
* Find an atom that matches the given unicode string. The string is assumed
* to be zero terminated.
*/
extern NS_BASE nsIAtom* NS_NewAtom(const PRUnichar* unicode);
/**
* Find an atom that matches the given string.
*/
extern NS_BASE nsIAtom* NS_NewAtom(const nsString& aString);
/**
* Return a count of the total number of atoms currently
* alive in the system.
*/
extern NS_BASE nsrefcnt NS_GetNumberOfAtoms(void);
#endif /* nsIAtom_h___ */

View File

@@ -0,0 +1,56 @@
/* -*- 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:
/** Close the stream. */
NS_IMETHOD
Close(void) = 0;
};
/** Error codes */
//@{
/// End of file
#define NS_BASE_STREAM_EOF NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_BASE, 1)
/// Stream closed
#define NS_BASE_STREAM_CLOSED NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_BASE, 2)
/// Error from the operating system
#define NS_BASE_STREAM_OSERROR NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_BASE, 3)
/// Illegal arguments
#define NS_BASE_STREAM_ILLEGAL_ARGS NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_BASE, 4)
/// For unichar streams
#define NS_BASE_STREAM_NO_CONVERTER NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_BASE, 5)
/// For unichar streams
#define NS_BASE_STREAM_BAD_CONVERSION NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_BASE, 6)
//@}
#endif /* nsInputStream_h___ */

View File

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

View File

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

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

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

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

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

View File

@@ -0,0 +1,91 @@
/* -*- 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} }
#define NS_IB2UCONVERTER_IID \
{ 0x35e40290, 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);
/// Abstract interface for converting from bytes to unicode characters
class nsIB2UConverter : public nsISupports {
public:
/** aDstLen is updated to indicate how much data was translated into
* aDst; aSrcLen is updated to indicate how much data was used in
* the source buffer.
*/
NS_IMETHOD Convert(PRUnichar* aDst,
PRUint32 aDstOffset,
PRUint32& aDstLen,
const char* aSrc,
PRUint32 aSrcOffset,
PRUint32& aSrcLen) = 0;
};
/** 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);
/** Create a new nsB2UConverter for the given character set. When given
* nsnull, the converter for iso-latin1 to unicode is provided. If no
* converter can be found, nsnull is returned.
*/
extern NS_BASE nsresult
NS_NewB2UConverter(nsIB2UConverter** aInstancePtrResult,
nsISupports* aOuter,
nsString* aCharSet = nsnull);
#endif /* nsUnicharInputStream_h___ */

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

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

View File

@@ -0,0 +1,288 @@
/* -*- 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();
~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;
}
nsProperties::~nsProperties()
{
if (mTable) {
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();
mIn = nsnull;
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)
{
cout << "will add " << aKey.ToNewCString() << "=" << aNewValue.ToNewCString() << endl;
if (!mTable) {
mTable = PL_NewHashTable(8, (PLHashFunction) HashKey,
(PLHashComparator) CompareKeys,
(PLHashComparator) nsnull, nsnull, nsnull);
if (!mTable) {
return NS_ERROR_OUT_OF_MEMORY;
}
}
PRUnichar *key = aKey.ToNewUnicode();
PRInt32 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, key,
new nsString(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)
{
PRUnichar *key = aKey;
PRInt32 len;
PRUint32 hashValue = nsCRT::HashValue(key, &len);
PLHashEntry **hep = PL_HashTableRawLookup(mTable, hashValue, key);
PLHashEntry *he = *hep;
if (he) {
((nsString *) he->value)->Copy(aValue);
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;
}
NS_DEFINE_IID(kIFactoryIID, NS_IFACTORY_IID);
NS_IMPL_ISUPPORTS(nsPropertiesFactory, kIFactoryIID);
NS_IMETHODIMP
nsPropertiesFactory::CreateInstance(nsISupports* aOuter, REFNSIID aIID,
void** aResult)
{
if (aOuter) {
return NS_ERROR_NO_AGGREGATION;
}
if (!aResult) {
return NS_ERROR_NULL_POINTER;
}
*aResult = nsnull;
nsProperties* props = new nsProperties();
if (!props) {
return NS_ERROR_OUT_OF_MEMORY;
}
nsresult ret = props->QueryInterface(aIID, aResult);
if (NS_FAILED(ret)) {
delete props;
}
return ret;
}
NS_IMETHODIMP
nsPropertiesFactory::LockFactory(PRBool aLock)
{
if (aLock) {
PR_AtomicIncrement(&gLockCount);
}
else {
PR_AtomicDecrement(&gLockCount);
}
return NS_OK;
}

View File

@@ -0,0 +1,34 @@
/* -*- 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 : nsIFactory
{
public:
NS_DECL_ISUPPORTS
NS_IMETHOD CreateInstance(nsISupports* aOuter, REFNSIID aIID,
void** aResult);
NS_IMETHOD LockFactory(PRBool aLock);
};
#endif /* nsProperties_h___ */

View File

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

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

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

View File

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

View File

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

File diff suppressed because it is too large Load Diff

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

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

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

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

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

View File

@@ -0,0 +1,341 @@
/* -*- 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 "nsIUnicharInputStream.h"
#include "nsIByteBuffer.h"
#include "nsIUnicharBuffer.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);
}
//----------------------------------------------------------------------
class IsoLatin1Converter : public nsIB2UConverter {
public:
IsoLatin1Converter();
NS_DECL_ISUPPORTS
NS_IMETHOD Convert(PRUnichar* aDst,
PRUint32 aDstOffset,
PRUint32& aDstLen,
const char* aSrc,
PRUint32 aSrcOffset,
PRUint32& aSrcLen);
};
IsoLatin1Converter::IsoLatin1Converter()
{
NS_INIT_REFCNT();
}
NS_DEFINE_IID(kIB2UConverterIID, NS_IB2UCONVERTER_IID);
NS_IMPL_ISUPPORTS(IsoLatin1Converter,kIB2UConverterIID);
nsresult IsoLatin1Converter::Convert(PRUnichar* aDst,
PRUint32 aDstOffset,
PRUint32& aDstLen,
const char* aSrc,
PRUint32 aSrcOffset,
PRUint32& aSrcLen)
{
PRUint32 amount = aSrcLen;
if (aSrcLen > aDstLen) {
amount = aDstLen;
}
const char* end = aSrc + amount;
while (aSrc < end) {
PRUint8 isoLatin1 = PRUint8(*aSrc++);
/* XXX insert table based lookup converter here */
*aDst++ = isoLatin1;
}
aDstLen = amount;
aSrcLen = amount;
return NS_OK;
}
NS_BASE nsresult
NS_NewB2UConverter(nsIB2UConverter** aInstancePtrResult,
nsISupports* aOuter,
nsString* aCharSet)
{
if (nsnull != aOuter) {
return NS_ERROR_NO_AGGREGATION;
}
// We cannot use enum to pass charset id
if ((nsnull != aCharSet) && (! aCharSet->EqualsIgnoreCase( "iso-8859-1" ))){
return NS_BASE_STREAM_NO_CONVERTER;
}
IsoLatin1Converter* it = new IsoLatin1Converter();
if (nsnull == it) {
return NS_ERROR_OUT_OF_MEMORY;
}
return it->QueryInterface(kIB2UConverterIID, (void**)aInstancePtrResult);
}
//----------------------------------------------------------------------
class ConverterInputStream : public nsIUnicharInputStream {
public:
ConverterInputStream(nsIInputStream* aStream,
nsIB2UConverter* 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;
nsIB2UConverter* mConverter;
nsIByteBuffer* mByteData;
PRUint32 mByteDataOffset;
nsIUnicharBuffer* mUnicharData;
PRUint32 mUnicharDataOffset;
PRUint32 mUnicharDataLength;
};
ConverterInputStream::ConverterInputStream(nsIInputStream* aStream,
nsIB2UConverter* 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
PRUint32 dstLen = mUnicharData->GetBufferSize();
PRUint32 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
nsIB2UConverter* 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);
converter->Release();
if (nsnull == it) {
return NS_ERROR_OUT_OF_MEMORY;
}
return it->QueryInterface(kIUnicharInputStreamIID,
(void **) aInstancePtrResult);
}

View File

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

View File

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

View File

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

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

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

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

View File

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

View File

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

@@ -0,0 +1,220 @@
/* -*- 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>
//----------------------------------------------------------------------------------------
void nsFileSpecHelpers::Canonify(char*& ioPath, bool 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 nsNativeFileSpec::SetLeafName(const char* inLeafName)
//----------------------------------------------------------------------------------------
{
nsFileSpecHelpers::LeafReplace(mPath, '/', inLeafName);
} // nsNativeFileSpec::SetLeafName
//----------------------------------------------------------------------------------------
char* nsNativeFileSpec::GetLeafName() const
//----------------------------------------------------------------------------------------
{
return nsFileSpecHelpers::GetLeaf(mPath, '/');
} // nsNativeFileSpec::GetLeafName
//----------------------------------------------------------------------------------------
bool nsNativeFileSpec::Exists() const
//----------------------------------------------------------------------------------------
{
struct stat st;
return 0 == stat(mPath, &st);
} // nsNativeFileSpec::Exists
//----------------------------------------------------------------------------------------
bool nsNativeFileSpec::IsFile() const
//----------------------------------------------------------------------------------------
{
struct stat st;
return 0 == stat(mPath, &st) && S_ISREG(st.st_mode);
} // nsNativeFileSpec::IsFile
//----------------------------------------------------------------------------------------
bool nsNativeFileSpec::IsDirectory() const
//----------------------------------------------------------------------------------------
{
struct stat st;
return 0 == stat(mPath, &st) && S_ISDIR(st.st_mode);
} // nsNativeFileSpec::IsDirectory
//----------------------------------------------------------------------------------------
void nsNativeFileSpec::GetParent(nsNativeFileSpec& outSpec) const
//----------------------------------------------------------------------------------------
{
nsFileSpecHelpers::StringAssign(outSpec.mPath, mPath);
char* cp = strrchr(outSpec.mPath, '/');
if (cp)
*cp = '\0';
} // nsNativeFileSpec::GetParent
//----------------------------------------------------------------------------------------
void nsNativeFileSpec::operator += (const char* inRelativePath)
//----------------------------------------------------------------------------------------
{
if (!inRelativePath || !mPath)
return;
if (mPath[strlen(mPath) - 1] != '/')
char* newPath = nsFileSpecHelpers::ReallocCat(mPath, "/");
SetLeafName(inRelativePath);
} // nsNativeFileSpec::operator +=
//----------------------------------------------------------------------------------------
void nsNativeFileSpec::CreateDirectory(int mode)
//----------------------------------------------------------------------------------------
{
// Note that mPath is canonical!
mkdir(mPath, mode);
} // nsNativeFileSpec::CreateDirectory
//----------------------------------------------------------------------------------------
void nsNativeFileSpec::Delete(bool inRecursive)
// To check if this worked, call Exists() afterwards, see?
//----------------------------------------------------------------------------------------
{
if (IsDirectory())
{
if (inRecursive)
{
for (nsDirectoryIterator i(*this); i; i++)
{
nsNativeFileSpec& child = (nsNativeFileSpec&)i;
child.Delete(inRecursive);
}
}
rmdir(mPath);
}
else
remove(mPath);
} // nsNativeFileSpec::Delete
//========================================================================================
// nsDirectoryIterator
//========================================================================================
//----------------------------------------------------------------------------------------
nsDirectoryIterator::nsDirectoryIterator(
const nsNativeFileSpec& 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

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

@@ -0,0 +1,297 @@
/* -*- 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"
//----------------------------------------------------------------------------------------
void nsFileSpecHelpers::Canonify(char*& ioPath, bool 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;
}
//----------------------------------------------------------------------------------------
nsNativeFileSpec::nsNativeFileSpec(const nsFilePath& inPath)
//----------------------------------------------------------------------------------------
: mPath(NULL)
{
*this = inPath;
}
//----------------------------------------------------------------------------------------
void nsNativeFileSpec::operator = (const nsFilePath& inPath)
//----------------------------------------------------------------------------------------
{
nsFileSpecHelpers::StringAssign(mPath, (const char*)inPath);
nsFileSpecHelpers::UnixToNative(mPath);
} // nsNativeFileSpec::operator =
//----------------------------------------------------------------------------------------
nsFilePath::nsFilePath(const nsNativeFileSpec& inSpec)
//----------------------------------------------------------------------------------------
: mPath(NULL)
{
*this = inSpec;
} // nsFilePath::nsFilePath
//----------------------------------------------------------------------------------------
void nsFilePath::operator = (const nsNativeFileSpec& inSpec)
//----------------------------------------------------------------------------------------
{
nsFileSpecHelpers::StringAssign(mPath, inSpec.mPath);
nsFileSpecHelpers::NativeToUnix(mPath);
} // nsFilePath::operator =
//----------------------------------------------------------------------------------------
void nsNativeFileSpec::SetLeafName(const char* inLeafName)
//----------------------------------------------------------------------------------------
{
nsFileSpecHelpers::LeafReplace(mPath, '\\', inLeafName);
} // nsNativeFileSpec::SetLeafName
//----------------------------------------------------------------------------------------
char* nsNativeFileSpec::GetLeafName() const
//----------------------------------------------------------------------------------------
{
return nsFileSpecHelpers::GetLeaf(mPath, '\\');
} // nsNativeFileSpec::GetLeafName
//----------------------------------------------------------------------------------------
bool nsNativeFileSpec::Exists() const
//----------------------------------------------------------------------------------------
{
struct stat st;
return 0 == stat(mPath, &st);
} // nsNativeFileSpec::Exists
//----------------------------------------------------------------------------------------
bool nsNativeFileSpec::IsFile() const
//----------------------------------------------------------------------------------------
{
struct stat st;
return 0 == stat(mPath, &st) && (_S_IFREG & st.st_mode);
} // nsNativeFileSpec::IsFile
//----------------------------------------------------------------------------------------
bool nsNativeFileSpec::IsDirectory() const
//----------------------------------------------------------------------------------------
{
struct stat st;
return 0 == stat(mPath, &st) && (_S_IFDIR & st.st_mode);
} // nsNativeFileSpec::IsDirectory
//----------------------------------------------------------------------------------------
void nsNativeFileSpec::GetParent(nsNativeFileSpec& outSpec) const
//----------------------------------------------------------------------------------------
{
nsFileSpecHelpers::StringAssign(outSpec.mPath, mPath);
char* cp = strrchr(outSpec.mPath, '\\');
if (cp)
*cp = '\0';
} // nsNativeFileSpec::GetParent
//----------------------------------------------------------------------------------------
void nsNativeFileSpec::operator += (const char* inRelativePath)
//----------------------------------------------------------------------------------------
{
if (!inRelativePath || !mPath)
return;
if (mPath[strlen(mPath) - 1] != '\\')
char* newPath = nsFileSpecHelpers::ReallocCat(mPath, "\\");
SetLeafName(inRelativePath);
} // nsNativeFileSpec::operator +=
//----------------------------------------------------------------------------------------
void nsNativeFileSpec::CreateDirectory(int /*mode*/)
//----------------------------------------------------------------------------------------
{
// Note that mPath is canonical!
mkdir(mPath);
} // nsNativeFileSpec::CreateDirectory
//----------------------------------------------------------------------------------------
void nsNativeFileSpec::Delete(bool inRecursive)
//----------------------------------------------------------------------------------------
{
if (IsDirectory())
{
if (inRecursive)
{
for (nsDirectoryIterator i(*this); i; i++)
{
nsNativeFileSpec& child = (nsNativeFileSpec&)i;
child.Delete(inRecursive);
}
}
rmdir(mPath);
}
else
{
remove(mPath);
}
} // nsNativeFileSpec::Delete
//========================================================================================
// nsDirectoryIterator
//========================================================================================
//----------------------------------------------------------------------------------------
nsDirectoryIterator::nsDirectoryIterator(
const nsNativeFileSpec& 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

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

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

@@ -0,0 +1,401 @@
#include "string.h"
#include "nsFileSpec.h"
#include "nsFileStream.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, nsNativeFileSpec& outParent);
int Delete(nsNativeFileSpec& victim);
int CreateDirectory(nsNativeFileSpec& victim);
int IterateDirectoryChildren(nsNativeFileSpec& startChild);
int CanonicalPath(const char* relativePath);
void Banner(const char* bannerString);
void Passed();
void Failed();
void Inspect();
nsOutputFileStream mConsole;
};
//----------------------------------------------------------------------------------------
void FilesTest::Banner(const char* bannerString)
//----------------------------------------------------------------------------------------
{
mConsole
<< nsEndl
<< "---------------------------" << nsEndl
<< bannerString << " Test" << nsEndl
<< "---------------------------" << nsEndl;
}
//----------------------------------------------------------------------------------------
void FilesTest::Passed()
//----------------------------------------------------------------------------------------
{
mConsole << "Test passed." << 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
nsNativeFileSpec 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;
nsNativeFileSpec mySpec(myTextFilePath);
{
mConsole << "WRITING IDENTICAL OUTPUT TO " << pathAsString << nsEndl << nsEndl;
nsOutputFileStream testStream(myTextFilePath);
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;
mConsole
<< "Replacing \"path\" by \"ZUUL\" in " << pathAsString << nsEndl << nsEndl;
nsIOFileStream testStream(myTextFilePath);
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::InputStream(const char* relativePath)
//----------------------------------------------------------------------------------------
{
nsFilePath myTextFilePath(relativePath, true);
const char* pathAsString = (const char*)myTextFilePath;
mConsole << "READING BACK DATA FROM " << pathAsString << nsEndl << nsEndl;
nsInputFileStream testStream2(myTextFilePath);
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,
nsNativeFileSpec& outParent)
//----------------------------------------------------------------------------------------
{
nsFilePath myTextFilePath(relativePath, true);
const char* pathAsString = (const char*)myTextFilePath;
nsNativeFileSpec 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(nsNativeFileSpec& 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(nsNativeFileSpec& 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(nsNativeFileSpec& startChild)
//----------------------------------------------------------------------------------------
{
// - Test of directory iterator
nsNativeFileSpec 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; i++)
{
char* itemName = ((nsNativeFileSpec&)i).GetLeafName();
mConsole << '\t' << itemName << nsEndl;
delete [] itemName;
}
mConsole << "Backwards listing of " << (const char*)grandparentPath << ":" << nsEndl;
for (nsDirectoryIterator j(grandparent, -1); j; j--)
{
char* itemName = ((nsNativeFileSpec&)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::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");
nsNativeFileSpec 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;
return 0;
}
//----------------------------------------------------------------------------------------
int main()
// For use with DEBUG defined.
//----------------------------------------------------------------------------------------
{
FilesTest tester;
return tester.RunAllTests();
} // main

View File

@@ -0,0 +1,46 @@
#
# 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
REQUIRES = xpcom netlib
CPPSRCS = TestAtoms.cpp TestCRT.cpp FilesTest.cpp
LIBS = \
-lraptorbase \
-lxpcom \
$(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

@@ -0,0 +1,107 @@
/* -*- 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"
#define NETLIB_DLL "netlib.dll"
#define RAPTORBASE_DLL "raptorbase.dll"
#define XPCOM_DLL "xpcom32.dll"
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);
int
main(int argc, char *argv[])
{
nsRepository::RegisterFactory(kNetServiceCID, NETLIB_DLL, PR_FALSE,
PR_FALSE);
nsRepository::RegisterFactory(kEventQueueServiceCID, XPCOM_DLL,
PR_FALSE, PR_FALSE);
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

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

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

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

@@ -0,0 +1,104 @@
#!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
RESFILE = timer.res
PROGRAMS = $(PROG0) $(PROG1) \
!ifdef MODULAR_NETLIB
$(PROG2) \
$(PROG3) \
$(PROG5) \
!endif
$(PROG4) \
$(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
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
# 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

View File

@@ -0,0 +1,32 @@
/* -*- 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 resources_h___
#define resources_h___
#define TIMER_1SECOND 40000
#define TIMER_5SECOND 40001
#define TIMER_10SECOND 40002
#define TIMER_1REPEAT 40003
#define TIMER_5REPEAT 40004
#define TIMER_10REPEAT 40005
#define TIMER_CANCEL 40006
#define TIMER_EXIT 40010
#endif /* resources_h___ */

View File

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

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

890
mozilla/build/autoconf/config.guess vendored Executable file
View File

@@ -0,0 +1,890 @@
#! /bin/sh
# Attempt to guess a canonical system name.
# Copyright (C) 1992, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
#
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# Written by Per Bothner <bothner@cygnus.com>.
# The master version of this file is at the FSF in /home/gd/gnu/lib.
#
# This script attempts to guess a canonical system name similar to
# config.sub. If it succeeds, it prints the system name on stdout, and
# exits with 0. Otherwise, it exits with 1.
#
# The plan is that this can be called by configure scripts if you
# don't specify an explicit system type (host/target name).
#
# Only a few systems have been added to this list; please add others
# (but try to keep the structure clean).
#
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
# (ghazi@noc.rutgers.edu 8/24/94.)
if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
PATH=$PATH:/.attbin ; export PATH
fi
UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
trap 'rm -f dummy.c dummy.o dummy; exit 1' 1 2 15
# Note: order is significant - the case branches are not exclusive.
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
alpha:OSF1:*:*)
if test $UNAME_RELEASE = "V4.0"; then
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
fi
# A Vn.n version is a released version.
# A Tn.n version is a released field test version.
# A Xn.n version is an unreleased experimental baselevel.
# 1.2 uses "1.2" for uname -r.
cat <<EOF >dummy.s
.globl main
.ent main
main:
.frame \$30,0,\$26,0
.prologue 0
.long 0x47e03d80 # implver $0
lda \$2,259
.long 0x47e20c21 # amask $2,$1
srl \$1,8,\$2
sll \$2,2,\$2
sll \$0,3,\$0
addl \$1,\$0,\$0
addl \$2,\$0,\$0
ret \$31,(\$26),1
.end main
EOF
${CC-cc} dummy.s -o dummy 2>/dev/null
if test "$?" = 0 ; then
./dummy
case "$?" in
7)
UNAME_MACHINE="alpha"
;;
15)
UNAME_MACHINE="alphaev5"
;;
14)
UNAME_MACHINE="alphaev56"
;;
10)
UNAME_MACHINE="alphapca56"
;;
16)
UNAME_MACHINE="alphaev6"
;;
esac
fi
rm -f dummy.s dummy
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr [[A-Z]] [[a-z]]`
exit 0 ;;
21064:Windows_NT:50:3)
echo alpha-dec-winnt3.5
exit 0 ;;
Amiga*:UNIX_System_V:4.0:*)
echo m68k-cbm-sysv4
exit 0;;
amiga:NetBSD:*:*)
echo m68k-cbm-netbsd${UNAME_RELEASE}
exit 0 ;;
amiga:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
arc64:OpenBSD:*:*)
echo mips64el-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
arc:OpenBSD:*:*)
echo mipsel-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
hkmips:OpenBSD:*:*)
echo mips-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
pmax:OpenBSD:*:*)
echo mipsel-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
sgi:OpenBSD:*:*)
echo mips-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
wgrisc:OpenBSD:*:*)
echo mipsel-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
echo arm-acorn-riscix${UNAME_RELEASE}
exit 0;;
arm32:NetBSD:*:*)
echo arm-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
exit 0 ;;
SR2?01:HI-UX/MPP:*:*)
echo hppa1.1-hitachi-hiuxmpp
exit 0;;
Pyramid*:OSx*:*:*|MIS*:OSx*:*:*)
# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
if test "`(/bin/universe) 2>/dev/null`" = att ; then
echo pyramid-pyramid-sysv3
else
echo pyramid-pyramid-bsd
fi
exit 0 ;;
NILE:*:*:dcosx)
echo pyramid-pyramid-svr4
exit 0 ;;
sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit 0 ;;
i86pc:SunOS:5.*:*)
echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit 0 ;;
sun4*:SunOS:6*:*)
# According to config.sub, this is the proper way to canonicalize
# SunOS6. Hard to guess exactly what SunOS6 will be like, but
# it's likely to be more like Solaris than SunOS4.
echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit 0 ;;
sun4*:SunOS:*:*)
case "`/usr/bin/arch -k`" in
Series*|S4*)
UNAME_RELEASE=`uname -v`
;;
esac
# Japanese Language versions have a version number like `4.1.3-JL'.
echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
exit 0 ;;
sun3*:SunOS:*:*)
echo m68k-sun-sunos${UNAME_RELEASE}
exit 0 ;;
sun*:*:4.2BSD:*)
UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
case "`/bin/arch`" in
sun3)
echo m68k-sun-sunos${UNAME_RELEASE}
;;
sun4)
echo sparc-sun-sunos${UNAME_RELEASE}
;;
esac
exit 0 ;;
aushp:SunOS:*:*)
echo sparc-auspex-sunos${UNAME_RELEASE}
exit 0 ;;
atari*:NetBSD:*:*)
echo m68k-atari-netbsd${UNAME_RELEASE}
exit 0 ;;
atari*:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
sun3*:NetBSD:*:*)
echo m68k-sun-netbsd${UNAME_RELEASE}
exit 0 ;;
sun3*:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
mac68k:NetBSD:*:*)
echo m68k-apple-netbsd${UNAME_RELEASE}
exit 0 ;;
mac68k:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
mvme68k:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
mvme88k:OpenBSD:*:*)
echo m88k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
powerpc:machten:*:*)
echo powerpc-apple-machten${UNAME_RELEASE}
exit 0 ;;
RISC*:Mach:*:*)
echo mips-dec-mach_bsd4.3
exit 0 ;;
RISC*:ULTRIX:*:*)
echo mips-dec-ultrix${UNAME_RELEASE}
exit 0 ;;
VAX*:ULTRIX*:*:*)
echo vax-dec-ultrix${UNAME_RELEASE}
exit 0 ;;
2020:CLIX:*:*)
echo clipper-intergraph-clix${UNAME_RELEASE}
exit 0 ;;
mips:*:*:UMIPS | mips:*:*:RISCos)
sed 's/^ //' << EOF >dummy.c
int main (argc, argv) int argc; char **argv; {
#if defined (host_mips) && defined (MIPSEB)
#if defined (SYSTYPE_SYSV)
printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
#endif
#if defined (SYSTYPE_SVR4)
printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
#endif
#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
#endif
#endif
exit (-1);
}
EOF
${CC-cc} dummy.c -o dummy \
&& ./dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
&& rm dummy.c dummy && exit 0
rm -f dummy.c dummy
echo mips-mips-riscos${UNAME_RELEASE}
exit 0 ;;
Night_Hawk:Power_UNIX:*:*)
echo powerpc-harris-powerunix
exit 0 ;;
m88k:CX/UX:7*:*)
echo m88k-harris-cxux7
exit 0 ;;
m88k:*:4*:R4*)
echo m88k-motorola-sysv4
exit 0 ;;
m88k:*:3*:R3*)
echo m88k-motorola-sysv3
exit 0 ;;
AViiON:dgux:*:*)
# DG/UX returns AViiON for all architectures
UNAME_PROCESSOR=`/usr/bin/uname -p`
if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88110 ] ; then
if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \
-o ${TARGET_BINARY_INTERFACE}x = x ] ; then
echo m88k-dg-dgux${UNAME_RELEASE}
else
echo m88k-dg-dguxbcs${UNAME_RELEASE}
fi
else echo i586-dg-dgux${UNAME_RELEASE}
fi
exit 0 ;;
M88*:DolphinOS:*:*) # DolphinOS (SVR3)
echo m88k-dolphin-sysv3
exit 0 ;;
M88*:*:R3*:*)
# Delta 88k system running SVR3
echo m88k-motorola-sysv3
exit 0 ;;
XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
echo m88k-tektronix-sysv3
exit 0 ;;
Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
echo m68k-tektronix-bsd
exit 0 ;;
*:IRIX*:*:*)
echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
exit 0 ;;
????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX '
i?86:AIX:*:*)
echo i386-ibm-aix
exit 0 ;;
*:AIX:2:3)
if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
sed 's/^ //' << EOF >dummy.c
#include <sys/systemcfg.h>
main()
{
if (!__power_pc())
exit(1);
puts("powerpc-ibm-aix3.2.5");
exit(0);
}
EOF
${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
rm -f dummy.c dummy
echo rs6000-ibm-aix3.2.5
elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
echo rs6000-ibm-aix3.2.4
else
echo rs6000-ibm-aix3.2
fi
exit 0 ;;
*:AIX:*:4)
if /usr/sbin/lsattr -EHl proc0 | grep POWER >/dev/null 2>&1; then
IBM_ARCH=rs6000
else
IBM_ARCH=powerpc
fi
if [ -x /usr/bin/oslevel ] ; then
IBM_REV=`/usr/bin/oslevel`
else
IBM_REV=4.${UNAME_RELEASE}
fi
echo ${IBM_ARCH}-ibm-aix${IBM_REV}
exit 0 ;;
*:AIX:*:*)
echo rs6000-ibm-aix
exit 0 ;;
ibmrt:4.4BSD:*|romp-ibm:BSD:*)
echo romp-ibm-bsd4.4
exit 0 ;;
ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC NetBSD and
echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
exit 0 ;; # report: romp-ibm BSD 4.3
*:BOSX:*:*)
echo rs6000-bull-bosx
exit 0 ;;
DPX/2?00:B.O.S.:*:*)
echo m68k-bull-sysv3
exit 0 ;;
9000/[34]??:4.3bsd:1.*:*)
echo m68k-hp-bsd
exit 0 ;;
hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
echo m68k-hp-bsd4.4
exit 0 ;;
9000/[3478]??:HP-UX:*:*)
case "${UNAME_MACHINE}" in
9000/31? ) HP_ARCH=m68000 ;;
9000/[34]?? ) HP_ARCH=m68k ;;
9000/7?? | 9000/8?[1679] ) HP_ARCH=hppa1.1 ;;
9000/8?? ) HP_ARCH=hppa1.0 ;;
esac
HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
echo ${HP_ARCH}-hp-hpux${HPUX_REV}
exit 0 ;;
3050*:HI-UX:*:*)
sed 's/^ //' << EOF >dummy.c
#include <unistd.h>
int
main ()
{
long cpu = sysconf (_SC_CPU_VERSION);
/* The order matters, because CPU_IS_HP_MC68K erroneously returns
true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
results, however. */
if (CPU_IS_PA_RISC (cpu))
{
switch (cpu)
{
case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
default: puts ("hppa-hitachi-hiuxwe2"); break;
}
}
else if (CPU_IS_HP_MC68K (cpu))
puts ("m68k-hitachi-hiuxwe2");
else puts ("unknown-hitachi-hiuxwe2");
exit (0);
}
EOF
${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
rm -f dummy.c dummy
echo unknown-hitachi-hiuxwe2
exit 0 ;;
9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
echo hppa1.1-hp-bsd
exit 0 ;;
9000/8??:4.3bsd:*:*)
echo hppa1.0-hp-bsd
exit 0 ;;
hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
echo hppa1.1-hp-osf
exit 0 ;;
hp8??:OSF1:*:*)
echo hppa1.0-hp-osf
exit 0 ;;
i?86:OSF1:*:*)
if [ -x /usr/sbin/sysversion ] ; then
echo ${UNAME_MACHINE}-unknown-osf1mk
else
echo ${UNAME_MACHINE}-unknown-osf1
fi
exit 0 ;;
parisc*:Lites*:*:*)
echo hppa1.1-hp-lites
exit 0 ;;
C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
echo c1-convex-bsd
exit 0 ;;
C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
if getsysinfo -f scalar_acc
then echo c32-convex-bsd
else echo c2-convex-bsd
fi
exit 0 ;;
C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
echo c34-convex-bsd
exit 0 ;;
C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
echo c38-convex-bsd
exit 0 ;;
C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
echo c4-convex-bsd
exit 0 ;;
CRAY*X-MP:*:*:*)
echo xmp-cray-unicos
exit 0 ;;
CRAY*Y-MP:*:*:*)
echo ymp-cray-unicos${UNAME_RELEASE}
exit 0 ;;
CRAY*[A-Z]90:*:*:*)
echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
-e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
exit 0 ;;
CRAY*TS:*:*:*)
echo t90-cray-unicos${UNAME_RELEASE}
exit 0 ;;
CRAY-2:*:*:*)
echo cray2-cray-unicos
exit 0 ;;
F300:UNIX_System_V:*:*)
FUJITSU_SYS=`uname -p | tr [A-Z] [a-z] | sed -e 's/\///'`
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit 0 ;;
F301:UNIX_System_V:*:*)
echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'`
exit 0 ;;
hp3[0-9][05]:NetBSD:*:*)
echo m68k-hp-netbsd${UNAME_RELEASE}
exit 0 ;;
hp300:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
i?86:BSD/386:*:* | *:BSD/OS:*:*)
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
exit 0 ;;
*:FreeBSD:*:*)
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
exit 0 ;;
*:NetBSD:*:*)
echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
exit 0 ;;
*:OpenBSD:*:*)
echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
exit 0 ;;
i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin32
exit 0 ;;
i*:MINGW*:*)
echo ${UNAME_MACHINE}-pc-mingw32
exit 0 ;;
p*:CYGWIN*:*)
echo powerpcle-unknown-cygwin32
exit 0 ;;
prep*:SunOS:5.*:*)
echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit 0 ;;
*:GNU:*:*)
echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
exit 0 ;;
*:Linux:*:*)
# uname on the ARM produces all sorts of strangeness, and we need to
# filter it out.
case "$UNAME_MACHINE" in
arm* | sa110*) UNAME_MACHINE="arm" ;;
esac
# The BFD linker knows what the default object file format is, so
# first see if it will tell us.
ld_help_string=`ld --help 2>&1`
ld_supported_emulations=`echo $ld_help_string \
| sed -ne '/supported emulations:/!d
s/[ ][ ]*/ /g
s/.*supported emulations: *//
s/ .*//
p'`
case "$ld_supported_emulations" in
i?86linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" ; exit 0 ;;
i?86coff) echo "${UNAME_MACHINE}-pc-linux-gnucoff" ; exit 0 ;;
sparclinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
armlinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
m68klinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
elf32ppc) echo "powerpc-unknown-linux-gnu" ; exit 0 ;;
esac
if test "${UNAME_MACHINE}" = "alpha" ; then
sed 's/^ //' <<EOF >dummy.s
.globl main
.ent main
main:
.frame \$30,0,\$26,0
.prologue 0
.long 0x47e03d80 # implver $0
lda \$2,259
.long 0x47e20c21 # amask $2,$1
srl \$1,8,\$2
sll \$2,2,\$2
sll \$0,3,\$0
addl \$1,\$0,\$0
addl \$2,\$0,\$0
ret \$31,(\$26),1
.end main
EOF
LIBC=""
${CC-cc} dummy.s -o dummy 2>/dev/null
if test "$?" = 0 ; then
./dummy
case "$?" in
7)
UNAME_MACHINE="alpha"
;;
15)
UNAME_MACHINE="alphaev5"
;;
14)
UNAME_MACHINE="alphaev56"
;;
10)
UNAME_MACHINE="alphapca56"
;;
16)
UNAME_MACHINE="alphaev6"
;;
esac
objdump --private-headers dummy | \
grep ld.so.1 > /dev/null
if test "$?" = 0 ; then
LIBC="libc1"
fi
fi
rm -f dummy.s dummy
echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0
elif test "${UNAME_MACHINE}" = "mips" ; then
cat >dummy.c <<EOF
main(argc, argv)
int argc;
char *argv[];
{
#ifdef __MIPSEB__
printf ("%s-unknown-linux-gnu\n", argv[1]);
#endif
#ifdef __MIPSEL__
printf ("%sel-unknown-linux-gnu\n", argv[1]);
#endif
return 0;
}
EOF
${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0
rm -f dummy.c dummy
else
# Either a pre-BFD a.out linker (linux-gnuoldld)
# or one that does not give us useful --help.
# GCC wants to distinguish between linux-gnuoldld and linux-gnuaout.
# If ld does not provide *any* "supported emulations:"
# that means it is gnuoldld.
echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:"
test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
case "${UNAME_MACHINE}" in
i?86)
VENDOR=pc;
;;
*)
VENDOR=unknown;
;;
esac
# Determine whether the default compiler is a.out or elf
cat >dummy.c <<EOF
#include <features.h>
main(argc, argv)
int argc;
char *argv[];
{
#ifdef __ELF__
# ifdef __GLIBC__
# if __GLIBC__ >= 2
printf ("%s-${VENDOR}-linux-gnu\n", argv[1]);
# else
printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
# endif
# else
printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
# endif
#else
printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]);
#endif
return 0;
}
EOF
${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0
rm -f dummy.c dummy
fi ;;
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions
# are messed up and put the nodename in both sysname and nodename.
i?86:DYNIX/ptx:4*:*)
echo i386-sequent-sysv4
exit 0 ;;
i?86:UNIX_SV:4.2MP:2.*)
# Unixware is an offshoot of SVR4, but it has its own version
# number series starting with 2...
# I am not positive that other SVR4 systems won't match this,
# I just have to hope. -- rms.
# Use sysv4.2uw... so that sysv4* matches it.
echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
exit 0 ;;
i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*)
if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE}
else
echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
fi
exit 0 ;;
i?86:*:3.2:*)
if test -f /usr/options/cb.name; then
UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
elif /bin/uname -X 2>/dev/null >/dev/null ; then
UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
(/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
(/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
&& UNAME_MACHINE=i586
echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
else
echo ${UNAME_MACHINE}-pc-sysv32
fi
exit 0 ;;
pc:*:*:*)
# uname -m prints for DJGPP always 'pc', but it prints nothing about
# the processor, so we play safe by assuming i386.
echo i386-pc-msdosdjgpp
exit 0 ;;
Intel:Mach:3*:*)
echo i386-pc-mach3
exit 0 ;;
paragon:*:*:*)
echo i860-intel-osf1
exit 0 ;;
i860:*:4.*:*) # i860-SVR4
if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
else # Add other i860-SVR4 vendors below as they are discovered.
echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
fi
exit 0 ;;
mini*:CTIX:SYS*5:*)
# "miniframe"
echo m68010-convergent-sysv
exit 0 ;;
M68*:*:R3V[567]*:*)
test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
OS_REL=''
test -r /etc/.relid \
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
&& echo i486-ncr-sysv4.3${OS_REL} && exit 0
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
&& echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
&& echo i486-ncr-sysv4 && exit 0 ;;
m68*:LynxOS:2.*:*)
echo m68k-unknown-lynxos${UNAME_RELEASE}
exit 0 ;;
mc68030:UNIX_System_V:4.*:*)
echo m68k-atari-sysv4
exit 0 ;;
i?86:LynxOS:2.*:*)
echo i386-unknown-lynxos${UNAME_RELEASE}
exit 0 ;;
TSUNAMI:LynxOS:2.*:*)
echo sparc-unknown-lynxos${UNAME_RELEASE}
exit 0 ;;
rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*)
echo rs6000-unknown-lynxos${UNAME_RELEASE}
exit 0 ;;
SM[BE]S:UNIX_SV:*:*)
echo mips-dde-sysv${UNAME_RELEASE}
exit 0 ;;
RM*:SINIX-*:*:*)
echo mips-sni-sysv4
exit 0 ;;
*:SINIX-*:*:*)
if uname -p 2>/dev/null >/dev/null ; then
UNAME_MACHINE=`(uname -p) 2>/dev/null`
echo ${UNAME_MACHINE}-sni-sysv4
else
echo ns32k-sni-sysv
fi
exit 0 ;;
PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
# says <Richard.M.Bartel@ccMail.Census.GOV>
echo i586-unisys-sysv4
exit 0 ;;
*:UNIX_System_V:4*:FTX*)
# From Gerald Hewes <hewes@openmarket.com>.
# How about differentiating between stratus architectures? -djm
echo hppa1.1-stratus-sysv4
exit 0 ;;
*:*:*:FTX*)
# From seanf@swdc.stratus.com.
echo i860-stratus-sysv4
exit 0 ;;
mc68*:A/UX:*:*)
echo m68k-apple-aux${UNAME_RELEASE}
exit 0 ;;
news*:NEWS-OS:*:6*)
echo mips-sony-newsos6
exit 0 ;;
R3000:*System_V*:*:* | R4000:UNIX_SYSV:*:*)
if [ -d /usr/nec ]; then
echo mips-nec-sysv${UNAME_RELEASE}
else
echo mips-unknown-sysv${UNAME_RELEASE}
fi
exit 0 ;;
esac
#echo '(No uname command or uname output not recognized.)' 1>&2
#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
cat >dummy.c <<EOF
#ifdef _SEQUENT_
# include <sys/types.h>
# include <sys/utsname.h>
#endif
main ()
{
#if defined (sony)
#if defined (MIPSEB)
/* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
I don't know.... */
printf ("mips-sony-bsd\n"); exit (0);
#else
#include <sys/param.h>
printf ("m68k-sony-newsos%s\n",
#ifdef NEWSOS4
"4"
#else
""
#endif
); exit (0);
#endif
#endif
#if defined (__arm) && defined (__acorn) && defined (__unix)
printf ("arm-acorn-riscix"); exit (0);
#endif
#if defined (hp300) && !defined (hpux)
printf ("m68k-hp-bsd\n"); exit (0);
#endif
#if defined (NeXT)
#if !defined (__ARCHITECTURE__)
#define __ARCHITECTURE__ "m68k"
#endif
int version;
version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
exit (0);
#endif
#if defined (MULTIMAX) || defined (n16)
#if defined (UMAXV)
printf ("ns32k-encore-sysv\n"); exit (0);
#else
#if defined (CMU)
printf ("ns32k-encore-mach\n"); exit (0);
#else
printf ("ns32k-encore-bsd\n"); exit (0);
#endif
#endif
#endif
#if defined (__386BSD__)
printf ("i386-pc-bsd\n"); exit (0);
#endif
#if defined (sequent)
#if defined (i386)
printf ("i386-sequent-dynix\n"); exit (0);
#endif
#if defined (ns32000)
printf ("ns32k-sequent-dynix\n"); exit (0);
#endif
#endif
#if defined (_SEQUENT_)
struct utsname un;
uname(&un);
if (strncmp(un.version, "V2", 2) == 0) {
printf ("i386-sequent-ptx2\n"); exit (0);
}
if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
printf ("i386-sequent-ptx1\n"); exit (0);
}
printf ("i386-sequent-ptx\n"); exit (0);
#endif
#if defined (vax)
#if !defined (ultrix)
printf ("vax-dec-bsd\n"); exit (0);
#else
printf ("vax-dec-ultrix\n"); exit (0);
#endif
#endif
#if defined (alliant) && defined (i860)
printf ("i860-alliant-bsd\n"); exit (0);
#endif
exit (1);
}
EOF
${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy && rm dummy.c dummy && exit 0
rm -f dummy.c dummy
# Apollos put the system type in the environment.
test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
# Convex versions that predate uname can use getsysinfo(1)
if [ -x /usr/convex/getsysinfo ]
then
case `getsysinfo -f cpu_type` in
c1*)
echo c1-convex-bsd
exit 0 ;;
c2*)
if getsysinfo -f scalar_acc
then echo c32-convex-bsd
else echo c2-convex-bsd
fi
exit 0 ;;
c34*)
echo c34-convex-bsd
exit 0 ;;
c38*)
echo c38-convex-bsd
exit 0 ;;
c4*)
echo c4-convex-bsd
exit 0 ;;
esac
fi
#echo '(Unable to guess system type)' 1>&2
exit 1

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