Browse Source

Revert "remove excluded files"

This reverts commit fd0439a56e.
roytam1 6 months ago
parent
commit
d64fda91f7
  1. BIN
      palemoon/branding/beta/VisualElements_150.png
  2. BIN
      palemoon/branding/beta/VisualElements_70.png
  3. BIN
      palemoon/branding/beta/appname.bmp
  4. 10
      palemoon/branding/beta/branding.nsi
  5. 1
      palemoon/branding/beta/configure.sh
  6. BIN
      palemoon/branding/beta/content/about-background.jpg
  7. BIN
      palemoon/branding/beta/content/about-logo.png
  8. BIN
      palemoon/branding/beta/content/about-logo@2x.png
  9. BIN
      palemoon/branding/beta/content/about-wordmark.png
  10. BIN
      palemoon/branding/beta/content/about.png
  11. 49
      palemoon/branding/beta/content/aboutDialog.css
  12. BIN
      palemoon/branding/beta/content/icon48.png
  13. BIN
      palemoon/branding/beta/content/icon64.png
  14. 12
      palemoon/branding/beta/content/jar.mn
  15. 3
      palemoon/branding/beta/content/moz.build
  16. BIN
      palemoon/branding/beta/default16.png
  17. BIN
      palemoon/branding/beta/default32.png
  18. BIN
      palemoon/branding/beta/default48.png
  19. BIN
      palemoon/branding/beta/document.ico
  20. BIN
      palemoon/branding/beta/firefox.ico
  21. 4
      palemoon/branding/beta/locales/en-US/brand.dtd
  22. 5
      palemoon/branding/beta/locales/en-US/brand.properties
  23. 8
      palemoon/branding/beta/locales/jar.mn
  24. 5
      palemoon/branding/beta/locales/moz.build
  25. 10
      palemoon/branding/beta/moz.build
  26. BIN
      palemoon/branding/beta/mozicon128.png
  27. 8
      palemoon/branding/beta/palemoon.VisualElementsManifest.xml
  28. 44
      palemoon/branding/beta/pref/palemoon-branding.js
  29. BIN
      palemoon/branding/beta/wizHeader.bmp
  30. BIN
      palemoon/branding/beta/wizHeaderRTL.bmp
  31. BIN
      palemoon/branding/beta/wizWatermark.bmp
  32. BIN
      palemoon/branding/unstable/VisualElements_150.png
  33. BIN
      palemoon/branding/unstable/VisualElements_70.png
  34. BIN
      palemoon/branding/unstable/appname.bmp
  35. 10
      palemoon/branding/unstable/branding.nsi
  36. 2
      palemoon/branding/unstable/configure.sh
  37. BIN
      palemoon/branding/unstable/content/about-background.jpg
  38. BIN
      palemoon/branding/unstable/content/about-logo.png
  39. BIN
      palemoon/branding/unstable/content/about-logo@2x.png
  40. BIN
      palemoon/branding/unstable/content/about-wordmark.png
  41. BIN
      palemoon/branding/unstable/content/about.png
  42. 49
      palemoon/branding/unstable/content/aboutDialog.css
  43. BIN
      palemoon/branding/unstable/content/icon48.png
  44. BIN
      palemoon/branding/unstable/content/icon64.png
  45. 12
      palemoon/branding/unstable/content/jar.mn
  46. 3
      palemoon/branding/unstable/content/moz.build
  47. BIN
      palemoon/branding/unstable/default16.png
  48. BIN
      palemoon/branding/unstable/default32.png
  49. BIN
      palemoon/branding/unstable/default48.png
  50. BIN
      palemoon/branding/unstable/disk.icns
  51. BIN
      palemoon/branding/unstable/document.icns
  52. BIN
      palemoon/branding/unstable/document.ico
  53. BIN
      palemoon/branding/unstable/dsstore
  54. BIN
      palemoon/branding/unstable/firefox.icns
  55. BIN
      palemoon/branding/unstable/firefox.ico
  56. 4
      palemoon/branding/unstable/locales/en-US/brand.dtd
  57. 5
      palemoon/branding/unstable/locales/en-US/brand.properties
  58. 8
      palemoon/branding/unstable/locales/jar.mn
  59. 5
      palemoon/branding/unstable/locales/moz.build
  60. 9
      palemoon/branding/unstable/moz.build
  61. BIN
      palemoon/branding/unstable/mozicon128.png
  62. 8
      palemoon/branding/unstable/palemoon.VisualElementsManifest.xml
  63. 59
      palemoon/branding/unstable/pref/palemoon-branding.js
  64. BIN
      palemoon/branding/unstable/wizHeader.bmp
  65. BIN
      palemoon/branding/unstable/wizHeaderRTL.bmp
  66. BIN
      palemoon/branding/unstable/wizWatermark.bmp
  67. 1
      platform/.gitattributes
  68. 23
      platform/db/mork/build/moz.build
  69. 30
      platform/db/mork/build/nsIMdbFactoryFactory.h
  70. 21
      platform/db/mork/build/nsMorkCID.h
  71. 56
      platform/db/mork/build/nsMorkFactory.cpp
  72. 9
      platform/db/mork/moz.build
  73. 2512
      platform/db/mork/public/mdb.h
  74. 8
      platform/db/mork/public/moz.build
  75. 247
      platform/db/mork/src/mork.h
  76. 297
      platform/db/mork/src/morkArray.cpp
  77. 98
      platform/db/mork/src/morkArray.h
  78. 523
      platform/db/mork/src/morkAtom.cpp
  79. 365
      platform/db/mork/src/morkAtom.h
  80. 427
      platform/db/mork/src/morkAtomMap.cpp
  81. 365
      platform/db/mork/src/morkAtomMap.h
  82. 270
      platform/db/mork/src/morkAtomSpace.cpp
  83. 219
      platform/db/mork/src/morkAtomSpace.h
  84. 425
      platform/db/mork/src/morkBead.cpp
  85. 245
      platform/db/mork/src/morkBead.h
  86. 110
      platform/db/mork/src/morkBlob.cpp
  87. 141
      platform/db/mork/src/morkBlob.h
  88. 1031
      platform/db/mork/src/morkBuilder.cpp
  89. 303
      platform/db/mork/src/morkBuilder.h
  90. 114
      platform/db/mork/src/morkCell.cpp
  91. 89
      platform/db/mork/src/morkCell.h
  92. 530
      platform/db/mork/src/morkCellObject.cpp
  93. 173
      platform/db/mork/src/morkCellObject.h
  94. 233
      platform/db/mork/src/morkCh.cpp
  95. 126
      platform/db/mork/src/morkCh.h
  96. 201
      platform/db/mork/src/morkConfig.cpp
  97. 148
      platform/db/mork/src/morkConfig.h
  98. 201
      platform/db/mork/src/morkCursor.cpp
  99. 127
      platform/db/mork/src/morkCursor.h
  100. 288
      platform/db/mork/src/morkDeque.cpp
  101. Some files were not shown because too many files have changed in this diff Show More

BIN
palemoon/branding/beta/VisualElements_150.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

BIN
palemoon/branding/beta/VisualElements_70.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

BIN
palemoon/branding/beta/appname.bmp

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

10
palemoon/branding/beta/branding.nsi

@ -0,0 +1,10 @@
# NSIS branding defines for official beta builds.
# BrandFullNameInternal is used for some registry and file system values
# instead of BrandFullName and typically should not be modified.
!define BrandFullNameInternal "Pale Moon"
!define CompanyName "Moonchild Productions"
!define URLInfoAbout "http://www.palemoon.org/"
!define URLUpdateInfo "http://www.palemoon.org/releasenotes.shtml"
!define HelpLink "https://forum.palemoon.org/viewforum.php?f=24"
!define URLSystemRequirements "http://www.palemoon.org/download.shtml"

1
palemoon/branding/beta/configure.sh

@ -0,0 +1 @@
MOZ_APP_DISPLAYNAME="Pale Moon"

BIN
palemoon/branding/beta/content/about-background.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

BIN
palemoon/branding/beta/content/about-logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

BIN
palemoon/branding/beta/content/about-logo@2x.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 136 KiB

BIN
palemoon/branding/beta/content/about-wordmark.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
palemoon/branding/beta/content/about.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

49
palemoon/branding/beta/content/aboutDialog.css

@ -0,0 +1,49 @@
#aboutPMDialogContainer {
background-image: url("chrome://branding/content/about-background.jpg");
background-repeat: no-repeat;
background-color: #D5BC9A;
color: #202010;
}
#aboutHeaderBox {
background-image: url("chrome://branding/content/about-wordmark.png");
background-repeat: no-repeat;
background-position: center center;
height: 44px;
}
#aboutVersionBox {
text-shadow: 1px 1px 0px #D5BC9A;
}
#aboutTextBox {
animation: 3s fadeIn;
animation-fill-mode: forwards;
text-shadow: 1px 1px 0px #D5BC9A;
color: #202010;
}
@keyframes fadeIn {
0% {
opacity: 0;
}
50% {
opacity: 0;
}
100% {
opacity: 1;
}
}
#aboutLinkBox {
padding: 15px 10px 0;
}
#aboutPMtrademark {
font-size: 10px;
text-align: center;
color: #C0C0C0;
text-shadow: 1px 1px 0px #000000;
margin-top: 10px;
margin-bottom: 10px;
}

BIN
palemoon/branding/beta/content/icon48.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

BIN
palemoon/branding/beta/content/icon64.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

12
palemoon/branding/beta/content/jar.mn

@ -0,0 +1,12 @@
browser.jar:
% content branding %content/branding/ contentaccessible=yes
content/branding/about.png (about.png)
content/branding/about-background.jpg (about-background.jpg)
content/branding/about-logo.png (about-logo.png)
content/branding/about-logo@2x.png (about-logo@2x.png)
content/branding/about-wordmark.png (about-wordmark.png)
content/branding/icon48.png (icon48.png)
content/branding/icon64.png (icon64.png)
content/branding/icon16.png (../default16.png)
content/branding/icon32.png (../default32.png)
content/branding/aboutDialog.css (aboutDialog.css)

3
palemoon/branding/beta/content/moz.build

@ -0,0 +1,3 @@
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
JAR_MANIFESTS += ['jar.mn']

BIN
palemoon/branding/beta/default16.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 884 B

BIN
palemoon/branding/beta/default32.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
palemoon/branding/beta/default48.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

BIN
palemoon/branding/beta/document.ico

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

BIN
palemoon/branding/beta/firefox.ico

Binary file not shown.

After

Width:  |  Height:  |  Size: 350 KiB

4
palemoon/branding/beta/locales/en-US/brand.dtd

@ -0,0 +1,4 @@
<!ENTITY brandShortName "Pale Moon">
<!ENTITY brandFullName "Pale Moon">
<!ENTITY vendorShortName "Moonchild">
<!ENTITY trademarkInfo.part1 "The Pale Moon logo and project names are trademarks of Moonchild Productions (M.C. Straver BASc). All rights reserved.">

5
palemoon/branding/beta/locales/en-US/brand.properties

@ -0,0 +1,5 @@
brandShortName=Pale Moon
brandFullName=Pale Moon
vendorShortName=Moonchild
syncBrandShortName=Sync

8
palemoon/branding/beta/locales/jar.mn

@ -0,0 +1,8 @@
#filter substitution
@AB_CD@.jar:
% locale branding @AB_CD@ %locale/branding/
# Unofficial branding only exists in en-US
locale/branding/brand.dtd (en-US/brand.dtd)
locale/branding/brand.properties (en-US/brand.properties)
locale/branding/browserconfig.properties (../../shared/locales/browserconfig.properties)

5
palemoon/branding/beta/locales/moz.build

@ -0,0 +1,5 @@
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
DEFINES['MOZ_DISTRIBUTION_ID_UNQUOTED'] = CONFIG['MOZ_DISTRIBUTION_ID']
JAR_MANIFESTS += ['jar.mn']

10
palemoon/branding/beta/moz.build

@ -0,0 +1,10 @@
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
DIRS += ['content', 'locales']
DIST_SUBDIR = 'browser'
export('DIST_SUBDIR')
include('../shared/branding.mozbuild')
ApplicationBranding()

BIN
palemoon/branding/beta/mozicon128.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

8
palemoon/branding/beta/palemoon.VisualElementsManifest.xml

@ -0,0 +1,8 @@
<Application xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
<VisualElements
ShowNameOnSquare150x150Logo='on'
Square150x150Logo='browser\VisualElements\VisualElements_150.png'
Square70x70Logo='browser\VisualElements\VisualElements_70.png'
ForegroundText='light'
BackgroundColor='#14141A'/>
</Application>

44
palemoon/branding/beta/pref/palemoon-branding.js

@ -0,0 +1,44 @@
#filter substitution
#filter emptyLines
#include ../../shared/pref/preferences.inc
#include ../../shared/pref/uaoverrides.inc
pref("startup.homepage_override_url","http://www.palemoon.org/releasenotes.shtml");
pref("app.releaseNotesURL", "http://www.palemoon.org/releasenotes.shtml");
// Enable Firefox compatmode by default.
pref("general.useragent.compatMode", 2);
pref("general.useragent.compatMode.gecko", true);
pref("general.useragent.compatMode.firefox", true);
// Enable dynamic UA updates
pref("general.useragent.updates.enabled", true);
pref("general.useragent.updates.interval", 86400); // Once per day
pref("general.useragent.updates.retry", 7200); // Retry getting update every 2 hours if failed
pref("general.useragent.updates.url", "https://dua.palemoon.org/?app=palemoon&version=%APP_VERSION%&channel=%CHANNEL%");
// Geolocation
pref("geo.wifi.uri", "https://pro.ip-api.com/json/?fields=lat,lon,status,message&key=K3TirHYiysBjnmD");
// ========================= updates ========================
#ifdef MOZ_UPDATER
// Updates enabled
pref("app.update.enabled", true);
pref("app.update.cert.checkAttributes", true);
// Interval: Time between checks for a new version (in seconds) -- 2 days for Pale Moon
pref("app.update.interval", 172800);
pref("app.update.promptWaitTime", 86400);
// URL user can browse to manually if for some reason all update
// installation attempts fail.
pref("app.update.url.manual", "http://www.palemoon.org/");
// A default value for the "More information about this update" link
// supplied in the "An update is available" page of the update wizard.
pref("app.update.url.details", "http://www.palemoon.org/releasenotes.shtml");
#else
// Updates disabled (Mac, etc.)
pref("app.update.enabled", false);
pref("app.update.url", "");
#endif

BIN
palemoon/branding/beta/wizHeader.bmp

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

BIN
palemoon/branding/beta/wizHeaderRTL.bmp

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

BIN
palemoon/branding/beta/wizWatermark.bmp

Binary file not shown.

After

Width:  |  Height:  |  Size: 151 KiB

BIN
palemoon/branding/unstable/VisualElements_150.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

BIN
palemoon/branding/unstable/VisualElements_70.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

BIN
palemoon/branding/unstable/appname.bmp

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

10
palemoon/branding/unstable/branding.nsi

@ -0,0 +1,10 @@
# NSIS branding defines for official unstable builds.
# BrandFullNameInternal is used for some registry and file system values
# instead of BrandFullName and typically should not be modified.
!define BrandFullNameInternal "Pale Moon"
!define CompanyName "Moonchild Productions"
!define URLInfoAbout "http://www.palemoon.org/"
!define URLUpdateInfo "http://www.palemoon.org/unstable/"
!define HelpLink "http://www.palemoon.org/unstable/"
!define URLSystemRequirements "http://www.palemoon.org/download.shtml"

2
palemoon/branding/unstable/configure.sh

@ -0,0 +1,2 @@
MOZ_APP_DISPLAYNAME="Pale Moon"

BIN
palemoon/branding/unstable/content/about-background.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 112 KiB

BIN
palemoon/branding/unstable/content/about-logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

BIN
palemoon/branding/unstable/content/about-logo@2x.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

BIN
palemoon/branding/unstable/content/about-wordmark.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
palemoon/branding/unstable/content/about.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

49
palemoon/branding/unstable/content/aboutDialog.css

@ -0,0 +1,49 @@
#aboutPMDialogContainer {
background-image: url("chrome://branding/content/about-background.jpg");
background-repeat: no-repeat;
background-color: #D5BC9A;
color: #202010;
}
#aboutHeaderBox {
background-image: url("chrome://branding/content/about-wordmark.png");
background-repeat: no-repeat;
background-position: center center;
height: 44px;
}
#aboutVersionBox {
text-shadow: 1px 1px 0px #D5BC9A;
}
#aboutTextBox {
animation: 3s fadeIn;
animation-fill-mode: forwards;
text-shadow: 1px 1px 0px #D5BC9A;
color: #202010;
}
@keyframes fadeIn {
0% {
opacity: 0;
}
50% {
opacity: 0;
}
100% {
opacity: 1;
}
}
#aboutLinkBox {
padding: 15px 10px 0;
}
#aboutPMtrademark {
font-size: 10px;
text-align: center;
color: #C0C0C0;
text-shadow: 1px 1px 0px #000000;
margin-top: 10px;
margin-bottom: 10px;
}

BIN
palemoon/branding/unstable/content/icon48.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

BIN
palemoon/branding/unstable/content/icon64.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

12
palemoon/branding/unstable/content/jar.mn

@ -0,0 +1,12 @@
browser.jar:
% content branding %content/branding/ contentaccessible=yes
content/branding/about.png (about.png)
content/branding/about-background.jpg (about-background.jpg)
content/branding/about-logo.png (about-logo.png)
content/branding/about-logo@2x.png (about-logo@2x.png)
content/branding/about-wordmark.png (about-wordmark.png)
content/branding/icon48.png (icon48.png)
content/branding/icon64.png (icon64.png)
content/branding/icon16.png (../default16.png)
content/branding/icon32.png (../default32.png)
content/branding/aboutDialog.css (aboutDialog.css)

3
palemoon/branding/unstable/content/moz.build

@ -0,0 +1,3 @@
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
JAR_MANIFESTS += ['jar.mn']

BIN
palemoon/branding/unstable/default16.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 872 B

BIN
palemoon/branding/unstable/default32.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

BIN
palemoon/branding/unstable/default48.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

BIN
palemoon/branding/unstable/disk.icns

Binary file not shown.

BIN
palemoon/branding/unstable/document.icns

Binary file not shown.

BIN
palemoon/branding/unstable/document.ico

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

BIN
palemoon/branding/unstable/dsstore

Binary file not shown.

BIN
palemoon/branding/unstable/firefox.icns

Binary file not shown.

BIN
palemoon/branding/unstable/firefox.ico

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

4
palemoon/branding/unstable/locales/en-US/brand.dtd

@ -0,0 +1,4 @@
<!ENTITY brandShortName "Pale Moon">
<!ENTITY brandFullName "Pale Moon">
<!ENTITY vendorShortName "Moonchild">
<!ENTITY trademarkInfo.part1 "The Pale Moon logo and project names are trademarks of Moonchild Productions (M.C. Straver BASc). All rights reserved.">

5
palemoon/branding/unstable/locales/en-US/brand.properties

@ -0,0 +1,5 @@
brandShortName=Pale Moon
brandFullName=Pale Moon
vendorShortName=Moonchild
syncBrandShortName=Sync

8
palemoon/branding/unstable/locales/jar.mn

@ -0,0 +1,8 @@
#filter substitution
@AB_CD@.jar:
% locale branding @AB_CD@ %locale/branding/
# Unofficial branding only exists in en-US
locale/branding/brand.dtd (en-US/brand.dtd)
locale/branding/brand.properties (en-US/brand.properties)
locale/branding/browserconfig.properties (../../shared/locales/browserconfig.properties)

5
palemoon/branding/unstable/locales/moz.build

@ -0,0 +1,5 @@
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
DEFINES['MOZ_DISTRIBUTION_ID_UNQUOTED'] = CONFIG['MOZ_DISTRIBUTION_ID']
JAR_MANIFESTS += ['jar.mn']

9
palemoon/branding/unstable/moz.build

@ -0,0 +1,9 @@
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
DIRS += ['content', 'locales']
DIST_SUBDIR = 'browser'
export('DIST_SUBDIR')
include('../shared/branding.mozbuild')
ApplicationBranding()

BIN
palemoon/branding/unstable/mozicon128.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

8
palemoon/branding/unstable/palemoon.VisualElementsManifest.xml

@ -0,0 +1,8 @@
<Application xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
<VisualElements
ShowNameOnSquare150x150Logo='on'
Square150x150Logo='browser\VisualElements\VisualElements_150.png'
Square70x70Logo='browser\VisualElements\VisualElements_70.png'
ForegroundText='light'
BackgroundColor='#14141A'/>
</Application>

59
palemoon/branding/unstable/pref/palemoon-branding.js

@ -0,0 +1,59 @@
#filter substitution
#filter emptyLines
#include ../../shared/pref/preferences.inc
#include ../../shared/pref/uaoverrides.inc
pref("startup.homepage_override_url","http://www.palemoon.org/unstable/releasenotes.shtml");
pref("app.releaseNotesURL", "http://www.palemoon.org/unstable/releasenotes.shtml");
// Enable Firefox compatmode by default.
pref("general.useragent.compatMode", 2);
pref("general.useragent.compatMode.gecko", true);
pref("general.useragent.compatMode.firefox", true);
// Enable dynamic UA updates
pref("general.useragent.updates.enabled", true);
pref("general.useragent.updates.interval", 86400); // Once per day
pref("general.useragent.updates.retry", 7200); // Retry getting update every 2 hours if failed
pref("general.useragent.updates.url", "https://dua.palemoon.org/?app=palemoon&version=%APP_VERSION%&channel=%CHANNEL%");
// Geolocation
pref("geo.wifi.uri", "https://pro.ip-api.com/json/?fields=lat,lon,status,message&key=K3TirHYiysBjnmD");
// ========================= updates ========================
#if defined(XP_WIN) || defined(XP_LINUX)
// Enable auto-updates for this channel
pref("app.update.auto", true);
// Updates enabled
pref("app.update.enabled", true);
pref("app.update.cert.checkAttributes", true);
pref("app.update.certs.1.issuerName", "CN=COMODO RSA Domain Validation Secure Server CA,O=COMODO CA Limited,L=Salford,ST=Greater Manchester,C=GB");
pref("app.update.certs.1.commonName", "*.palemoon.org");
pref("app.update.certs.2.issuerName", "CN=Sectigo RSA Domain Validation Secure Server CA,O=Sectigo Limited,L=Salford,ST=Greater Manchester,C=GB");
pref("app.update.certs.2.commonName", "*.palemoon.org");
// Interval: Time between checks for a new version (in seconds) -- 6 hours for unstable
pref("app.update.interval", 21600);
pref("app.update.promptWaitTime", 86400);
// URL user can browse to manually if for some reason all update installation
// attempts fail.
#ifndef XP_LINUX
pref("app.update.url.manual", "http://www.palemoon.org/unstable/");
#else
pref("app.update.url.manual", "http://linux.palemoon.org/download/unstable/");
#endif
// A default value for the "More information about this update" link
// supplied in the "An update is available" page of the update wizard.
#ifndef XP_LINUX
pref("app.update.url.details", "http://www.palemoon.org/unstable/");
#else
pref("app.update.url.details", "http://linux.palemoon.org/download/unstable/");
#endif
#else
// Updates disabled (Mac, etc.)
pref("app.update.enabled", false);
pref("app.update.url", "");
#endif

BIN
palemoon/branding/unstable/wizHeader.bmp

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

BIN
palemoon/branding/unstable/wizHeaderRTL.bmp

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

BIN
palemoon/branding/unstable/wizWatermark.bmp

Binary file not shown.

After

Width:  |  Height:  |  Size: 151 KiB

1
platform/.gitattributes vendored

@ -0,0 +1 @@
* -text

23
platform/db/mork/build/moz.build

@ -0,0 +1,23 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
EXPORTS += [
'nsIMdbFactoryFactory.h',
'nsMorkCID.h',
]
SOURCES += [
'nsMorkFactory.cpp',
]
if CONFIG['MOZ_INCOMPLETE_EXTERNAL_LINKAGE']:
XPCOMBinaryComponent('mork')
USE_LIBS += [
'nspr',
'xpcomglue_s',
'xul',
]
else:
Library('mork')
FINAL_LIBRARY = 'xul'

30
platform/db/mork/build/nsIMdbFactoryFactory.h

@ -0,0 +1,30 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef nsIMdbFactoryFactory_h__
#define nsIMdbFactoryFactory_h__
#include "nsISupports.h"
#include "nsIFactory.h"
#include "nsIComponentManager.h"
class nsIMdbFactory;
// 2794D0B7-E740-47a4-91C0-3E4FCB95B806
#define NS_IMDBFACTORYFACTORY_IID \
{ 0x2794d0b7, 0xe740, 0x47a4, { 0x91, 0xc0, 0x3e, 0x4f, 0xcb, 0x95, 0xb8, 0x6 } }
// because Mork doesn't support XPCOM, we have to wrap the mdb factory interface
// with an interface that gives you an mdb factory.
class nsIMdbFactoryService : public nsISupports
{
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IMDBFACTORYFACTORY_IID)
NS_IMETHOD GetMdbFactory(nsIMdbFactory **aFactory) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIMdbFactoryService, NS_IMDBFACTORYFACTORY_IID)
#endif

21
platform/db/mork/build/nsMorkCID.h

@ -0,0 +1,21 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef nsMorkCID_h__
#define nsMorkCID_h__
#include "nsISupports.h"
#include "nsIFactory.h"
#include "nsIComponentManager.h"
#define NS_MORK_CONTRACTID \
"@mozilla.org/db/mork;1"
// 36d90300-27f5-11d3-8d74-00805f8a6617
#define NS_MORK_CID \
{ 0x36d90300, 0x27f5, 0x11d3, \
{ 0x8d, 0x74, 0x00, 0x80, 0x5f, 0x8a, 0x66, 0x17 } }
#endif

56
platform/db/mork/build/nsMorkFactory.cpp

@ -0,0 +1,56 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "mozilla/ModuleUtils.h"
#include "nsCOMPtr.h"
#include "nsMorkCID.h"
#include "nsIMdbFactoryFactory.h"
#include "mdb.h"
class nsMorkFactoryService final : public nsIMdbFactoryService
{
public:
nsMorkFactoryService() {};
// nsISupports methods
NS_DECL_ISUPPORTS
NS_IMETHOD GetMdbFactory(nsIMdbFactory **aFactory) override;
protected:
~nsMorkFactoryService() {}
nsCOMPtr<nsIMdbFactory> mMdbFactory;
};
NS_GENERIC_FACTORY_CONSTRUCTOR(nsMorkFactoryService)
NS_DEFINE_NAMED_CID(NS_MORK_CID);
const mozilla::Module::CIDEntry kMorkCIDs[] = {
{ &kNS_MORK_CID, false, NULL, nsMorkFactoryServiceConstructor },
{ NULL }
};
const mozilla::Module::ContractIDEntry kMorkContracts[] = {
{ NS_MORK_CONTRACTID, &kNS_MORK_CID },
{ NULL }
};
static const mozilla::Module kMorkModule = {
mozilla::Module::kVersion,
kMorkCIDs,
kMorkContracts
};
NSMODULE_DEFN(nsMorkModule) = &kMorkModule;
NS_IMPL_ISUPPORTS(nsMorkFactoryService, nsIMdbFactoryService)
NS_IMETHODIMP nsMorkFactoryService::GetMdbFactory(nsIMdbFactory **aFactory)
{
if (!mMdbFactory)
mMdbFactory = MakeMdbFactory();
NS_IF_ADDREF(*aFactory = mMdbFactory);
return *aFactory ? NS_OK : NS_ERROR_OUT_OF_MEMORY;
}

9
platform/db/mork/moz.build

@ -0,0 +1,9 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
DIRS += [
'public',
'src',
'build',
]

2512
platform/db/mork/public/mdb.h

File diff suppressed because it is too large Load Diff

8
platform/db/mork/public/moz.build

@ -0,0 +1,8 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
EXPORTS += [
'mdb.h',
]

247
platform/db/mork/src/mork.h

@ -0,0 +1,247 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (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/MPL/
*
* 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.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1999
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either of the GNU General Public License Version 2 or later (the "GPL"),
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef _MORK_
#define _MORK_ 1
#ifndef _MDB_
#include "mdb.h"
#endif
#include "nscore.h"
//3456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789
// { %%%%% begin disable unused param warnings %%%%%
#define MORK_USED_1(x) (void)(&x)
#define MORK_USED_2(x,y) (void)(&x);(void)(&y);
#define MORK_USED_3(x,y,z) (void)(&x);(void)(&y);(void)(&z);
#define MORK_USED_4(w,x,y,z) (void)(&w);(void)(&x);(void)(&y);(void)(&z);
// } %%%%% end disable unused param warnings %%%%%
// { %%%%% begin macro for finding class member offset %%%%%
/*| OffsetOf: the unsigned integer offset of a class or struct
**| field from the beginning of that class or struct. This is
**| the same as the similarly named public domain IronDoc macro,
**| and is also the same as another macro appearing in stdlib.h.
**| We want these offsets so we can correctly convert pointers
**| to member slots back into pointers to enclosing objects, and
**| have this exactly match what the compiler thinks is true.
**|
**|| Bascially we are asking the compiler to determine the offset at
**| compile time, and we use the definition of address artithmetic
**| to do this. By casting integer zero to a pointer of type obj*,
**| we can reference the address of a slot in such an object that
**| is hypothetically physically placed at address zero, but without
**| actually dereferencing a memory location. The absolute address
**| of slot is the same as offset of that slot, when the object is
**| placed at address zero.
|*/
#define mork_OffsetOf(obj,slot) ((unsigned int)&((obj*) 0)->slot)
// } %%%%% end macro for finding class member offset %%%%%
// { %%%%% begin specific-size integer scalar typedefs %%%%%
typedef unsigned char mork_u1; // make sure this is one byte
typedef unsigned short mork_u2; // make sure this is two bytes
typedef short mork_i2; // make sure this is two bytes
typedef uint32_t mork_u4; // make sure this is four bytes
typedef int32_t mork_i4; // make sure this is four bytes
typedef PRWord mork_ip; // make sure sizeof(mork_ip) == sizeof(void*)
typedef mork_u1 mork_ch; // small byte-sized character (never wide)
typedef mork_u1 mork_flags; // one byte's worth of predicate bit flags
typedef mork_u2 mork_base; // 2-byte magic class signature slot in object
typedef mork_u2 mork_derived; // 2-byte magic class signature slot in object
typedef mork_u4 mork_token; // unsigned token for atomized string
typedef mork_token mork_scope; // token used to id scope for rows
typedef mork_token mork_kind; // token used to id kind for tables
typedef mork_token mork_cscode; // token used to id charset names
typedef mork_token mork_aid; // token used to id atomize cell values
typedef mork_token mork_column; // token used to id columns for rows
typedef mork_column mork_delta; // mork_column plus mork_change
typedef mork_token mork_color; // bead ID
#define morkColor_kNone ((mork_color) 0)
typedef mork_u4 mork_magic; // unsigned magic signature
typedef mork_u4 mork_seed; // unsigned collection change counter
typedef mork_u4 mork_count; // unsigned collection member count
typedef mork_count mork_num; // synonym for count
typedef mork_u4 mork_size; // unsigned physical media size
typedef mork_u4 mork_fill; // unsigned logical content size
typedef mork_u4 mork_more; // more available bytes for larger buffer
typedef mdb_u4 mork_percent; // 0..100, with values >100 same as 100
typedef mork_i4 mork_pos; // negative means "before first" (at zero pos)
typedef mork_i4 mork_line; // negative means "before first line in file"
typedef mork_u1 mork_usage; // 1-byte magic usage signature slot in object
typedef mork_u1 mork_access; // 1-byte magic access signature slot in object
typedef mork_u1 mork_change; // add, cut, put, set, nil
typedef mork_u1 mork_priority; // 0..9, for a total of ten different values
typedef mork_u1 mork_able; // on, off, asleep (clone IronDoc's fe_able)
typedef mork_u1 mork_load; // dirty or clean (clone IronDoc's fe_load)
// } %%%%% end specific-size integer scalar typedefs %%%%%
// 'test' is a public domain Mithril for key equality tests in probe maps
typedef mork_i2 mork_test; /* neg=>kVoid, zero=>kHit, pos=>kMiss */
#define morkTest_kVoid ((mork_test) -1) /* -1: nil key slot, no key order */
#define morkTest_kHit ((mork_test) 0) /* 0: keys are equal, a map hit */
#define morkTest_kMiss ((mork_test) 1) /* 1: keys not equal, a map miss */
// { %%%%% begin constants for Mork scalar types %%%%%
#define morkPriority_kHi ((mork_priority) 0) /* best priority */
#define morkPriority_kMin ((mork_priority) 0) /* best priority is smallest */
#define morkPriority_kLo ((mork_priority) 9) /* worst priority */
#define morkPriority_kMax ((mork_priority) 9) /* worst priority is biggest */
#define morkPriority_kCount 10 /* number of distinct priority values */
#define morkAble_kEnabled ((mork_able) 0x55) /* same as IronDoc constant */
#define morkAble_kDisabled ((mork_able) 0xAA) /* same as IronDoc constant */
#define morkAble_kAsleep ((mork_able) 0x5A) /* same as IronDoc constant */
#define morkChange_kAdd 'a' /* add member */
#define morkChange_kCut 'c' /* cut member */
#define morkChange_kPut 'p' /* put member */
#define morkChange_kSet 's' /* set all members */
#define morkChange_kNil 0 /* no change in this member */
#define morkChange_kDup 'd' /* duplicate changes have no effect */
// kDup is intended to replace another change constant in an object as a
// conclusion about change feasibility while staging intended alterations.
#define morkLoad_kDirty ((mork_load) 0xDD) /* same as IronDoc constant */
#define morkLoad_kClean ((mork_load) 0x22) /* same as IronDoc constant */
#define morkAccess_kOpen 'o'
#define morkAccess_kClosing 'c'
#define morkAccess_kShut 's'
#define morkAccess_kDead 'd'
// } %%%%% end constants for Mork scalar types %%%%%
// { %%%%% begin non-specific-size integer scalar typedefs %%%%%
typedef int mork_char; // nominal type for ints used to hold input byte
#define morkChar_IsWhite(c) \
((c) == 0xA || (c) == 0x9 || (c) == 0xD || (c) == ' ')
// } %%%%% end non-specific-size integer scalar typedefs %%%%%
// { %%%%% begin mdb-driven scalar typedefs %%%%%
// easier to define bool exactly the same as mdb:
typedef mdb_bool mork_bool; // unsigned byte with zero=false, nonzero=true
/* canonical boolean constants provided only for code clarity: */
#define morkBool_kTrue ((mork_bool) 1) /* actually any nonzero means true */
#define morkBool_kFalse ((mork_bool) 0) /* only zero means false */
// mdb clients can assign these, so we cannot pick maximum size:
typedef mdb_id mork_id; // unsigned object identity in a scope
typedef mork_id mork_rid; // unsigned row identity inside scope
typedef mork_id mork_tid; // unsigned table identity inside scope
typedef mork_id mork_gid; // unsigned group identity without any scope
// we only care about neg, zero, pos -- so we don't care about size:
typedef mdb_order mork_order; // neg:lessthan, zero:equalto, pos:greaterthan
// } %%%%% end mdb-driven scalar typedefs %%%%%
#define morkId_kMinusOne ((mdb_id) -1)
// { %%%%% begin class forward defines %%%%%
// try to put these in alphabetical order for easier examination:
class morkMid;
class morkAtom;
class morkAtomSpace;
class morkBookAtom;
class morkBuf;
class morkBuilder;
class morkCell;
class morkCellObject;
class morkCursor;
class morkEnv;
class morkFactory;
class morkFile;
class morkHandle;
class morkHandleFace; // just an opaque cookie type
class morkHandleFrame;
class morkHashArrays;
class morkMap;
class morkNode;
class morkObject;
class morkOidAtom;
class morkParser;
class morkPool;
class morkPlace;
class morkPort;
class morkPortTableCursor;
class morkProbeMap;
class morkRow;
class morkRowCellCursor;
class morkRowObject;
class morkRowSpace;
class morkSorting;
class morkSortingRowCursor;
class morkSpace;
class morkSpan;
class morkStore;
class morkStream;
class morkTable;
class morkTableChange;
class morkTableRowCursor;
class morkThumb;
class morkWriter;
class morkZone;
// } %%%%% end class forward defines %%%%%
// include this config file last for platform & environment specific stuff:
#ifndef _MORKCONFIG_
#include "morkConfig.h"
#endif
//3456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789
#endif /* _MORK_ */

297
platform/db/mork/src/morkArray.cpp

@ -0,0 +1,297 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "nscore.h"
#ifndef _MDB_
#include "mdb.h"
#endif
#ifndef _MORK_
#include "mork.h"
#endif
#ifndef _MORKNODE_
#include "morkNode.h"
#endif
#ifndef _MORKENV_
#include "morkEnv.h"
#endif
#ifndef _MORKARRAY_
#include "morkArray.h"
#endif
//3456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789
// ````` ````` ````` ````` `````
// { ===== begin morkNode interface =====
/*public virtual*/ void
morkArray::CloseMorkNode(morkEnv* ev) // CloseTable() only if open
{
if ( this->IsOpenNode() )
{
this->MarkClosing();
this->CloseArray(ev);
this->MarkShut();
}
}
/*public virtual*/
morkArray::~morkArray() // assert CloseTable() executed earlier
{
MORK_ASSERT(this->IsShutNode());
MORK_ASSERT(mArray_Slots==0);
}
/*public non-poly*/
morkArray::morkArray(morkEnv* ev, const morkUsage& inUsage,
nsIMdbHeap* ioHeap, mork_size inSize, nsIMdbHeap* ioSlotHeap)
: morkNode(ev, inUsage, ioHeap)
, mArray_Slots( 0 )
, mArray_Heap( 0 )
, mArray_Fill( 0 )
, mArray_Size( 0 )
, mArray_Seed( (mork_u4)NS_PTR_TO_INT32(this) ) // "random" integer assignment
{
if ( ev->Good() )
{
if ( ioSlotHeap )
{
nsIMdbHeap_SlotStrongHeap(ioSlotHeap, ev, &mArray_Heap);
if ( ev->Good() )
{
if ( inSize < 3 )
inSize = 3;
mdb_size byteSize = inSize * sizeof(void*);
void** block = 0;
ioSlotHeap->Alloc(ev->AsMdbEnv(), byteSize, (void**) &block);
if ( block && ev->Good() )
{
mArray_Slots = block;
mArray_Size = inSize;
MORK_MEMSET(mArray_Slots, 0, byteSize);
if ( ev->Good() )
mNode_Derived = morkDerived_kArray;
}
}
}
else
ev->NilPointerError();
}
}
/*public non-poly*/ void
morkArray::CloseArray(morkEnv* ev) // called by CloseMorkNode();
{
if ( this->IsNode() )
{
if ( mArray_Heap && mArray_Slots )
mArray_Heap->Free(ev->AsMdbEnv(), mArray_Slots);
mArray_Slots = 0;
mArray_Size = 0;
mArray_Fill = 0;
++mArray_Seed;
nsIMdbHeap_SlotStrongHeap((nsIMdbHeap*) 0, ev, &mArray_Heap);
this->MarkShut();
}
else
this->NonNodeError(ev);
}
// } ===== end morkNode methods =====
// ````` ````` ````` ````` `````
/*static*/ void
morkArray::NonArrayTypeError(morkEnv* ev)
{
ev->NewError("non morkArray");
}
/*static*/ void
morkArray::IndexBeyondEndError(morkEnv* ev)
{
ev->NewError("array index beyond end");
}
/*static*/ void
morkArray::NilSlotsAddressError(morkEnv* ev)
{
ev->NewError("nil mArray_Slots");
}
/*static*/ void
morkArray::FillBeyondSizeError(morkEnv* ev)
{
ev->NewError("mArray_Fill > mArray_Size");
}
mork_bool
morkArray::Grow(morkEnv* ev, mork_size inNewSize)
// Grow() returns true if capacity becomes >= inNewSize and ev->Good()
{
if ( ev->Good() && inNewSize > mArray_Size ) // make array larger?
{
if ( mArray_Fill <= mArray_Size ) // fill and size fit the invariant?
{
if (mArray_Size <= 3)
inNewSize = mArray_Size + 3;
else
inNewSize = mArray_Size * 2;// + 3; // try doubling size here - used to grow by 3
mdb_size newByteSize = inNewSize * sizeof(void*);
void** newBlock = 0;
mArray_Heap->Alloc(ev->AsMdbEnv(), newByteSize, (void**) &newBlock);
if ( newBlock && ev->Good() ) // okay new block?
{
void** oldSlots = mArray_Slots;
void** oldEnd = oldSlots + mArray_Fill;
void** newSlots = newBlock;
void** newEnd = newBlock + inNewSize;
while ( oldSlots < oldEnd )
*newSlots++ = *oldSlots++;
while ( newSlots < newEnd )
*newSlots++ = (void*) 0;
oldSlots = mArray_Slots;
mArray_Size = inNewSize;
mArray_Slots = newBlock;
mArray_Heap->Free(ev->AsMdbEnv(), oldSlots);
}
}
else
this->FillBeyondSizeError(ev);
}
++mArray_Seed; // always modify seed, since caller intends to add slots
return ( ev->Good() && mArray_Size >= inNewSize );
}
void*
morkArray::SafeAt(morkEnv* ev, mork_pos inPos)
{
if ( mArray_Slots )
{
if ( inPos >= 0 && inPos < (mork_pos) mArray_Fill )
return mArray_Slots[ inPos ];
else
this->IndexBeyondEndError(ev);
}
else
this->NilSlotsAddressError(ev);
return (void*) 0;
}
void
morkArray::SafeAtPut(morkEnv* ev, mork_pos inPos, void* ioSlot)
{
if ( mArray_Slots )
{
if ( inPos >= 0 && inPos < (mork_pos) mArray_Fill )
{
mArray_Slots[ inPos ] = ioSlot;
++mArray_Seed;
}
else
this->IndexBeyondEndError(ev);
}
else
this->NilSlotsAddressError(ev);
}
mork_pos
morkArray::AppendSlot(morkEnv* ev, void* ioSlot)
{
mork_pos outPos = -1;
if ( mArray_Slots )
{
mork_fill fill = mArray_Fill;
if ( this->Grow(ev, fill+1) )
{
outPos = (mork_pos) fill;
mArray_Slots[ fill ] = ioSlot;
mArray_Fill = fill + 1;
// note Grow() increments mArray_Seed
}
}
else
this->NilSlotsAddressError(ev);
return outPos;
}
void
morkArray::AddSlot(morkEnv* ev, mork_pos inPos, void* ioSlot)
{
if ( mArray_Slots )
{
mork_fill fill = mArray_Fill;
if ( this->Grow(ev, fill+1) )
{
void** slot = mArray_Slots; // the slot vector
void** end = slot + fill; // one past the last used array slot
slot += inPos; // the slot to be added
while ( --end >= slot ) // another slot to move upward?
end[ 1 ] = *end;
*slot = ioSlot;
mArray_Fill = fill + 1;
// note Grow() increments mArray_Seed
}
}
else
this->NilSlotsAddressError(ev);
}
void
morkArray::CutSlot(morkEnv* ev, mork_pos inPos)
{
MORK_USED_1(ev);
mork_fill fill = mArray_Fill;
if ( inPos >= 0 && inPos < (mork_pos) fill ) // cutting slot in used array portion?
{
void** slot = mArray_Slots; // the slot vector
void** end = slot + fill; // one past the last used array slot
slot += inPos; // the slot to be cut
while ( ++slot < end ) // another slot to move downward?
slot[ -1 ] = *slot;
slot[ -1 ] = 0; // clear the last used slot which is now unused
// note inPos<fill implies fill>0, so fill-1 must be nonnegative:
mArray_Fill = fill - 1;
++mArray_Seed;
}
}
void
morkArray::CutAllSlots(morkEnv* ev)
{
if ( mArray_Slots )
{
if ( mArray_Fill <= mArray_Size )
{
mdb_size oldByteSize = mArray_Fill * sizeof(void*);
MORK_MEMSET(mArray_Slots, 0, oldByteSize);
}
else
this->FillBeyondSizeError(ev);
}
else
this->NilSlotsAddressError(ev);
++mArray_Seed;
mArray_Fill = 0;
}
//3456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789

98
platform/db/mork/src/morkArray.h

@ -0,0 +1,98 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef _MORKARRAY_
#define _MORKARRAY_ 1
#ifndef _MORK_
#include "mork.h"
#endif
#ifndef _MORKNODE_
#include "morkNode.h"
#endif
//3456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789
#define morkDerived_kArray /*i*/ 0x4179 /* ascii 'Ay' */
class morkArray : public morkNode { // row iterator
// public: // slots inherited from morkObject (meant to inform only)
// nsIMdbHeap* mNode_Heap;
// mork_able mNode_Mutable; // can this node be modified?
// mork_load mNode_Load; // is this node clean or dirty?
// mork_base mNode_Base; // must equal morkBase_kNode
// mork_derived mNode_Derived; // depends on specific node subclass
// mork_access mNode_Access; // kOpen, kClosing, kShut, or kDead
// mork_usage mNode_Usage; // kHeap, kStack, kMember, kGlobal, kNone
// mork_uses mNode_Uses; // refcount for strong refs
// mork_refs mNode_Refs; // refcount for strong refs + weak refs
public: // state is public because the entire Mork system is private
void** mArray_Slots; // array of pointers
nsIMdbHeap* mArray_Heap; // required heap for allocating mArray_Slots
mork_fill mArray_Fill; // logical count of used slots in mArray_Slots
mork_size mArray_Size; // physical count of mArray_Slots ( >= Fill)
mork_seed mArray_Seed; // change counter for syncing with iterators
// { ===== begin morkNode interface =====
public: // morkNode virtual methods
virtual void CloseMorkNode(morkEnv* ev) override; // CloseArray()
virtual ~morkArray(); // assert that close executed earlier
public: // morkArray construction & destruction
morkArray(morkEnv* ev, const morkUsage& inUsage,
nsIMdbHeap* ioHeap, mork_size inSize, nsIMdbHeap* ioSlotHeap);
void CloseArray(morkEnv* ev); // called by CloseMorkNode();
private: // copying is not allowed
morkArray(const morkArray& other);
morkArray& operator=(const morkArray& other);