diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 000000000..798ae0c9d --- /dev/null +++ b/.gitattributes @@ -0,0 +1,9 @@ +# Bash needs lf even on windows/cygwin +*.st eol=lf +*.sh eol=lf + +# st files are always text, even if they contain invalid encoded chars +*.st text diff + +# GitHub is unable to properly detect Smalltalk code, so help it a bit +*.st linguist-language=Smalltalk diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml new file mode 100644 index 000000000..97de5a0a6 --- /dev/null +++ b/.github/workflows/CI.yml @@ -0,0 +1,19 @@ +name: CI + +on: [ push, pull_request, workflow_dispatch ] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + smalltalk: [ Pharo64-13, Pharo64-12, Pharo64-11, Pharo64-10 , Pharo64-9.0 , Pharo64-8.0 , Pharo64-7.0 ] + name: ${{ matrix.smalltalk }} + steps: + - uses: actions/checkout@v3 + - uses: hpi-swa/setup-smalltalkCI@v1 + with: + smalltalk-version: ${{ matrix.smalltalk }} + - run: smalltalkci -s ${{ matrix.smalltalk }} + shell: bash + timeout-minutes: 5 diff --git a/.gitignore b/.gitignore index 6c5ee8df1..fcd224e33 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ Session.vim .netrwhist *~ +.DS_Store diff --git a/.project b/.project new file mode 100644 index 000000000..46c779582 --- /dev/null +++ b/.project @@ -0,0 +1,3 @@ +{ + 'srcDirectory' : 'repository' +} \ No newline at end of file diff --git a/.smalltalk_gemstone.ston b/.smalltalk_gemstone.ston new file mode 100644 index 000000000..151407b92 --- /dev/null +++ b/.smalltalk_gemstone.ston @@ -0,0 +1,11 @@ +SmalltalkCISpec { + #loading : [ + SCIMetacelloLoadSpec { + #baseline : 'ZincHTTPComponents', + #load : [ 'default', 'SSL' ], + #directory : 'repository', + #onWarningLog : true, + #platforms : [ #gemstone ] + } + ] +} diff --git a/.smalltalk_pharo.ston b/.smalltalk_pharo.ston new file mode 100644 index 000000000..ff75bbcd4 --- /dev/null +++ b/.smalltalk_pharo.ston @@ -0,0 +1,9 @@ +SmalltalkCISpec { + #loading : [ + SCIMetacelloLoadSpec { + #baseline : 'ZincHTTPComponents', + #directory: 'repository', + #platforms : [ #pharo ] + } + ] +} \ No newline at end of file diff --git a/README-gemstone.md b/README-gemstone.md new file mode 100644 index 000000000..91bafef30 --- /dev/null +++ b/README-gemstone.md @@ -0,0 +1,39 @@ +# Zinc HTTP Components + +## For GemStone + + +Zinc HTTP Components is an open-source Smalltalk framework +to deal with the HTTP networking protocol. + + +Base [Readme](README.md) + + +## Loading into GemStone + +1. [Upgrade to GLASS 1.0-beta.9](http://code.google.com/p/glassdb/wiki/GemToolsUpdate#Update_GLASS) + +2. Install Zinc: + + ```Smalltalk + "GemStone 2.4" + Metacello new + baseline: 'Zinc'; + repository: 'github://glassdb/zinc:gemstone2.4/repository'; + load: 'Tests'. + + "GemStone 3.1" + Metacello new + baseline: 'Zinc'; + repository: 'github://glassdb/zinc:gemstone3.1/repository'; + load: 'Tests'. + ``` + +*See the [Releases page](https://github.com/glassdb/zinc/releases/) for instructions for installing specific Zinc releases.* + +## Travis Status + +**GemStone2.4.x** [![Build Status](https://travis-ci.org/glassdb/zinc.png?branch=gemstone2.4)](https://travis-ci.org/glassdb/zinc) + +**GemStone3.1.x** [![Build Status](https://travis-ci.org/glassdb/zinc.png?branch=gemstone3.1)](https://travis-ci.org/glassdb/zinc) diff --git a/README.md b/README.md index 6aa51721f..82621b25c 100644 --- a/README.md +++ b/README.md @@ -3,18 +3,134 @@ Zinc HTTP Components is an open-source Smalltalk framework to deal with the HTTP networking protocol. +Based on core classes modelling all main HTTP concepts, +a full featured HTTP client and server are provided. - +Zinc is part of any [Pharo Smalltalk](https://www.pharo.org) version since 1.3. -## Please read the [Zinc HTTP Components](https://github.com/svenvc/zinc/blob/master/zinc-http-components-paper.md) paper +## CI Actions +[![CI](https://github.com/svenvc/zinc/actions/workflows/CI.yml/badge.svg)](https://github.com/svenvc/zinc/actions/workflows/CI.yml) +[![Pharo 7.0](https://img.shields.io/badge/Pharo-7.0-informational)](https://pharo.org) +[![Pharo 8.0](https://img.shields.io/badge/Pharo-8.0-informational)](https://pharo.org) +[![Pharo 9.0](https://img.shields.io/badge/Pharo-9.0-informational)](https://pharo.org) +[![Pharo 10](https://img.shields.io/badge/Pharo-10-informational)](https://pharo.org) +[![Pharo 11](https://img.shields.io/badge/Pharo-11-informational)](https://pharo.org) +[![Pharo 12](https://img.shields.io/badge/Pharo-12-informational)](https://pharo.org) +[![Pharo 13](https://img.shields.io/badge/Pharo-13-informational)](https://pharo.org) -*Sven Van Caekenberghe* +## API + +Here are a couple of simple examples to give an impression of the API. +You start a default (easy to reference) HTTP server with just one line of code. + +```Smalltalk +ZnServer startDefaultOn: 1701. +``` + +Now you can browse locally to http://localhost:1701 - in particular +have a look at the `/routes` section and `/echo` - these are part of a set of demonstration handlers. + +Accessing the server that we just started from code is easy too. + +```Smalltalk +ZnClient new + url: ZnServer default localUrl; + addPathSegment: #echo; + entity: (ZnEntity text: 'Hello'); + post. +``` + +This builds an HTTP POST to our server's `/echo` handler with a simple text as resource. +The server will echo information about the request it received, including the text resource that you posted. + +By default, the demonstration server has a couple of handlers, mostly for testing. +You can add your own, to do additions (sum two numbers), for example. + + +```Smalltalk +ZnServer default delegate + map: #adder to: [ :request | | x y sum | + x := (request uri queryAt: #x) asNumber. + y := (request uri queryAt: #y) asNumber. + sum := x + y. + ZnResponse ok: (ZnEntity text: sum asString) ]. +``` + +This creates a new handler `/adder` that will take 2 query arguments, converts them to numbers and returns the result of adding them together. + +Using the full client, we can test our new functionality. + +```Smalltalk +ZnClient new + url: ZnServer default localUrl; + addPathSegment: #adder; + queryAt: #x put: 1; + queryAt: #y put: 2; + get. +``` + +This builds an appropriate request to our `/adder` and executes it. +By entering the proper URL directly, this becomes a one liner. + +```Smalltalk +'http://localhost:1701/adder?x=1&y=2' asUrl retrieveContents. +``` -[MIT Licensed](https://github.com/svenvc/zinc/blob/master/license.txt) +## Documentation + + +Over the years, various documentation has been written about Zinc HTTP Components. +Some of it is somewhat outdated. We list the most recent first. + +The code base has decent class and method comments, as well as unit tests and examples. + +The best starter documentation can be found in the +[Pharo Enterprise](https://books.pharo.org/enterprise-pharo/) book. + +My [Blog](https://blog.stfx.eu) contains several entries about Zinc. + +In particular, in the following chapters (these no longer seem to exist): +- [Client](https://ci.inria.fr/pharo-contribution/job/EnterprisePharoBook/lastSuccessfulBuild/artifact/book-result/Zinc-HTTP-Client/Zinc-HTTP-Client.html) +- [Server](https://ci.inria.fr/pharo-contribution/job/EnterprisePharoBook/lastSuccessfulBuild/artifact/book-result/Zinc-HTTP-Server/Zinc-HTTP-Server.html) +- [WebApp](https://ci.inria.fr/pharo-contribution/job/EnterprisePharoBook/lastSuccessfulBuild/artifact/book-result/WebApp/WebApp.html) +- [TeaPot](https://ci.inria.fr/pharo-contribution/job/EnterprisePharoBook/lastSuccessfulBuild/artifact/book-result/Teapot/Teapot.html) +- [Encoding](https://ci.inria.fr/pharo-contribution/job/EnterprisePharoBook/lastSuccessfulBuild/artifact/book-result/Zinc-Encoding-Meta/Zinc-Encoding-Meta.html) +- [WebSockets](https://ci.inria.fr/pharo-contribution/job/EnterprisePharoBook/lastSuccessfulBuild/artifact/book-result/WebSockets/WebSockets.html) + +A live website can be found at [https://zn.stfx.eu](https://zn.stfx.eu). You can run part of this website locally. + +The original [Zinc HTTP Components](doc/zinc-http-components-paper.md) paper. + +The [Building and deploying your first web app with Pharo](doc/build-and-deploy-1st-webapp/build-deploy-1st-webapp.md) tutorial. + +There is a separate [GemStone README](README-gemstone.md). + +## Loading + +```smalltalk +Metacello new + repository: 'github://svenvc/zinc/repository'; + baseline: 'ZincHTTPComponents'; + load. +``` + +When loading code in an image that already contains Zinc or Zodiac, +it could be helpful to configure a bunch of options to make sure +the latest code gets loaded from this repository. + +```smalltalk +Metacello new + repository: 'github://svenvc/zinc/repository'; + baseline: 'ZincHTTPComponents'; + onConflict: [ :e | e useIncoming ]; + onUpgrade: [ :e | e useIncoming ]; + onWarning: [ :e | e load ]; + load. +``` ## Loading into GemStone @@ -50,6 +166,26 @@ Gofer new load: 'Tests' ]. ``` +## Ethymology + +Any project needs a name. We also needed a namespace prefix for our Smalltalk classes. +We choose `Zinc` and `Zn` or `zn` respectively. + +``` +zinc |zi ng k| +noun +the chemical element of atomic number 30, a silvery-white metal +that is a constituent of brass and is used for coating (galvanizing) +iron and steel to protect against corrosion. (Symbol: Zn) +ORIGIN mid 17th cent.: from German Zink, of unknown origin. +``` + +Here is the Wikipedia entry: [Zinc](https://en.wikipedia.org/wiki/Zinc). +Apart from the fact that this is a nice name, don't go searching for a hidden meaning: +there is none. -## Travis Status [![Build Status](https://travis-ci.org/GsDevKit/zinc.png?branch=gs_master)](https://travis-ci.org/GsDevKit/zinc) +*Sven Van Caekenberghe* + + +[MIT Licensed](https://github.com/svenvc/zinc/blob/master/license.txt) diff --git a/doc/build-and-deploy-1st-webapp/add-repo.png b/doc/build-and-deploy-1st-webapp/add-repo.png new file mode 100644 index 000000000..d1f82a748 Binary files /dev/null and b/doc/build-and-deploy-1st-webapp/add-repo.png differ diff --git a/doc/build-and-deploy-1st-webapp/breakpoint-1.png b/doc/build-and-deploy-1st-webapp/breakpoint-1.png new file mode 100644 index 000000000..1d95d89bb Binary files /dev/null and b/doc/build-and-deploy-1st-webapp/breakpoint-1.png differ diff --git a/doc/build-and-deploy-1st-webapp/breakpoint-2.png b/doc/build-and-deploy-1st-webapp/breakpoint-2.png new file mode 100644 index 000000000..4411c2c53 Binary files /dev/null and b/doc/build-and-deploy-1st-webapp/breakpoint-2.png differ diff --git a/doc/build-and-deploy-1st-webapp/build-deploy-1st-webapp.html b/doc/build-and-deploy-1st-webapp/build-deploy-1st-webapp.html new file mode 100644 index 000000000..0a79b51ca --- /dev/null +++ b/doc/build-and-deploy-1st-webapp/build-deploy-1st-webapp.html @@ -0,0 +1,955 @@ + + + + + + + + +

Building and deploying your first web app with Pharo

+ +

Understanding HTTP fundamentals through Zinc HTTP Components

+ +

Sven Van Caekenberghe

+ +

Written July 2013, updated May 2015

+ +

There are lots of ways to get something on the Web today. However, it remains important that you understand the actual mechanics of building and deploying a web application. This guide explains how to build and deploy your first web application using Pharo.

+ +

Of course, there are an infinite number of techniques to make a web app. Even in Pharo, there are multiple frameworks approaching this problem, most notably Seaside, AIDAweb and Iliad. Here, we’ll be using the foundational framework called Zinc HTTP Components. By doing so, we’ll be touching the fundamentals of HTTP and web apps.

+ +

Using nice objects, abstracting each concept in HTTP and related open standards, the actual code will be easier than you might expect.

+ +

The dynamic, interactive nature of Pharo combined with its rich IDE and library will allow us to do things that are nearly impossible using other technology stacks. By chronologically following the development process, you will see the app growing from something trivial to the final result. Finally, we will save our source code in a repository and deploy for real in the cloud.

+ +

Table Of Contents

+ + + +

Let’s get started.

+ +

The web app

+ +

The web application that we are going to build will show a picture and allow users to change the picture by uploading a new one. Because we want to focus on the basic mechanics, the fundamentals as well as the build and deploy process, there are some simplifications. There will be one picture for all users, no login and we will store the picture in memory.

+ +
+How the final web app will look in the browser +
How the final web app will look in the browser
+ + + +

In our implementation, /image will serve an HTML page containing the image and a form. To serve the raw image itself, we’ll add a parameter, like /image?raw=true. These will be GET HTTP requests. The form will submit its data to /image as a POST request.

+ +

Downloading Pharo

+ +

Go to http://www.pharo.org and download the whole self-contained package for your platform, it is just 12 to 14 MB. Select the released version 2.0. Although not recommended for beginners, current development version 3.0 will do just fine as well. Double-click and you enter the Pharo world.

+ +
+Pharo in action, running the code in the next section +
Pharo in action, running the code in the next section
+ + + +

Pharo is an incredible sophisticated and deep environment and toolset. The Pharo by Example book is probably the best way to get started if all this is totally new to you. In what follows we assume you at least read the first chapter, ‘A Quick Tour of Pharo’. A really short overview is the 2 page Pharo flyer/cheatsheet.

+ +

Running an HTTP server

+ +

Open a Workspace, type and execute

+ +
ZnServer startDefaultOn: 8080. 
+
+ +

Now open the address http://localhost:8080 in your favourite browser. You should get the default welcome page of Zinc HTTP Components. If you visit http://localhost:8080/help you will see a list of all available pages. Now add the following line to your workspace and execute it

+ +
ZnServer default logToTranscript.
+
+ +

Next open the Transcript and visit or reload a page. You should see log output like this

+ +
2013-07-07 00:22:49 479147 D Executing request/response loop
+2013-07-07 00:22:49 479147 I Read a ZnRequest(GET /)
+2013-07-07 00:22:49 479147 T GET / 200 977B 2ms
+2013-07-07 00:22:49 479147 I Wrote a ZnResponse(200 OK text/html;charset=utf-8 977B) 
+
+ +

You can see the server entering the request/response loop for a certain connection/thread. A request is read and a response is written. Let’s have a look under the hood. Put the server in debug mode and inspect it like this

+ +
ZnServer default debugMode: true; inspect.
+
+ +

Visit and reload a page. Now you can use the inspector to explore the actual lastRequest and lastResponse objects. Pretty cool, right ?

+ +

To complete our little tour, let’s try one more thing. We can execute any request programmatically as well, using an HTTP client. To visit a page, try inspecting the result of

+ +
ZnClient new get: 'http://localhost:8080/random'.
+
+ +

If you would look inside the client object, you would find similar request and response objects. Which makes total sense since the client talks to the server and vice versa, over the network. If you want, you can stop the server using

+ +
ZnServer stopDefault.
+
+ +

If you are curious, please consult the Zinc HTTP Components documentation.

+ +

Saying hello world

+ +

Let’s lay the groundwork for our new web application by making a version that only says ‘Hello World!’. We’ll be extending the web app gradually until we reach our functional goal.

+ +

Open the Nautilus System Browser and create a new package (right click in the first column) called something like ‘MyFirstWebApp’. Now create a new class (right click in the second column) with the same name, MyFirstWebApp. You will be given a template: edit ‘NameOfSubclass’ and accept by clicking ‘OK’. Your definition should now appear in the bottom pane

+ +
Object subclass: #MyFirstWebApp
+  instanceVariableNames: ''
+  classVariableNames: ''
+  poolDictionaries: ''
+  category: 'MyFirstWebApp'
+
+ +

Any object can be a web app, it only has to respond to a message called #handleRequest: to answer a response based on a request. Now add the following method

+ +
handleRequest: request
+  request uri path = #image
+    ifFalse: [ ^ ZnResponse notFound: request uri ].
+  ^ ZnResponse ok: (ZnEntity text: 'Hello World!')
+
+ +

Create a new protocol called ‘public’ (by right-clicking in the third column). When the new protocol is selected, a new method template will appear in the bottom pane. Overwrite the whole template with the code above and accept it.

+ +
+Nautilus System Browser open on our first method +
Nautilus System Browser open on our first method
+ + + +

What we do here is look at the incoming request to make sure the URI path is /image which will be the final name of our web app. If not, we return a Not Found (code 404) response. If so, we create and return an OK response (code 200) with a simple text entity as body or payload.

+ +
value: request
+  ^ self handleRequest: request
+
+ +

Now do the same for the #value: method, effectively making it an alias of #handleRequest: - this is needed so our web app object can be used more flexibly. To test our web app, we’ll add it as one of the pages of the default server, like this

+ +
ZnServer startDefaultOn: 8080.
+ZnServer default delegate map: #image to: MyFirstWebApp new.
+
+ +

The second expression adds a route from /image to an instance of our web app object. If all is well, http://localhost:8080/image should show your friendly message. Note how we are not even serving HTML, just plain text.

+ +

Try changing the text. Try putting a breakpoint in MyFirstWebApp>>#handleRequest: (right-click on the method name in the fourth column) and inspecting things. Then just continue the execution. Note how this is a live environment: you make a little change and it is immediately used, you can look into the actual request and response objects moving around.

+ +
+Execution stopping on a breakpoint +
Execution stopping on a breakpoint
+ + + +
+Inside the Debugger +
Inside the Debugger
+ + + + +

Leave the server running. If you want you can enable logging again, or switch to debug mode and inspect the server instance. Don’t forget to remove any breakpoints you set.

+ +

Serving an HTML page

+ +

HTML generation and/or using templates can be done with some of the higher level frameworks, here we’ll manually compose our HTML. Go ahead and add a new method, #html, while changing a previous one slightly

+ +
html
+  ^ '<html><head><title>Image</title>
+  <body>
+  <h1>Image</h1>
+  </body></html>'
+
+handleRequest: request
+  request uri path = #image
+    ifFalse: [ ^ ZnResponse notFound: request uri ].
+  ^ ZnResponse ok: (ZnEntity html: self html)
+
+ +

Accept the above two methods and test http://localhost:8080/image again to make sure you now see a real HTML page.

+ +

You have a probably noted the red exclamation mark icon in front of our class name in the browser. This is an indication that we have no class comment, which is not good: documentation is important. Click the ‘Comment’ button and write some documentation. You can also use the class comment as a notepad for yourself, saving useful expressions that you can later execute in place.

+ +

Serving an image

+ +

Images for the purpose of our web app can be any of three types: GIF, JPEG or PNG. We will store them in memory as an entity, an object wrapping the actual bytes together with a mime type.

+ +

To simplify our app, we will arrange things so that we always start with a default image, then we always have something to show. Let’s add a little helper, #downloadPharoLogo

+ +
downloadPharoLogo
+  ^ ZnClient new 
+      beOneShot;
+      get: 'http://www.pharo.org/files/pharo.png';
+      entity 
+
+ +

Quickly test the code by selecting the method body (not including the name) and inspecting the result. You should get an image entity back. Now add the accessor #image

+ +
image
+  ^ image ifNil: [ image := self downloadPharoLogo ]
+
+ +

When you try to accept this method, you will get an error. We are using an unknown variable, image. Select the option to automatically declare a new instance variable and we are good.

+ +

Remember that we decided we were going to serve the raw image itself using a query variable, like /image?raw=true. Make the following modification to existing methods and add a new one

+ +
html
+  ^ '<html><head><title>Image</title>
+  <body>
+  <h1>Image</h1>
+  <img src="image?raw=true"/>
+  </body></html>'
+
+handleRequest: request
+  request uri path = #image
+    ifFalse: [ ^ ZnResponse notFound: request uri ].
+  ^ self handleGetRequest: request
+
+handleGetRequest: request
+  ^ (request uri queryAt: #raw ifAbsent: [ nil ])
+      ifNil: [ ZnResponse ok: (ZnEntity html: self html) ]
+      ifNotNil: [ ZnResponse ok: self image ]
+
+ +

We extended our HTML with a IMG element. We delegate some of our request handling to a new method, #handleGetRequest: where we inspect the incoming URI. If it has a non empty query variable raw we serve the raw image directly, else we serve the HTML page like before.

+ +

Check it out: you should now see an image in the browser when visiting http://localhost:8080/image !

+ +

Uploading a new image

+ +

Interaction is what differentiates a web site from a web application. We will now add the ability for users to upload a new image to change the one on the server. To add this ability we need to use an HTML form. Let’s change our HTML one final time.

+ +
html
+  ^ '<html><head><title>Image</title>
+  <body>
+  <h1>Image</h1>
+  <img src="image?raw=true"/>
+  <br/>
+  <form enctype="multipart/form-data" action="image" method="POST">
+   <h3>Change the image:</h3>
+   <input type="file" name="file"/>
+   <input type="submit" value= "Upload"/>
+  </form>
+  </body></html>'
+
+ +

The user will be able to select a file on the local disk for upload. When s/he click the Upload submit button, the web browser will send an HTTP POST to the action URL, /image, encoding the form contents using a technique called multi-part form-data. With the above change, you will be able to see the form, its just won’t work, yet.

+ +

In our request handling, we have to distinguish between GET and POST requests. Change #handleRequest: to its final form.

+ +
handleRequest: request
+  request uri path = #image
+    ifTrue: [ 
+      request method = #GET
+        ifTrue: [ ^ self handleGetRequest: request ].
+      request method = #POST
+        ifTrue: [ ^ self handlePostRequest: request ] ].
+  ^ ZnResponse notFound: request uri
+
+ +

Now we have to add an implementation of #handlePostRequest: to accept the uploaded image and change the current one.

+ +
handlePostRequest: request
+  | part newImage |
+  part := request entity partNamed: #file.
+  newImage := part entity.
+  image := newImage.
+  ^ ZnResponse redirect: #image
+
+ +

We start with a simple version without error handling. The entity of the incoming request is a multi-part form-data object containing named parts. Each part, such as the file part, contains another sub-entity. In our case, the uploaded image. Note also how the response to the POST is a redirect to our main page. You should now have a fully functional web app. Go and try it out!

+ +

We have taken a bit of a shortcut in the code above. It is pretty dangerous to just accept what is coming in from the internet without doing some checking. Here is a version that does that.

+ +
handlePostRequest: request
+  | part newImage badRequest |
+  badRequest := [ ^ ZnResponse badRequest: request ].
+  (request hasEntity 
+      and: [ request contentType matches: ZnMimeType multiPartFormData ])
+    ifFalse: badRequest.
+  part := request entity 
+            partNamed: #file
+            ifNone: badRequest.
+  newImage := part entity.
+  (newImage notNil
+      and: [ newImage contentType matches: 'image/*' asZnMimeType ])
+    ifFalse: badRequest.
+  image := newImage.
+  ^ ZnResponse redirect: #image
+
+ +

Our standard response when something is wrong will be to return a Bad Request (code 400). We define this behaviour to a local variable so that we can reuse it multiple times over. The first test makes sure there actually is an entity in the POST request and that it is of the correct type. Next we handle the case when there is no file part. Finally, we make sure the file part is actually an image (JPEG, PNG or GIF) by matching with the wildcard image/* mime type.

+ +

If you are curious, set a breakpoint in the method and inspect the request object of an actual request. You can learn an awful lot from looking at live objects.

+ +

Live debugging

+ +

Let’s make a deliberate error in our code. Change #handlePostRequest: so that the last line reads like

+ +
  ^ ZnResponse redirectTo: #image
+
+ +

The compiler will already complain, ignore the warning and accept the code anyway. Try uploading a new image. The debugger will pop up telling you that ZnResponse does not understand #redirectTo: and show you the offending code. You could fix the code and try uploading again to see if it works.

+ +
+Handling a MessageNotUnderstood +
Handling a MessageNotUnderstood
+ + + +

But we can do better! Just fix the code and accept it. Now you can restart and proceed the execution. The same request is still active and the server will now do the correct thing. Have a look at your web browser: you will see that your initial action, the upload, that first initially hung, has now succeeded.

+ +

Up to now, the suggestion was that you can use the debugger and inspector tools to look at requests and responses. But you can actually change them while they are happening ! Prepare for our experiment by making sure that you change the image to be different from the default one. Now set a breakpoint in #handleGetRequest: and reload the main page. There will be two requests coming in: the first one for /image and the second one for /image?raw=true. Proceed the first one.

+ +
+Changing data during execution +
Changing data during execution
+ + + +

Now, with the execution being stopped for the second request, click on the image instance variable in the bottom left pane. The pane next to it will show some image entity. Select the whole contents and replace it with

+ +
self downloadPharoLogo
+
+ +

and accept the change. Now proceed the execution. Your previously uploaded image is gone, replaced again by the default Pharo logo. We just changed an object in the middle of the execution.

+ +

Imagine doing all your development like that, having a real conversation with your application, while you are developing it. Be warned though: once you get used to this, it will be hard to go back.

+ +

Image magic

+ +

The abilities to look at the requests and responses coming in and going out of the server, to set breakpoints, to debug live request without redoing the user interaction or to modify data structure live are already great and quite unique. But there is more.

+ +

Pharo is not just a platform for server applications, it can be used to build regular applications with normal graphics as well. In fact, it is very good at it. That is why it has built-in support to work with JPEG, GIF or PNG.

+ +

Would it not be cool to be able to actually parse the image that we were manipulating as an opaque collection of bytes up till now ? To make sure it is real. To look at it while debugging. Turns out this is quite easy. Are you ready for some image magick, pun intended ?

+ +

The Pharo object that represents images is called a form. There are objects called GIFReadWriter, PNGReadWriter and JPEGReadWriter that can parse bytes into forms. Add two helper methods, #formForImageEntity: and #form

+ +
formForImageEntity: imageEntity
+  | imageType parserClassName parserClass parser |
+  imageType := imageEntity contentType sub.
+  parserClassName := imageType asUppercase, #ReadWriter.
+  parserClass := Smalltalk globals at: parserClassName asSymbol.
+  parser := parserClass on: imageEntity readStream.
+    ^ parser nextImage
+
+form
+  ^ self formForImageEntity: self image
+
+ +

What we do is use the sub type of the mime type, like png in image/png, to find the parser class. Then we instanciate a new parser on a read stream on the actual bytes and invoke the parser with sending #nextImage, which will return a form. The #form method makes it easy to invoke all this logic on our current image.

+ +

Now we can have a look at, for example, the default image like this

+ +
MyFirstWebApp new form asMorph openInWindow.
+
+ +

Obviously you can do this while debugging too. We can also use the image parsing logic to improve our error checking even further. Here is the final version of #handlePostRequest:

+ +
handlePostRequest: request
+  | part newImage badRequest |
+  badRequest := [ ^ ZnResponse badRequest: request ].
+  (request hasEntity 
+      and: [ request contentType matches: ZnMimeType multiPartFormData ])
+    ifFalse: badRequest.
+  part := request entity 
+            partNamed: #file
+            ifNone: badRequest.
+  newImage := part entity.
+  (newImage notNil 
+      and: [ newImage contentType matches: 'image/*' asZnMimeType ])
+    ifFalse: badRequest.
+  [ self formForImageEntity: newImage ]
+    on: Error 
+    do: badRequest.
+  image := newImage.
+  ^ ZnResponse redirect: #image
+
+ +

Before making the actual assignment of the new image to our instance variable we added an extra expression. We try parsing the image. We are not interested in the result, but we do want to reply with a bad request when the parsing should fail.

+ +

Once we have a form object, the possibilities are almost endless. You can query a form for the its size, depth and other elements. You can manipulate the form in various ways: scaling, resizing, rotating, flipping, cropping, compositing. And you can do all this in an interactive, dynamic environment.

+ +

Adding tests

+ +

We all know that testing is good, but how do we actually test a web app ? Writing some basic tests is actually not difficult, since Zinc HTTP Components covers both the client and the server side with the same objects.

+ +

Writing tests is creating objects, letting them interact and then asserting a number of conditions. Create a new subclass of TestCase, MyFirstWebAppTests, and add the following helper method.

+ +
withServerDo: block
+  | server |
+  server := ZnServer on: 1700 + 10 atRandom.
+  [ 
+    server start.
+    self assert: server isRunning & server isListening.
+    server delegate: MyFirstWebApp new.
+    block cull: server
+  ] 
+    ensure: [ server stop ]
+
+ +

Since we will be needing a configured server instance with our web app as delegate for each of our tests, we move that logic into #withServerDo: and make sure the server is OK and properly stopped afterwards. Now we are ready for our first test.

+ +
testMainPage
+  self withServerDo: [ :server |
+    | client |
+    client := ZnClient new.
+    client url: server localUrl; addPath: #image.
+    client get.
+    self assert: client isSuccess.
+    self assert: (client entity contentType matches: ZnMimeType textHtml).
+    self assert: (client contents includesSubstring: 'Image').
+    client close ]
+
+ +

In #testMainPage we do a request for the main page, /image, and assert that the request is successful and contains HTML. Make sure the test is green by running it from the browser (click the round icon in front of the method name in the fourth pane).

+ +
+Running our first test inside the browser +
Running our first test inside the browser
+ + + +

Let’s try to write a test for the actual raw image being served.

+ +
testDefaultImage
+  self withServerDo: [ :server |
+    | client |
+    client := ZnClient new.
+    client url: server localUrl; addPath: #image; queryAt: #raw put: #true.
+    client get.
+    self assert: client isSuccess.
+    self assert: (client entity contentType matches: 'image/*' asZnMimeType).
+    self assert: client entity equals: server delegate image.
+    client close ]
+
+ +

Note how we can actually test for equality between the served image and the one inside our app object (the delegate). Run the test.

+ +

Our final test will actually do an image upload and check if the served image did actually change to what we uploaded.

+ +
image
+  ^ ZnClient new
+      beOneShot;
+      get: 'http://zn.stfx.eu/zn/Hot-Air-Balloon.gif';
+      entity
+
+testUpload
+  self withServerDo: [ :server |
+    | image client |
+    image := self image.
+    client := ZnClient new.
+    client url: server localUrl; addPath: #image.
+    client addPart: (ZnMimePart fieldName: #file entity: image).
+    client post.
+    self assert: client isSuccess.
+    client resetEntity; queryAt: #raw put: #true.
+    client get.
+    self assert: client isSuccess.
+    self assert: client entity equals: image.
+    client close ]
+
+ +

The HTTP client object is pretty powerful. It can do a correct multi-part form-data POST, just like a browser. Furthermore, once configured, it can be reused, like for the second GET request.

+ +

Saving code to a repository

+ +

If all is well, you now have a package called MyFirstWebApp containing two classes, MyFirstWebApp and MyFirstWebAppTests. The first one should have 9 methods, the second 5. If you are unsure about your code, you can double check with the full listing at the end of this document. Our web app should now work as expected, and we have some tests to prove it.

+ +

But our code currently only lives in our development image. Let’s change that and move our code to a source code repository. For this we first have to define a Monticello package. Click on the package name in the first column of the browser and select the option ‘Create an MC package’. Use the same name.

+ +
+Creating a Monticello package +
Creating a Monticello package
+ + + +

Pharo uses distributed source code management. Your code can live on your local file system, or it can live on a server. The main place for storing Pharo code is on SmalltalkHub. Go over there and create yourself a new account. Once you have an account, create and register a new project called ‘MyFirstWebApp’. You can leave the public option checked, it means that you and others can download the code without credentials. Go to the project’s page.

+ +
+MyFirstWebApps project page on SmalltalkHub +
MyFirstWebApp’s project page on SmalltalkHub
+ + + +

On this page, select and copy the Monticello registration template (make sure to copy the whole contents, including the username and password parts). Now go back to Pharo and add a repository for your package (right-click on the package name, select Open… > Add a repository).

+ +
+Adding a repository +
Adding a repository
+ + + +

Select Smalltalkhub.com as repository type and overwrite the presented template with the one you just copied. It should look similar to

+ +
MCHttpRepository
+  location: 'http://www.smalltalkhub.com/mc/SvenVanCaekenberghe/MyFirstWebApp/main'
+  user: ''
+  password: ''
+
+ +

Now before accepting, fill in your user(name) and password (between the single quotes), the ones you gave during registration on SmalltalkHub. Open the Monticello Browser to see what we have done. Find your package in the first column and your repository in the second one.

+ +
+The Monticello Browser looking at our package and repository +
The Monticello Browser looking at our package and repository
+ + + +

There should be a asterisk (*) in front of your package name, indicating that the package is dirty, that it has uncommitted changes. If not, force a change computation by clicking ‘Changes’ button. You should get a browser showing all the changes that you made. Since this is the first version, all your changes are additions.

+ +
+The Changes/Diff Browser for our package +
The Changes/Diff Browser for our package
+ + + +

OK, we’re almost done. Go back to the Monticello Browser and click the ‘Save’ button (with your package and repository selected). Leave the version name, something like MyFirstWebApp-SvenVanCaekenberghe.1 alone, write a nice commit message in the second pane and press Accept to save your code to SmalltalkHub.

+ +
+Committing to SmalltalkHub +
Committing to SmalltalkHub
+ + + +

When all goes well, you will see an upload progress bar and finally a version window that confirms the commit. You can close it later on.

+ +
Name: MyFirstWebApp-SvenVanCaekenberghe.1
+Author: SvenVanCaekenberghe
+Time: 9 July 2013, 2:18:24.638381 pm
+UUID: adad42a6-ff4c-41a4-a2a3-09f8cb29c902
+Ancestors: 
+
+First check in of our web app, following 'Building and deploying your first web app in Pharo'.
+
+ +
+Confirmation Version Window +
Confirmation Version Window
+ + + +

If something goes wrong, you probably made a typo in your repository specification. You can edit it by right-clicking on it in the Monticello Browser and selecting ‘Edit repository info’. If a save fails, you will get a Version Window after some error message. Don’t close the Version Window. Your code now lives in your local package cache. Click the ‘Copy’ button and select your SmalltalkHub repository to try saving again.

+ +

You can now browse back to Smalltalkhub.com to confirm that your code arrived there.

+ +
+Looking at our commit on SmalltalkHub +
Looking at our commit on SmalltalkHub
+ + + +

After a successful commit, it is a good idea to save your image. In any case, your package should now no longer be dirty, and there should be no more differences between the local version and the one on SmalltalkHub.

+ +

Defining a project configuration

+ +

Real software consists of several packages and will depend on extra external libraries and frameworks. In practice, software configuration management, including the management of dependencies and versions, is thus a necessity.

+ +

To solve this problem, Pharo is using Metacello. And although we don’t really need it for our small example, we are going to use it anyway. Of course, we will not go into details as this is a complex subject.

+ +

To create a Metacello configuration, you define an object, what else did you expect ? First create a new package as well as a Metacello package called ‘ConfigurationOfMyFirstWebApp’. Then go find the class MetacelloConfigTemplate. You have to copy this class (right-click on the class name) and name it ‘ConfigurationOfMyFirstWebApp’ as well. Now move the copy to your new package by dragging it, or by editing the category field of the class definition.

+ +

We are going to define three methods: one defining a baseline for our configuration, one defining concrete package versions for that baseline, and one declaring that version as the stable released version. Here is the code (if you would be working in Pharo 3.0 you will notice that MetacelloConfigTemplate contains some extra template methods, remove any baseline or version related ones and overwrite #stable:)

+ +
baseline1: spec
+  <version: '1-baseline'>
+  spec for: #common do: [
+    spec 
+      blessing: #baseline;
+      repository: 'http://smalltalkhub.com/mc/SvenVanCaekenberghe/MyFirstWebApp/main/';
+      package: 'MyFirstWebApp' ]
+
+version1: spec
+  <version: '1' imports: #('1-baseline')>
+  spec for: #common do: [
+    spec
+      blessing: #release;
+      package: 'MyFirstWebApp' with: 'MyFirstWebApp-SvenVanCaekenberghe.1' ]
+
+stable: spec
+  <symbolicVersion: #'stable'>
+  spec for: #common version: '1'
+
+ +

You can test your configuration by trying to load it.

+ +
ConfigurationOfMyFirstWebApp load.
+
+ +

Of course, not much will happen since you already have the specified version loaded. For some feedback, make sure the Transcript is open and inspect the above expression.

+ +
+Loading our Metacello configuration +
Loading our Metacello configuration
+ + + +

Now add your SmalltalkHub repository to the ConfigurationOfMyFirstWebApp Monticello package. Double-check the changes in the Monticello Browser, remember we copied a whole class. Now commit by saving to your SmalltalkHub repository. Use the web interface to verify that all went well.

+ +

Running a real cloud server

+ +

So we created our first web app and tested it locally. We stored our source code in the SmalltalkHub repository and created a Metacello configuration for it. Now we need a real cloud server to run our web app.

+ +

It used to be hard and expensive to get access to a real server permanently connected to the internet. Not any more: prices have comes down and operating cloud servers has become a much easier to use service.

+ +

For this guide, we will be using Digital Ocean. The entry level server there, which is more than powerful enough for our experiment, costs just $5 a month. If you stop and remove the server after a couple of days, you will only pay cents. Go ahead and make yourself an account and register a credit card.

+ +
+First part of the Create Droplet form +
First part of the Create Droplet form
+ + + +

A server instance is called a Droplet. Click the ‘Create Droplet ’ button and fill in the form. Pick a hostname, select the smallest size, pick a region close to you. As operating system image, we’ll be using a 32-bit Ubuntu Linux, version 13.04 x32. You can optionally use an SSH key pair to log in - it is a good idea, see How to Use SSH Keys with DigitalOcean Droplets - just skip this option for now if you are uncomfortable with it, it is not necessary for this tutorial. Finally click the ‘Create Droplet’ button.

+ +
+Second part of the Create Droplet form +
Second part of the Create Droplet form
+ + + +

In less than a minute, your new server instance will be ready. Your root password will be emailed to you. If you look at your droplets, you should see your new server in the list. Click on it to see its details.

+ +
+Looking at your Droplet +
Looking at your Droplet
+ + + +

The important step now is to get SSH command line access to your new server, preferably using a normal terminal. With the IP address from the control panel and the root password emailed to you, try to log in.

+ +
$ ssh root@82.196.12.54
+
+ +

Your server is freshly installed and includes only the most essential core packages. Now we have to install Pharo on it. One easy way to do this is using the functionality offered by http://get.pharo.org. The following command will install a fresh Pharo 2.0 image together with all other files needed.

+ +
# curl get.pharo.org/20+vm | bash
+
+ +

Make sure the VM+image combination works by asking for the image version.

+ +
# ./pharo Pharo.image printVersion
+[version] 2.0 #20611
+
+ +

Let’s quickly test the stock HTTP server that comes with Pharo, like we did in the third section of this guide.

+ +
# ./pharo Pharo.image eval --no-quit 'ZnServer startDefaultOn: 8080'
+
+ +

This command will block. Now access your new HTTP server at http://82.196.12.54:8080 after substituting your own IP address of course. You should see the Zinc HTTP Components welcome page. If this works, you can press ctrl-C in the terminal to end our test.

+ +

Deploying for production

+ +

We now have a running server. It can run Pharo too, but it is currently using a generic image. How do we get our code deployed ? To do this we use the Metacello configuration. But first, we are going to make a copy of the stock Pharo.image that we downloaded. We want to keep the original clean while we make changes to the copy.

+ +
# ./pharo Pharo.image save myfirstwebapp
+
+ +

We now have a new image (and changes) file called myfirstwebapp.image (and myfirstwebapp.changes). Through the config command line option we can load our Metacello configuration. Before actually loading anything, we will ask for all available versions to verify that we can access the repository.

+ +
# ./pharo myfirstwebapp.image config http://www.smalltalkhub.com/mc/SvenVanCaekenberghe/MyFirstWebApp/main ConfigurationOfMyFirstWebApp
+===============================================================================
+Notice: Available versions for ConfigurationOfMyFirstWebApp
+===============================================================================
+1
+1-baseline
+bleedingEdge
+last
+stable
+
+ +

Since we have only one version, all the above are equivalent references to the same version. Now we will load and install the stable version.

+ +
# ./pharo myfirstwebapp.image config http://www.smalltalkhub.com/mc/SvenVanCaekenberghe/MyFirstWebApp/main ConfigurationOfMyFirstWebApp --install=stable
+===============================================================================
+Notice: Installing ConfigurationOfMyFirstWebApp stable
+===============================================================================
+
+ +

After loading all necessary code, the config option will also save our image so that it now permanently includes our code. Although we could try to write a (long) one line expression to start our web app in a server and pass it to the eval option, it is better to write a small script. Create a file called ‘run.st’ with the following contents

+ +
ZnServer defaultOn: 8080.
+ZnServer default logToStandardOutput.
+ZnServer default delegate 
+  map: 'image' to: MyFirstWebApp new;
+  map: 'redirect-to-image' to: [ :request | ZnResponse redirect: 'image' ];
+  map: '/' to: 'redirect-to-image'. 
+ZnServer default start. 
+
+ +

We added a little twist here: we changed the default root (/) handler to redirect to our new /image web app. Test the startup script like this

+ +
# ./pharo myfirstwebapp.image run.st
+2013-07-10 11:46:58 660707 I Starting ZnManagingMultiThreadedServer HTTP port 8080
+2013-07-10 11:46:58 670019 D Initializing server socket
+2013-07-10 11:47:12 909356 D Executing request/response loop
+2013-07-10 11:47:12 909356 I Read a ZnRequest(GET /)
+2013-07-10 11:47:12 909356 T GET / 302 16B 0ms
+2013-07-10 11:47:12 909356 I Wrote a ZnResponse(302 Found text/plain;charset=utf-8 16B)
+2013-07-10 11:47:12 909356 I Read a ZnRequest(GET /image)
+2013-07-10 11:47:12 909356 T GET /image 200 282B 0ms
+2013-07-10 11:47:12 909356 I Wrote a ZnResponse(200 OK text/html;charset=utf-8 282B)
+2013-07-10 11:47:12 909356 I Read a ZnRequest(GET /image?raw=true)
+2013-07-10 11:47:12 909356 T GET /image?raw=true 200 18778B 82ms
+2013-07-10 11:47:12 909356 I Wrote a ZnResponse(200 OK image/png 18778B)
+
+ +

Surf to the correct IP address and port to test you application. Note that /welcome, /help and /image are still available too. Type ctrl-c to kill the server again. Now it is time to put the server in background, running for real.

+ +
# nohup ./pharo myfirstwebapp.image run.st &
+
+ +

One more step

+ +

Did you like the example so far ? Would you like to take one more step ? Here is a little extension, as an exercise.

+ +

Add an extra section at the bottom of the main page that shows a miniature version of the previous image. Initially, you can show an empty image. Here are a couple of hints. Read only as far as you need, try to figure it out yourself.

+ +

Hint 1

+ +

You can scale a form object into another one using just one message taking a single argument. You can use the same classes that we used for parsing as a tool to generate PNG, JPEG or GIF images given a form.

+ +

When you are done, save your code as a new version. Then update your configuration with a new, stable version. Finally, go to the server, update your image based on the configuration and restart the running vm+image.

+ +

Hint 2

+ +

Change the #html method referring to a new variant, /image?previous=true, for the second image. Adjust #handleGetRequest: to look for that attribute.

+ +

Add a helper method #pngImageEntityForForm: and a #previousImage accessor. It is easy to create an empty, blank form as default. Call a #updatePreviousImage at the right spot in #handlePostRequest: and implement the necessary functionality there.

+ +

Hint 3

+ +

If you found it difficult to find the right methods, have a look at the following ones:

+ + + +

Solution, part 1, new methods

+ +

Here are 3 new methods that are part of the solution.

+ +
pngImageEntityForForm: form
+  ^ ZnByteArrayEntity
+      with: (ByteArray streamContents: [ :out |
+               (PNGReadWriter on: out) nextPutImage: form ])
+      type: ZnMimeType imagePng
+
+previousImage
+  ^ previousImage ifNil: [ 
+      | emptyForm |
+      emptyForm:= Form extent: 128 @ 128 depth: 8.
+      previousImage := self pngImageEntityForForm: emptyForm ]
+
+updatePreviousImage
+  | form scaled |
+  form := self form.
+  scaled := form scaledIntoFormOfSize: 128.
+  previousImage := self pngImageEntityForForm: scaled
+
+ +

Solution, part 2, changed methods

+ +

Here are the changes to 3 existing methods for the complete solution.

+ +
html
+  ^ '<html><head><title>Image</title>
+  <body>
+  <h1>Image</h1>
+  <img src="image?raw=true"/>
+  <br/>
+  <form enctype="multipart/form-data" action="image" method="POST">
+   <h3>Change the image:</h3>
+   <input type="file" name="file"/>
+   <input type="submit" value= "Upload"/>
+  </form>
+  <h3>Previous Image</h3>
+  <img src="image?previous=true"/>
+  </body></html>'
+
+handleGetRequest: request
+  (request uri queryAt: #raw ifAbsent: [ nil ])
+    ifNotNil: [ ^ ZnResponse ok: self image ].
+  (request uri queryAt: #previous ifAbsent: [ nil ])
+    ifNotNil: [ ^ ZnResponse ok: self previousImage ].
+  ^ ZnResponse ok: (ZnEntity html: self html)
+
+handlePostRequest: request
+  | part newImage badRequest |
+  badRequest := [ ^ ZnResponse badRequest: request ].
+  (request hasEntity 
+      and: [ request contentType matches: ZnMimeType multiPartFormData ])
+    ifFalse: badRequest.
+  part := request entity 
+            partNamed: #file
+            ifNone: badRequest.
+  newImage := part entity.
+  (newImage notNil 
+      and: [ newImage contentType matches: 'image/*' asZnMimeType ])
+    ifFalse: badRequest.
+  [ self formForImageEntity: newImage ]
+    on: Error 
+    do: badRequest.
+  self updatePreviousImage.
+  image := newImage.
+  ^ ZnResponse redirect: #image
+
+ +

Solution, part 3, updated configuration

+ +

To update our configuration, add 1 method and change 1 method.

+ +
version2: spec
+  <version: '2' imports: #('1-baseline')>
+  spec for: #common do: [
+    spec
+      blessing: #release;
+      package: 'MyFirstWebApp' with: 'MyFirstWebApp-SvenVanCaekenberghe.2' ]
+
+stable: spec
+  <symbolicVersion: #'stable'>
+  spec for: #common version: '2'
+
+ +

Of course, you will have to substitute your name for the concrete version.

+ +

Conclusion

+ +

Congratulations: you have now built and deployed your first web app with Pharo. Hopefully you are interested in learning more. From the Pharo website you should be able to find all the information you need. Don’t forget about the Pharo by Example book and the mailing lists.

+ +

This guide was an introduction to writing web applications using Pharo, touching on the fundamentals of HTTP. Like we mentioned in the introduction, there are a couple of high level frameworks that offer more extensive support for writing web applications. The three most important ones are Seaside, AIDAweb and Iliad.

+ +

Listing

+ +

Here is the full code listing of the web app. You can also find the code, including the tests and the Metacello configuration, checked in to SmalltalkHub in my MyFirstWebApp project. A similar example is also included in Zinc HTTP Components itself, under the name ZnImageExampleDelegate[Tests].

+ +
Object subclass: #MyFirstWebApp
+  instanceVariableNames: ''
+  classVariableNames: ''
+  poolDictionaries: ''
+  category: 'MyFirstWebApp'
+
+handleRequest: request
+  request uri path = #image
+    ifTrue: [ 
+      request method = #GET
+        ifTrue: [ ^ self handleGetRequest: request ].
+      request method = #POST
+        ifTrue: [ ^ self handlePostRequest: request ] ].
+  ^ ZnResponse notFound: request uri
+
+value: request
+  ^ self handleRequest: request
+
+handleGetRequest: request
+  ^ (request uri queryAt: #raw ifAbsent: [ nil ])
+      ifNil: [ ZnResponse ok: (ZnEntity html: self html) ]
+      ifNotNil: [ ZnResponse ok: self image ]
+
+handlePostRequest: request
+  | part newImage badRequest |
+  badRequest := [ ^ ZnResponse badRequest: request ].
+  (request hasEntity 
+      and: [ request contentType matches: ZnMimeType multiPartFormData ])
+    ifFalse: badRequest.
+  part := request entity 
+            partNamed: #file
+            ifNone: badRequest.
+  newImage := part entity.
+  (newImage notNil 
+      and: [ newImage contentType matches: 'image/*' asZnMimeType ])
+    ifFalse: badRequest.
+  [ self formForImageEntity: newImage ]
+    on: Error 
+    do: badRequest.
+  image := newImage.
+  ^ ZnResponse redirect: #image
+
+html
+  ^ '<html><head><title>Image</title>
+  <body>
+  <h1>Image</h1>
+  <img src="image?raw=true"/>
+  <br/>
+  <form enctype="multipart/form-data" action="image" method="POST">
+   <h3>Change the image:</h3>
+   <input type="file" name="file"/>
+   <input type="submit" value= "Upload"/>
+  </form>
+  </body></html>'
+
+downloadPharoLogo
+  ^ ZnClient new 
+      beOneShot;
+      get: 'http://www.pharo.org/files/pharo.png';
+      entity 
+
+image
+  ^ image ifNil: [ image := self downloadPharoLogo ]
+
+formForImageEntity: imageEntity
+  | imageType parserClassName parserClass parser |
+  imageType := imageEntity contentType sub.
+  parserClassName := imageType asUppercase, #ReadWriter.
+  parserClass := Smalltalk globals at: parserClassName asSymbol.
+  parser := parserClass on: imageEntity readStream.
+    ^ parser nextImage
+
+form
+  ^ self formForImageEntity: self image
+
+ + diff --git a/doc/build-and-deploy-1st-webapp/build-deploy-1st-webapp.md b/doc/build-and-deploy-1st-webapp/build-deploy-1st-webapp.md new file mode 100644 index 000000000..8e030c200 --- /dev/null +++ b/doc/build-and-deploy-1st-webapp/build-deploy-1st-webapp.md @@ -0,0 +1,786 @@ +# Building and deploying your first web app with Pharo +### Understanding HTTP fundamentals through Zinc HTTP Components + +*Sven Van Caekenberghe* + +*Written July 2013, updated May 2015* + +There are lots of ways to get something on the Web today. However, it remains important that you understand the actual mechanics of building and deploying a web application. This guide explains how to build and deploy your first web application using [Pharo](http://www.pharo.org). + +Of course, there are an infinite number of techniques to make a web app. Even in Pharo, there are multiple frameworks approaching this problem, most notably [Seaside](http://www.seaside.st), [AIDAweb](http://www.aidaweb.si) and [Iliad](http://www.iliadproject.org). Here, we'll be using the foundational framework called [Zinc HTTP Components](http://zn.stfx.eu). By doing so, we'll be touching the fundamentals of HTTP and web apps. + +Using nice objects, abstracting each concept in [HTTP](http://en.wikipedia.org/wiki/Http) and related open standards, the actual code will be easier than you might expect. + +The dynamic, interactive nature of Pharo combined with its rich IDE and library will allow us to do things that are nearly impossible using other technology stacks. By chronologically following the development process, you will see the app growing from something trivial to the final result. Finally, we will save our source code in a repository and deploy for real in the cloud. + +### Table Of Contents + +- [The web app](#thewebapp) +- [Downloading Pharo](#downloadingpharo) +- [Running an HTTP server](#runninganhttpserver) +- [Saying hello world](#sayinghelloworld) +- [Serving an HTML page](#servinganhtmlpage) +- [Serving an image](#servinganimage) +- [Uploading a new image](#uploadinganewimage) +- [Live debugging](#livedebugging) +- [Image magic](#imagemagic) +- [Adding tests](#addingtests) +- [Saving code to a repository](#savingcodetoarepository) +- [Defining a project configuration](#definingaprojectconfiguration) +- [Running a real cloud server](#runningarealcloudserver) +- [Deploying for production](#deployingforproduction) +- [One more step](#onemorestep) +- [Conclusion](#conclusion) +- [Listing](#listing) + +Let's get started. + +## The web app + +The web application that we are going to build will show a picture and allow users to change the picture by uploading a new one. Because we want to focus on the basic mechanics, the fundamentals as well as the build and deploy process, there are some simplifications. There will be one picture for all users, no login and we will store the picture in memory. + +![How the final web app will look in the browser](image-web-app.png) + +In our implementation, /image will serve an HTML page containing the image and a form. To serve the raw image itself, we'll add a parameter, like /image?raw=true. These will be GET HTTP requests. The form will submit its data to /image as a POST request. + +## Downloading Pharo + +Go to [http://www.pharo.org](http://www.pharo.org) and download the whole self-contained package for your platform, it is just 12 to 14 MB. Select the released version 2.0. Although not recommended for beginners, current development version 3.0 will do just fine as well. Double-click and you enter the Pharo world. + +![Pharo in action, running the code in the next section](pharo-in-action.png) + +Pharo is an incredible sophisticated and deep environment and toolset. The [Pharo by Example](http://pharobyexample.org) book is probably the best way to get started if all this is totally new to you. In what follows we assume you at least read the first chapter, 'A Quick Tour of Pharo'. A really short overview is the 2 page [Pharo flyer/cheatsheet](http://files.pharo.org/media/flyer-cheat-sheet.pdf). + +## Running an HTTP server + +Open a Workspace, type and execute + + ZnServer startDefaultOn: 8080. + +Now open the address [http://localhost:8080](http://localhost:8080) in your favourite browser. You should get the default welcome page of Zinc HTTP Components. If you visit [http://localhost:8080/help](http://localhost:8080/help) you will see a list of all available pages. Now add the following line to your workspace and execute it + + ZnServer default logToTranscript. + +Next open the Transcript and visit or reload a page. You should see log output like this + + 2013-07-07 00:22:49 479147 D Executing request/response loop + 2013-07-07 00:22:49 479147 I Read a ZnRequest(GET /) + 2013-07-07 00:22:49 479147 T GET / 200 977B 2ms + 2013-07-07 00:22:49 479147 I Wrote a ZnResponse(200 OK text/html;charset=utf-8 977B) + +You can see the server entering the request/response loop for a certain connection/thread. A request is read and a response is written. Let's have a look under the hood. Put the server in debug mode and inspect it like this + + ZnServer default debugMode: true; inspect. + +Visit and reload a page. Now you can use the inspector to explore the actual lastRequest and lastResponse objects. Pretty cool, right ? + +To complete our little tour, let's try one more thing. We can execute any request programmatically as well, using an HTTP client. To visit a page, try inspecting the result of + + ZnClient new get: 'http://localhost:8080/random'. + +If you would look inside the client object, you would find similar request and response objects. Which makes total sense since the client talks to the server and vice versa, over the network. If you want, you can stop the server using + + ZnServer stopDefault. + +If you are curious, please consult the [Zinc HTTP Components](http://zn.stfx.eu/zn/zinc-http-components-paper.html) documentation. + +## Saying hello world + +Let's lay the groundwork for our new web application by making a version that only says 'Hello World!'. We'll be extending the web app gradually until we reach our functional goal. + +Open the Nautilus System Browser and create a new package (right click in the first column) called something like **'MyFirstWebApp'**. Now create a new class (right click in the second column) with the same name, **MyFirstWebApp**. You will be given a template: edit 'NameOfSubclass' and accept by clicking 'OK'. Your definition should now appear in the bottom pane + + Object subclass: #MyFirstWebApp + instanceVariableNames: '' + classVariableNames: '' + poolDictionaries: '' + category: 'MyFirstWebApp' + +Any object can be a web app, it only has to respond to a message called **#handleRequest:** to answer a response based on a request. Now add the following method + + handleRequest: request + request uri path = #image + ifFalse: [ ^ ZnResponse notFound: request uri ]. + ^ ZnResponse ok: (ZnEntity text: 'Hello World!') + +Create a new protocol called 'public' (by right-clicking in the third column). When the new protocol is selected, a new method template will appear in the bottom pane. Overwrite the whole template with the code above and accept it. + +![Nautilus System Browser open on our first method](first-code.png) + +What we do here is look at the incoming request to make sure the URI path is /image which will be the final name of our web app. If not, we return a Not Found (code 404) response. If so, we create and return an OK response (code 200) with a simple text entity as body or payload. + + value: request + ^ self handleRequest: request + +Now do the same for the **#value:** method, effectively making it an alias of #handleRequest: - this is needed so our web app object can be used more flexibly. To test our web app, we'll add it as one of the pages of the default server, like this + + ZnServer startDefaultOn: 8080. + ZnServer default delegate map: #image to: MyFirstWebApp new. + +The second expression adds a route from /image to an instance of our web app object. If all is well, [http://localhost:8080/image](http://localhost:8080/image) should show your friendly message. Note how we are not even serving HTML, just plain text. + +Try changing the text. Try putting a breakpoint in MyFirstWebApp>>#handleRequest: (right-click on the method name in the fourth column) and inspecting things. Then just continue the execution. Note how this is a live environment: you make a little change and it is immediately used, you can look into the actual request and response objects moving around. + +![Execution stopping on a breakpoint](breakpoint-1.png) + +![Inside the Debugger](breakpoint-2.png) + +Leave the server running. If you want you can enable logging again, or switch to debug mode and inspect the server instance. Don't forget to remove any breakpoints you set. + +## Serving an HTML page + +HTML generation and/or using templates can be done with some of the higher level frameworks, here we'll manually compose our HTML. Go ahead and add a new method, **#html**, while changing a previous one slightly + + html + ^ 'Image + +

Image

+ ' + + handleRequest: request + request uri path = #image + ifFalse: [ ^ ZnResponse notFound: request uri ]. + ^ ZnResponse ok: (ZnEntity html: self html) + +Accept the above two methods and test [http://localhost:8080/image](http://localhost:8080/image) again to make sure you now see a real HTML page. + +You have a probably noted the red exclamation mark icon in front of our class name in the browser. This is an indication that we have no class comment, which is not good: documentation is important. Click the 'Comment' button and write some documentation. You can also use the class comment as a notepad for yourself, saving useful expressions that you can later execute in place. + +## Serving an image + +Images for the purpose of our web app can be any of three types: GIF, JPEG or PNG. We will store them in memory as an entity, an object wrapping the actual bytes together with a mime type. + +To simplify our app, we will arrange things so that we always start with a default image, then we always have something to show. Let's add a little helper, **#downloadPharoLogo** + + downloadPharoLogo + ^ ZnClient new + beOneShot; + get: 'http://www.pharo.org/files/pharo.png'; + entity + +Quickly test the code by selecting the method body (not including the name) and inspecting the result. You should get an image entity back. Now add the accessor **#image** + + image + ^ image ifNil: [ image := self downloadPharoLogo ] + +When you try to accept this method, you will get an error. We are using an unknown variable, image. Select the option to automatically declare a new instance variable and we are good. + +Remember that we decided we were going to serve the raw image itself using a query variable, like /image?raw=true. Make the following modification to existing methods and add a new one + + html + ^ 'Image + +

Image

+ + ' + + handleRequest: request + request uri path = #image + ifFalse: [ ^ ZnResponse notFound: request uri ]. + ^ self handleGetRequest: request + + handleGetRequest: request + ^ (request uri queryAt: #raw ifAbsent: [ nil ]) + ifNil: [ ZnResponse ok: (ZnEntity html: self html) ] + ifNotNil: [ ZnResponse ok: self image ] + +We extended our HTML with a IMG element. We delegate some of our request handling to a new method, **#handleGetRequest:** where we inspect the incoming URI. If it has a non empty query variable raw we serve the raw image directly, else we serve the HTML page like before. + +Check it out: you should now see an image in the browser when visiting [http://localhost:8080/image](http://localhost:8080/image) ! + +## Uploading a new image + +Interaction is what differentiates a web site from a web application. We will now add the ability for users to upload a new image to change the one on the server. To add this ability we need to use an HTML form. Let's change our HTML one final time. + + html + ^ 'Image + +

Image

+ +
+
+

Change the image:

+ + +
+ ' + +The user will be able to select a file on the local disk for upload. When s/he click the Upload submit button, the web browser will send an HTTP POST to the action URL, /image, encoding the form contents using a technique called multi-part form-data. With the above change, you will be able to see the form, its just won't work, yet. + +In our request handling, we have to distinguish between GET and POST requests. Change #handleRequest: to its final form. + + handleRequest: request + request uri path = #image + ifTrue: [ + request method = #GET + ifTrue: [ ^ self handleGetRequest: request ]. + request method = #POST + ifTrue: [ ^ self handlePostRequest: request ] ]. + ^ ZnResponse notFound: request uri + +Now we have to add an implementation of **#handlePostRequest:** to accept the uploaded image and change the current one. + + handlePostRequest: request + | part newImage | + part := request entity partNamed: #file. + newImage := part entity. + image := newImage. + ^ ZnResponse redirect: #image + +We start with a simple version without error handling. The entity of the incoming request is a multi-part form-data object containing named parts. Each part, such as the file part, contains another sub-entity. In our case, the uploaded image. Note also how the response to the POST is a redirect to our main page. You should now have a fully functional web app. Go and try it out! + +We have taken a bit of a shortcut in the code above. It is pretty dangerous to just accept what is coming in from the internet without doing some checking. Here is a version that does that. + + handlePostRequest: request + | part newImage badRequest | + badRequest := [ ^ ZnResponse badRequest: request ]. + (request hasEntity + and: [ request contentType matches: ZnMimeType multiPartFormData ]) + ifFalse: badRequest. + part := request entity + partNamed: #file + ifNone: badRequest. + newImage := part entity. + (newImage notNil + and: [ newImage contentType matches: 'image/*' asZnMimeType ]) + ifFalse: badRequest. + image := newImage. + ^ ZnResponse redirect: #image + +Our standard response when something is wrong will be to return a Bad Request (code 400). We define this behaviour to a local variable so that we can reuse it multiple times over. The first test makes sure there actually is an entity in the POST request and that it is of the correct type. Next we handle the case when there is no file part. Finally, we make sure the file part is actually an image (JPEG, PNG or GIF) by matching with the wildcard image/* mime type. + +If you are curious, set a breakpoint in the method and inspect the request object of an actual request. You can learn an awful lot from looking at live objects. + +## Live debugging + +Let's make a deliberate error in our code. Change #handlePostRequest: so that the last line reads like + + ^ ZnResponse redirectTo: #image + +The compiler will already complain, ignore the warning and accept the code anyway. Try uploading a new image. The debugger will pop up telling you that ZnResponse does not understand #redirectTo: and show you the offending code. You could fix the code and try uploading again to see if it works. + +![Handling a MessageNotUnderstood](dnu.png) + +But we can do better! Just fix the code and accept it. Now you can restart and proceed the execution. The same request is still active and the server will now do the correct thing. Have a look at your web browser: you will see that your initial action, the upload, that first initially hung, has now succeeded. + +Up to now, the suggestion was that you can use the debugger and inspector tools to look at requests and responses. But you can actually change them while they are happening ! Prepare for our experiment by making sure that you change the image to be different from the default one. Now set a breakpoint in #handleGetRequest: and reload the main page. There will be two requests coming in: the first one for /image and the second one for /image?raw=true. Proceed the first one. + +![Changing data during execution](live-change.png) + +Now, with the execution being stopped for the second request, click on the image instance variable in the bottom left pane. The pane next to it will show some image entity. Select the whole contents and replace it with + + self downloadPharoLogo + +and accept the change. Now proceed the execution. Your previously uploaded image is gone, replaced again by the default Pharo logo. We just changed an object in the middle of the execution. + +Imagine doing all your development like that, having a real conversation with your application, while you are developing it. Be warned though: once you get used to this, it will be hard to go back. + +## Image magic + +The abilities to look at the requests and responses coming in and going out of the server, to set breakpoints, to debug live request without redoing the user interaction or to modify data structure live are already great and quite unique. But there is more. + +Pharo is not just a platform for server applications, it can be used to build regular applications with normal graphics as well. In fact, it is very good at it. That is why it has built-in support to work with JPEG, GIF or PNG. + +Would it not be cool to be able to actually parse the image that we were manipulating as an opaque collection of bytes up till now ? To make sure it is real. To look at it while debugging. Turns out this is quite easy. Are you ready for some [image magick](http://en.wikipedia.org/wiki/ImageMagick), pun intended ? + +The Pharo object that represents images is called a form. There are objects called GIFReadWriter, PNGReadWriter and JPEGReadWriter that can parse bytes into forms. Add two helper methods, **#formForImageEntity:** and **#form** + + formForImageEntity: imageEntity + | imageType parserClassName parserClass parser | + imageType := imageEntity contentType sub. + parserClassName := imageType asUppercase, #ReadWriter. + parserClass := Smalltalk globals at: parserClassName asSymbol. + parser := parserClass on: imageEntity readStream. + ^ parser nextImage + + form + ^ self formForImageEntity: self image + +What we do is use the sub type of the mime type, like png in image/png, to find the parser class. Then we instanciate a new parser on a read stream on the actual bytes and invoke the parser with sending #nextImage, which will return a form. The #form method makes it easy to invoke all this logic on our current image. + +Now we can have a look at, for example, the default image like this + + MyFirstWebApp new form asMorph openInWindow. + +Obviously you can do this while debugging too. We can also use the image parsing logic to improve our error checking even further. Here is the final version of #handlePostRequest: + + handlePostRequest: request + | part newImage badRequest | + badRequest := [ ^ ZnResponse badRequest: request ]. + (request hasEntity + and: [ request contentType matches: ZnMimeType multiPartFormData ]) + ifFalse: badRequest. + part := request entity + partNamed: #file + ifNone: badRequest. + newImage := part entity. + (newImage notNil + and: [ newImage contentType matches: 'image/*' asZnMimeType ]) + ifFalse: badRequest. + [ self formForImageEntity: newImage ] + on: Error + do: badRequest. + image := newImage. + ^ ZnResponse redirect: #image + +Before making the actual assignment of the new image to our instance variable we added an extra expression. We try parsing the image. We are not interested in the result, but we do want to reply with a bad request when the parsing should fail. + +Once we have a form object, the possibilities are almost endless. You can query a form for the its size, depth and other elements. You can manipulate the form in various ways: scaling, resizing, rotating, flipping, cropping, compositing. And you can do all this in an interactive, dynamic environment. + +## Adding tests + +We all know that testing is good, but how do we actually test a web app ? Writing some basic tests is actually not difficult, since Zinc HTTP Components covers both the client and the server side with the same objects. + +Writing tests is creating objects, letting them interact and then asserting a number of conditions. Create a new subclass of TestCase, **MyFirstWebAppTests**, and add the following helper method. + + withServerDo: block + | server | + server := ZnServer on: 1700 + 10 atRandom. + [ + server start. + self assert: server isRunning & server isListening. + server delegate: MyFirstWebApp new. + block cull: server + ] + ensure: [ server stop ] + +Since we will be needing a configured server instance with our web app as delegate for each of our tests, we move that logic into **#withServerDo:** and make sure the server is OK and properly stopped afterwards. Now we are ready for our first test. + + testMainPage + self withServerDo: [ :server | + | client | + client := ZnClient new. + client url: server localUrl; addPath: #image. + client get. + self assert: client isSuccess. + self assert: (client entity contentType matches: ZnMimeType textHtml). + self assert: (client contents includesSubstring: 'Image'). + client close ] + +In #testMainPage we do a request for the main page, /image, and assert that the request is successful and contains HTML. Make sure the test is green by running it from the browser (click the round icon in front of the method name in the fourth pane). + +![Running our first test inside the browser](first-test.png) + +Let's try to write a test for the actual raw image being served. + + testDefaultImage + self withServerDo: [ :server | + | client | + client := ZnClient new. + client url: server localUrl; addPath: #image; queryAt: #raw put: #true. + client get. + self assert: client isSuccess. + self assert: (client entity contentType matches: 'image/*' asZnMimeType). + self assert: client entity equals: server delegate image. + client close ] + +Note how we can actually test for equality between the served image and the one inside our app object (the delegate). Run the test. + +Our final test will actually do an image upload and check if the served image did actually change to what we uploaded. + + image + ^ ZnClient new + beOneShot; + get: 'http://zn.stfx.eu/zn/Hot-Air-Balloon.gif'; + entity + + testUpload + self withServerDo: [ :server | + | image client | + image := self image. + client := ZnClient new. + client url: server localUrl; addPath: #image. + client addPart: (ZnMimePart fieldName: #file entity: image). + client post. + self assert: client isSuccess. + client resetEntity; queryAt: #raw put: #true. + client get. + self assert: client isSuccess. + self assert: client entity equals: image. + client close ] + +The HTTP client object is pretty powerful. It can do a correct multi-part form-data POST, just like a browser. Furthermore, once configured, it can be reused, like for the second GET request. + +## Saving code to a repository + +If all is well, you now have a package called MyFirstWebApp containing two classes, MyFirstWebApp and MyFirstWebAppTests. The first one should have 9 methods, the second 5. If you are unsure about your code, you can double check with the full listing at the end of this document. Our web app should now work as expected, and we have some tests to prove it. + +But our code currently only lives in our development image. Let's change that and move our code to a source code repository. For this we first have to define a Monticello package. Click on the package name in the first column of the browser and select the option 'Create an MC package'. Use the same name. + +![Creating a Monticello package](create-mc-package.png) + +Pharo uses distributed source code management. Your code can live on your local file system, or it can live on a server. The main place for storing Pharo code is on [SmalltalkHub](http://www.smalltalkhub.com). Go over there and create yourself a new account. Once you have an account, create and register a new project called **'MyFirstWebApp'**. You can leave the public option checked, it means that you and others can download the code without credentials. Go to the project's page. + +![MyFirstWebApp's project page on SmalltalkHub](sthub.png) + +On this page, select and copy the Monticello registration template (make sure to copy the whole contents, including the username and password parts). Now go back to Pharo and add a repository for your package (right-click on the package name, select Open… > Add a repository). + +![Adding a repository](add-repo.png) + +Select Smalltalkhub.com as repository type and overwrite the presented template with the one you just copied. It should look similar to + + MCHttpRepository + location: 'http://www.smalltalkhub.com/mc/SvenVanCaekenberghe/MyFirstWebApp/main' + user: '' + password: '' + +Now before accepting, fill in your user(name) and password (between the single quotes), the ones you gave during registration on SmalltalkHub. Open the Monticello Browser to see what we have done. Find your package in the first column and your repository in the second one. + +![The Monticello Browser looking at our package and repository](mc-browser.png) + +There should be a asterisk (*) in front of your package name, indicating that the package is dirty, that it has uncommitted changes. If not, force a change computation by clicking 'Changes' button. You should get a browser showing all the changes that you made. Since this is the first version, all your changes are additions. + +![The Changes/Diff Browser for our package](diffs.png) + +OK, we're almost done. Go back to the Monticello Browser and click the 'Save' button (with your package and repository selected). Leave the version name, something like MyFirstWebApp-SvenVanCaekenberghe.1 alone, write a nice commit message in the second pane and press Accept to save your code to SmalltalkHub. + +![Committing to SmalltalkHub](commit.png) + +When all goes well, you will see an upload progress bar and finally a version window that confirms the commit. You can close it later on. + + Name: MyFirstWebApp-SvenVanCaekenberghe.1 + Author: SvenVanCaekenberghe + Time: 9 July 2013, 2:18:24.638381 pm + UUID: adad42a6-ff4c-41a4-a2a3-09f8cb29c902 + Ancestors: + + First check in of our web app, following 'Building and deploying your first web app in Pharo'. + +![Confirmation Version Window](version.png) + +If something goes wrong, you probably made a typo in your repository specification. You can edit it by right-clicking on it in the Monticello Browser and selecting 'Edit repository info'. If a save fails, you will get a Version Window after some error message. Don't close the Version Window. Your code now lives in your local package cache. Click the 'Copy' button and select your SmalltalkHub repository to try saving again. + +You can now browse back to [Smalltalkhub.com](Smalltalkhub.com) to confirm that your code arrived there. + +![Looking at our commit on SmalltalkHub](sthub-v1.png) + +After a successful commit, it is a good idea to save your image. In any case, your package should now no longer be dirty, and there should be no more differences between the local version and the one on SmalltalkHub. + +## Defining a project configuration + +Real software consists of several packages and will depend on extra external libraries and frameworks. In practice, software configuration management, including the management of dependencies and versions, is thus a necessity. + +To solve this problem, Pharo is using Metacello. And although we don't really need it for our small example, we are going to use it anyway. Of course, we will not go into details as this is a complex subject. + +To create a Metacello configuration, you define an object, what else did you expect ? First create a new package as well as a Metacello package called **'ConfigurationOfMyFirstWebApp'**. Then go find the class MetacelloConfigTemplate. You have to copy this class (right-click on the class name) and name it **'ConfigurationOfMyFirstWebApp'** as well. Now move the copy to your new package by dragging it, or by editing the category field of the class definition. + +We are going to define three methods: one defining a baseline for our configuration, one defining concrete package versions for that baseline, and one declaring that version as the stable released version. Here is the code (if you would be working in Pharo 3.0 you will notice that MetacelloConfigTemplate contains some extra template methods, remove any baseline or version related ones and overwrite #stable:) + + baseline1: spec + + spec for: #common do: [ + spec + blessing: #baseline; + repository: 'http://smalltalkhub.com/mc/SvenVanCaekenberghe/MyFirstWebApp/main/'; + package: 'MyFirstWebApp' ] + + version1: spec + + spec for: #common do: [ + spec + blessing: #release; + package: 'MyFirstWebApp' with: 'MyFirstWebApp-SvenVanCaekenberghe.1' ] + + stable: spec + + spec for: #common version: '1' + +You can test your configuration by trying to load it. + + ConfigurationOfMyFirstWebApp load. + +Of course, not much will happen since you already have the specified version loaded. For some feedback, make sure the Transcript is open and inspect the above expression. + +![Loading our Metacello configuration](metacello-load.png) + +Now add your SmalltalkHub repository to the ConfigurationOfMyFirstWebApp Monticello package. Double-check the changes in the Monticello Browser, remember we copied a whole class. Now commit by saving to your SmalltalkHub repository. Use the web interface to verify that all went well. + +## Running a real cloud server + +So we created our first web app and tested it locally. We stored our source code in the SmalltalkHub repository and created a Metacello configuration for it. Now we need a real cloud server to run our web app. + +It used to be hard and expensive to get access to a real server permanently connected to the internet. Not any more: prices have comes down and operating cloud servers has become a much easier to use service. + +For this guide, we will be using [Digital Ocean](http://www.digitalocean.com). The entry level server there, which is more than powerful enough for our experiment, costs just $5 a month. If you stop and remove the server after a couple of days, you will only pay cents. Go ahead and make yourself an account and register a credit card. + +![First part of the Create Droplet form](create-droplet-1.png) + +A server instance is called a Droplet. Click the 'Create Droplet ' button and fill in the form. Pick a hostname, select the smallest size, pick a region close to you. As operating system image, we'll be using a 32-bit Ubuntu Linux, version 13.04 x32. You can optionally use an SSH key pair to log in - it is a good idea, see [How to Use SSH Keys with DigitalOcean Droplets](https://www.digitalocean.com/community/articles/how-to-use-ssh-keys-with-digitalocean-droplets) - just skip this option for now if you are uncomfortable with it, it is not necessary for this tutorial. Finally click the 'Create Droplet' button. + +![Second part of the Create Droplet form](create-droplet-2.png) + +In less than a minute, your new server instance will be ready. Your root password will be emailed to you. If you look at your droplets, you should see your new server in the list. Click on it to see its details. + +![Looking at your Droplet](my-droplet.png) + +The important step now is to get SSH command line access to your new server, preferably using a normal terminal. With the IP address from the control panel and the root password emailed to you, try to log in. + + $ ssh root@82.196.12.54 + +Your server is freshly installed and includes only the most essential core packages. Now we have to install Pharo on it. One easy way to do this is using the functionality offered by [http://get.pharo.org](http://get.pharo.org). The following command will install a fresh Pharo 2.0 image together with all other files needed. + + # curl get.pharo.org/20+vm | bash + +Make sure the VM+image combination works by asking for the image version. + + # ./pharo Pharo.image printVersion + [version] 2.0 #20611 + +Let's quickly test the stock HTTP server that comes with Pharo, like we did in the third section of this guide. + + # ./pharo Pharo.image eval --no-quit 'ZnServer startDefaultOn: 8080' + +This command will block. Now access your new HTTP server at [http://82.196.12.54:8080](http://82.196.12.54:8080) after substituting your own IP address of course. You should see the Zinc HTTP Components welcome page. If this works, you can press ctrl-C in the terminal to end our test. + +## Deploying for production + +We now have a running server. It can run Pharo too, but it is currently using a generic image. How do we get our code deployed ? To do this we use the Metacello configuration. But first, we are going to make a copy of the stock Pharo.image that we downloaded. We want to keep the original clean while we make changes to the copy. + + # ./pharo Pharo.image save myfirstwebapp + +We now have a new image (and changes) file called myfirstwebapp.image (and myfirstwebapp.changes). Through the config command line option we can load our Metacello configuration. Before actually loading anything, we will ask for all available versions to verify that we can access the repository. + + # ./pharo myfirstwebapp.image config http://www.smalltalkhub.com/mc/SvenVanCaekenberghe/MyFirstWebApp/main ConfigurationOfMyFirstWebApp + =============================================================================== + Notice: Available versions for ConfigurationOfMyFirstWebApp + =============================================================================== + 1 + 1-baseline + bleedingEdge + last + stable + +Since we have only one version, all the above are equivalent references to the same version. Now we will load and install the stable version. + + # ./pharo myfirstwebapp.image config http://www.smalltalkhub.com/mc/SvenVanCaekenberghe/MyFirstWebApp/main ConfigurationOfMyFirstWebApp --install=stable + =============================================================================== + Notice: Installing ConfigurationOfMyFirstWebApp stable + =============================================================================== + +After loading all necessary code, the config option will also save our image so that it now permanently includes our code. Although we could try to write a (long) one line expression to start our web app in a server and pass it to the eval option, it is better to write a small script. Create a file called 'run.st' with the following contents + + ZnServer defaultOn: 8080. + ZnServer default logToStandardOutput. + ZnServer default delegate + map: 'image' to: MyFirstWebApp new; + map: 'redirect-to-image' to: [ :request | ZnResponse redirect: 'image' ]; + map: '/' to: 'redirect-to-image'. + ZnServer default start. + +We added a little twist here: we changed the default root (/) handler to redirect to our new /image web app. Test the startup script like this + + # ./pharo myfirstwebapp.image run.st + 2013-07-10 11:46:58 660707 I Starting ZnManagingMultiThreadedServer HTTP port 8080 + 2013-07-10 11:46:58 670019 D Initializing server socket + 2013-07-10 11:47:12 909356 D Executing request/response loop + 2013-07-10 11:47:12 909356 I Read a ZnRequest(GET /) + 2013-07-10 11:47:12 909356 T GET / 302 16B 0ms + 2013-07-10 11:47:12 909356 I Wrote a ZnResponse(302 Found text/plain;charset=utf-8 16B) + 2013-07-10 11:47:12 909356 I Read a ZnRequest(GET /image) + 2013-07-10 11:47:12 909356 T GET /image 200 282B 0ms + 2013-07-10 11:47:12 909356 I Wrote a ZnResponse(200 OK text/html;charset=utf-8 282B) + 2013-07-10 11:47:12 909356 I Read a ZnRequest(GET /image?raw=true) + 2013-07-10 11:47:12 909356 T GET /image?raw=true 200 18778B 82ms + 2013-07-10 11:47:12 909356 I Wrote a ZnResponse(200 OK image/png 18778B) + +Surf to the correct IP address and port to test you application. Note that /welcome, /help and /image are still available too. Type ctrl-c to kill the server again. Now it is time to put the server in background, running for real. + + # nohup ./pharo myfirstwebapp.image run.st & + +## One more step + +Did you like the example so far ? Would you like to take one more step ? Here is a little extension, as an exercise. + +Add an extra section at the bottom of the main page that shows a miniature version of the previous image. Initially, you can show an empty image. Here are a couple of hints. Read only as far as you need, try to figure it out yourself. + +### Hint 1 + +You can scale a form object into another one using just one message taking a single argument. You can use the same classes that we used for parsing as a tool to generate PNG, JPEG or GIF images given a form. + +When you are done, save your code as a new version. Then update your configuration with a new, stable version. Finally, go to the server, update your image based on the configuration and restart the running vm+image. + +### Hint 2 + +Change the #html method referring to a new variant, /image?previous=true, for the second image. Adjust #handleGetRequest: to look for that attribute. + +Add a helper method #pngImageEntityForForm: and a #previousImage accessor. It is easy to create an empty, blank form as default. Call a #updatePreviousImage at the right spot in #handlePostRequest: and implement the necessary functionality there. + +### Hint 3 + +If you found it difficult to find the right methods, have a look at the following ones: + +- Form>>#scaledIntoFormOfSize: +- Form class>>#extent:depth: +- PNGReadWriter>>#nextPutImage: +- ByteArray class>>#streamContents: +- ZnByteArrayEntity class>>#with:type: + +### Solution, part 1, new methods + +Here are 3 new methods that are part of the solution. + + pngImageEntityForForm: form + ^ ZnByteArrayEntity + with: (ByteArray streamContents: [ :out | + (PNGReadWriter on: out) nextPutImage: form ]) + type: ZnMimeType imagePng + + previousImage + ^ previousImage ifNil: [ + | emptyForm | + emptyForm:= Form extent: 128 @ 128 depth: 8. + previousImage := self pngImageEntityForForm: emptyForm ] + + updatePreviousImage + | form scaled | + form := self form. + scaled := form scaledIntoFormOfSize: 128. + previousImage := self pngImageEntityForForm: scaled + +### Solution, part 2, changed methods + +Here are the changes to 3 existing methods for the complete solution. + + html + ^ 'Image + +

Image

+ +
+
+

Change the image:

+ + +
+

Previous Image

+ + ' + + handleGetRequest: request + (request uri queryAt: #raw ifAbsent: [ nil ]) + ifNotNil: [ ^ ZnResponse ok: self image ]. + (request uri queryAt: #previous ifAbsent: [ nil ]) + ifNotNil: [ ^ ZnResponse ok: self previousImage ]. + ^ ZnResponse ok: (ZnEntity html: self html) + + handlePostRequest: request + | part newImage badRequest | + badRequest := [ ^ ZnResponse badRequest: request ]. + (request hasEntity + and: [ request contentType matches: ZnMimeType multiPartFormData ]) + ifFalse: badRequest. + part := request entity + partNamed: #file + ifNone: badRequest. + newImage := part entity. + (newImage notNil + and: [ newImage contentType matches: 'image/*' asZnMimeType ]) + ifFalse: badRequest. + [ self formForImageEntity: newImage ] + on: Error + do: badRequest. + self updatePreviousImage. + image := newImage. + ^ ZnResponse redirect: #image + +### Solution, part 3, updated configuration + +To update our configuration, add 1 method and change 1 method. + + version2: spec + + spec for: #common do: [ + spec + blessing: #release; + package: 'MyFirstWebApp' with: 'MyFirstWebApp-SvenVanCaekenberghe.2' ] + + stable: spec + + spec for: #common version: '2' + +Of course, you will have to substitute your name for the concrete version. + +## Conclusion + +Congratulations: you have now built and deployed your first web app with Pharo. Hopefully you are interested in learning more. From [the Pharo website](http://www.pharo.org) you should be able to find all the information you need. Don't forget about the [Pharo by Example](http://pharobyexample.org) book and the mailing lists. + +This guide was an introduction to writing web applications using Pharo, touching on the fundamentals of HTTP. Like we mentioned in the introduction, there are a couple of high level frameworks that offer more extensive support for writing web applications. The three most important ones are [Seaside](http://www.seaside.st), [AIDAweb](http://www.aidaweb.si) and [Iliad](http://www.iliadproject.org). + +## Listing + +Here is the full code listing of the web app. You can also find the code, including the tests and the Metacello configuration, checked in to SmalltalkHub in my [MyFirstWebApp](http://www.smalltalkhub.com/#!/~SvenVanCaekenberghe/MyFirstWebApp) project. A similar example is also included in Zinc HTTP Components itself, under the name ZnImageExampleDelegate[Tests]. + + Object subclass: #MyFirstWebApp + instanceVariableNames: '' + classVariableNames: '' + poolDictionaries: '' + category: 'MyFirstWebApp' + + handleRequest: request + request uri path = #image + ifTrue: [ + request method = #GET + ifTrue: [ ^ self handleGetRequest: request ]. + request method = #POST + ifTrue: [ ^ self handlePostRequest: request ] ]. + ^ ZnResponse notFound: request uri + + value: request + ^ self handleRequest: request + + handleGetRequest: request + ^ (request uri queryAt: #raw ifAbsent: [ nil ]) + ifNil: [ ZnResponse ok: (ZnEntity html: self html) ] + ifNotNil: [ ZnResponse ok: self image ] + + handlePostRequest: request + | part newImage badRequest | + badRequest := [ ^ ZnResponse badRequest: request ]. + (request hasEntity + and: [ request contentType matches: ZnMimeType multiPartFormData ]) + ifFalse: badRequest. + part := request entity + partNamed: #file + ifNone: badRequest. + newImage := part entity. + (newImage notNil + and: [ newImage contentType matches: 'image/*' asZnMimeType ]) + ifFalse: badRequest. + [ self formForImageEntity: newImage ] + on: Error + do: badRequest. + image := newImage. + ^ ZnResponse redirect: #image + + html + ^ 'Image + +

Image

+ +
+
+

Change the image:

+ + +
+ ' + + downloadPharoLogo + ^ ZnClient new + beOneShot; + get: 'http://www.pharo.org/files/pharo.png'; + entity + + image + ^ image ifNil: [ image := self downloadPharoLogo ] + + formForImageEntity: imageEntity + | imageType parserClassName parserClass parser | + imageType := imageEntity contentType sub. + parserClassName := imageType asUppercase, #ReadWriter. + parserClass := Smalltalk globals at: parserClassName asSymbol. + parser := parserClass on: imageEntity readStream. + ^ parser nextImage + + form + ^ self formForImageEntity: self image diff --git a/doc/build-and-deploy-1st-webapp/commit.png b/doc/build-and-deploy-1st-webapp/commit.png new file mode 100644 index 000000000..21547ab53 Binary files /dev/null and b/doc/build-and-deploy-1st-webapp/commit.png differ diff --git a/doc/build-and-deploy-1st-webapp/create-droplet-1.png b/doc/build-and-deploy-1st-webapp/create-droplet-1.png new file mode 100644 index 000000000..f488badc5 Binary files /dev/null and b/doc/build-and-deploy-1st-webapp/create-droplet-1.png differ diff --git a/doc/build-and-deploy-1st-webapp/create-droplet-2.png b/doc/build-and-deploy-1st-webapp/create-droplet-2.png new file mode 100644 index 000000000..03c7d86ad Binary files /dev/null and b/doc/build-and-deploy-1st-webapp/create-droplet-2.png differ diff --git a/doc/build-and-deploy-1st-webapp/create-mc-package.png b/doc/build-and-deploy-1st-webapp/create-mc-package.png new file mode 100644 index 000000000..ae9919874 Binary files /dev/null and b/doc/build-and-deploy-1st-webapp/create-mc-package.png differ diff --git a/doc/build-and-deploy-1st-webapp/diffs.png b/doc/build-and-deploy-1st-webapp/diffs.png new file mode 100644 index 000000000..eb2c96432 Binary files /dev/null and b/doc/build-and-deploy-1st-webapp/diffs.png differ diff --git a/doc/build-and-deploy-1st-webapp/dnu.png b/doc/build-and-deploy-1st-webapp/dnu.png new file mode 100644 index 000000000..258e157d2 Binary files /dev/null and b/doc/build-and-deploy-1st-webapp/dnu.png differ diff --git a/doc/build-and-deploy-1st-webapp/first-code.png b/doc/build-and-deploy-1st-webapp/first-code.png new file mode 100644 index 000000000..d46d6c87c Binary files /dev/null and b/doc/build-and-deploy-1st-webapp/first-code.png differ diff --git a/doc/build-and-deploy-1st-webapp/first-test.png b/doc/build-and-deploy-1st-webapp/first-test.png new file mode 100644 index 000000000..fa7a0f27e Binary files /dev/null and b/doc/build-and-deploy-1st-webapp/first-test.png differ diff --git a/doc/build-and-deploy-1st-webapp/image-web-app.png b/doc/build-and-deploy-1st-webapp/image-web-app.png new file mode 100644 index 000000000..7c2db3327 Binary files /dev/null and b/doc/build-and-deploy-1st-webapp/image-web-app.png differ diff --git a/doc/build-and-deploy-1st-webapp/live-change.png b/doc/build-and-deploy-1st-webapp/live-change.png new file mode 100644 index 000000000..097cb7874 Binary files /dev/null and b/doc/build-and-deploy-1st-webapp/live-change.png differ diff --git a/doc/build-and-deploy-1st-webapp/mc-browser.png b/doc/build-and-deploy-1st-webapp/mc-browser.png new file mode 100644 index 000000000..9522c38ca Binary files /dev/null and b/doc/build-and-deploy-1st-webapp/mc-browser.png differ diff --git a/doc/build-and-deploy-1st-webapp/metacello-load.png b/doc/build-and-deploy-1st-webapp/metacello-load.png new file mode 100644 index 000000000..c21d5abac Binary files /dev/null and b/doc/build-and-deploy-1st-webapp/metacello-load.png differ diff --git a/doc/build-and-deploy-1st-webapp/my-droplet.png b/doc/build-and-deploy-1st-webapp/my-droplet.png new file mode 100644 index 000000000..37227a911 Binary files /dev/null and b/doc/build-and-deploy-1st-webapp/my-droplet.png differ diff --git a/doc/build-and-deploy-1st-webapp/pharo-in-action.png b/doc/build-and-deploy-1st-webapp/pharo-in-action.png new file mode 100644 index 000000000..e4e2193a7 Binary files /dev/null and b/doc/build-and-deploy-1st-webapp/pharo-in-action.png differ diff --git a/doc/build-and-deploy-1st-webapp/sthub-v1.png b/doc/build-and-deploy-1st-webapp/sthub-v1.png new file mode 100644 index 000000000..0ef34c0b3 Binary files /dev/null and b/doc/build-and-deploy-1st-webapp/sthub-v1.png differ diff --git a/doc/build-and-deploy-1st-webapp/sthub.png b/doc/build-and-deploy-1st-webapp/sthub.png new file mode 100644 index 000000000..2ea0e4e43 Binary files /dev/null and b/doc/build-and-deploy-1st-webapp/sthub.png differ diff --git a/doc/build-and-deploy-1st-webapp/style.css b/doc/build-and-deploy-1st-webapp/style.css new file mode 100644 index 000000000..b71bb16fa --- /dev/null +++ b/doc/build-and-deploy-1st-webapp/style.css @@ -0,0 +1,27 @@ +body { + font: 24px/1.6 Helvetica; + width: 800px; + margin: 0 auto; +} +code { + font-size: 66%; + overflow: auto; +} +pre, code { + display: block; + background: #F0F0F0; + padding: 0.5em; +} +figure { + display: block; + margin: 0; +} +img { + max-width: 100%; + height: auto; +} +figcaption { + font-style: italic; + text-align: center; + color: gray; +} diff --git a/doc/build-and-deploy-1st-webapp/version.png b/doc/build-and-deploy-1st-webapp/version.png new file mode 100644 index 000000000..b2352d74c Binary files /dev/null and b/doc/build-and-deploy-1st-webapp/version.png differ diff --git a/doc/od-zn-40y-st.md b/doc/od-zn-40y-st.md new file mode 100644 index 000000000..e6ececaf5 --- /dev/null +++ b/doc/od-zn-40y-st.md @@ -0,0 +1,254 @@ +# Zinc HTTP Components in Pharo Smalltalk +## Examples of real world object design + +## Forty years of Smalltalk + +Sven Van Caekenberghe - August 2020 + +*first draft 2020-08-14 not yet published* + + +HTTP is one of the most important underlying technologies of the internet. Any modern system needs a good implementation of HTTP. But a Smalltalk system requires more than that: its implementation of HTTP should be written in itself so that it can be fully understood by its users. + +Zinc HTTP Components is a fundamental part of Pharo Smalltalk providing an implementation of the HTTP protocol including a high level client and server. It is used as the foundation for many applications, including those consuming or offering Web Services and those built with the Seaside Web Application Framework. + +This article shows a number of cases of real world object design from the Zinc HTTP Components framework. + + +## Modelling the protocol + +HTTP consists of requests sent from a client to a server and responses being sent back, over a network. Requests and responses are quite similar: they both contain headers (a collection of key value meta data) and an optional entity (the resource being transferred, like an HTML or text document). They differ in their very first line: requests start with a request line while responses start with a status line. + +From a structural standpoint, our design naturally follows from the specification. We create a message superclass with request and response being subclasses. A headers class encapsulates dealing with the key value meta data, while both request and status line classes represent the first lines. A set of entity subclasses implements the optional entity/resource part. + +From a behaviour standpoint, the protocol tells us what our message objects should be able to do. On the client side, it should be easy and elegant to create and configure a request object. Next it should be possible to write this composite object to a network stream. On the server side, the request object is read from a network stream and reconstructed into the same structure. For the response, a similar path is executed on the server side. + +This leads us to define 2 key messages: readFrom: and writeTo: which all our HTTP objects should implement. In a composite request object for example, #writeTo: is implemented by delegating to its request line, headers and optional entity sub-objects. + +Using carefully selected accessors and class side object creation methods, we build an API to elegantly deal with HTTP. Let's look at some code. Here is a script that executes a client side GET request according to the protocol specification. + + | url request response connection | + url := 'http://stfx.eu/small.html' asUrl. + request := ZnRequest get: url. + request setConnectionClose. + connection := ZnNetworkingUtils socketStreamToUrl: url. + request writeOn: connection. + connection flush. + response := ZnResponse readFrom: connection. + connection close. + response. + +First we define a URL object. Second we use this URL to create a request object. The get: instance creation method does everything to configure this composite object for this common case. Just as an example, we send setConnectionClose to the request to indicate that this will be a one shot request/response cycle - this sets the Connection header equal to Close. + +Next we open a network connection (TCP socket stream) to the host part of the URL. We are now ready to send off our request by writing it on the wire. Finally we flush the stream to make sure the data is fully transferred. + +If all goes well, we can now use the connection to read the response from the server. + +![A response being inspected](zn-response.png) + +In the above script, you can inspect any of the objects involved to figure out what they represent. The standard print representations of the request and response are already helpful. + + a ZnRequest(GET /small.html) + a ZnResponse(200 OK text/html 113B) + +For debugging purposes, we can also have a look at what went over the wire by writing the request and response to the Transcript. + + request writeOn: Transcript. + response writeOn: Transcript. + Transcript flush. + +Which results in the following output. First comes the request. + + GET /small.html HTTP/1.1 + User-Agent: Zinc HTTP Components 1.0 (Pharo/7.0) + Accept: */* + Host: stfx.eu + Connection: close + +The first line is the request line, the other 4 lines constitute the header, there is no entity. Next the response is shown. + + HTTP/1.1 200 OK + Server: nginx/1.18.0 (Ubuntu) + Date: Thu, 13 Aug 2020 09:29:56 GMT + Content-Type: text/html + Content-Length: 113 + Last-Modified: Fri, 04 May 2012 22:00:00 GMT + Connection: close + Etag: "4fa45160-71" + Accept-Ranges: bytes + + + Small +

Small

This is a small HTML document

+ + +Here, the first line is the status line, then come 8 headers, an empty line and the entity, an HTML document. + +On the server side, something similar happens: the request is read, a response object is constructed and written. Here is an example of how such a response could be constructed. + + | page | + page := ZnHtmlOutputStream streamContents: [ :html | + html page: #Small do: [ + html tag: #p with: 'This is a small HTML document' ] ]. + ZnResponse ok: (ZnEntity html: page) + +This should give you a first idea about what is going on inside Zinc HTTP Components and what an object based approach to HTTP looks and feels like. + +The high level approach is to use an HTTP Client object which has a builder style API: you construct and configure your request before executing it, with the result stored inside the client. + + ZnClient new + url: 'http://stfx.eu/small.html'; + beOneShot; + systemPolicy; + accept: ZnMimeType textHtml; + get. + +The beOneShot message tells the client to act like we did earlier, to run only a single request/response cycle. The accept: message specifies the (mime) type of resource (entity) that we want. The systemPolicy message instructs the client to enforce both HTTP success and a matching mime type or else signal an error. The result of the get message is the actual contents of the resource, in this case the HTML as a String. If necessary, the full response object remains available inside the client object. + +BTW, the absolute shortest way to retrieve the contents of a URL is to simply ask for it. + + 'http://stfx.eu/small.html' asUrl retrieveContents. + + +## Custom streams + +In a true dynamically typed language, the actual type (class) of an object is not the most important aspect. Instead, the messages understood by an object are what matters most. + +There is a lot of stream based input and output happening in Zinc HTTP Components. The code doing this IO sticks to a small set of messages that these streams need to understand. We can replace one stream with another, even when they don't share a common superclass, as long as they implement (understand) the same messages. + +Consider HTTP chunked transfer encoding. This is an optional technique whereby the server decides not to return a document in one push, but instead splits it in smaller parts, each part being preceded by its size until an empty chunk ends the stream. This is most often done with dynamically generated content where the total size is not known upfront. + +When a client reads a response, the fact that chunked transfer is used is indicated in a header. A helper object, called the entity reader looks at the headers, sets up the proper stream and instructs the response object to read itself. + +Unknown to the response's readFrom: code, the stream is changed. In case of chunked transfer, the original stream is wrapped in a ChunkedReadStream object that transparently deals with chunk processing. + +The standard next or atEnd messages work as before, but ChunkedReadStream retrieves chunks of specific sizes from its wrapped stream, buffering as necessary. + + ZnChunkedReadStream>>#next + self ensureChunkOrAtEnd. + self atEnd ifTrue: [ ^ nil ]. + ^ chunk at: (position := position + 1) + +Along the same pattern, there are streams that add buffering to unbuffered wrapped streams, that decode bytes into characters using a specific encoding, convert line ends, etc. + +This composition or wrapping can happen multiple times: a character decoding stream could convert bytes to characters from a GZIP decoding stream from a chunked transfer stream from a TLS/SSL stream on a primitive socket stream. So data goes from encrypted to decrypted to being un-chunked to being decompressed and finally being character decoded. + +All this happens transparently and without the need to share a common superclass, just by implementing the same set of required messages each time. + +The advantage is that each functionality, interpreting chunked transfer, GZIP decompression, character decoding, buffering, is encapsulated in one single object and that you can combine them as needed. + + +## Support objects + +One way to start a new object design is to build up domain specific language using support objects. These objects are often easier to define and implement. By encapsulating bits and pieces of specific functionality they are very useful nonetheless. In the domain of HTTP and internet protocols, there are many such objects. + +Being able to parse and interpret the constituent parts of a URL, generating a correctly encoded URL constructed from parts, fits nicely with a single object. Convenience API makes working with URL objects easier. Important behaviour like the construction of a new URL from a relative URL in the context of an existing URL finds its natural place here. + +Once parsed, most easily done by sending asUrl to a String, the URL objects knows all details. + + 'http://www.google.com/search?q=Smalltalk' asUrl queryAt: #q. + "=> 'Smalltalk'" + + 'http://www.google.com/search?q=42' asUrl authorityWithPort. + "=> 'www.google.com:80'" + + 'http://www.google.com/search?q=42' asUrl firstPathSegment. + "=> 'search'" + +The withRelativeReference: message implements a pretty tricky algorithm. + + 'http://www.site.com/static/html/home.html' asZnUrl withRelativeReference: '../js/menu.js'. + "=> http://www.site.com/static/js/menu.js" + +Both of the following expressions generate the same URL, https://encrypted.google.com/search?q=Smalltalk%20en%20Fran%C3%A7ais. Note the encoding. First a builder style API is used, next convenience binary messages are used. + + ZnUrl new + scheme: #https; + host: 'encrypted.google.com'; + addPathSegment: 'search'; + queryAt: #q put: 'Smalltalk en Français'; + yourself. + + 'https://encrypted.google.com' asUrl / #search ? (#q -> 'Smalltalk en Français'). + +Similar objects are MimeType, Cookie or CookieJar. + +Another category of support objects implement algorithms. Examples are CharacterEncoder, BasicAuthenticator, PercentEncoder or Base64Encoder. Placing just the code of one algorithm in a single class can make a lot of sense due to the single responsibility principle. This does not prevent adding a number of convenience methods here and there to better integrate with standard classes. + +For example, Base64 encoding a 10 element ByteArray with values 0 to 9 is equal to the String 'AAECAwQFBgcICQ=='. + + ZnBase64Encoder new encode: #[ 0 1 2 3 4 5 6 7 8 9 ]. + #[ 0 1 2 3 4 5 6 7 8 9 ] base64Encoded. + + ZnBase64Encoder new decode: 'AAECAwQFBgcICQ=='. + 'AAECAwQFBgcICQ==' base64Decoded. + +The unary convenience message does the job in most cases. However, the actual support object has more options: changing the alphabet used, if and how to break lines, what newline character to use, how to do padding, what padding character to use, how strict to be while parsing. These options cannot all be expresses as arguments without increasing complexity again. + + +## Object logging + +During development as well as during production, logging and metrics can be an important tool. In most cases, this is done by writing textual messages to log streams. Interpreting these streams is often very hard. Reimplementing classic logging frameworks does not solve the core issues. + +Object logging is an elegant, powerful as well as efficient solution. The idea is simple: we instrument our code so that it generates actual log objects during its execution. This stream of log objects can then be used for inspection purposes during development as well as for classic textual logging, system monitoring and metrics calculations. + +The design is just as simple. We create a hierarchy of custom log objects below the common superclass LogEvent, itself a subclass of Announcement. To distribute event objects we use an Announcer. This system class delivers Announcements to its subscribers, if any, possibly filtered by type. + +In Pharo you can inspect the following expression to get started. + + ZnLogEvent announcer. + +In one of the inspector tabs you will see LogEvents arrive while Zinc HTTP Components executes client or server side code. + +![Log events being inspected](zn-log-events.png) + +LogEvents are created, filled with useful data, and then emitted. + + ZnLogEvent>>#emit + self announcer announce: self + +Since we already create many objects during execution anyway, like requests, responses, URLs, etc, which are normally not used afterwards, packaging them in an event is cheap. What happens to these events is decided later by the code subscribing to them. + +By implementing proper printOn: methods on each event, we can establish a regular way to print them, covering the classic textual logging case. The following expression sets up a listener for our log events and prints them to the Transcript. + + ZnLogEvent logToTranscript. + +Executing a simple HTTP GET request will result in the following output. + + ZnClient new beOneShot get: 'http://stfx.eu/small.html'. + + 2020-08-14 14:04:00 022 Connection Established stfx.eu:80 146.185.177.20 121ms + 2020-08-14 14:04:00 023 Request Written a ZnRequest(GET /small.html) 0ms + 2020-08-14 14:04:00 024 Response Read a ZnResponse(200 OK text/html 113B) 29ms + 2020-08-14 14:04:00 025 GET /small.html 200 113B 29ms + 2020-08-14 14:04:00 026 Connection Closed 146.185.177.20:80 + +At the standard log level of the HTTP Client, 5 log events where generated: a ConnectionEstablishedEvent, a RequestWrittenEvent, a ResponseReadEvent, a ClientTransactionEvent and finally a ClientConnectionClosedEvent. As you can see, timing information is also included. + +To monitor throughput on a server, we could subscribe to ServerTransactionEvents and count them. Since we also have access to the request and response of each transaction, we can compute the amount of bytes transferred. With access to the URL and all headers, we could add all kinds of extra filters. + +Generating output in the industry standard Apache Common Log Format is just a question of using the proper formatter. + + | formatter | + formatter := ZnCommonLogFormat new. + ZnLogEvent announcer + when: ZnServerTransactionEvent + do: [ :event | + formatter format: event on: Transcript. + Transcript cr; endEntry ]. + +Here the formatter finds all the data it needs in the event's embedded request and response. + + +## Closing + +Smalltalk's simple language and object model, just messaging with minimal syntax constructs and single inheritance, form a surprisingly powerful tool to fully exploit object design in its purest form. + +I hope this article piqued your interest enough to download Pharo Smalltalk and start exploring for yourself. There is much to learn. + + +## Author Bio + +![Sven Van Caekenberghe](svc.png) + +Sven Van Caekenberghe loves software development for cloud and web based systems using high-level, dynamic and interactive environments such as Smalltalk and Lisp. He is the founder and co-owner of Beta Nine, a software engineering company in Hasselt, Belgium. He is a proud supporter of the Pharo Association and Consortium as well as a member of the Board. He actively develops and maintains several key open source libraries for Pharo. diff --git a/doc/svc.png b/doc/svc.png new file mode 100644 index 000000000..074a61e9e Binary files /dev/null and b/doc/svc.png differ diff --git a/zinc-http-components-paper.md b/doc/zinc-http-components-paper.md similarity index 99% rename from zinc-http-components-paper.md rename to doc/zinc-http-components-paper.md index c4084fade..9d398363a 100644 --- a/zinc-http-components-paper.md +++ b/doc/zinc-http-components-paper.md @@ -38,7 +38,7 @@ An HTML resource will have a mime-type like 'text/html;charset=utf-8'. To specify which resource you want, a URL (Uniform Resource Locator) is used. Web addresses are the most common form of URL. -For example, , is a URL that referes to a PNG image resource on a specific server. +For example, , is a URL that referes to a PNG image resource on a specific server. The reliable transport connection between an HTTP client and server is used bidirectionally: both to send the request as well as to receive the response. @@ -708,7 +708,7 @@ A nice feature here, more as an example, are some direct ways to ask for image r ZnEasy getGif: 'http://homepage.mac.com/svc/ADayAtTheBeach/calculator.gif'. ZnEasy getJpeg: 'http://caretaker.wolf359.be/sun-fire-x2100.jpg'. - ZnEasy getPng: 'http://www.pharo-project.org/images/pharo.png'. + ZnEasy getPng: 'http://pharo.org/files/pharo.png'. (ZnEasy getPng: 'http://chart.googleapis.com/chart?cht=tx&chl=', 'a^2+b^2=c^2' encodeForHTTP) asMorph openInHand. diff --git a/doc/zn-log-events.png b/doc/zn-log-events.png new file mode 100644 index 000000000..4bc1eb3a4 Binary files /dev/null and b/doc/zn-log-events.png differ diff --git a/doc/zn-response.png b/doc/zn-response.png new file mode 100644 index 000000000..ddd967b83 Binary files /dev/null and b/doc/zn-response.png differ diff --git a/license.txt b/license.txt index 8b381d2fb..3f70fc990 100644 --- a/license.txt +++ b/license.txt @@ -1,6 +1,6 @@ MIT License -Copyright (C) 2010-2012 Sven Van Caekenberghe and collaborators. +Copyright (C) 2010-2018 Sven Van Caekenberghe and collaborators. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/repository/.properties b/repository/.properties new file mode 100644 index 000000000..c2bedd42d --- /dev/null +++ b/repository/.properties @@ -0,0 +1,3 @@ +{ + #format : #filetree +} \ No newline at end of file diff --git a/repository/BaselineOfZincHTTPComponents.package/.filetree b/repository/BaselineOfZincHTTPComponents.package/.filetree index 8998102c2..57a679737 100644 --- a/repository/BaselineOfZincHTTPComponents.package/.filetree +++ b/repository/BaselineOfZincHTTPComponents.package/.filetree @@ -1,4 +1,5 @@ { - "noMethodMetaData" : true, "separateMethodMetaAndSource" : false, - "useCypressPropertiesFile" : true } + "noMethodMetaData" : true, + "useCypressPropertiesFile" : true +} \ No newline at end of file diff --git a/repository/BaselineOfZincHTTPComponents.package/BaselineOfZincHTTPComponents.class/README.md b/repository/BaselineOfZincHTTPComponents.package/BaselineOfZincHTTPComponents.class/README.md index e69de29bb..12e9c2347 100644 --- a/repository/BaselineOfZincHTTPComponents.package/BaselineOfZincHTTPComponents.class/README.md +++ b/repository/BaselineOfZincHTTPComponents.package/BaselineOfZincHTTPComponents.class/README.md @@ -0,0 +1,33 @@ +I am BaselineOfZincHTTPComponents. +I am a BaselineOf. + +I am used to load the Zinc HTTP Components project from GitHub as in + + Metacello new + repository: 'github://svenvc/zinc/repository'; + baseline: 'ZincHTTPComponents'; + load. + +The following groups are available to load: + + - default (Core & Tests) + - Core (Zinc-HTTP Zinc-HTTP-Examples Zinc-Zodiac-Core) + - Tests (Zinc-Tests Zinc-Character-Encoding-Tests Zinc-Resource-Meta-Tests Zodiac-Tests Zinc-Zodiac-Tests) + - Character-Encoding + - Resource-Meta + - Zodiac + - AWS + - WebDAV + - WebSocket + - SSO-OAuth1 + - SSO-OAuth2 + - SSO-OpenID + - SSO-Demo + - SSO (SSO-OAuth1 SSO-OAuth2 SSO-OpenID SSO-Demo Zinc-SSO-Demo) + - WWS (Zinc-WWS-Server Zinc-WWS-Client) + - REST + - Server-Sent-Events + +See also https://github.com/svenvc/zinc + +Part of Zinc HTTP Components. diff --git a/repository/BaselineOfZincHTTPComponents.package/BaselineOfZincHTTPComponents.class/instance/baseline..st b/repository/BaselineOfZincHTTPComponents.package/BaselineOfZincHTTPComponents.class/instance/baseline..st index 95bae02d4..ead35e350 100644 --- a/repository/BaselineOfZincHTTPComponents.package/BaselineOfZincHTTPComponents.class/instance/baseline..st +++ b/repository/BaselineOfZincHTTPComponents.package/BaselineOfZincHTTPComponents.class/instance/baseline..st @@ -1,239 +1,172 @@ -baseline +baselines baseline: spec - - spec - for: #'common' - do: [ - spec - configuration: 'XMLSupport' - with: [ - spec - versionString: #'stable'; - repository: 'http://www.squeaksource.com/MetacelloRepository' ]; - yourself. - spec - package: 'Zinc-Character-Encoding-Core'; - package: 'Zinc-Character-Encoding-Tests' - with: [ spec requires: 'Zinc-Character-Encoding-Core' ]; - package: 'Zinc-Resource-Meta-Core' - with: [ spec requires: 'Zinc-Character-Encoding-Core' ]; - package: 'Zinc-Resource-Meta-Tests' - with: [ spec requires: 'Zinc-Resource-Meta-Core' ]; - package: 'Zinc-HTTP' - with: [ spec requires: #('Zinc-Character-Encoding-Core' 'Zinc-Resource-Meta-Core') ]; - package: 'Zinc-Patch-HTTPSocket' with: [ spec requires: 'Zinc-HTTP' ]; - package: 'Zinc-AWS' with: [ spec requires: #('Zinc-HTTP' 'XMLSupport') ]; - package: 'Zinc-REST' with: [ spec requires: #('Zinc-HTTP' 'NeoJSON') ]; - package: 'Zinc-WebSocket-Core' with: [ spec requires: 'Zinc-HTTP' ]; - package: 'Zinc-WebSocket-Tests' - with: [ spec requires: 'Zinc-WebSocket-Core' ]; - package: 'Zinc-SSO-OAuth1-Core' - with: [ spec requires: #('Zinc-HTTP' 'NeoJSON') ]; - package: 'Zinc-SSO-OAuth2-Core' - with: [ spec requires: #('Zinc-HTTP' 'NeoJSON') ]; - package: 'Zinc-SSO-OpenID-Core' - with: [ spec requires: #('Zinc-HTTP' 'XMLSupport') ]; - package: 'Zinc-SSO-Demo' - with: [ - spec - requires: - #('Zinc-SSO-OAuth1-Core' 'Zinc-SSO-OAuth2-Core' 'Zinc-SSO-OpenID-Core') ]; - package: 'Zinc-SSO-OAuth1-Tests' - with: [ spec requires: #('Zinc-SSO-OAuth1-Core') ]; - package: 'Zinc-SSO-OpenID-Tests' - with: [ spec requires: #('Zinc-SSO-OpenID-Core') ]; - package: 'Zinc-WebDAV' with: [ spec requires: 'Zinc-HTTP' ]; - package: 'Zinc-WWS-Server' with: [ spec requires: 'Zinc-HTTP' ]; - package: 'Zinc-WWS-Client' with: [ spec requires: 'Zinc-HTTP' ]; - package: 'Zinc-Tests' with: [ spec requires: 'Zinc-HTTP' ]. - spec - group: 'default' with: #('Core'); - group: 'Core' with: #('Zinc-HTTP'); - group: 'CI' with: #('default' 'Tests'); - group: 'Tests' - with: - #('Zinc-Tests' 'Zinc-Character-Encoding-Tests' 'Zinc-Resource-Meta-Tests'); - group: 'Character-Encoding' - with: #('Zinc-Character-Encoding-Core' 'Zinc-Character-Encoding-Tests'); - group: 'Resource-Meta' - with: #('Zinc-Resource-Meta-Core' 'Zinc-Resource-Meta-Tests'); - group: 'Tests' with: #('Zinc-Tests'); - group: 'AWS' with: #('Zinc-AWS'); - group: 'WebDAV' with: #('Zinc-WebDAV'); - group: 'WebSocket' with: #('Zinc-WebSocket-Core' 'Zinc-WebSocket-Tests'); - group: 'SSO-OAuth1' with: #('Zinc-SSO-OAuth1-Core' 'Zinc-SSO-OAuth1-Tests'); - group: 'SSO-OAuth2' with: #('Zinc-SSO-OAuth2-Core'); - group: 'SSO-OpenID' with: #('Zinc-SSO-OpenID-Core' 'Zinc-SSO-OpenID-Tests'); - group: 'SSO-Demo' - with: - #('Zinc-SSO-OAuth1-Core' 'Zinc-SSO-OAuth2-Core' 'Zinc-SSO-OpenID-Core'); - group: 'SSO' - with: #('SSO-OAuth1' 'SSO-OAuth2' 'SSO-OpenID' 'SSO-Demo' 'Zinc-SSO-Demo'); - group: 'WWS' with: #('Zinc-WWS-Server' 'Zinc-WWS-Client'); - group: 'REST' with: #('Zinc-REST'); - yourself ]. - spec - for: #'squeakCommon' - do: [ - spec - configuration: 'NeoJSON' - with: [ - spec - versionString: #'stable'; - repository: 'http://mc.stfx.eu/Neo' ]; - yourself. - spec - package: 'Zinc-Patch-HTTPSocket' with: [ spec requires: 'Zinc-HTTP' ]; - package: 'Zinc-Zodiac' - with: [ spec requires: #('Zinc-HTTP' 'Zodiac-Core' 'Zodiac-Tests') ]; - package: 'Zodiac-Core'; - package: 'Zodiac-Tests' - with: [ - spec - requires: 'Zodiac-Core'; - yourself ]. - spec - group: 'Patch-HTTPSocket' with: #('Zinc-Patch-HTTPSocket'); - group: 'Zodiac' with: #('Zinc-Zodiac'); - group: 'SSL' with: #('Zodiac'); - yourself ]. - spec - for: #'pharo1.x' - do: [ - spec - package: 'Zinc-FileSystem-Legacy'; - package: 'Zinc-Pharo-Forward-Compatibility'; - package: 'Zinc-HTTP' - with: [ spec requires: #('Zinc-FileSystem-Legacy' 'Zinc-Pharo-Forward-Compatibility') ] ]. - spec - for: #'pharo2.x' - do: [ - spec - package: 'Zinc-FileSystem'; - package: 'Zinc-HTTP' with: [ spec requires: 'Zinc-FileSystem' ] ]. - spec - for: #'gemstone' - do: [ - spec - baseline: 'GLASS1' - with: [ - spec - loads: #('Base' 'Announcements'); - repository: 'github://glassdb/glass:master/repository' ]; - baseline: 'PharoCompatibility' - with: [ - spec - loads: #('Core'); - repository: 'github://GsDevKit/PharoCompatibility:master/repository' ]; - baseline: 'Cryptography' - with: [ - spec - loads: #('Cryptography'); - repository: 'github://GsDevKit/Cryptography:master/repository' ]; - baseline: 'GsApplicationTools' - with: [ - spec - loads: #('Core'); - repository: 'github://GsDevKit/gsApplicationTools:master/repository' ]; - baseline: 'NeoJSON' - with: [ spec repository: 'github://GsDevKit/NeoJSON:gs_master/filetree' ]; - yourself. - spec - package: 'SocketStream'; - package: 'Zinc-FileSystem-Legacy' with: [ spec requires: #('GLASS1') ]; - package: 'Zinc-GemStone-Server-Tools' - with: [ spec requires: #('Zinc-HTTP' 'GsApplicationTools') ]; - package: 'Zinc-WebSocket-Core' - with: [ spec requires: #('Zinc-HTTP' 'Cryptography') ]; - package: 'Zinc-HTTP' - with: [ - spec - requires: #('GLASS1' 'Zinc-FileSystem-Legacy'); - includes: #('SocketStream') ]; - package: 'Zinc-Tests' with: [ spec requires: #('PharoCompatibility') ]. - spec - group: 'Core' with: #('Zinc-GemStone-Server-Tools'); - group: 'CI' with: #('REST' 'WebSocket'); - group: 'SSL' with: #(); - yourself ]. - spec - for: #'gs2.x' - do: [ - spec - package: 'Zinc-Character-Encoding-Tests' - with: [ spec includes: 'Zinc-Character-Encoding-GS2-Tests' ]; - package: 'Zinc-Character-Encoding-GS2-Tests' - with: [ spec requires: 'Zinc-Character-Encoding-Tests' ]; - yourself ]. - spec - for: #'gs3.x' - do: [ - spec - package: 'Zinc-Character-Encoding-Tests' - with: [ spec includes: 'Zinc-Character-Encoding-GS3-Tests' ]; - package: 'Zinc-Character-Encoding-GS3-Tests' - with: [ spec requires: 'Zinc-Character-Encoding-Tests' ]; - package: 'Zinc-WebSocket-Core' - with: [ spec requires: #('Zinc-HTTP' 'Cryptography') ]; - yourself ]. - spec - for: #(#'gs2.x' #'gs3.0.x') - do: [ - spec - package: 'Zinc-Character-Encoding-Core' - with: [ spec includes: 'Zinc-Character-Encoding-GS24-Core' ]; - package: 'Zinc-Character-Encoding-GS24-Core' - with: [ spec requires: 'Zinc-Character-Encoding-Core' ]; - yourself ]. - spec - for: #(#'gs2.x' #'gs3.0.x' #'gs3.1.x') - do: [ - spec - package: 'Zinc-Character-Encoding-Tests' - with: [ spec includes: 'Zinc-Character-Encoding-GS-Tests' ]; - package: 'Zinc-Character-Encoding-GS-Tests' - with: [ spec requires: 'Zinc-Character-Encoding-Tests' ]; - yourself ]. - spec - for: - #(#'gs3.2.x' #'gs3.3.x' #'gs3.4.x' #'gs3.5.x' #'gs3.6.x') - do: [ - spec - package: 'Zinc-Character-Encoding-Core' - with: [ spec includes: 'Zinc-Character-Encoding-GS32-Core' ]; - package: 'Zinc-Character-Encoding-GS32-Core' - with: [ spec requires: 'Zinc-Character-Encoding-Core' ]; - yourself ]. - spec - for: - #(#'gs3.7.x' #'gs3.8.x' #'gs3.9.x') - do: [ - spec - package: 'Zinc-Character-Encoding-Core' - with: [ - spec - file: 'Zinc-Character-Encoding-Core.v37'; - includes: 'Zinc-Character-Encoding-GS32-Core' ]; - package: 'Zinc-Character-Encoding-GS32-Core' - with: [ - spec - file: 'Zinc-Character-Encoding-GS32-Core.v37'; - requires: 'Zinc-Character-Encoding-Core' ]; - yourself ]. - spec - for: - #(#'gs3.3.x' #'gs3.4.x' #'gs3.5.x' #'gs3.6.x' #'gs3.7.x' #'gs3.8.x' #'gs3.9.x') - do: [ - spec - baseline: 'Zodiac' - with: [ - spec - loads: #('Core'); - repository: 'github://GsDevKit/zodiac:gs_master/repository' ]; - yourself. - spec - package: 'Zinc-Zodiac' with: [ spec requires: #('Zinc-HTTP' 'Zodiac') ]; - yourself. - spec - group: 'SSL' with: #('Zinc-Zodiac'); - yourself ] + + spec for: #common do: [ + spec + package: 'Zinc-Character-Encoding-Core'; + package: 'Zinc-Character-Encoding-Tests' with: [ spec requires: #('Zinc-Character-Encoding-Core') ]; + package: 'Zinc-Resource-Meta-Core' with: [ spec requires: #('Zinc-Character-Encoding-Core') ]; + package: 'Zinc-Resource-Meta-Tests' with: [ spec requires: #('Zinc-Resource-Meta-Core') ]; + package: 'Zinc-HTTP' with: [ spec requires: #('Zinc-Character-Encoding-Core' 'Zinc-Resource-Meta-Core') ]; + package: 'Zinc-HTTP-Examples' with: [ spec requires: #('Zinc-HTTP') ]; + package: 'Zinc-Tests' with: [ spec requires: #('Zinc-HTTP') ]. + spec + package: 'Zinc-AWS' with: [ spec requires: #('Zinc-HTTP' 'XMLParser') ]; + package: 'Zinc-REST' with: [ spec requires: #('Zinc-HTTP' 'NeoJSON') ]; + package: 'Zinc-WebSocket-Core' with: [ spec requires: #('Zinc-HTTP') ]; + package: 'Zinc-WebSocket-Tests' with: [ spec requires: #('Zinc-WebSocket-Core') ]; + package: 'Zinc-SSO-OAuth1-Core' with: [ spec requires: #('Zinc-HTTP' 'NeoJSON') ]; + package: 'Zinc-SSO-OAuth2-Core' with: [ spec requires: #('Zinc-HTTP' 'NeoJSON') ]; + package: 'Zinc-SSO-OpenID-Core' with: [ spec requires: #('Zinc-HTTP' 'XMLParser') ]; + package: 'Zinc-SSO-Demo' with: [ spec requires: #('Zinc-SSO-OAuth1-Core' 'Zinc-SSO-OAuth2-Core' 'Zinc-SSO-OpenID-Core') ]; + package: 'Zinc-SSO-OAuth1-Tests' with: [ spec requires: #('Zinc-SSO-OAuth1-Core') ]; + package: 'Zinc-SSO-OpenID-Tests' with: [ spec requires: #('Zinc-SSO-OpenID-Core') ]; + package: 'Zinc-WebDAV' with: [ spec requires: #('Zinc-HTTP') ]; + package: 'Zinc-WWS-Server' with: [ spec requires: #('Zinc-HTTP') ]; + package: 'Zinc-WWS-Client' with: [ spec requires: #('Zinc-HTTP') ]; + package: 'Zinc-Server-Sent-Events' with: [ spec requires: #('Zinc-HTTP') ]. + spec + group: 'default' with: #('Core' 'Tests'); + group: 'Core' with: #('Zinc-HTTP' 'Zinc-HTTP-Examples'); + group: 'Tests' with: #('Zinc-Tests' 'Zinc-Character-Encoding-Tests' 'Zinc-Resource-Meta-Tests'); + group: 'Character-Encoding' with: #('Zinc-Character-Encoding-Core' 'Zinc-Character-Encoding-Tests'); + group: 'Resource-Meta' with: #('Zinc-Resource-Meta-Core' 'Zinc-Resource-Meta-Tests'); + group: 'AWS' with: #('Zinc-AWS'); + group: 'WebDAV' with: #('Zinc-WebDAV'); + group: 'WebSocket' with: #('Zinc-WebSocket-Core' 'Zinc-WebSocket-Tests'); + group: 'SSO-OAuth1' with: #('Zinc-SSO-OAuth1-Core' 'Zinc-SSO-OAuth1-Tests'); + group: 'SSO-OAuth2' with: #('Zinc-SSO-OAuth2-Core'); + group: 'SSO-OpenID' with: #('Zinc-SSO-OpenID-Core' 'Zinc-SSO-OpenID-Tests'); + group: 'SSO-Demo' with: #('Zinc-SSO-OAuth1-Core' 'Zinc-SSO-OAuth2-Core' 'Zinc-SSO-OpenID-Core'); + group: 'SSO' with: #('SSO-OAuth1' 'SSO-OAuth2' 'SSO-OpenID' 'SSO-Demo' 'Zinc-SSO-Demo'); + group: 'WWS' with: #('Zinc-WWS-Server' 'Zinc-WWS-Client'); + group: 'REST' with: #('Zinc-REST'); + group: 'Server-Sent-Events' with: #('Zinc-Server-Sent-Events') ]. + + spec for: #'pharo' do: [ + spec baseline: 'NeoJSON' + with: [ spec + loads: #('Core'); + repository: 'github://svenvc/NeoJSON:master/repository' ]; + baseline: 'XMLParser' + with: [ spec + loads: #('Core'); + repository: 'github://pharo-contributions/XML-XMLParser:master/src' ]; + baseline: 'Zodiac Project' + with: [ spec + className: 'BaselineOfZodiac'; + loads: #('Core' 'Tests'); + repository: 'github://svenvc/zodiac:master/repository' ]. + spec + package: 'Zinc-Pharo-Character-Encoding-Core' with: [ spec requires: #('Zinc-Character-Encoding-Core') ]; + package: 'Zinc-Pharo-Character-Encoding-Tests' with: [ spec requires: #('Zinc-Character-Encoding-Tests' + 'Zinc-Pharo-Character-Encoding-Core') ]; + package: 'Zinc-Pharo-Resource-Meta-Core' with: [ spec requires: #('Zinc-Resource-Meta-Core' 'Zinc-Pharo-Character-Encoding-Core') ]; + package: 'Zinc-Pharo-Resource-Meta-Tests' with: [ spec requires: #('Zinc-Pharo-Resource-Meta-Core' 'Zinc-Resource-Meta-Tests') ]; + package: 'Zinc-Pharo-HTTP' with: [ spec postLoadDoIt: #recompileZnLogEventHierarchy; + requires: #('Zinc-Pharo-Character-Encoding-Core' 'Zinc-Pharo-Resource-Meta-Core' 'Zinc-HTTP') ]; + package: 'Zinc-Pharo-HTTP-Examples' with: [ spec requires: #('Zinc-HTTP-Examples') ]; + package: 'Zinc-Pharo-Tests' with: [ spec requires: #('Zinc-Tests') ]. + spec + package: 'Zinc-Pharo-WebSocket-Core' with: [ spec requires: #('Zinc-Pharo-HTTP') ]; + package: 'Zinc-Pharo-WebSocket-Tests' with: [ spec requires: #('Zinc-Pharo-WebSocket-Core') ]; + package: 'Zinc-Zodiac-Core' with: [ spec requires: #('Zinc-HTTP' 'Zodiac Project') ]; + package: 'Zinc-Zodiac-Tests' with: [ spec requires: #('Zinc-Zodiac-Core') ]; + package: 'Zinc-Pharo-Zodiac-Tests' with: [ spec requires: #('Zinc-Zodiac-Tests') ]. + spec + group: 'Core' with: #('Zinc-Pharo-HTTP' 'Zinc-Pharo-HTTP-Examples'); + group: 'Tests' with: #('Zinc-Pharo-Character-Encoding-Tests' 'Zinc-Pharo-Resource-Meta-Tests' 'Zinc-Pharo-Tests'); + group: 'Character-Encoding' with: #('Zinc-Pharo-Character-Encoding-Core' 'Zinc-Pharo-Character-Encoding-Tests'); + group: 'Resource-Meta' with: #('Zinc-Pharo-Resource-Meta-Core' 'Zinc-Resource-Meta-Tests'); + group: 'WebSocket' with: #('Zinc-Pharo-WebSocket-Core' 'Zinc-Pharo-WebSocket-Tests'); + group: 'SSL' with: #('Zinc-Zodiac-Core' 'Zinc-Zodiac-Tests' 'Zinc-Pharo-Zodiac-Tests'); + group: 'Zodiac' with: #('SSL') ]. "alias" + + spec for: #'gemstone' do: [ + spec baseline: 'GLASS1' + with: [ spec + loads: #('Base' 'GsMisc'); + repository: 'github://glassdb/glass:master/repository' ]; + baseline: 'PharoCompatibility' + with: [ spec + loads: #('Core'); + repository: 'github://GsDevKit/PharoCompatibility:master/repository' ]; + baseline: 'OrderedDictionary' + with: [ spec + loads: #('Core'); + repository: 'github://GsDevKit/OrderedDictionary:master/repository' ]; + baseline: 'NeoJSON' + with: [ spec + loads: #('Core'); + repository: 'github://GsDevKit/NeoJSON:gs_master/filetree' ]; + baseline: 'Cryptography' + with: [ spec + loads: #('Cryptography'); + repository: 'github://GsDevKit/Cryptography:master/repository' ]; + baseline: 'GsApplicationTools' + with: [ spec + loads: #('Core'); + repository: 'github://GsDevKit/gsApplicationTools:master/repository' ]; + baseline: 'XMLParser' + with: [ spec + loads: #('Core'); + repository: 'github://GsDevKit/XML-XMLParser:gemstone/src' ]; + baseline: 'Zodiac Project' + with: [ spec + className: 'BaselineOfZodiac'; + loads: #('Core'); + repository: 'github://GsDevKit/zodiac:gs_master/repository' ]. + + spec + package: 'Zinc-GemStone-Resource-Meta-Core' with: [ spec requires: #('Zinc-Resource-Meta-Core') ]; + package: 'Zinc-GemStone-Resource-Meta-Tests' with: [ spec requires: #('Zinc-GemStone-Resource-Meta-Core' 'Zinc-Resource-Meta-Tests') ]; + package: 'Zinc-Tests' with: [ spec requires: #('PharoCompatibility') ]; + package: 'Zinc-GemStone-HTTP' with: [ spec requires: #('GLASS1' 'Zinc-FileSystem-Legacy' 'Zinc-GemStone-Resource-Meta-Core' 'Zinc-HTTP'); + includes: #('SocketStream') ]; + package: 'Zinc-GemStone-HTTP-Examples' with: [ spec requires: #('Zinc-HTTP-Examples') ]; + package: 'Zinc-GemStone-Tests' with: [ spec requires: #('Zinc-Tests') ]. + spec + package: 'Zinc-GemStone-WebSocket-Core' with: [ spec requires: #('Zinc-GemStone-HTTP') ]; + package: 'Zinc-GemStone-WebSocket-Tests' with: [ spec requires: #('Zinc-GemStone-WebSocket-Core') ]; + package: 'Zinc-Zodiac-Core' with: [ spec requires: #('Zinc-GemStone-HTTP' 'Zodiac Project') ]; + package: 'Zinc-Zodiac-Tests' with: [ spec requires: #('Zinc-Zodiac-Core') ]; + package: 'Zinc-GemStone-Zodiac-Tests' with: [ spec requires: #('Zinc-Zodiac-Tests') ]; + package: 'SocketStream'; + package: 'Zinc-FileSystem-Legacy' with: [ spec requires: #('GLASS1') ]; + package: 'Zinc-GemStone-Server-Tools' with: [ spec requires: #('Zinc-HTTP' 'GsApplicationTools') ]; + package: 'Zinc-WebSocket-Core' with: [ spec requires: #('Zinc-HTTP' 'Cryptography') ]. + spec + group: 'Core' with: #('Zinc-GemStone-HTTP' 'Zinc-GemStone-HTTP-Examples' 'Zinc-GemStone-Server-Tools'); + group: 'CI' with: #('REST' 'WebSocket'); + group: 'Tests' with: #('Zinc-GemStone-Resource-Meta-Tests' 'Zinc-GemStone-Tests'); + group: 'Resource-Meta' with: #('Zinc-GemStone-Resource-Meta-Core' 'Zinc-Resource-Meta-Tests'); + group: 'WebSocket' with: #('Zinc-GemStone-WebSocket-Core' 'Zinc-GemStone-WebSocket-Tests'); + group: 'SSL' with: #('Zinc-Zodiac-Core' 'Zinc-Zodiac-Tests' 'Zinc-GemStone-Zodiac-Tests'); + group: 'Zodiac' with: #('SSL') ]. "alias" + + spec + for: #'gs3.x' + do: [ + spec + package: 'Zinc-Character-Encoding-Tests' + with: [ spec includes: #('Zinc-Character-Encoding-GS3-Tests') ]; + package: 'Zinc-Character-Encoding-GS3-Tests' + with: [ spec requires: #('Zinc-Character-Encoding-Tests') ]; + package: 'Zinc-WebSocket-Core' + with: [ spec requires: #('Zinc-HTTP' 'Cryptography') ] ]. + spec + for: #(#'gs3.7.x' #'gs3.8.x' #'gs3.9.x') + do: [ + spec + package: 'Zinc-Character-Encoding-Core' + with: [ spec + file: 'Zinc-Character-Encoding-Core.v37'; + includes: #('Zinc-GemStone-Character-Encoding-Core' 'Zinc-Character-Encoding-GS32-Core') ]; + package: 'Zinc-GemStone-Character-Encoding-Core' + with: [ spec + file: 'Zinc-GemStone-Character-Encoding-Core.v37'; + requires: #('SocketStream') ]; + package: 'Zinc-Character-Encoding-GS32-Core' + with: [ spec + file: 'Zinc-Character-Encoding-GS32-Core.v37'; + requires: #('Zinc-Character-Encoding-Core') ] ]. diff --git a/repository/BaselineOfZincHTTPComponents.package/BaselineOfZincHTTPComponents.class/instance/recompileZnLogEventHierarchy.st b/repository/BaselineOfZincHTTPComponents.package/BaselineOfZincHTTPComponents.class/instance/recompileZnLogEventHierarchy.st new file mode 100644 index 000000000..643f31647 --- /dev/null +++ b/repository/BaselineOfZincHTTPComponents.package/BaselineOfZincHTTPComponents.class/instance/recompileZnLogEventHierarchy.st @@ -0,0 +1,6 @@ +doits +recompileZnLogEventHierarchy + "This is a hack, but somehow there is something wrong in the instance variables layout, + which can only be fixed by recompiling, which should happen but doesn't, so force it." + + ZnLogEvent withAllSubclassesDo: #recompile \ No newline at end of file diff --git a/repository/BaselineOfZincHTTPComponents.package/BaselineOfZincHTTPComponents.class/methodProperties.json b/repository/BaselineOfZincHTTPComponents.package/BaselineOfZincHTTPComponents.class/methodProperties.json deleted file mode 100644 index 50b53ef03..000000000 --- a/repository/BaselineOfZincHTTPComponents.package/BaselineOfZincHTTPComponents.class/methodProperties.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "class" : { - }, - "instance" : { - "baseline:" : "dkh 02/24/2023 12:14" } } diff --git a/repository/BaselineOfZincHTTPComponents.package/BaselineOfZincHTTPComponents.class/properties.json b/repository/BaselineOfZincHTTPComponents.package/BaselineOfZincHTTPComponents.class/properties.json index 14e50ffd0..d20345efb 100644 --- a/repository/BaselineOfZincHTTPComponents.package/BaselineOfZincHTTPComponents.class/properties.json +++ b/repository/BaselineOfZincHTTPComponents.package/BaselineOfZincHTTPComponents.class/properties.json @@ -1,14 +1,11 @@ { + "commentStamp" : "SvenVanCaekenberghe 7/5/2020 16:32", + "super" : "BaselineOf", "category" : "BaselineOfZincHTTPComponents", - "classinstvars" : [ - ], - "classvars" : [ - ], - "commentStamp" : "", - "instvars" : [ - ], + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], "name" : "BaselineOfZincHTTPComponents", - "pools" : [ - ], - "super" : "BaselineOf", - "type" : "normal" } + "type" : "normal" +} \ No newline at end of file diff --git a/repository/BaselineOfZincHTTPComponents.package/monticello.meta/categories.st b/repository/BaselineOfZincHTTPComponents.package/monticello.meta/categories.st index a66021749..c4c0addff 100644 --- a/repository/BaselineOfZincHTTPComponents.package/monticello.meta/categories.st +++ b/repository/BaselineOfZincHTTPComponents.package/monticello.meta/categories.st @@ -1 +1 @@ -SystemOrganization addCategory: #'BaselineOfZincHTTPComponents'! +self packageOrganizer ensurePackage: #'BaselineOfZincHTTPComponents' withTags: #()! diff --git a/repository/BaselineOfZincHTTPComponents.package/monticello.meta/version b/repository/BaselineOfZincHTTPComponents.package/monticello.meta/version deleted file mode 100644 index d5ae69d81..000000000 --- a/repository/BaselineOfZincHTTPComponents.package/monticello.meta/version +++ /dev/null @@ -1 +0,0 @@ -(name 'BaselineOfZincHTTPComponents-dkh.31' message '''update' id 'a66616e4-6f94-47e1-81fe-75b0a0ab3c67' date '02/24/2023' time '12:17:54' author 'dkh' ancestors ((name 'BaselineOfZincHTTPComponents-dkh.30' message 'GsDevKit/GsdevKit#132: update lineup for 3.5.5 and add support for 3.7.x, 3,8.x and 3.9.x ' id 'bac70a37-ac2a-4075-b8a3-988153e7bedc' date '01/13/2021' time '12:56:08' author 'dkh' ancestors ((name 'BaselineOfZincHTTPComponents-dkh.29' message 'proposed fix for Issue #87' id 'daadc724-9376-4910-bb0f-de20bc3753c3' date '06/18/2019' time '15:13:25' author 'dkh' ancestors ((name 'BaselineOfZincHTTPComponents-dkh.28' message 'GsDevKit/GsDevKit#110: zinc should be loaded into 3.5' id '51af281a-09c0-418d-9d71-cc85f1ac862f' date '01/26/2019' time '14:11:57' author 'dkh' ancestors ((name 'BaselineOfZincHTTPComponents-dkh.27' message 'Use master branch of gsApplicationTools ... only use tag when the an incompatible update is in the offing ...' id '02c75a03-6340-4b34-a44e-a872b0b9a837' date '05/18/2016' time '16:53:20' author 'dkh' ancestors ((name 'BaselineOfZincHTTPComponents-dkh.26' message 'Move ZnGemServerManagingMultiThreadedServer and supporting methods (ZnDefaultGsTransactionalServerDelegate>>handleRequest:gemServer:) into Zinc-GemStone-Server-Tools package ... where GemServer code belongs ... cleanin g up sent but not implemented' id '40501c1a-bac1-44dd-a942-f6b47baf3041' date '05/18/2016' time '14:19:34' author 'dkh' ancestors ((name 'BaselineOfZincHTTPComponents-dkh.25' message 'merged by GitFileTree-MergeDriver' id '973a0e77-f5df-4eb4-bdfe-5391bddf5749' date '04/04/2016' time '09:41:30' author 'dkh' ancestors ((name 'BaselineOfZincHTTPComponents-dkh.24' message 'zodiac needs to include 3.4 as well' id '904b521e-9c6a-40f8-ab3b-babbe67e59c2' date '02/10/2016' time '09:33:20' author 'dkh' ancestors ((name 'BaselineOfZincHTTPComponents-dkh.23' message 'update for GemStone 3.4 ...' id '17b01c43-d2d8-46d9-8a7d-7b938c0511f6' date '12/21/2015' time '15:11:55' author 'dkh' ancestors () stepChildren ())) stepChildren ())(name 'BaselineOfZincHTTPComponents-PaulDeBruicker.23' message 'specify the GsDevKit zinc github repo in the gemstone section of the baseline so it looks in the right spot for the GemStone packages' id 'ef6a667d-5788-45b9-ae6d-517aa8eb01d8' date '02/13/2016' time '00:11:30' author 'PaulDeBruicker' ancestors ((name 'BaselineOfZincHTTPComponents-dkh.22' message 'Issue #77: Zodiac will only be supported for GemStone 3.3, so fiddle baseline. Update ZnHTTPSTests>>testGForceInria and and adjust ZnHTTPSTests for GemStone' id '703519fa-30e3-4d08-b127-463916eafe8b' date '12/15/2015' time '14:44:35' author 'dkh' ancestors ((name 'BaselineOfZincHTTPComponents-dkh.21' message 'Issue #77: remove SSL group from the CI group ... not expected to pass at the moment' id 'f794ab4a-4f35-4b17-a926-575d33cab3f3' date '12/01/2015' time '14:45:48' author 'dkh' ancestors ((name 'BaselineOfZincHTTPComponents-dkh.20' message 'Issue #77: refactor the packages in baseline for Zodiac. GemStone uses a baseline project to load Zodiac and Pharo does not ... add SSL group for loading SSL support on pharo or GemStone' id 'e8cbcd5d-4c1f-4fb9-ae4a-f6a82ed2d4ae' date '12/01/2015' time '11:47:16' author 'dkh' ancestors ((name 'BaselineOfZincHTTPComponents-dkh.19' message 'Issue #69: fix mistake in tag spec for baseline ... start adding support for Rest transactional example' id 'b8134660-25eb-46d5-9cbb-b4c4fe2b21d7' date '01/12/2015' time '10:58:15' author 'dkh' ancestors ((name 'BaselineOfZincHTTPComponents-dkh.18' message 'Issue #58: change GsApplicationTools project reference back to: gsApplicationTools:v.1.?' id 'f297e739-5425-4c6e-8262-3039ca36e341' date '01/07/2015' time '16:20:29' author 'dkh' ancestors ((name 'BaselineOfZincHTTPComponents-dkh.17' message 'Issue #58: use dev branch for GsApplicationTools' id '72892950-b7c5-4a4c-b40a-5cfd0b98688a' date '01/06/2015' time '15:14:41' author 'dkh' ancestors ((name 'BaselineOfZincHTTPComponents-dkh.16' message 'Issue #58: mods to be minimally compatible with GsApplicationTools v1.0.0' id '34566c61-ca88-4eaf-b4ad-2149de6755fe' date '01/06/2015' time '11:59:55' author 'dkh' ancestors ((name 'BaselineOfZincHTTPComponents-dkh.15' message 'Issue #58: ZnSingleThreadedServer>>handleRequestProtected: don''t pass the exception ... debugMode doesn''t quite appy to GemStone ... need different granularity I think ... GsPharo 0.9.2 needs to be used' id '6f7305be-3dbd-40f9-a81f-3f920132534e' date '12/02/2014' time '16:29:14' author 'dkh' ancestors ((name 'BaselineOfZincHTTPComponents-dkh.14' message 'Issue #58: add dependency upon GsApplicationTools for Zinc-GemStone-Server-Tools, a new package which holds ZnServerStarter class needed by web socket tests ...' id 'e09422d2-1065-4ceb-8845-084f10a4c4f7' date '11/26/2014' time '13:39:44' author 'dkh' ancestors ((name 'BaselineOfZincHTTPComponents-dkh.13' message 'NeoJSON is on gs_master branch now' id 'f6fdee09-f8c6-4738-907c-215a6eae7bcf' date '11/22/2014' time '12:39:05' author 'dkh' ancestors ((name 'BaselineOfZincHTTPComponents-dkh.12' message 'Issue #58: load NeoJSON tests now ... they should be passing?' id '71ee4921-b3f1-4550-bec2-277fe6363086' date '11/20/2014' time '17:43:32' author 'dkh' ancestors ((name 'BaselineOfZincHTTPComponents-dkh.11' message 'Issue #58: switch Cryptography project to use GsDevKit/Cryptography project and add backin into CI group, since the project should now load without errors' id '7602ba2b-54cc-45de-a7ad-567191c9b1c5' date '11/18/2014' time '12:09:24' author 'dkh' ancestors ((name 'BaselineOfZincHTTPComponents-dkh.10' message 'Issue #58: pull WebSockt from CI group ... interested in seeing how things are for NeoJSON and and zinc core' id '3b28664e-1ba7-4d76-aff5-e5c89eb2236b' date '11/17/2014' time '18:16:16' author 'dkh' ancestors ((name 'BaselineOfZincHTTPComponents-dkh.9' message 'Issue #60: reference GsDevKit/NeoJSON directory and only load Core, since NeoJSON tests are known not to pass: https://github.com/GsDevKit/NeoJSON/issues/3' id '73c88fdd-cbe7-4a5c-8485-923f314c6c44' date '11/17/2014' time '18:14:59' author 'dkh' ancestors ((name 'BaselineOfZincHTTPComponents-dkh.8' message 'Issue #58: re-enable websocket as part of CI ... this will take longer to get straightened out as both NeoJSON and WebSockets have issues' id '342aa976-a532-4d8b-a428-6e7cb9111a41' date '11/17/2014' time '18:03:43' author 'dkh' ancestors ((name 'BaselineOfZincHTTPComponents-dkh.7' message 'Issue #58: disable web-socket test load for ''CI'' until Cryptography load issue resolved Issue #60: fix NeoJSON specification and add ''REST'' to ''CI'' group ... defer reference to GsDevKit/NeoJSON project until travis tests have been enabled ...' id 'fec29f56-7062-41a6-85d2-9d7a439559e4' date '11/17/2014' time '16:33:26' author 'dkh' ancestors ((name 'BaselineOfZincHTTPComponents-dkh.6' message 'Issue #58: cryptography configuration needed updating, so added stable version while I was at it ...' id '00296be5-2d30-418d-a474-2f373393e313' date '11/01/2014' time '13:00:26' author 'dkh' ancestors ((name 'BaselineOfZincHTTPComponents-dkh.5' message 'Issue #58: no stable version defined in the current Cryptography configuration...' id '67a67e96-6cf9-4c32-a87a-9e3d8bc3d647' date '11/01/2014' time '12:46:46' author 'dkh' ancestors ((name 'BaselineOfZincHTTPComponents-dkh.4' message 'Issue #58: create CI group to specifiy packages to be loaded by travis-ci for testing ... for GemStone that includes Zinc-WebSocket-Tests ... expect failures since Cryptography project is not up to snuff...yet' id '15af9af6-9829-412c-be6b-70cdc7fda24a' date '11/01/2014' time '12:28:52' author 'dkh' ancestors ((name 'BaselineOfZincHTTPComponents-dkh.3' message 'Issue #55: bump mcz version of the gs_master branch BaselineOfZincHTTPComponents, to avoid duplice mcz versions' id 'e175a78c-9a07-4da1-97a2-96eb0d40ba96' date '10/27/2014' time '15:10:49' author 'dkh' ancestors ((name 'BaselineOfZincHTTPComponents-dkh.2' message 'restore Zodiac packages and groups to configuration ... not ported to GemStone yet, see Issue #55 for details' id '6311a4fb-03de-42dc-81c7-b96971d30368' date '10/15/2014' time '11:55:57' author 'dkh' ancestors ((name 'BaselineOfZincHTTPComponents-JohanBrichau.1' message 'renamed BaselineOfZinc to BaselineOfZincHTTPComponents' id 'e022a66b-5bb4-47eb-b582-74a3ebaa1f9e' date '07/09/2014' time '21:16:19' author 'JohanBrichau' ancestors () stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ()) \ No newline at end of file diff --git a/repository/BaselineOfZincHTTPComponents.package/properties.json b/repository/BaselineOfZincHTTPComponents.package/properties.json index f037444a7..6f31cf5a2 100644 --- a/repository/BaselineOfZincHTTPComponents.package/properties.json +++ b/repository/BaselineOfZincHTTPComponents.package/properties.json @@ -1,2 +1 @@ -{ - } +{ } \ No newline at end of file diff --git a/repository/BaselineOfZincHTTPComponentsCore.package/.filetree b/repository/BaselineOfZincHTTPComponentsCore.package/.filetree new file mode 100644 index 000000000..57a679737 --- /dev/null +++ b/repository/BaselineOfZincHTTPComponentsCore.package/.filetree @@ -0,0 +1,5 @@ +{ + "separateMethodMetaAndSource" : false, + "noMethodMetaData" : true, + "useCypressPropertiesFile" : true +} \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnBase64EncoderTests.class/README.md b/repository/BaselineOfZincHTTPComponentsCore.package/BaselineOfZincHTTPComponentsCore.class/README.md similarity index 100% rename from repository/Zinc-Character-Encoding-Tests.package/ZnBase64EncoderTests.class/README.md rename to repository/BaselineOfZincHTTPComponentsCore.package/BaselineOfZincHTTPComponentsCore.class/README.md diff --git a/repository/BaselineOfZincHTTPComponentsCore.package/BaselineOfZincHTTPComponentsCore.class/instance/baseline..st b/repository/BaselineOfZincHTTPComponentsCore.package/BaselineOfZincHTTPComponentsCore.class/instance/baseline..st new file mode 100644 index 000000000..6c586cc9f --- /dev/null +++ b/repository/BaselineOfZincHTTPComponentsCore.package/BaselineOfZincHTTPComponentsCore.class/instance/baseline..st @@ -0,0 +1,25 @@ +baseline +baseline: spec + + spec for: #common do: [ + spec postLoadDoIt: #postLoadCore:. + spec baseline: 'ZodiacCore' with: [ + spec + repository: 'github://feenkcom/zodiac/repository' ]. + + spec + package: 'Zinc-Character-Encoding-Core'; + package: 'Zinc-Character-Encoding-Tests' with: [ spec requires: 'Zinc-Character-Encoding-Core' ]; + package: 'Zinc-Resource-Meta-Core' with: [ spec requires: 'Zinc-Character-Encoding-Core' ]; + package: 'Zinc-Resource-Meta-Tests' with: [ spec requires: 'Zinc-Resource-Meta-Core' ]; + package: 'Zinc-HTTP' with: [ spec requires: #('Zinc-Character-Encoding-Core' 'Zinc-Resource-Meta-Core') ]; + package: 'Zinc-HTTP-UnixSocket' with: [ spec requires: #('Zinc-HTTP') ]; + package: 'Zinc-HTTP-Examples' with: [ spec requires: #('Zinc-HTTP') ]; + package: 'Zinc-Tests' with: [ spec requires: 'Zinc-HTTP' ]; + package: 'Zinc-Zodiac-Core' with: [ spec requires: #('Zinc-HTTP' 'ZodiacCore') ]; + package: 'Zinc-Zodiac-Tests' with: [ spec requires: #('Zinc-Zodiac-Core') ]. + + "spec + group: 'default' with: #('Core' 'Tests'); + group: 'Core' with: #('Zinc-HTTP' 'Zinc-HTTP-Examples' 'Zinc-Zodiac-Core'); + group: 'Tests' with: #('Zinc-Tests' 'Zinc-Character-Encoding-Tests' 'Zinc-Resource-Meta-Tests' 'Zinc-Zodiac-Tests')" ] \ No newline at end of file diff --git a/repository/BaselineOfZincHTTPComponentsCore.package/BaselineOfZincHTTPComponentsCore.class/instance/postLoadCore..st b/repository/BaselineOfZincHTTPComponentsCore.package/BaselineOfZincHTTPComponentsCore.class/instance/postLoadCore..st new file mode 100644 index 000000000..2ced468ee --- /dev/null +++ b/repository/BaselineOfZincHTTPComponentsCore.package/BaselineOfZincHTTPComponentsCore.class/instance/postLoadCore..st @@ -0,0 +1,16 @@ +private +postLoadCore: spec + "Packages that are part of `pharo-project/pharo`, e.g. `Zinc-HTTP` won't be updated to reflect this repository. + Force the packages to be reloaded." + | repository head | + + repository := IceRepository registry detect: [ :each | each name = 'zinc' ]. + head := repository head description. + repository checkoutBranch: head. + + "This is a hack, but somehow there is something wrong in the instance variables layout, + which can only be fixed by recompiling, which should happen but doesn't, so force it. + + ported from a postload in zinc" + + ZnLogEvent withAllSubclassesDo: #recompile \ No newline at end of file diff --git a/repository/BaselineOfZincHTTPComponentsCore.package/BaselineOfZincHTTPComponentsCore.class/properties.json b/repository/BaselineOfZincHTTPComponentsCore.package/BaselineOfZincHTTPComponentsCore.class/properties.json new file mode 100644 index 000000000..9a43a4a6e --- /dev/null +++ b/repository/BaselineOfZincHTTPComponentsCore.package/BaselineOfZincHTTPComponentsCore.class/properties.json @@ -0,0 +1,11 @@ +{ + "commentStamp" : "", + "super" : "BaselineOf", + "category" : "BaselineOfZincHTTPComponentsCore", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "BaselineOfZincHTTPComponentsCore", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/BaselineOfZincHTTPComponentsCore.package/monticello.meta/categories.st b/repository/BaselineOfZincHTTPComponentsCore.package/monticello.meta/categories.st new file mode 100644 index 000000000..73069a7ee --- /dev/null +++ b/repository/BaselineOfZincHTTPComponentsCore.package/monticello.meta/categories.st @@ -0,0 +1 @@ +SystemOrganization addCategory: #BaselineOfZincHTTPComponentsCore! diff --git a/repository/Zinc-Character-Encoding-GS2-Tests.package/monticello.meta/initializers.st b/repository/BaselineOfZincHTTPComponentsCore.package/monticello.meta/initializers.st similarity index 100% rename from repository/Zinc-Character-Encoding-GS2-Tests.package/monticello.meta/initializers.st rename to repository/BaselineOfZincHTTPComponentsCore.package/monticello.meta/initializers.st diff --git a/repository/BaselineOfZincHTTPComponentsCore.package/monticello.meta/package b/repository/BaselineOfZincHTTPComponentsCore.package/monticello.meta/package new file mode 100644 index 000000000..b0b82043f --- /dev/null +++ b/repository/BaselineOfZincHTTPComponentsCore.package/monticello.meta/package @@ -0,0 +1 @@ +(name 'BaselineOfZincHTTPComponentsCore') \ No newline at end of file diff --git a/repository/BaselineOfZincHTTPComponentsCore.package/properties.json b/repository/BaselineOfZincHTTPComponentsCore.package/properties.json new file mode 100644 index 000000000..6f31cf5a2 --- /dev/null +++ b/repository/BaselineOfZincHTTPComponentsCore.package/properties.json @@ -0,0 +1 @@ +{ } \ No newline at end of file diff --git a/repository/BaselineOfZincHTTPComponentsRest.package/.filetree b/repository/BaselineOfZincHTTPComponentsRest.package/.filetree new file mode 100644 index 000000000..57a679737 --- /dev/null +++ b/repository/BaselineOfZincHTTPComponentsRest.package/.filetree @@ -0,0 +1,5 @@ +{ + "separateMethodMetaAndSource" : false, + "noMethodMetaData" : true, + "useCypressPropertiesFile" : true +} \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedWriteStreamTests.class/README.md b/repository/BaselineOfZincHTTPComponentsRest.package/BaselineOfZincHTTPComponentsRest.class/README.md similarity index 100% rename from repository/Zinc-Character-Encoding-Tests.package/ZnBufferedWriteStreamTests.class/README.md rename to repository/BaselineOfZincHTTPComponentsRest.package/BaselineOfZincHTTPComponentsRest.class/README.md diff --git a/repository/BaselineOfZincHTTPComponentsRest.package/BaselineOfZincHTTPComponentsRest.class/instance/baseline..st b/repository/BaselineOfZincHTTPComponentsRest.package/BaselineOfZincHTTPComponentsRest.class/instance/baseline..st new file mode 100644 index 000000000..b1884cba8 --- /dev/null +++ b/repository/BaselineOfZincHTTPComponentsRest.package/BaselineOfZincHTTPComponentsRest.class/instance/baseline..st @@ -0,0 +1,14 @@ +baseline +baseline: spec + + spec for: #common do: [ + spec baseline: 'NeoJSON' with: [ + spec repository: 'github://svenvc/NeoJSON:master/repository' ]. + spec baseline: 'ZincHTTPComponentsCore' with: [ + spec repository: 'github://feenkcom/zinc/repository' ]. + + spec + package: 'Zinc-REST' with: [ spec requires: #('ZincHTTPComponentsCore' 'NeoJSON') ]. + + "spec + group: 'REST' with: #('Zinc-REST')" ] diff --git a/repository/BaselineOfZincHTTPComponentsRest.package/BaselineOfZincHTTPComponentsRest.class/properties.json b/repository/BaselineOfZincHTTPComponentsRest.package/BaselineOfZincHTTPComponentsRest.class/properties.json new file mode 100644 index 000000000..4988c9d39 --- /dev/null +++ b/repository/BaselineOfZincHTTPComponentsRest.package/BaselineOfZincHTTPComponentsRest.class/properties.json @@ -0,0 +1,11 @@ +{ + "commentStamp" : "", + "super" : "BaselineOf", + "category" : "BaselineOfZincHTTPComponentsRest", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "BaselineOfZincHTTPComponentsRest", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/BaselineOfZincHTTPComponentsRest.package/monticello.meta/categories.st b/repository/BaselineOfZincHTTPComponentsRest.package/monticello.meta/categories.st new file mode 100644 index 000000000..3562785b5 --- /dev/null +++ b/repository/BaselineOfZincHTTPComponentsRest.package/monticello.meta/categories.st @@ -0,0 +1 @@ +SystemOrganization addCategory: #BaselineOfZincHTTPComponentsRest! diff --git a/repository/Zinc-Character-Encoding-GS24-Core.package/monticello.meta/initializers.st b/repository/BaselineOfZincHTTPComponentsRest.package/monticello.meta/initializers.st similarity index 100% rename from repository/Zinc-Character-Encoding-GS24-Core.package/monticello.meta/initializers.st rename to repository/BaselineOfZincHTTPComponentsRest.package/monticello.meta/initializers.st diff --git a/repository/BaselineOfZincHTTPComponentsRest.package/monticello.meta/package b/repository/BaselineOfZincHTTPComponentsRest.package/monticello.meta/package new file mode 100644 index 000000000..934a0d159 --- /dev/null +++ b/repository/BaselineOfZincHTTPComponentsRest.package/monticello.meta/package @@ -0,0 +1 @@ +(name 'BaselineOfZincHTTPComponentsRest') \ No newline at end of file diff --git a/repository/BaselineOfZincHTTPComponentsRest.package/properties.json b/repository/BaselineOfZincHTTPComponentsRest.package/properties.json new file mode 100644 index 000000000..6f31cf5a2 --- /dev/null +++ b/repository/BaselineOfZincHTTPComponentsRest.package/properties.json @@ -0,0 +1 @@ +{ } \ No newline at end of file diff --git a/repository/BaselineOfZincHTTPComponentsWebSocket.package/.filetree b/repository/BaselineOfZincHTTPComponentsWebSocket.package/.filetree new file mode 100644 index 000000000..57a679737 --- /dev/null +++ b/repository/BaselineOfZincHTTPComponentsWebSocket.package/.filetree @@ -0,0 +1,5 @@ +{ + "separateMethodMetaAndSource" : false, + "noMethodMetaData" : true, + "useCypressPropertiesFile" : true +} \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTests.class/README.md b/repository/BaselineOfZincHTTPComponentsWebSocket.package/BaselineOfZincHTTPComponentsWebSocket.class/README.md similarity index 100% rename from repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTests.class/README.md rename to repository/BaselineOfZincHTTPComponentsWebSocket.package/BaselineOfZincHTTPComponentsWebSocket.class/README.md diff --git a/repository/BaselineOfZincHTTPComponentsWebSocket.package/BaselineOfZincHTTPComponentsWebSocket.class/instance/baseline..st b/repository/BaselineOfZincHTTPComponentsWebSocket.package/BaselineOfZincHTTPComponentsWebSocket.class/instance/baseline..st new file mode 100644 index 000000000..c96997149 --- /dev/null +++ b/repository/BaselineOfZincHTTPComponentsWebSocket.package/BaselineOfZincHTTPComponentsWebSocket.class/instance/baseline..st @@ -0,0 +1,14 @@ +baseline +baseline: spec + + spec for: #common do: [ + + spec baseline: 'ZincHTTPComponentsCore' with: [ + spec repository: 'github://feenkcom/zinc/repository' ]. + + spec + package: 'Zinc-WebSocket-Core' with: [ spec requires: 'ZincHTTPComponentsCore' ]; + package: 'Zinc-WebSocket-Tests' with: [ spec requires: 'Zinc-WebSocket-Core' ]. + + "spec + group: 'WebSocket' with: #('Zinc-WebSocket-Core' 'Zinc-WebSocket-Tests')" ] diff --git a/repository/BaselineOfZincHTTPComponentsWebSocket.package/BaselineOfZincHTTPComponentsWebSocket.class/properties.json b/repository/BaselineOfZincHTTPComponentsWebSocket.package/BaselineOfZincHTTPComponentsWebSocket.class/properties.json new file mode 100644 index 000000000..0ff9596b0 --- /dev/null +++ b/repository/BaselineOfZincHTTPComponentsWebSocket.package/BaselineOfZincHTTPComponentsWebSocket.class/properties.json @@ -0,0 +1,11 @@ +{ + "commentStamp" : "", + "super" : "BaselineOf", + "category" : "BaselineOfZincHTTPComponentsWebSocket", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "BaselineOfZincHTTPComponentsWebSocket", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/BaselineOfZincHTTPComponentsWebSocket.package/monticello.meta/categories.st b/repository/BaselineOfZincHTTPComponentsWebSocket.package/monticello.meta/categories.st new file mode 100644 index 000000000..9909bd36b --- /dev/null +++ b/repository/BaselineOfZincHTTPComponentsWebSocket.package/monticello.meta/categories.st @@ -0,0 +1 @@ +SystemOrganization addCategory: #BaselineOfZincHTTPComponentsWebSocket! diff --git a/repository/Zinc-Zodiac.package/monticello.meta/initializers.st b/repository/BaselineOfZincHTTPComponentsWebSocket.package/monticello.meta/initializers.st similarity index 100% rename from repository/Zinc-Zodiac.package/monticello.meta/initializers.st rename to repository/BaselineOfZincHTTPComponentsWebSocket.package/monticello.meta/initializers.st diff --git a/repository/BaselineOfZincHTTPComponentsWebSocket.package/monticello.meta/package b/repository/BaselineOfZincHTTPComponentsWebSocket.package/monticello.meta/package new file mode 100644 index 000000000..80f664e51 --- /dev/null +++ b/repository/BaselineOfZincHTTPComponentsWebSocket.package/monticello.meta/package @@ -0,0 +1 @@ +(name 'BaselineOfZincHTTPComponentsWebSocket') \ No newline at end of file diff --git a/repository/BaselineOfZincHTTPComponentsWebSocket.package/properties.json b/repository/BaselineOfZincHTTPComponentsWebSocket.package/properties.json new file mode 100644 index 000000000..6f31cf5a2 --- /dev/null +++ b/repository/BaselineOfZincHTTPComponentsWebSocket.package/properties.json @@ -0,0 +1 @@ +{ } \ No newline at end of file diff --git a/repository/ConfigurationOfZincHTTPComponents.package/.filetree b/repository/ConfigurationOfZincHTTPComponents.package/.filetree index 8998102c2..57a679737 100644 --- a/repository/ConfigurationOfZincHTTPComponents.package/.filetree +++ b/repository/ConfigurationOfZincHTTPComponents.package/.filetree @@ -1,4 +1,5 @@ { - "noMethodMetaData" : true, "separateMethodMetaAndSource" : false, - "useCypressPropertiesFile" : true } + "noMethodMetaData" : true, + "useCypressPropertiesFile" : true +} \ No newline at end of file diff --git a/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/README.md b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/README.md index 651c86847..6a70ce439 100644 --- a/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/README.md +++ b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/README.md @@ -7,6 +7,7 @@ Here are some ways to load this project: ConfigurationOfZincHTTPComponents load. ConfigurationOfZincHTTPComponents project latestVersion load. ConfigurationOfZincHTTPComponents project latestVersion load: 'Tests'. + (ConfigurationOfZincHTTPComponents project version: '2.9.1') load. ConfigurationOfZincHTTPComponents project bleedingEdge load. Here is a list of available groups: diff --git a/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/class/getZnAndZdcMCVersions.st b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/class/getZnAndZdcMCVersions.st new file mode 100644 index 000000000..91768c861 --- /dev/null +++ b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/class/getZnAndZdcMCVersions.st @@ -0,0 +1,5 @@ +accessing +getZnAndZdcMCVersions + ^ (MCWorkingCopy allManagers collect: #description) + select: [ :each | ('*Zinc*' match: each) or: [ '*Zodiac*' match: each ]] + thenCollect: #asString \ No newline at end of file diff --git a/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/class/getZnAndZdcMCVersionsReport.st b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/class/getZnAndZdcMCVersionsReport.st new file mode 100644 index 000000000..89dab34c7 --- /dev/null +++ b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/class/getZnAndZdcMCVersionsReport.st @@ -0,0 +1,3 @@ +accessing +getZnAndZdcMCVersionsReport + ^ String crlf join: (self getZnAndZdcMCVersions) sorted \ No newline at end of file diff --git a/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/baseline20..st b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/baseline20..st index 0e896f5a7..b8e02d720 100644 --- a/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/baseline20..st +++ b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/baseline20..st @@ -4,7 +4,7 @@ baseline20: spec spec for: #common do: [ spec blessing: #baseline; - description: 'Baseline for Zinc HTTP Components, a framework to deal with the HTTP networking'; + description: 'Baseline for Zinc HTTP Components, a framework to deal with HTTP networking'; author: 'SvenVanCaekenberghe'; repository: 'http://mc.stfx.eu/ZincHTTPComponents'. spec project: 'XML Support' with: [ diff --git a/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/baseline21..st b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/baseline21..st index 421d976dd..6284c99a3 100644 --- a/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/baseline21..st +++ b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/baseline21..st @@ -4,7 +4,7 @@ baseline21: spec spec for: #common do: [ spec blessing: #baseline; - description: 'Baseline for Zinc HTTP Components, a framework to deal with the HTTP networking'; + description: 'Baseline for Zinc HTTP Components, a framework to deal with HTTP networking'; author: 'SvenVanCaekenberghe'; repository: 'http://mc.stfx.eu/ZincHTTPComponents'. spec project: 'XML Support' with: [ diff --git a/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/baseline22..st b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/baseline22..st index 13ca81934..3ee04c1d3 100644 --- a/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/baseline22..st +++ b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/baseline22..st @@ -4,7 +4,7 @@ baseline22: spec spec for: #common do: [ spec blessing: #baseline; - description: 'Baseline for Zinc HTTP Components, a framework to deal with the HTTP networking'; + description: 'Baseline for Zinc HTTP Components, a framework to deal with HTTP networking'; author: 'SvenVanCaekenberghe'; repository: 'http://mc.stfx.eu/ZincHTTPComponents'. spec project: 'XML Support' with: [ diff --git a/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/baseline23..st b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/baseline23..st index e26557664..b9bc3db10 100644 --- a/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/baseline23..st +++ b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/baseline23..st @@ -4,7 +4,7 @@ baseline23: spec spec for: #common do: [ spec blessing: #baseline; - description: 'Baseline for Zinc HTTP Components, a framework to deal with the HTTP networking'; + description: 'Baseline for Zinc HTTP Components, a framework to deal with HTTP networking'; author: 'SvenVanCaekenberghe'; repository: 'http://mc.stfx.eu/ZincHTTPComponents'. spec project: 'XML Support' with: [ diff --git a/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/baseline24..st b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/baseline24..st index 1b645e614..5e71fc95d 100644 --- a/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/baseline24..st +++ b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/baseline24..st @@ -4,7 +4,7 @@ baseline24: spec spec for: #pharo do: [ spec blessing: #baseline; - description: 'Baseline for Zinc HTTP Components, a framework to deal with the HTTP networking'; + description: 'Baseline for Zinc HTTP Components, a framework to deal with HTTP networking'; author: 'SvenVanCaekenberghe'. spec project: 'XML Support' with: [ spec diff --git a/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/baseline25..st b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/baseline25..st new file mode 100644 index 000000000..5a5b7888f --- /dev/null +++ b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/baseline25..st @@ -0,0 +1,73 @@ +baselines +baseline25: spec + + spec for: #pharo do: [ + spec + blessing: #baseline; + description: 'Baseline for Zinc HTTP Components, a framework to deal with HTTP networking'; + author: 'SvenVanCaekenberghe'. + spec project: 'XML Support' with: [ + spec + className: 'ConfigurationOfXMLSupport'; + versionString: #'stable'; + repository: 'http://www.squeaksource.com/MetacelloRepository' ]. + spec project: 'Neo JSON' with: [ + spec + className: 'ConfigurationOfNeoJSON'; + versionString: #'stable'; + repository: 'http://mc.stfx.eu/Neo' ]. + spec package: 'Zodiac-Core' with: [ spec repository: 'http://mc.stfx.eu/Zodiac' ]. + spec package: 'Zodiac-Tests' with: [ spec repository: 'http://mc.stfx.eu/Zodiac' ]. + spec + package: 'Zinc-Character-Encoding-Core'; + package: 'Zinc-Character-Encoding-Tests' with: [ spec requires: 'Zinc-Character-Encoding-Core' ]; + package: 'Zinc-Resource-Meta-Core' with: [ spec requires: 'Zinc-Character-Encoding-Core' ]; + package: 'Zinc-Resource-Meta-Tests' with: [ spec requires: 'Zinc-Resource-Meta-Core' ]; + package: 'Zinc-HTTP' with: [ spec requires: #( 'Zinc-Character-Encoding-Core' 'Zinc-Resource-Meta-Core' ) ]; + package: 'Zinc-Patch-HTTPSocket' with: [ spec requires: 'Zinc-HTTP' ]; + package: 'Zinc-AWS' with: [ spec requires: #( 'Zinc-HTTP' 'XML Support' ) ]; + package: 'Zinc-REST' with: [ spec requires: #( 'Zinc-HTTP' 'Neo JSON' ) ]; + package: 'Zinc-Zodiac' with: [ spec requires: #( 'Zinc-HTTP' 'Zodiac-Core' 'Zodiac-Tests' ) ]; + package: 'Zinc-WebSocket-Core' with: [ spec requires: 'Zinc-HTTP' ]; + package: 'Zinc-WebSocket-Tests' with: [ spec requires: 'Zinc-WebSocket-Core' ]; + package: 'Zinc-SSO-OAuth1-Core' with: [ spec requires: #( 'Zinc-HTTP' 'Neo JSON' ) ]; + package: 'Zinc-SSO-OAuth2-Core' with: [ spec requires: #( 'Zinc-HTTP' 'Neo JSON' ) ]; + package: 'Zinc-SSO-OpenID-Core' with: [ spec requires: #( 'Zinc-HTTP' 'XML Support' ) ]; + package: 'Zinc-SSO-Demo' with: [ spec requires: #( 'Zinc-SSO-OAuth1-Core' 'Zinc-SSO-OAuth2-Core' 'Zinc-SSO-OpenID-Core' ) ]; + package: 'Zinc-SSO-OAuth1-Tests' with: [ spec requires: #( 'Zinc-SSO-OAuth1-Core' ) ]; + package: 'Zinc-SSO-OpenID-Tests' with: [ spec requires: #( 'Zinc-SSO-OpenID-Core' ) ]; + package: 'Zinc-WebDAV' with: [ spec requires: 'Zinc-HTTP' ]; + package: 'Zinc-WWS-Server' with: [ spec requires: 'Zinc-HTTP' ]; + package: 'Zinc-WWS-Client' with: [ spec requires: 'Zinc-HTTP' ]; + package: 'Zinc-Tests' with: [ spec requires: 'Zinc-HTTP' ]; + package: 'Zinc-Seaside'. "For now, no dependence on Seaside itself" + spec + group: 'default' with: #('Core'); + group: 'Core' with: #('Zinc-HTTP'); + group: 'Tests' with: #('Zinc-Tests' 'Zinc-Character-Encoding-Tests' 'Zinc-Resource-Meta-Tests'); + group: 'Character-Encoding' with: #('Zinc-Character-Encoding-Core' 'Zinc-Character-Encoding-Tests'); + group: 'Resource-Meta' with: #('Zinc-Resource-Meta-Core' 'Zinc-Resource-Meta-Tests'); + group: 'Zodiac' with: #('Zinc-Zodiac'); + group: 'AWS' with: #('Zinc-AWS'); + group: 'WebDAV' with: #('Zinc-WebDAV'); + group: 'WebSocket' with: #('Zinc-WebSocket-Core' 'Zinc-WebSocket-Tests'); + group: 'SSO-OAuth1' with: #('Zinc-SSO-OAuth1-Core' 'Zinc-SSO-OAuth1-Tests'); + group: 'SSO-OAuth2' with: #('Zinc-SSO-OAuth2-Core'); + group: 'SSO-OpenID' with: #('Zinc-SSO-OpenID-Core' 'Zinc-SSO-OpenID-Tests'); + group: 'SSO-Demo' with: #('Zinc-SSO-OAuth1-Core' 'Zinc-SSO-OAuth2-Core' 'Zinc-SSO-OpenID-Core'); + group: 'SSO' with: #('SSO-OAuth1' 'SSO-OAuth2' 'SSO-OpenID' 'SSO-Demo' 'Zinc-SSO-Demo'); + group: 'WWS' with: #('Zinc-WWS-Server' 'Zinc-WWS-Client'); + group: 'REST' with: #('Zinc-REST'); + group: 'Patch-HTTPSocket' with: #('Zinc-Patch-HTTPSocket'); + group: 'Seaside' with: #('Zinc-Seaside') ]. + spec for: #squeakCommon do:[spec repository: 'http://mc.stfx.eu/ZincHTTPComponents']. + spec for: #'pharo1.x' do: [ + spec + package: 'Zinc-FileSystem-Legacy'; + package: 'Zinc-Pharo-Forward-Compatibility'; + package: 'Zinc-HTTP' with: [ spec requires: #('Zinc-FileSystem-Legacy' 'Zinc-Pharo-Forward-Compatibility') ] ]. + spec for: #'pharo2.x' do: [ + spec + package: 'Zinc-FileSystem'; + package: 'Zinc-HTTP' with: [ spec requires: 'Zinc-FileSystem' ]; + package: 'Zinc-Resource-Meta-FileSystem' with: [ spec requires: 'Zinc-HTTP' ] ] diff --git a/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/baseline26..st b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/baseline26..st new file mode 100644 index 000000000..04af3b9b4 --- /dev/null +++ b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/baseline26..st @@ -0,0 +1,79 @@ +baselines +baseline26: spec + + spec for: #pharo do: [ + spec + blessing: #baseline; + description: 'Baseline for Zinc HTTP Components, a framework to deal with HTTP networking'; + author: 'SvenVanCaekenberghe'. + spec project: 'XML Support' with: [ + spec + className: 'ConfigurationOfXMLSupport'; + versionString: #'stable'; + repository: 'http://www.squeaksource.com/MetacelloRepository' ]. + spec project: 'Neo JSON' with: [ + spec + className: 'ConfigurationOfNeoJSON'; + versionString: #'stable'; + repository: 'http://mc.stfx.eu/Neo' ]. + spec package: 'Zodiac-Core' with: [ spec repository: 'http://mc.stfx.eu/Zodiac' ]. + spec package: 'Zodiac-Tests' with: [ spec repository: 'http://mc.stfx.eu/Zodiac' ]. + spec + package: 'Zinc-Character-Encoding-Core'; + package: 'Zinc-Character-Encoding-Tests' with: [ spec requires: 'Zinc-Character-Encoding-Core' ]; + package: 'Zinc-Resource-Meta-Core' with: [ spec requires: 'Zinc-Character-Encoding-Core' ]; + package: 'Zinc-Resource-Meta-Tests' with: [ spec requires: 'Zinc-Resource-Meta-Core' ]; + package: 'Zinc-HTTP' with: [ spec requires: #( 'Zinc-Character-Encoding-Core' 'Zinc-Resource-Meta-Core' ) ]; + package: 'Zinc-Patch-HTTPSocket' with: [ spec requires: 'Zinc-HTTP' ]; + package: 'Zinc-AWS' with: [ spec requires: #( 'Zinc-HTTP' 'XML Support' ) ]; + package: 'Zinc-REST' with: [ spec requires: #( 'Zinc-HTTP' 'Neo JSON' ) ]; + package: 'Zinc-Zodiac' with: [ spec requires: #( 'Zinc-HTTP' 'Zodiac-Core' 'Zodiac-Tests' ) ]; + package: 'Zinc-WebSocket-Core' with: [ spec requires: 'Zinc-HTTP' ]; + package: 'Zinc-WebSocket-Tests' with: [ spec requires: 'Zinc-WebSocket-Core' ]; + package: 'Zinc-SSO-OAuth1-Core' with: [ spec requires: #( 'Zinc-HTTP' 'Neo JSON' ) ]; + package: 'Zinc-SSO-OAuth2-Core' with: [ spec requires: #( 'Zinc-HTTP' 'Neo JSON' ) ]; + package: 'Zinc-SSO-OpenID-Core' with: [ spec requires: #( 'Zinc-HTTP' 'XML Support' ) ]; + package: 'Zinc-SSO-Demo' with: [ spec requires: #( 'Zinc-SSO-OAuth1-Core' 'Zinc-SSO-OAuth2-Core' 'Zinc-SSO-OpenID-Core' ) ]; + package: 'Zinc-SSO-OAuth1-Tests' with: [ spec requires: #( 'Zinc-SSO-OAuth1-Core' ) ]; + package: 'Zinc-SSO-OpenID-Tests' with: [ spec requires: #( 'Zinc-SSO-OpenID-Core' ) ]; + package: 'Zinc-WebDAV' with: [ spec requires: 'Zinc-HTTP' ]; + package: 'Zinc-WWS-Server' with: [ spec requires: 'Zinc-HTTP' ]; + package: 'Zinc-WWS-Client' with: [ spec requires: 'Zinc-HTTP' ]; + package: 'Zinc-Tests' with: [ spec requires: 'Zinc-HTTP' ]; + package: 'Zinc-Seaside'. "For now, no dependence on Seaside itself" + spec + group: 'default' with: #('Core'); + group: 'Core' with: #('Zinc-HTTP'); + group: 'Tests' with: #('Zinc-Tests' 'Zinc-Character-Encoding-Tests' 'Zinc-Resource-Meta-Tests'); + group: 'Character-Encoding' with: #('Zinc-Character-Encoding-Core' 'Zinc-Character-Encoding-Tests'); + group: 'Resource-Meta' with: #('Zinc-Resource-Meta-Core' 'Zinc-Resource-Meta-Tests'); + group: 'Zodiac' with: #('Zinc-Zodiac'); + group: 'AWS' with: #('Zinc-AWS'); + group: 'WebDAV' with: #('Zinc-WebDAV'); + group: 'WebSocket' with: #('Zinc-WebSocket-Core' 'Zinc-WebSocket-Tests'); + group: 'SSO-OAuth1' with: #('Zinc-SSO-OAuth1-Core' 'Zinc-SSO-OAuth1-Tests'); + group: 'SSO-OAuth2' with: #('Zinc-SSO-OAuth2-Core'); + group: 'SSO-OpenID' with: #('Zinc-SSO-OpenID-Core' 'Zinc-SSO-OpenID-Tests'); + group: 'SSO-Demo' with: #('Zinc-SSO-OAuth1-Core' 'Zinc-SSO-OAuth2-Core' 'Zinc-SSO-OpenID-Core'); + group: 'SSO' with: #('SSO-OAuth1' 'SSO-OAuth2' 'SSO-OpenID' 'SSO-Demo' 'Zinc-SSO-Demo'); + group: 'WWS' with: #('Zinc-WWS-Server' 'Zinc-WWS-Client'); + group: 'REST' with: #('Zinc-REST'); + group: 'Patch-HTTPSocket' with: #('Zinc-Patch-HTTPSocket'); + group: 'Seaside' with: #('Zinc-Seaside') ]. + spec for: #squeakCommon do:[ spec repository: 'http://mc.stfx.eu/ZincHTTPComponents' ]. + spec for: #'pharo1.x' do: [ + spec + package: 'Zinc-FileSystem-Legacy'; + package: 'Zinc-Pharo-Forward-Compatibility'; + package: 'Zinc-HTTP' with: [ spec requires: #('Zinc-FileSystem-Legacy' 'Zinc-Pharo-Forward-Compatibility') ] ]. + spec for: #'pharo2.x' do: [ + spec + package: 'Zinc-FileSystem'; + package: 'Zinc-pharo2-forward-compatibility'; + package: 'Zinc-HTTP' with: [ spec requires: #('Zinc-FileSystem' 'Zinc-pharo2-forward-compatibility')]; + package: 'Zinc-Resource-Meta-FileSystem' with: [ spec requires: 'Zinc-HTTP' ] ]. + spec for: #'pharo3.x' do: [ + spec + package: 'Zinc-FileSystem'; + package: 'Zinc-HTTP' with: [ spec requires: 'Zinc-FileSystem' ]; + package: 'Zinc-Resource-Meta-FileSystem' with: [ spec requires: 'Zinc-HTTP' ] ] diff --git a/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/baseline27..st b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/baseline27..st new file mode 100644 index 000000000..5faea0d32 --- /dev/null +++ b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/baseline27..st @@ -0,0 +1,89 @@ +baselines +baseline27: spec + + spec for: #pharo do: [ + spec + blessing: #baseline; + description: 'Baseline for Zinc HTTP Components, a framework to deal with HTTP networking'; + author: 'SvenVanCaekenberghe'. + spec project: 'XML Support' with: [ + spec + className: 'ConfigurationOfXMLSupport'; + versionString: #'stable'; + repository: 'http://www.squeaksource.com/MetacelloRepository' ]. + spec project: 'Neo JSON' with: [ + spec + className: 'ConfigurationOfNeoJSON'; + versionString: #'stable'; + repository: 'http://mc.stfx.eu/Neo' ]. + spec package: 'Zodiac-Core' with: [ spec repository: 'http://mc.stfx.eu/Zodiac' ]. + spec package: 'Zodiac-Tests' with: [ spec repository: 'http://mc.stfx.eu/Zodiac' ]. + spec + package: 'Zinc-Character-Encoding-Core'; + package: 'Zinc-Character-Encoding-Tests' with: [ spec requires: 'Zinc-Character-Encoding-Core' ]; + package: 'Zinc-Resource-Meta-Core' with: [ spec requires: 'Zinc-Character-Encoding-Core' ]; + package: 'Zinc-Resource-Meta-Tests' with: [ spec requires: 'Zinc-Resource-Meta-Core' ]; + package: 'Zinc-HTTP' with: [ spec requires: #( 'Zinc-Character-Encoding-Core' 'Zinc-Resource-Meta-Core' ) ]; + package: 'Zinc-Patch-HTTPSocket' with: [ spec requires: 'Zinc-HTTP' ]; + package: 'Zinc-AWS' with: [ spec requires: #( 'Zinc-HTTP' 'XML Support' ) ]; + package: 'Zinc-REST' with: [ spec requires: #( 'Zinc-HTTP' 'Neo JSON' ) ]; + package: 'Zinc-Zodiac' with: [ spec requires: #( 'Zinc-HTTP' 'Zodiac-Core' 'Zodiac-Tests' ) ]; + package: 'Zinc-WebSocket-Core' with: [ spec requires: 'Zinc-HTTP' ]; + package: 'Zinc-WebSocket-Tests' with: [ spec requires: 'Zinc-WebSocket-Core' ]; + package: 'Zinc-SSO-OAuth1-Core' with: [ spec requires: #( 'Zinc-HTTP' 'Neo JSON' ) ]; + package: 'Zinc-SSO-OAuth2-Core' with: [ spec requires: #( 'Zinc-HTTP' 'Neo JSON' ) ]; + package: 'Zinc-SSO-OpenID-Core' with: [ spec requires: #( 'Zinc-HTTP' 'XML Support' ) ]; + package: 'Zinc-SSO-Demo' with: [ spec requires: #( 'Zinc-SSO-OAuth1-Core' 'Zinc-SSO-OAuth2-Core' 'Zinc-SSO-OpenID-Core' ) ]; + package: 'Zinc-SSO-OAuth1-Tests' with: [ spec requires: #( 'Zinc-SSO-OAuth1-Core' ) ]; + package: 'Zinc-SSO-OpenID-Tests' with: [ spec requires: #( 'Zinc-SSO-OpenID-Core' ) ]; + package: 'Zinc-WebDAV' with: [ spec requires: 'Zinc-HTTP' ]; + package: 'Zinc-WWS-Server' with: [ spec requires: 'Zinc-HTTP' ]; + package: 'Zinc-WWS-Client' with: [ spec requires: 'Zinc-HTTP' ]; + package: 'Zinc-Tests' with: [ spec requires: 'Zinc-HTTP' ]; + package: 'Zinc-Seaside'. "For now, no dependence on Seaside itself" + spec + group: 'default' with: #('Core'); + group: 'Core' with: #('Zinc-HTTP'); + group: 'Tests' with: #('Zinc-Tests' 'Zinc-Character-Encoding-Tests' 'Zinc-Resource-Meta-Tests'); + group: 'Character-Encoding' with: #('Zinc-Character-Encoding-Core' 'Zinc-Character-Encoding-Tests'); + group: 'Resource-Meta' with: #('Zinc-Resource-Meta-Core' 'Zinc-Resource-Meta-Tests'); + group: 'Zodiac' with: #('Zinc-Zodiac'); + group: 'AWS' with: #('Zinc-AWS'); + group: 'WebDAV' with: #('Zinc-WebDAV'); + group: 'WebSocket' with: #('Zinc-WebSocket-Core' 'Zinc-WebSocket-Tests'); + group: 'SSO-OAuth1' with: #('Zinc-SSO-OAuth1-Core' 'Zinc-SSO-OAuth1-Tests'); + group: 'SSO-OAuth2' with: #('Zinc-SSO-OAuth2-Core'); + group: 'SSO-OpenID' with: #('Zinc-SSO-OpenID-Core' 'Zinc-SSO-OpenID-Tests'); + group: 'SSO-Demo' with: #('Zinc-SSO-OAuth1-Core' 'Zinc-SSO-OAuth2-Core' 'Zinc-SSO-OpenID-Core'); + group: 'SSO' with: #('SSO-OAuth1' 'SSO-OAuth2' 'SSO-OpenID' 'SSO-Demo' 'Zinc-SSO-Demo'); + group: 'WWS' with: #('Zinc-WWS-Server' 'Zinc-WWS-Client'); + group: 'REST' with: #('Zinc-REST'); + group: 'Patch-HTTPSocket' with: #('Zinc-Patch-HTTPSocket'); + group: 'Seaside' with: #('Zinc-Seaside') ]. + spec for: #squeakCommon do:[ spec repository: 'http://mc.stfx.eu/ZincHTTPComponents' ]. + spec for: #'pharo1.x' do: [ + spec + package: 'Zinc-FileSystem-Legacy'; + package: 'Zinc-Pharo-Forward-Compatibility'; + package: 'Zinc-HTTP' with: [ spec requires: #('Zinc-FileSystem-Legacy' 'Zinc-Pharo-Forward-Compatibility') ] ]. + spec for: #'pharo2.x' do: [ + spec + package: 'Zinc-FileSystem'; + package: 'Zinc-pharo2-forward-compatibility'; + package: 'Zinc-HTTP' with: [ spec requires: #('Zinc-FileSystem' 'Zinc-pharo2-forward-compatibility')]; + package: 'Zinc-Resource-Meta-FileSystem' with: [ spec requires: 'Zinc-HTTP' ] ]. + spec for: #'pharo3.x' do: [ + spec + package: 'Zinc-FileSystem'; + package: 'Zinc-HTTP' with: [ spec requires: 'Zinc-FileSystem' ]; + package: 'Zinc-Resource-Meta-FileSystem' with: [ spec requires: 'Zinc-HTTP' ] ]. + spec for: #'pharo4.x' do: [ + spec + package: 'Zinc-FileSystem'; + package: 'Zinc-HTTP' with: [ spec requires: 'Zinc-FileSystem' ]; + package: 'Zinc-Resource-Meta-FileSystem' with: [ spec requires: 'Zinc-HTTP' ] ]. + spec for: #'pharo5.x' do: [ + spec + package: 'Zinc-FileSystem'; + package: 'Zinc-HTTP' with: [ spec requires: 'Zinc-FileSystem' ]; + package: 'Zinc-Resource-Meta-FileSystem' with: [ spec requires: 'Zinc-HTTP' ] ] diff --git a/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/baseline28..st b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/baseline28..st new file mode 100644 index 000000000..f8c0f98c1 --- /dev/null +++ b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/baseline28..st @@ -0,0 +1,94 @@ +baselines +baseline28: spec + + spec for: #pharo do: [ + spec + blessing: #baseline; + description: 'Baseline for Zinc HTTP Components, a framework to deal with HTTP networking'; + author: 'SvenVanCaekenberghe'. + spec project: 'XML Support' with: [ + spec + className: 'ConfigurationOfXMLSupport'; + versionString: #'stable'; + repository: 'http://www.squeaksource.com/MetacelloRepository' ]. + spec project: 'Neo JSON' with: [ + spec + className: 'ConfigurationOfNeoJSON'; + versionString: #'stable'; + repository: 'http://mc.stfx.eu/Neo' ]. + spec package: 'Zodiac-Core' with: [ spec repository: 'http://mc.stfx.eu/Zodiac' ]. + spec package: 'Zodiac-Tests' with: [ spec repository: 'http://mc.stfx.eu/Zodiac' ]. + spec + package: 'Zinc-Character-Encoding-Core'; + package: 'Zinc-Character-Encoding-Tests' with: [ spec requires: 'Zinc-Character-Encoding-Core' ]; + package: 'Zinc-Resource-Meta-Core' with: [ spec requires: 'Zinc-Character-Encoding-Core' ]; + package: 'Zinc-Resource-Meta-Tests' with: [ spec requires: 'Zinc-Resource-Meta-Core' ]; + package: 'Zinc-HTTP' with: [ spec requires: #( 'Zinc-Character-Encoding-Core' 'Zinc-Resource-Meta-Core' ) ]; + package: 'Zinc-Patch-HTTPSocket' with: [ spec requires: 'Zinc-HTTP' ]; + package: 'Zinc-AWS' with: [ spec requires: #( 'Zinc-HTTP' 'XML Support' ) ]; + package: 'Zinc-REST' with: [ spec requires: #( 'Zinc-HTTP' 'Neo JSON' ) ]; + package: 'Zinc-Zodiac' with: [ spec requires: #( 'Zinc-HTTP' 'Zodiac-Core' 'Zodiac-Tests' ) ]; + package: 'Zinc-WebSocket-Core' with: [ spec requires: 'Zinc-HTTP' ]; + package: 'Zinc-WebSocket-Tests' with: [ spec requires: 'Zinc-WebSocket-Core' ]; + package: 'Zinc-SSO-OAuth1-Core' with: [ spec requires: #( 'Zinc-HTTP' 'Neo JSON' ) ]; + package: 'Zinc-SSO-OAuth2-Core' with: [ spec requires: #( 'Zinc-HTTP' 'Neo JSON' ) ]; + package: 'Zinc-SSO-OpenID-Core' with: [ spec requires: #( 'Zinc-HTTP' 'XML Support' ) ]; + package: 'Zinc-SSO-Demo' with: [ spec requires: #( 'Zinc-SSO-OAuth1-Core' 'Zinc-SSO-OAuth2-Core' 'Zinc-SSO-OpenID-Core' ) ]; + package: 'Zinc-SSO-OAuth1-Tests' with: [ spec requires: #( 'Zinc-SSO-OAuth1-Core' ) ]; + package: 'Zinc-SSO-OpenID-Tests' with: [ spec requires: #( 'Zinc-SSO-OpenID-Core' ) ]; + package: 'Zinc-WebDAV' with: [ spec requires: 'Zinc-HTTP' ]; + package: 'Zinc-WWS-Server' with: [ spec requires: 'Zinc-HTTP' ]; + package: 'Zinc-WWS-Client' with: [ spec requires: 'Zinc-HTTP' ]; + package: 'Zinc-Tests' with: [ spec requires: 'Zinc-HTTP' ]; + package: 'Zinc-Seaside'. "For now, no dependence on Seaside itself" + spec + group: 'default' with: #('Core'); + group: 'Core' with: #('Zinc-HTTP'); + group: 'Tests' with: #('Zinc-Tests' 'Zinc-Character-Encoding-Tests' 'Zinc-Resource-Meta-Tests'); + group: 'Character-Encoding' with: #('Zinc-Character-Encoding-Core' 'Zinc-Character-Encoding-Tests'); + group: 'Resource-Meta' with: #('Zinc-Resource-Meta-Core' 'Zinc-Resource-Meta-Tests'); + group: 'Zodiac' with: #('Zinc-Zodiac'); + group: 'AWS' with: #('Zinc-AWS'); + group: 'WebDAV' with: #('Zinc-WebDAV'); + group: 'WebSocket' with: #('Zinc-WebSocket-Core' 'Zinc-WebSocket-Tests'); + group: 'SSO-OAuth1' with: #('Zinc-SSO-OAuth1-Core' 'Zinc-SSO-OAuth1-Tests'); + group: 'SSO-OAuth2' with: #('Zinc-SSO-OAuth2-Core'); + group: 'SSO-OpenID' with: #('Zinc-SSO-OpenID-Core' 'Zinc-SSO-OpenID-Tests'); + group: 'SSO-Demo' with: #('Zinc-SSO-OAuth1-Core' 'Zinc-SSO-OAuth2-Core' 'Zinc-SSO-OpenID-Core'); + group: 'SSO' with: #('SSO-OAuth1' 'SSO-OAuth2' 'SSO-OpenID' 'SSO-Demo' 'Zinc-SSO-Demo'); + group: 'WWS' with: #('Zinc-WWS-Server' 'Zinc-WWS-Client'); + group: 'REST' with: #('Zinc-REST'); + group: 'Patch-HTTPSocket' with: #('Zinc-Patch-HTTPSocket'); + group: 'Seaside' with: #('Zinc-Seaside') ]. + spec for: #squeakCommon do:[ spec repository: 'http://mc.stfx.eu/ZincHTTPComponents' ]. + spec for: #'pharo1.x' do: [ + spec + package: 'Zinc-FileSystem-Legacy'; + package: 'Zinc-Pharo-Forward-Compatibility'; + package: 'Zinc-HTTP' with: [ spec requires: #('Zinc-FileSystem-Legacy' 'Zinc-Pharo-Forward-Compatibility') ] ]. + spec for: #'pharo2.x' do: [ + spec + package: 'Zinc-FileSystem'; + package: 'Zinc-pharo2-forward-compatibility'; + package: 'Zinc-HTTP' with: [ spec requires: #('Zinc-FileSystem' 'Zinc-pharo2-forward-compatibility')]; + package: 'Zinc-Resource-Meta-FileSystem' with: [ spec requires: 'Zinc-HTTP' ] ]. + spec for: #'pharo3.x' do: [ + spec + package: 'Zinc-FileSystem'; + package: 'Zinc-HTTP' with: [ spec requires: 'Zinc-FileSystem' ]; + package: 'Zinc-Resource-Meta-FileSystem' with: [ spec requires: 'Zinc-HTTP' ] ]. + spec for: #'pharo4.x' do: [ + spec + package: 'Zinc-FileSystem'; + package: 'Zinc-HTTP' with: [ spec requires: 'Zinc-FileSystem' ]; + package: 'Zinc-Resource-Meta-FileSystem' with: [ spec requires: 'Zinc-HTTP' ] ]. + spec for: #'pharo5.x' do: [ + spec + package: 'Zinc-FileSystem'; + package: 'Zinc-HTTP' with: [ spec requires: 'Zinc-FileSystem' ]; + package: 'Zinc-Resource-Meta-FileSystem' with: [ spec requires: 'Zinc-HTTP' ] ]. + spec for: #'pharo6.x' do: [ + spec + package: 'Zinc-FileSystem'; + package: 'Zinc-HTTP' with: [ spec requires: 'Zinc-FileSystem' ]; + package: 'Zinc-Resource-Meta-FileSystem' with: [ spec requires: 'Zinc-HTTP' ] ] diff --git a/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/baseline29..st b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/baseline29..st new file mode 100644 index 000000000..74b1be896 --- /dev/null +++ b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/baseline29..st @@ -0,0 +1,100 @@ +baselines +baseline29: spec + + spec for: #pharo do: [ + spec + blessing: #baseline; + description: 'Baseline for Zinc HTTP Components, a framework to deal with HTTP networking'; + author: 'SvenVanCaekenberghe'. + spec project: 'XML Support' with: [ + spec + className: 'ConfigurationOfXMLSupport'; + versionString: #'stable'; + repository: 'http://www.squeaksource.com/MetacelloRepository' ]. + spec project: 'Neo JSON' with: [ + spec + className: 'ConfigurationOfNeoJSON'; + versionString: #'stable'; + repository: 'http://mc.stfx.eu/Neo' ]. + spec package: 'Zodiac-Core' with: [ spec repository: 'http://mc.stfx.eu/Zodiac' ]. + spec package: 'Zodiac-Tests' with: [ spec repository: 'http://mc.stfx.eu/Zodiac' ]. + spec package: 'Zodiac-Extra' with: [ spec repository: 'http://mc.stfx.eu/Zodiac' ]. + spec + package: 'Zinc-Character-Encoding-Core'; + package: 'Zinc-Character-Encoding-Tests' with: [ spec requires: 'Zinc-Character-Encoding-Core' ]; + package: 'Zinc-Resource-Meta-Core' with: [ spec requires: 'Zinc-Character-Encoding-Core' ]; + package: 'Zinc-Resource-Meta-Tests' with: [ spec requires: 'Zinc-Resource-Meta-Core' ]; + package: 'Zinc-HTTP' with: [ spec requires: #( 'Zinc-Character-Encoding-Core' 'Zinc-Resource-Meta-Core' ) ]; + package: 'Zinc-Patch-HTTPSocket' with: [ spec requires: 'Zinc-HTTP' ]; + package: 'Zinc-AWS' with: [ spec requires: #( 'Zinc-HTTP' 'XML Support' ) ]; + package: 'Zinc-REST' with: [ spec requires: #( 'Zinc-HTTP' 'Neo JSON' ) ]; + package: 'Zinc-Zodiac' with: [ spec requires: #( 'Zinc-HTTP' 'Zodiac-Core' 'Zodiac-Tests' ) ]; + package: 'Zinc-WebSocket-Core' with: [ spec requires: 'Zinc-HTTP' ]; + package: 'Zinc-WebSocket-Tests' with: [ spec requires: 'Zinc-WebSocket-Core' ]; + package: 'Zinc-SSO-OAuth1-Core' with: [ spec requires: #( 'Zinc-HTTP' 'Neo JSON' ) ]; + package: 'Zinc-SSO-OAuth2-Core' with: [ spec requires: #( 'Zinc-HTTP' 'Neo JSON' ) ]; + package: 'Zinc-SSO-OpenID-Core' with: [ spec requires: #( 'Zinc-HTTP' 'XML Support' ) ]; + package: 'Zinc-SSO-Demo' with: [ spec requires: #( 'Zinc-SSO-OAuth1-Core' 'Zinc-SSO-OAuth2-Core' 'Zinc-SSO-OpenID-Core' ) ]; + package: 'Zinc-SSO-OAuth1-Tests' with: [ spec requires: #( 'Zinc-SSO-OAuth1-Core' ) ]; + package: 'Zinc-SSO-OpenID-Tests' with: [ spec requires: #( 'Zinc-SSO-OpenID-Core' ) ]; + package: 'Zinc-WebDAV' with: [ spec requires: 'Zinc-HTTP' ]; + package: 'Zinc-WWS-Server' with: [ spec requires: 'Zinc-HTTP' ]; + package: 'Zinc-WWS-Client' with: [ spec requires: 'Zinc-HTTP' ]; + package: 'Zinc-Tests' with: [ spec requires: 'Zinc-HTTP' ]; + package: 'Zinc-Seaside'. "For now, no dependence on Seaside itself" + spec + group: 'default' with: #('Core'); + group: 'Core' with: #('Zinc-HTTP'); + group: 'Tests' with: #('Zinc-Tests' 'Zinc-Character-Encoding-Tests' 'Zinc-Resource-Meta-Tests'); + group: 'Character-Encoding' with: #('Zinc-Character-Encoding-Core' 'Zinc-Character-Encoding-Tests'); + group: 'Resource-Meta' with: #('Zinc-Resource-Meta-Core' 'Zinc-Resource-Meta-Tests'); + group: 'Zodiac' with: #('Zinc-Zodiac'); + group: 'AWS' with: #('Zinc-AWS'); + group: 'WebDAV' with: #('Zinc-WebDAV'); + group: 'WebSocket' with: #('Zinc-WebSocket-Core' 'Zinc-WebSocket-Tests'); + group: 'SSO-OAuth1' with: #('Zinc-SSO-OAuth1-Core' 'Zinc-SSO-OAuth1-Tests'); + group: 'SSO-OAuth2' with: #('Zinc-SSO-OAuth2-Core'); + group: 'SSO-OpenID' with: #('Zinc-SSO-OpenID-Core' 'Zinc-SSO-OpenID-Tests'); + group: 'SSO-Demo' with: #('Zinc-SSO-OAuth1-Core' 'Zinc-SSO-OAuth2-Core' 'Zinc-SSO-OpenID-Core'); + group: 'SSO' with: #('SSO-OAuth1' 'SSO-OAuth2' 'SSO-OpenID' 'SSO-Demo' 'Zinc-SSO-Demo'); + group: 'WWS' with: #('Zinc-WWS-Server' 'Zinc-WWS-Client'); + group: 'REST' with: #('Zinc-REST'); + group: 'Patch-HTTPSocket' with: #('Zinc-Patch-HTTPSocket'); + group: 'Seaside' with: #('Zinc-Seaside') ]. + spec for: #squeakCommon do:[ spec repository: 'http://mc.stfx.eu/ZincHTTPComponents' ]. + spec for: #'pharo1.x' do: [ + spec + package: 'Zinc-FileSystem-Legacy'; + package: 'Zinc-Pharo-Forward-Compatibility'; + package: 'Zinc-HTTP' with: [ spec requires: #('Zinc-FileSystem-Legacy' 'Zinc-Pharo-Forward-Compatibility') ] ]. + spec for: #'pharo2.x' do: [ + spec + package: 'Zinc-FileSystem'; + package: 'Zinc-pharo2-forward-compatibility'; + package: 'Zinc-HTTP' with: [ spec requires: #('Zinc-FileSystem' 'Zinc-pharo2-forward-compatibility')]; + package: 'Zinc-Resource-Meta-FileSystem' with: [ spec requires: 'Zinc-HTTP' ] ]. + spec for: #'pharo3.x' do: [ + spec + package: 'Zinc-FileSystem'; + package: 'Zinc-HTTP' with: [ spec requires: 'Zinc-FileSystem' ]; + package: 'Zinc-Resource-Meta-FileSystem' with: [ spec requires: 'Zinc-HTTP' ] ]. + spec for: #'pharo4.x' do: [ + spec + package: 'Zinc-FileSystem'; + package: 'Zinc-HTTP' with: [ spec requires: 'Zinc-FileSystem' ]; + package: 'Zinc-Resource-Meta-FileSystem' with: [ spec requires: 'Zinc-HTTP' ] ]. + spec for: #'pharo5.x' do: [ + spec + package: 'Zinc-FileSystem'; + package: 'Zinc-HTTP' with: [ spec requires: 'Zinc-FileSystem' ]; + package: 'Zinc-Resource-Meta-FileSystem' with: [ spec requires: 'Zinc-HTTP' ] ]. + spec for: #'pharo6.x' do: [ + spec + package: 'Zinc-FileSystem'; + package: 'Zinc-HTTP' with: [ spec requires: 'Zinc-FileSystem' ]; + package: 'Zinc-Resource-Meta-FileSystem' with: [ spec requires: 'Zinc-HTTP' ] ]. + spec for: #'pharo7.x' do: [ + spec + package: 'Zinc-FileSystem'; + package: 'Zinc-HTTP' with: [ spec requires: 'Zinc-FileSystem' ]; + package: 'Zinc-Resource-Meta-FileSystem' with: [ spec requires: 'Zinc-HTTP' ] ] diff --git a/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/baseline30..st b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/baseline30..st new file mode 100644 index 000000000..33bceb603 --- /dev/null +++ b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/baseline30..st @@ -0,0 +1,56 @@ +baselines +baseline30: spec + + spec for: #common do: [ + spec + blessing: #baseline; + description: 'Baseline for Zinc HTTP Components, a framework to deal with HTTP networking'; + author: 'SvenVanCaekenberghe'; + repository: 'http://mc.stfx.eu/ZincHTTPComponents'. + spec baseline: 'NeoJSON' with: [ spec repository: 'github://svenvc/NeoJSON:master/repository' ]. + spec project: 'XML Support' with: [ spec className: 'ConfigurationOfXMLSupport'; repository: 'http://www.squeaksource.com/MetacelloRepository' ]. + spec package: 'Zodiac-Core' with: [ spec repository: 'http://mc.stfx.eu/Zodiac' ]. + spec package: 'Zodiac-Tests' with: [ spec repository: 'http://mc.stfx.eu/Zodiac' ]. + spec + package: 'Zinc-Character-Encoding-Core'; + package: 'Zinc-Character-Encoding-Tests' with: [ spec requires: 'Zinc-Character-Encoding-Core' ]; + package: 'Zinc-Resource-Meta-Core' with: [ spec requires: 'Zinc-Character-Encoding-Core' ]; + package: 'Zinc-Resource-Meta-Tests' with: [ spec requires: 'Zinc-Resource-Meta-Core' ]; + package: 'Zinc-HTTP' with: [ spec requires: #('Zinc-Character-Encoding-Core' 'Zinc-Resource-Meta-Core') ]; + package: 'Zinc-HTTP-Examples' with: [ spec requires: #('Zinc-HTTP') ]; + package: 'Zinc-Tests' with: [ spec requires: 'Zinc-HTTP' ]; + package: 'Zinc-Zodiac-Core' with: [ spec requires: #('Zinc-HTTP' 'Zodiac-Core') ]; + package: 'Zinc-Zodiac-Tests' with: [ spec requires: #('Zinc-Zodiac-Core') ]. + spec + package: 'Zinc-Seaside'; "For now, no dependence on Seaside itself" + package: 'Zinc-AWS' with: [ spec requires: #('Zinc-HTTP' 'XML Support') ]; + package: 'Zinc-REST' with: [ spec requires: #('Zinc-HTTP' 'NeoJSON') ]; + package: 'Zinc-WebSocket-Core' with: [ spec requires: 'Zinc-HTTP' ]; + package: 'Zinc-WebSocket-Tests' with: [ spec requires: 'Zinc-WebSocket-Core' ]; + package: 'Zinc-SSO-OAuth1-Core' with: [ spec requires: #('Zinc-HTTP' 'NeoJSON') ]; + package: 'Zinc-SSO-OAuth2-Core' with: [ spec requires: #('Zinc-HTTP' 'NeoJSON') ]; + package: 'Zinc-SSO-OpenID-Core' with: [ spec requires: #('Zinc-HTTP' 'XML Support') ]; + package: 'Zinc-SSO-Demo' with: [ spec requires: #('Zinc-SSO-OAuth1-Core' 'Zinc-SSO-OAuth2-Core' 'Zinc-SSO-OpenID-Core') ]; + package: 'Zinc-SSO-OAuth1-Tests' with: [ spec requires: #('Zinc-SSO-OAuth1-Core') ]; + package: 'Zinc-SSO-OpenID-Tests' with: [ spec requires: #('Zinc-SSO-OpenID-Core') ]; + package: 'Zinc-WebDAV' with: [ spec requires: 'Zinc-HTTP' ]; + package: 'Zinc-WWS-Server' with: [ spec requires: 'Zinc-HTTP' ]; + package: 'Zinc-WWS-Client' with: [ spec requires: 'Zinc-HTTP' ]. + spec + group: 'default' with: #('Core' 'Tests'); + group: 'Core' with: #('Zinc-HTTP' 'Zinc-HTTP-Examples' 'Zinc-Zodiac-Core'); + group: 'Tests' with: #('Zinc-Tests' 'Zinc-Character-Encoding-Tests' 'Zinc-Resource-Meta-Tests' 'Zodiac-Tests' 'Zinc-Zodiac-Tests'); + group: 'Character-Encoding' with: #('Zinc-Character-Encoding-Core' 'Zinc-Character-Encoding-Tests'); + group: 'Resource-Meta' with: #('Zinc-Resource-Meta-Core' 'Zinc-Resource-Meta-Tests'); + group: 'Zodiac' with: #('Zodiac-Core' 'Zodiac-Tests'); + group: 'AWS' with: #('Zinc-AWS'); + group: 'WebDAV' with: #('Zinc-WebDAV'); + group: 'WebSocket' with: #('Zinc-WebSocket-Core' 'Zinc-WebSocket-Tests'); + group: 'SSO-OAuth1' with: #('Zinc-SSO-OAuth1-Core' 'Zinc-SSO-OAuth1-Tests'); + group: 'SSO-OAuth2' with: #('Zinc-SSO-OAuth2-Core'); + group: 'SSO-OpenID' with: #('Zinc-SSO-OpenID-Core' 'Zinc-SSO-OpenID-Tests'); + group: 'SSO-Demo' with: #('Zinc-SSO-OAuth1-Core' 'Zinc-SSO-OAuth2-Core' 'Zinc-SSO-OpenID-Core'); + group: 'SSO' with: #('SSO-OAuth1' 'SSO-OAuth2' 'SSO-OpenID' 'SSO-Demo' 'Zinc-SSO-Demo'); + group: 'WWS' with: #('Zinc-WWS-Server' 'Zinc-WWS-Client'); + group: 'REST' with: #('Zinc-REST'); + group: 'Seaside' with: #('Zinc-Seaside') ] \ No newline at end of file diff --git a/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/stable..st b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/stable..st index 643ec98a2..0161ce8a2 100644 --- a/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/stable..st +++ b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/stable..st @@ -1,7 +1,10 @@ accessing stable: spec - spec for: #pharo version: '2.5.2'. - spec for: #'pharo2.x' version: '2.5.2'. - spec for: #'pharo3.x' version: '2.5.2'. - spec for: #gemstone version: '2.4.3' \ No newline at end of file + spec for: #'pharo3.x' version: '3.0.1'. + spec for: #'pharo4.x' version: '3.0.1'. + spec for: #'pharo5.x' version: '3.0.1'. + spec for: #'pharo6.x' version: '3.0.1'. + spec for: #'pharo7.x' version: '3.0.1'. + spec for: #'pharo8.x' version: '3.0.1'. + spec for: #'gemstone' version: '3.0.1' diff --git a/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version253..st b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version253..st new file mode 100644 index 000000000..c61c428c1 --- /dev/null +++ b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version253..st @@ -0,0 +1,40 @@ +versions +version253: spec + + spec for: #pharo do: [ + spec + blessing: #release; + description: 'Update to latest package versions'; + author: 'SvenVanCaekenberghe'; + package: 'Zinc-Character-Encoding-Core' with: 'Zinc-Character-Encoding-Core-SvenVanCaekenberghe.35'; + package: 'Zinc-Character-Encoding-Tests' with: 'Zinc-Character-Encoding-Tests-SvenVanCaekenberghe.21'; + package: 'Zinc-Resource-Meta-Core' with: 'Zinc-Resource-Meta-Core-SvenVanCaekenberghe.38'; + package: 'Zinc-Resource-Meta-Tests' with: 'Zinc-Resource-Meta-Tests-SvenVanCaekenberghe.25'; + package: 'Zinc-HTTP' with: 'Zinc-HTTP-SvenVanCaekenberghe.410'; + package: 'Zinc-Tests' with: 'Zinc-Tests-SvenVanCaekenberghe.217'; + package: 'Zinc-AWS' with: 'Zinc-AWS-SvenVanCaekenberghe.17'; + package: 'Zinc-REST' with: 'Zinc-REST-SvenVanCaekenberghe.16'; + package: 'Zinc-WebDAV' with: 'Zinc-WebDAV-SvenVanCaekenberghe.3'; + package: 'Zinc-WebSocket-Core' with: 'Zinc-WebSocket-Core-SvenVanCaekenberghe.28'; + package: 'Zinc-WebSocket-Tests' with: 'Zinc-WebSocket-Tests-SvenVanCaekenberghe.7'; + package: 'Zinc-SSO-OAuth1-Core' with: 'Zinc-SSO-OAuth1-Core-SvenVanCaekenberghe.13'; + package: 'Zinc-SSO-OAuth2-Core' with: 'Zinc-SSO-OAuth2-Core-JanVanDeSandt.17'; + package: 'Zinc-SSO-OpenID-Core' with: 'Zinc-SSO-OpenID-Core-JanVanDeSandt.6'; + package: 'Zinc-SSO-Demo' with: 'Zinc-SSO-Demo-SvenVanCaekenberghe.5'; + package: 'Zinc-SSO-OAuth1-Tests' with: 'Zinc-SSO-OAuth1-Tests-SvenVanCaekenberghe.2'; + package: 'Zinc-SSO-OpenID-Tests' with: 'Zinc-SSO-OpenID-Tests-JanVanDeSandt.3'; + package: 'Zinc-WWS-Client' with: 'Zinc-WWS-Client-PhilippeBack.3'; + package: 'Zinc-WWS-Server' with: 'Zinc-WWS-Server-SvenVanCaekenberghe.10'; + package: 'Zinc-Zodiac' with: 'Zinc-Zodiac-SvenVanCaekenberghe.34'; + package: 'Zodiac-Core' with: 'Zodiac-Core-SvenVanCaekenberghe.30'; + package: 'Zodiac-Tests' with: 'Zodiac-Tests-SvenVanCaekenberghe.12'; + package: 'Zinc-Seaside' with: 'Zinc-Seaside-pmm.42' ]. + spec for: #'pharo1.x' do: [ + spec + package: 'Zinc-Patch-HTTPSocket' with: 'Zinc-Patch-HTTPSocket-SvenVanCaekenberghe.1'; + package: 'Zinc-FileSystem-Legacy' with: 'Zinc-FileSystem-Legacy-SvenVanCaekenberghe.5'; + package: 'Zinc-Pharo-Forward-Compatibility' with: 'Zinc-Pharo-Forward-Compatibility-SvenVanCaekenberghe.1' ]. + spec for: #'pharo2.x' do: [ + spec + package: 'Zinc-Patch-HTTPSocket' with: 'Zinc-Patch-HTTPSocket-MarcusDenker.4'; + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.10' ]. \ No newline at end of file diff --git a/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version254..st b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version254..st new file mode 100644 index 000000000..bf4c3064c --- /dev/null +++ b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version254..st @@ -0,0 +1,40 @@ +versions +version254: spec + + spec for: #pharo do: [ + spec + blessing: #release; + description: 'Update to latest package versions'; + author: 'SvenVanCaekenberghe'; + package: 'Zinc-Character-Encoding-Core' with: 'Zinc-Character-Encoding-Core-SvenVanCaekenberghe.36'; + package: 'Zinc-Character-Encoding-Tests' with: 'Zinc-Character-Encoding-Tests-SvenVanCaekenberghe.21'; + package: 'Zinc-Resource-Meta-Core' with: 'Zinc-Resource-Meta-Core-SvenVanCaekenberghe.39'; + package: 'Zinc-Resource-Meta-Tests' with: 'Zinc-Resource-Meta-Tests-SvenVanCaekenberghe.27'; + package: 'Zinc-HTTP' with: 'Zinc-HTTP-SvenVanCaekenberghe.411'; + package: 'Zinc-Tests' with: 'Zinc-Tests-SvenVanCaekenberghe.217'; + package: 'Zinc-AWS' with: 'Zinc-AWS-SvenVanCaekenberghe.17'; + package: 'Zinc-REST' with: 'Zinc-REST-SvenVanCaekenberghe.16'; + package: 'Zinc-WebDAV' with: 'Zinc-WebDAV-SvenVanCaekenberghe.3'; + package: 'Zinc-WebSocket-Core' with: 'Zinc-WebSocket-Core-SvenVanCaekenberghe.28'; + package: 'Zinc-WebSocket-Tests' with: 'Zinc-WebSocket-Tests-SvenVanCaekenberghe.7'; + package: 'Zinc-SSO-OAuth1-Core' with: 'Zinc-SSO-OAuth1-Core-SvenVanCaekenberghe.13'; + package: 'Zinc-SSO-OAuth2-Core' with: 'Zinc-SSO-OAuth2-Core-JanVanDeSandt.17'; + package: 'Zinc-SSO-OpenID-Core' with: 'Zinc-SSO-OpenID-Core-JanVanDeSandt.6'; + package: 'Zinc-SSO-Demo' with: 'Zinc-SSO-Demo-SvenVanCaekenberghe.5'; + package: 'Zinc-SSO-OAuth1-Tests' with: 'Zinc-SSO-OAuth1-Tests-SvenVanCaekenberghe.2'; + package: 'Zinc-SSO-OpenID-Tests' with: 'Zinc-SSO-OpenID-Tests-JanVanDeSandt.3'; + package: 'Zinc-WWS-Client' with: 'Zinc-WWS-Client-PhilippeBack.3'; + package: 'Zinc-WWS-Server' with: 'Zinc-WWS-Server-SvenVanCaekenberghe.10'; + package: 'Zinc-Zodiac' with: 'Zinc-Zodiac-SvenVanCaekenberghe.34'; + package: 'Zodiac-Core' with: 'Zodiac-Core-SvenVanCaekenberghe.30'; + package: 'Zodiac-Tests' with: 'Zodiac-Tests-SvenVanCaekenberghe.12'; + package: 'Zinc-Seaside' with: 'Zinc-Seaside-pmm.42' ]. + spec for: #'pharo1.x' do: [ + spec + package: 'Zinc-Patch-HTTPSocket' with: 'Zinc-Patch-HTTPSocket-SvenVanCaekenberghe.1'; + package: 'Zinc-FileSystem-Legacy' with: 'Zinc-FileSystem-Legacy-SvenVanCaekenberghe.5'; + package: 'Zinc-Pharo-Forward-Compatibility' with: 'Zinc-Pharo-Forward-Compatibility-SvenVanCaekenberghe.1' ]. + spec for: #'pharo2.x' do: [ + spec + package: 'Zinc-Patch-HTTPSocket' with: 'Zinc-Patch-HTTPSocket-MarcusDenker.4'; + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.10' ]. \ No newline at end of file diff --git a/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version255..st b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version255..st new file mode 100644 index 000000000..5e59a82c5 --- /dev/null +++ b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version255..st @@ -0,0 +1,40 @@ +versions +version255: spec + + spec for: #pharo do: [ + spec + blessing: #release; + description: 'Update to latest package versions'; + author: 'SvenVanCaekenberghe'; + package: 'Zinc-Character-Encoding-Core' with: 'Zinc-Character-Encoding-Core-SvenVanCaekenberghe.36'; + package: 'Zinc-Character-Encoding-Tests' with: 'Zinc-Character-Encoding-Tests-SvenVanCaekenberghe.21'; + package: 'Zinc-Resource-Meta-Core' with: 'Zinc-Resource-Meta-Core-SvenVanCaekenberghe.39'; + package: 'Zinc-Resource-Meta-Tests' with: 'Zinc-Resource-Meta-Tests-SvenVanCaekenberghe.27'; + package: 'Zinc-HTTP' with: 'Zinc-HTTP-SvenVanCaekenberghe.411'; + package: 'Zinc-Tests' with: 'Zinc-Tests-SvenVanCaekenberghe.218'; + package: 'Zinc-AWS' with: 'Zinc-AWS-SvenVanCaekenberghe.17'; + package: 'Zinc-REST' with: 'Zinc-REST-SvenVanCaekenberghe.16'; + package: 'Zinc-WebDAV' with: 'Zinc-WebDAV-SvenVanCaekenberghe.3'; + package: 'Zinc-WebSocket-Core' with: 'Zinc-WebSocket-Core-SvenVanCaekenberghe.28'; + package: 'Zinc-WebSocket-Tests' with: 'Zinc-WebSocket-Tests-SvenVanCaekenberghe.7'; + package: 'Zinc-SSO-OAuth1-Core' with: 'Zinc-SSO-OAuth1-Core-SvenVanCaekenberghe.13'; + package: 'Zinc-SSO-OAuth2-Core' with: 'Zinc-SSO-OAuth2-Core-JanVanDeSandt.17'; + package: 'Zinc-SSO-OpenID-Core' with: 'Zinc-SSO-OpenID-Core-JanVanDeSandt.6'; + package: 'Zinc-SSO-Demo' with: 'Zinc-SSO-Demo-SvenVanCaekenberghe.5'; + package: 'Zinc-SSO-OAuth1-Tests' with: 'Zinc-SSO-OAuth1-Tests-SvenVanCaekenberghe.2'; + package: 'Zinc-SSO-OpenID-Tests' with: 'Zinc-SSO-OpenID-Tests-JanVanDeSandt.3'; + package: 'Zinc-WWS-Client' with: 'Zinc-WWS-Client-PhilippeBack.3'; + package: 'Zinc-WWS-Server' with: 'Zinc-WWS-Server-SvenVanCaekenberghe.10'; + package: 'Zinc-Zodiac' with: 'Zinc-Zodiac-SvenVanCaekenberghe.34'; + package: 'Zodiac-Core' with: 'Zodiac-Core-SvenVanCaekenberghe.30'; + package: 'Zodiac-Tests' with: 'Zodiac-Tests-SvenVanCaekenberghe.12'; + package: 'Zinc-Seaside' with: 'Zinc-Seaside-pmm.42' ]. + spec for: #'pharo1.x' do: [ + spec + package: 'Zinc-Patch-HTTPSocket' with: 'Zinc-Patch-HTTPSocket-SvenVanCaekenberghe.1'; + package: 'Zinc-FileSystem-Legacy' with: 'Zinc-FileSystem-Legacy-SvenVanCaekenberghe.5'; + package: 'Zinc-Pharo-Forward-Compatibility' with: 'Zinc-Pharo-Forward-Compatibility-SvenVanCaekenberghe.1' ]. + spec for: #'pharo2.x' do: [ + spec + package: 'Zinc-Patch-HTTPSocket' with: 'Zinc-Patch-HTTPSocket-MarcusDenker.4'; + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.10' ]. \ No newline at end of file diff --git a/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version256..st b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version256..st new file mode 100644 index 000000000..db791114a --- /dev/null +++ b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version256..st @@ -0,0 +1,40 @@ +versions +version256: spec + + spec for: #pharo do: [ + spec + blessing: #release; + description: 'Update to latest package versions'; + author: 'SvenVanCaekenberghe'; + package: 'Zinc-Character-Encoding-Core' with: 'Zinc-Character-Encoding-Core-SvenVanCaekenberghe.37'; + package: 'Zinc-Character-Encoding-Tests' with: 'Zinc-Character-Encoding-Tests-SvenVanCaekenberghe.22'; + package: 'Zinc-Resource-Meta-Core' with: 'Zinc-Resource-Meta-Core-SvenVanCaekenberghe.47'; + package: 'Zinc-Resource-Meta-Tests' with: 'Zinc-Resource-Meta-Tests-SvenVanCaekenberghe.32'; + package: 'Zinc-HTTP' with: 'Zinc-HTTP-SvenVanCaekenberghe.422'; + package: 'Zinc-Tests' with: 'Zinc-Tests-SvenVanCaekenberghe.221'; + package: 'Zinc-AWS' with: 'Zinc-AWS-SvenVanCaekenberghe.17'; + package: 'Zinc-REST' with: 'Zinc-REST-SvenVanCaekenberghe.16'; + package: 'Zinc-WebDAV' with: 'Zinc-WebDAV-SvenVanCaekenberghe.3'; + package: 'Zinc-WebSocket-Core' with: 'Zinc-WebSocket-Core-SvenVanCaekenberghe.28'; + package: 'Zinc-WebSocket-Tests' with: 'Zinc-WebSocket-Tests-SvenVanCaekenberghe.7'; + package: 'Zinc-SSO-OAuth1-Core' with: 'Zinc-SSO-OAuth1-Core-SvenVanCaekenberghe.13'; + package: 'Zinc-SSO-OAuth2-Core' with: 'Zinc-SSO-OAuth2-Core-JanVanDeSandt.17'; + package: 'Zinc-SSO-OpenID-Core' with: 'Zinc-SSO-OpenID-Core-JanVanDeSandt.6'; + package: 'Zinc-SSO-Demo' with: 'Zinc-SSO-Demo-SvenVanCaekenberghe.5'; + package: 'Zinc-SSO-OAuth1-Tests' with: 'Zinc-SSO-OAuth1-Tests-SvenVanCaekenberghe.2'; + package: 'Zinc-SSO-OpenID-Tests' with: 'Zinc-SSO-OpenID-Tests-JanVanDeSandt.3'; + package: 'Zinc-WWS-Client' with: 'Zinc-WWS-Client-PhilippeBack.3'; + package: 'Zinc-WWS-Server' with: 'Zinc-WWS-Server-SvenVanCaekenberghe.10'; + package: 'Zinc-Zodiac' with: 'Zinc-Zodiac-SvenVanCaekenberghe.34'; + package: 'Zodiac-Core' with: 'Zodiac-Core-SvenVanCaekenberghe.35'; + package: 'Zodiac-Tests' with: 'Zodiac-Tests-SvenVanCaekenberghe.12'; + package: 'Zinc-Seaside' with: 'Zinc-Seaside-JohanBrichau.43' ]. + spec for: #'pharo1.x' do: [ + spec + package: 'Zinc-Patch-HTTPSocket' with: 'Zinc-Patch-HTTPSocket-SvenVanCaekenberghe.1'; + package: 'Zinc-FileSystem-Legacy' with: 'Zinc-FileSystem-Legacy-SvenVanCaekenberghe.5'; + package: 'Zinc-Pharo-Forward-Compatibility' with: 'Zinc-Pharo-Forward-Compatibility-SvenVanCaekenberghe.1' ]. + spec for: #'pharo2.x' do: [ + spec + package: 'Zinc-Patch-HTTPSocket' with: 'Zinc-Patch-HTTPSocket-MarcusDenker.4'; + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.10' ]. \ No newline at end of file diff --git a/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version261..st b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version261..st new file mode 100644 index 000000000..fd8f3b080 --- /dev/null +++ b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version261..st @@ -0,0 +1,44 @@ +versions +version261: spec + + spec for: #pharo do: [ + spec + blessing: #release; + description: 'Update to latest package versions'; + author: 'SvenVanCaekenberghe'; + package: 'Zinc-Character-Encoding-Core' with: 'Zinc-Character-Encoding-Core-SvenVanCaekenberghe.37'; + package: 'Zinc-Character-Encoding-Tests' with: 'Zinc-Character-Encoding-Tests-SvenVanCaekenberghe.22'; + package: 'Zinc-Resource-Meta-Core' with: 'Zinc-Resource-Meta-Core-SvenVanCaekenberghe.47'; + package: 'Zinc-Resource-Meta-Tests' with: 'Zinc-Resource-Meta-Tests-SvenVanCaekenberghe.32'; + package: 'Zinc-HTTP' with: 'Zinc-HTTP-SvenVanCaekenberghe.422'; + package: 'Zinc-Tests' with: 'Zinc-Tests-SvenVanCaekenberghe.221'; + package: 'Zinc-AWS' with: 'Zinc-AWS-SvenVanCaekenberghe.17'; + package: 'Zinc-REST' with: 'Zinc-REST-SvenVanCaekenberghe.16'; + package: 'Zinc-WebDAV' with: 'Zinc-WebDAV-SvenVanCaekenberghe.3'; + package: 'Zinc-WebSocket-Core' with: 'Zinc-WebSocket-Core-SvenVanCaekenberghe.28'; + package: 'Zinc-WebSocket-Tests' with: 'Zinc-WebSocket-Tests-SvenVanCaekenberghe.7'; + package: 'Zinc-SSO-OAuth1-Core' with: 'Zinc-SSO-OAuth1-Core-SvenVanCaekenberghe.13'; + package: 'Zinc-SSO-OAuth2-Core' with: 'Zinc-SSO-OAuth2-Core-JanVanDeSandt.17'; + package: 'Zinc-SSO-OpenID-Core' with: 'Zinc-SSO-OpenID-Core-JanVanDeSandt.6'; + package: 'Zinc-SSO-Demo' with: 'Zinc-SSO-Demo-SvenVanCaekenberghe.5'; + package: 'Zinc-SSO-OAuth1-Tests' with: 'Zinc-SSO-OAuth1-Tests-SvenVanCaekenberghe.2'; + package: 'Zinc-SSO-OpenID-Tests' with: 'Zinc-SSO-OpenID-Tests-JanVanDeSandt.3'; + package: 'Zinc-WWS-Client' with: 'Zinc-WWS-Client-PhilippeBack.3'; + package: 'Zinc-WWS-Server' with: 'Zinc-WWS-Server-SvenVanCaekenberghe.10'; + package: 'Zinc-Zodiac' with: 'Zinc-Zodiac-SvenVanCaekenberghe.34'; + package: 'Zodiac-Core' with: 'Zodiac-Core-SvenVanCaekenberghe.35'; + package: 'Zodiac-Tests' with: 'Zodiac-Tests-SvenVanCaekenberghe.12'; + package: 'Zinc-Seaside' with: 'Zinc-Seaside-JohanBrichau.43' ]. + spec for: #'pharo1.x' do: [ + spec + package: 'Zinc-Patch-HTTPSocket' with: 'Zinc-Patch-HTTPSocket-SvenVanCaekenberghe.1'; + package: 'Zinc-FileSystem-Legacy' with: 'Zinc-FileSystem-Legacy-SvenVanCaekenberghe.5'; + package: 'Zinc-Pharo-Forward-Compatibility' with: 'Zinc-Pharo-Forward-Compatibility-SvenVanCaekenberghe.1' ]. + spec for: #'pharo2.x' do: [ + spec + package: 'Zinc-Patch-HTTPSocket' with: 'Zinc-Patch-HTTPSocket-MarcusDenker.4'; + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.10'; + package: 'Zinc-pharo2-forward-compatibility' with: 'Zinc-pharo2-forward-compatibility-SvenVanCaekenberghe.1' ]. + spec for: #'pharo3.x' do: [ + spec + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.10' ] \ No newline at end of file diff --git a/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version262..st b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version262..st new file mode 100644 index 000000000..985c8e305 --- /dev/null +++ b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version262..st @@ -0,0 +1,45 @@ +versions +version262: spec + + spec for: #pharo do: [ + spec + blessing: #release; + description: 'Update to latest package versions'; + author: 'SvenVanCaekenberghe'; + package: 'Zinc-Character-Encoding-Core' with: 'Zinc-Character-Encoding-Core-SvenVanCaekenberghe.37'; + package: 'Zinc-Character-Encoding-Tests' with: 'Zinc-Character-Encoding-Tests-SvenVanCaekenberghe.22'; + package: 'Zinc-Resource-Meta-Core' with: 'Zinc-Resource-Meta-Core-SvenVanCaekenberghe.47'; + package: 'Zinc-Resource-Meta-Tests' with: 'Zinc-Resource-Meta-Tests-SvenVanCaekenberghe.32'; + package: 'Zinc-HTTP' with: 'Zinc-HTTP-SvenVanCaekenberghe.422'; + package: 'Zinc-Tests' with: 'Zinc-Tests-SvenVanCaekenberghe.221'; + package: 'Zinc-AWS' with: 'Zinc-AWS-SvenVanCaekenberghe.17'; + package: 'Zinc-REST' with: 'Zinc-REST-SvenVanCaekenberghe.16'; + package: 'Zinc-WebDAV' with: 'Zinc-WebDAV-SvenVanCaekenberghe.3'; + package: 'Zinc-WebSocket-Core' with: 'Zinc-WebSocket-Core-SvenVanCaekenberghe.28'; + package: 'Zinc-WebSocket-Tests' with: 'Zinc-WebSocket-Tests-SvenVanCaekenberghe.7'; + package: 'Zinc-SSO-OAuth1-Core' with: 'Zinc-SSO-OAuth1-Core-SvenVanCaekenberghe.13'; + package: 'Zinc-SSO-OAuth2-Core' with: 'Zinc-SSO-OAuth2-Core-JanVanDeSandt.17'; + package: 'Zinc-SSO-OpenID-Core' with: 'Zinc-SSO-OpenID-Core-JanVanDeSandt.6'; + package: 'Zinc-SSO-Demo' with: 'Zinc-SSO-Demo-SvenVanCaekenberghe.5'; + package: 'Zinc-SSO-OAuth1-Tests' with: 'Zinc-SSO-OAuth1-Tests-SvenVanCaekenberghe.2'; + package: 'Zinc-SSO-OpenID-Tests' with: 'Zinc-SSO-OpenID-Tests-JanVanDeSandt.3'; + package: 'Zinc-WWS-Client' with: 'Zinc-WWS-Client-PhilippeBack.3'; + package: 'Zinc-WWS-Server' with: 'Zinc-WWS-Server-SvenVanCaekenberghe.10'; + package: 'Zinc-Zodiac' with: 'Zinc-Zodiac-SvenVanCaekenberghe.34'; + package: 'Zodiac-Core' with: 'Zodiac-Core-SvenVanCaekenberghe.35'; + package: 'Zodiac-Tests' with: 'Zodiac-Tests-SvenVanCaekenberghe.12'; + package: 'Zinc-Seaside' with: 'Zinc-Seaside-JohanBrichau.43' ]. + spec for: #'pharo1.x' do: [ + spec + package: 'Zinc-Patch-HTTPSocket' with: 'Zinc-Patch-HTTPSocket-SvenVanCaekenberghe.1'; + package: 'Zinc-FileSystem-Legacy' with: 'Zinc-FileSystem-Legacy-SvenVanCaekenberghe.5'; + package: 'Zinc-Pharo-Forward-Compatibility' with: 'Zinc-Pharo-Forward-Compatibility-SvenVanCaekenberghe.1' ]. + spec for: #'pharo2.x' do: [ + spec + package: 'Zinc-Patch-HTTPSocket' with: 'Zinc-Patch-HTTPSocket-MarcusDenker.4'; + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.10'; + package: 'Zinc-pharo2-forward-compatibility' with: 'Zinc-pharo2-forward-compatibility-SvenVanCaekenberghe.1' ]. + spec for: #'pharo3.x' do: [ + spec + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.10'; + package: 'Zinc-Resouce-Meta-FileSystem' with: 'Zinc-Resouce-Meta-FileSystem-SvenVanCaekenberghe.7' ] \ No newline at end of file diff --git a/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version263..st b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version263..st new file mode 100644 index 000000000..6b596a76c --- /dev/null +++ b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version263..st @@ -0,0 +1,46 @@ +versions +version263: spec + + spec for: #pharo do: [ + spec + blessing: #release; + description: 'Update to latest package versions'; + author: 'SvenVanCaekenberghe'; + package: 'Zinc-Character-Encoding-Core' with: 'Zinc-Character-Encoding-Core-SvenVanCaekenberghe.37'; + package: 'Zinc-Character-Encoding-Tests' with: 'Zinc-Character-Encoding-Tests-SvenVanCaekenberghe.22'; + package: 'Zinc-Resource-Meta-Core' with: 'Zinc-Resource-Meta-Core-SvenVanCaekenberghe.48'; + package: 'Zinc-Resource-Meta-Tests' with: 'Zinc-Resource-Meta-Tests-SvenVanCaekenberghe.33'; + package: 'Zinc-HTTP' with: 'Zinc-HTTP-SvenVanCaekenberghe.423'; + package: 'Zinc-Tests' with: 'Zinc-Tests-SvenVanCaekenberghe.223'; + package: 'Zinc-AWS' with: 'Zinc-AWS-SvenVanCaekenberghe.17'; + package: 'Zinc-REST' with: 'Zinc-REST-SvenVanCaekenberghe.16'; + package: 'Zinc-WebDAV' with: 'Zinc-WebDAV-SvenVanCaekenberghe.3'; + package: 'Zinc-WebSocket-Core' with: 'Zinc-WebSocket-Core-SvenVanCaekenberghe.28'; + package: 'Zinc-WebSocket-Tests' with: 'Zinc-WebSocket-Tests-SvenVanCaekenberghe.7'; + package: 'Zinc-SSO-OAuth1-Core' with: 'Zinc-SSO-OAuth1-Core-SvenVanCaekenberghe.13'; + package: 'Zinc-SSO-OAuth2-Core' with: 'Zinc-SSO-OAuth2-Core-JanVanDeSandt.17'; + package: 'Zinc-SSO-OpenID-Core' with: 'Zinc-SSO-OpenID-Core-JanVanDeSandt.6'; + package: 'Zinc-SSO-Demo' with: 'Zinc-SSO-Demo-SvenVanCaekenberghe.5'; + package: 'Zinc-SSO-OAuth1-Tests' with: 'Zinc-SSO-OAuth1-Tests-SvenVanCaekenberghe.2'; + package: 'Zinc-SSO-OpenID-Tests' with: 'Zinc-SSO-OpenID-Tests-JanVanDeSandt.3'; + package: 'Zinc-WWS-Client' with: 'Zinc-WWS-Client-PhilippeBack.3'; + package: 'Zinc-WWS-Server' with: 'Zinc-WWS-Server-SvenVanCaekenberghe.10'; + package: 'Zinc-Zodiac' with: 'Zinc-Zodiac-SvenVanCaekenberghe.34'; + package: 'Zodiac-Core' with: 'Zodiac-Core-SvenVanCaekenberghe.38'; + package: 'Zodiac-Tests' with: 'Zodiac-Tests-SvenVanCaekenberghe.12'; + package: 'Zinc-Seaside' with: 'Zinc-Seaside-JohanBrichau.43' ]. + spec for: #'pharo1.x' do: [ + spec + package: 'Zinc-Patch-HTTPSocket' with: 'Zinc-Patch-HTTPSocket-SvenVanCaekenberghe.1'; + package: 'Zinc-FileSystem-Legacy' with: 'Zinc-FileSystem-Legacy-SvenVanCaekenberghe.5'; + package: 'Zinc-Pharo-Forward-Compatibility' with: 'Zinc-Pharo-Forward-Compatibility-SvenVanCaekenberghe.1' ]. + spec for: #'pharo2.x' do: [ + spec + package: 'Zinc-Patch-HTTPSocket' with: 'Zinc-Patch-HTTPSocket-MarcusDenker.4'; + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.10'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.7'; + package: 'Zinc-pharo2-forward-compatibility' with: 'Zinc-pharo2-forward-compatibility-SvenVanCaekenberghe.1' ]. + spec for: #'pharo3.x' do: [ + spec + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.10'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.7' ] \ No newline at end of file diff --git a/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version264..st b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version264..st new file mode 100644 index 000000000..b4ed5f8be --- /dev/null +++ b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version264..st @@ -0,0 +1,46 @@ +versions +version264: spec + + spec for: #pharo do: [ + spec + blessing: #release; + description: 'Update to latest package versions'; + author: 'SvenVanCaekenberghe'; + package: 'Zinc-Character-Encoding-Core' with: 'Zinc-Character-Encoding-Core-SvenVanCaekenberghe.37'; + package: 'Zinc-Character-Encoding-Tests' with: 'Zinc-Character-Encoding-Tests-SvenVanCaekenberghe.22'; + package: 'Zinc-Resource-Meta-Core' with: 'Zinc-Resource-Meta-Core-SvenVanCaekenberghe.52'; + package: 'Zinc-Resource-Meta-Tests' with: 'Zinc-Resource-Meta-Tests-monty.35'; + package: 'Zinc-HTTP' with: 'Zinc-HTTP-SvenVanCaekenberghe.427'; + package: 'Zinc-Tests' with: 'Zinc-Tests-SvenVanCaekenberghe.225'; + package: 'Zinc-AWS' with: 'Zinc-AWS-SvenVanCaekenberghe.17'; + package: 'Zinc-REST' with: 'Zinc-REST-SvenVanCaekenberghe.16'; + package: 'Zinc-WebDAV' with: 'Zinc-WebDAV-SvenVanCaekenberghe.3'; + package: 'Zinc-WebSocket-Core' with: 'Zinc-WebSocket-Core-SvenVanCaekenberghe.28'; + package: 'Zinc-WebSocket-Tests' with: 'Zinc-WebSocket-Tests-SvenVanCaekenberghe.7'; + package: 'Zinc-SSO-OAuth1-Core' with: 'Zinc-SSO-OAuth1-Core-SvenVanCaekenberghe.13'; + package: 'Zinc-SSO-OAuth2-Core' with: 'Zinc-SSO-OAuth2-Core-JanVanDeSandt.17'; + package: 'Zinc-SSO-OpenID-Core' with: 'Zinc-SSO-OpenID-Core-JanVanDeSandt.6'; + package: 'Zinc-SSO-Demo' with: 'Zinc-SSO-Demo-SvenVanCaekenberghe.5'; + package: 'Zinc-SSO-OAuth1-Tests' with: 'Zinc-SSO-OAuth1-Tests-SvenVanCaekenberghe.2'; + package: 'Zinc-SSO-OpenID-Tests' with: 'Zinc-SSO-OpenID-Tests-JanVanDeSandt.3'; + package: 'Zinc-WWS-Client' with: 'Zinc-WWS-Client-PhilippeBack.3'; + package: 'Zinc-WWS-Server' with: 'Zinc-WWS-Server-SvenVanCaekenberghe.10'; + package: 'Zinc-Zodiac' with: 'Zinc-Zodiac-SvenVanCaekenberghe.34'; + package: 'Zodiac-Core' with: 'Zodiac-Core-SvenVanCaekenberghe.38'; + package: 'Zodiac-Tests' with: 'Zodiac-Tests-SvenVanCaekenberghe.12'; + package: 'Zinc-Seaside' with: 'Zinc-Seaside-JohanBrichau.43' ]. + spec for: #'pharo1.x' do: [ + spec + package: 'Zinc-Patch-HTTPSocket' with: 'Zinc-Patch-HTTPSocket-SvenVanCaekenberghe.1'; + package: 'Zinc-FileSystem-Legacy' with: 'Zinc-FileSystem-Legacy-SvenVanCaekenberghe.5'; + package: 'Zinc-Pharo-Forward-Compatibility' with: 'Zinc-Pharo-Forward-Compatibility-SvenVanCaekenberghe.1' ]. + spec for: #'pharo2.x' do: [ + spec + package: 'Zinc-Patch-HTTPSocket' with: 'Zinc-Patch-HTTPSocket-MarcusDenker.4'; + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.10'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.7'; + package: 'Zinc-pharo2-forward-compatibility' with: 'Zinc-pharo2-forward-compatibility-SvenVanCaekenberghe.1' ]. + spec for: #'pharo3.x' do: [ + spec + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.10'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.7' ] \ No newline at end of file diff --git a/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version265..st b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version265..st new file mode 100644 index 000000000..0b1c35fef --- /dev/null +++ b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version265..st @@ -0,0 +1,46 @@ +versions +version265: spec + + spec for: #pharo do: [ + spec + blessing: #release; + description: 'Update to latest package versions'; + author: 'SvenVanCaekenberghe'; + package: 'Zinc-Character-Encoding-Core' with: 'Zinc-Character-Encoding-Core-SvenVanCaekenberghe.40'; + package: 'Zinc-Character-Encoding-Tests' with: 'Zinc-Character-Encoding-Tests-SvenVanCaekenberghe.22'; + package: 'Zinc-Resource-Meta-Core' with: 'Zinc-Resource-Meta-Core-SvenVanCaekenberghe.53'; + package: 'Zinc-Resource-Meta-Tests' with: 'Zinc-Resource-Meta-Tests-SvenVanCaekenberghe.36'; + package: 'Zinc-HTTP' with: 'Zinc-HTTP-SvenVanCaekenberghe.436'; + package: 'Zinc-Tests' with: 'Zinc-Tests-SvenVanCaekenberghe.232'; + package: 'Zinc-AWS' with: 'Zinc-AWS-SvenVanCaekenberghe.18'; + package: 'Zinc-REST' with: 'Zinc-REST-SvenVanCaekenberghe.18'; + package: 'Zinc-WebDAV' with: 'Zinc-WebDAV-SvenVanCaekenberghe.3'; + package: 'Zinc-WebSocket-Core' with: 'Zinc-WebSocket-Core-SvenVanCaekenberghe.29'; + package: 'Zinc-WebSocket-Tests' with: 'Zinc-WebSocket-Tests-SvenVanCaekenberghe.9'; + package: 'Zinc-SSO-OAuth1-Core' with: 'Zinc-SSO-OAuth1-Core-SvenVanCaekenberghe.13'; + package: 'Zinc-SSO-OAuth2-Core' with: 'Zinc-SSO-OAuth2-Core-JanVanDeSandt.20'; + package: 'Zinc-SSO-OpenID-Core' with: 'Zinc-SSO-OpenID-Core-JanVanDeSandt.6'; + package: 'Zinc-SSO-Demo' with: 'Zinc-SSO-Demo-SvenVanCaekenberghe.5'; + package: 'Zinc-SSO-OAuth1-Tests' with: 'Zinc-SSO-OAuth1-Tests-SvenVanCaekenberghe.2'; + package: 'Zinc-SSO-OpenID-Tests' with: 'Zinc-SSO-OpenID-Tests-JanVanDeSandt.3'; + package: 'Zinc-WWS-Client' with: 'Zinc-WWS-Client-PhilippeBack.3'; + package: 'Zinc-WWS-Server' with: 'Zinc-WWS-Server-SvenVanCaekenberghe.11'; + package: 'Zinc-Zodiac' with: 'Zinc-Zodiac-SvenVanCaekenberghe.35'; + package: 'Zodiac-Core' with: 'Zodiac-Core-SvenVanCaekenberghe.42'; + package: 'Zodiac-Tests' with: 'Zodiac-Tests-SvenVanCaekenberghe.13'; + package: 'Zinc-Seaside' with: 'Zinc-Seaside-JohanBrichau.43' ]. + spec for: #'pharo1.x' do: [ + spec + package: 'Zinc-Patch-HTTPSocket' with: 'Zinc-Patch-HTTPSocket-SvenVanCaekenberghe.1'; + package: 'Zinc-FileSystem-Legacy' with: 'Zinc-FileSystem-Legacy-SvenVanCaekenberghe.5'; + package: 'Zinc-Pharo-Forward-Compatibility' with: 'Zinc-Pharo-Forward-Compatibility-SvenVanCaekenberghe.1' ]. + spec for: #'pharo2.x' do: [ + spec + package: 'Zinc-Patch-HTTPSocket' with: 'Zinc-Patch-HTTPSocket-MarcusDenker.4'; + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.10'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.7'; + package: 'Zinc-pharo2-forward-compatibility' with: 'Zinc-pharo2-forward-compatibility-SvenVanCaekenberghe.1' ]. + spec for: #'pharo3.x' do: [ + spec + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.10'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.7' ] \ No newline at end of file diff --git a/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version266..st b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version266..st new file mode 100644 index 000000000..063e13fd1 --- /dev/null +++ b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version266..st @@ -0,0 +1,46 @@ +versions +version266: spec + + spec for: #pharo do: [ + spec + blessing: #release; + description: 'Update to latest package versions'; + author: 'SvenVanCaekenberghe'; + package: 'Zinc-Character-Encoding-Core' with: 'Zinc-Character-Encoding-Core-SvenVanCaekenberghe.40'; + package: 'Zinc-Character-Encoding-Tests' with: 'Zinc-Character-Encoding-Tests-SvenVanCaekenberghe.22'; + package: 'Zinc-Resource-Meta-Core' with: 'Zinc-Resource-Meta-Core-SvenVanCaekenberghe.53'; + package: 'Zinc-Resource-Meta-Tests' with: 'Zinc-Resource-Meta-Tests-SvenVanCaekenberghe.36'; + package: 'Zinc-HTTP' with: 'Zinc-HTTP-SvenVanCaekenberghe.436'; + package: 'Zinc-Tests' with: 'Zinc-Tests-SvenVanCaekenberghe.233'; + package: 'Zinc-AWS' with: 'Zinc-AWS-SvenVanCaekenberghe.18'; + package: 'Zinc-REST' with: 'Zinc-REST-SvenVanCaekenberghe.18'; + package: 'Zinc-WebDAV' with: 'Zinc-WebDAV-SvenVanCaekenberghe.3'; + package: 'Zinc-WebSocket-Core' with: 'Zinc-WebSocket-Core-LucFabresse.29'; + package: 'Zinc-WebSocket-Tests' with: 'Zinc-WebSocket-Tests-SvenVanCaekenberghe.9'; + package: 'Zinc-SSO-OAuth1-Core' with: 'Zinc-SSO-OAuth1-Core-SvenVanCaekenberghe.13'; + package: 'Zinc-SSO-OAuth2-Core' with: 'Zinc-SSO-OAuth2-Core-JanVanDeSandt.20'; + package: 'Zinc-SSO-OpenID-Core' with: 'Zinc-SSO-OpenID-Core-JanVanDeSandt.6'; + package: 'Zinc-SSO-Demo' with: 'Zinc-SSO-Demo-SvenVanCaekenberghe.5'; + package: 'Zinc-SSO-OAuth1-Tests' with: 'Zinc-SSO-OAuth1-Tests-SvenVanCaekenberghe.2'; + package: 'Zinc-SSO-OpenID-Tests' with: 'Zinc-SSO-OpenID-Tests-JanVanDeSandt.3'; + package: 'Zinc-WWS-Client' with: 'Zinc-WWS-Client-PhilippeBack.3'; + package: 'Zinc-WWS-Server' with: 'Zinc-WWS-Server-SvenVanCaekenberghe.11'; + package: 'Zinc-Zodiac' with: 'Zinc-Zodiac-SvenVanCaekenberghe.35'; + package: 'Zodiac-Core' with: 'Zodiac-Core-SvenVanCaekenberghe.42'; + package: 'Zodiac-Tests' with: 'Zodiac-Tests-SvenVanCaekenberghe.13'; + package: 'Zinc-Seaside' with: 'Zinc-Seaside-JohanBrichau.43' ]. + spec for: #'pharo1.x' do: [ + spec + package: 'Zinc-Patch-HTTPSocket' with: 'Zinc-Patch-HTTPSocket-SvenVanCaekenberghe.1'; + package: 'Zinc-FileSystem-Legacy' with: 'Zinc-FileSystem-Legacy-SvenVanCaekenberghe.5'; + package: 'Zinc-Pharo-Forward-Compatibility' with: 'Zinc-Pharo-Forward-Compatibility-SvenVanCaekenberghe.1' ]. + spec for: #'pharo2.x' do: [ + spec + package: 'Zinc-Patch-HTTPSocket' with: 'Zinc-Patch-HTTPSocket-MarcusDenker.4'; + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.10'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.7'; + package: 'Zinc-pharo2-forward-compatibility' with: 'Zinc-pharo2-forward-compatibility-SvenVanCaekenberghe.1' ]. + spec for: #'pharo3.x' do: [ + spec + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.10'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.7' ] \ No newline at end of file diff --git a/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version267..st b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version267..st new file mode 100644 index 000000000..032739743 --- /dev/null +++ b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version267..st @@ -0,0 +1,46 @@ +versions +version267: spec + + spec for: #pharo do: [ + spec + blessing: #release; + description: 'Update to latest package versions'; + author: 'SvenVanCaekenberghe'; + package: 'Zinc-Character-Encoding-Core' with: 'Zinc-Character-Encoding-Core-SvenVanCaekenberghe.41'; + package: 'Zinc-Character-Encoding-Tests' with: 'Zinc-Character-Encoding-Tests-SvenVanCaekenberghe.23'; + package: 'Zinc-Resource-Meta-Core' with: 'Zinc-Resource-Meta-Core-SvenVanCaekenberghe.55'; + package: 'Zinc-Resource-Meta-Tests' with: 'Zinc-Resource-Meta-Tests-SvenVanCaekenberghe.36'; + package: 'Zinc-HTTP' with: 'Zinc-HTTP-SvenVanCaekenberghe.440'; + package: 'Zinc-Tests' with: 'Zinc-Tests-SvenVanCaekenberghe.235'; + package: 'Zinc-AWS' with: 'Zinc-AWS-SvenVanCaekenberghe.18'; + package: 'Zinc-REST' with: 'Zinc-REST-HolgerHansPeterFreyther.19'; + package: 'Zinc-WebDAV' with: 'Zinc-WebDAV-SvenVanCaekenberghe.3'; + package: 'Zinc-WebSocket-Core' with: 'Zinc-WebSocket-Core-LucFabresse.29'; + package: 'Zinc-WebSocket-Tests' with: 'Zinc-WebSocket-Tests-LucFabresse.9'; + package: 'Zinc-SSO-OAuth1-Core' with: 'Zinc-SSO-OAuth1-Core-SvenVanCaekenberghe.13'; + package: 'Zinc-SSO-OAuth2-Core' with: 'Zinc-SSO-OAuth2-Core-JanVanDeSandt.20'; + package: 'Zinc-SSO-OpenID-Core' with: 'Zinc-SSO-OpenID-Core-JanVanDeSandt.6'; + package: 'Zinc-SSO-Demo' with: 'Zinc-SSO-Demo-SvenVanCaekenberghe.5'; + package: 'Zinc-SSO-OAuth1-Tests' with: 'Zinc-SSO-OAuth1-Tests-SvenVanCaekenberghe.2'; + package: 'Zinc-SSO-OpenID-Tests' with: 'Zinc-SSO-OpenID-Tests-JanVanDeSandt.3'; + package: 'Zinc-WWS-Client' with: 'Zinc-WWS-Client-PhilippeBack.3'; + package: 'Zinc-WWS-Server' with: 'Zinc-WWS-Server-SvenVanCaekenberghe.11'; + package: 'Zinc-Zodiac' with: 'Zinc-Zodiac-SvenVanCaekenberghe.35'; + package: 'Zodiac-Core' with: 'Zodiac-Core-SvenVanCaekenberghe.42'; + package: 'Zodiac-Tests' with: 'Zodiac-Tests-SvenVanCaekenberghe.13'; + package: 'Zinc-Seaside' with: 'Zinc-Seaside-JohanBrichau.43' ]. + spec for: #'pharo1.x' do: [ + spec + package: 'Zinc-Patch-HTTPSocket' with: 'Zinc-Patch-HTTPSocket-SvenVanCaekenberghe.1'; + package: 'Zinc-FileSystem-Legacy' with: 'Zinc-FileSystem-Legacy-SvenVanCaekenberghe.5'; + package: 'Zinc-Pharo-Forward-Compatibility' with: 'Zinc-Pharo-Forward-Compatibility-SvenVanCaekenberghe.1' ]. + spec for: #'pharo2.x' do: [ + spec + package: 'Zinc-Patch-HTTPSocket' with: 'Zinc-Patch-HTTPSocket-MarcusDenker.4'; + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.10'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.8'; + package: 'Zinc-pharo2-forward-compatibility' with: 'Zinc-pharo2-forward-compatibility-SvenVanCaekenberghe.1' ]. + spec for: #'pharo3.x' do: [ + spec + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.10'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.8' ] \ No newline at end of file diff --git a/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version268..st b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version268..st new file mode 100644 index 000000000..665015c5f --- /dev/null +++ b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version268..st @@ -0,0 +1,46 @@ +versions +version268: spec + + spec for: #pharo do: [ + spec + blessing: #release; + description: 'Update to latest package versions'; + author: 'SvenVanCaekenberghe'; + package: 'Zinc-Character-Encoding-Core' with: 'Zinc-Character-Encoding-Core-SvenVanCaekenberghe.45'; + package: 'Zinc-Character-Encoding-Tests' with: 'Zinc-Character-Encoding-Tests-SvenVanCaekenberghe.27'; + package: 'Zinc-Resource-Meta-Core' with: 'Zinc-Resource-Meta-Core-PavelKrivanek.56'; + package: 'Zinc-Resource-Meta-Tests' with: 'Zinc-Resource-Meta-Tests-SvenVanCaekenberghe.36'; + package: 'Zinc-HTTP' with: 'Zinc-HTTP-SvenVanCaekenberghe.447'; + package: 'Zinc-Tests' with: 'Zinc-Tests-SvenVanCaekenberghe.236'; + package: 'Zinc-AWS' with: 'Zinc-AWS-SvenVanCaekenberghe.18'; + package: 'Zinc-REST' with: 'Zinc-REST-HolgerHansPeterFreyther.20'; + package: 'Zinc-WebDAV' with: 'Zinc-WebDAV-SvenVanCaekenberghe.3'; + package: 'Zinc-WebSocket-Core' with: 'Zinc-WebSocket-Core-LucFabresse.29'; + package: 'Zinc-WebSocket-Tests' with: 'Zinc-WebSocket-Tests-LucFabresse.9'; + package: 'Zinc-SSO-OAuth1-Core' with: 'Zinc-SSO-OAuth1-Core-SvenVanCaekenberghe.13'; + package: 'Zinc-SSO-OAuth2-Core' with: 'Zinc-SSO-OAuth2-Core-JanVanDeSandt.20'; + package: 'Zinc-SSO-OpenID-Core' with: 'Zinc-SSO-OpenID-Core-JanVanDeSandt.6'; + package: 'Zinc-SSO-Demo' with: 'Zinc-SSO-Demo-SvenVanCaekenberghe.5'; + package: 'Zinc-SSO-OAuth1-Tests' with: 'Zinc-SSO-OAuth1-Tests-SvenVanCaekenberghe.2'; + package: 'Zinc-SSO-OpenID-Tests' with: 'Zinc-SSO-OpenID-Tests-JanVanDeSandt.3'; + package: 'Zinc-WWS-Client' with: 'Zinc-WWS-Client-PhilippeBack.3'; + package: 'Zinc-WWS-Server' with: 'Zinc-WWS-Server-SvenVanCaekenberghe.11'; + package: 'Zinc-Zodiac' with: 'Zinc-Zodiac-SvenVanCaekenberghe.35'; + package: 'Zodiac-Core' with: 'Zodiac-Core-SvenVanCaekenberghe.42'; + package: 'Zodiac-Tests' with: 'Zodiac-Tests-SvenVanCaekenberghe.13'; + package: 'Zinc-Seaside' with: 'Zinc-Seaside-JohanBrichau.43' ]. + spec for: #'pharo1.x' do: [ + spec + package: 'Zinc-Patch-HTTPSocket' with: 'Zinc-Patch-HTTPSocket-SvenVanCaekenberghe.1'; + package: 'Zinc-FileSystem-Legacy' with: 'Zinc-FileSystem-Legacy-SvenVanCaekenberghe.5'; + package: 'Zinc-Pharo-Forward-Compatibility' with: 'Zinc-Pharo-Forward-Compatibility-SvenVanCaekenberghe.1' ]. + spec for: #'pharo2.x' do: [ + spec + package: 'Zinc-Patch-HTTPSocket' with: 'Zinc-Patch-HTTPSocket-MarcusDenker.4'; + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.12'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.8'; + package: 'Zinc-pharo2-forward-compatibility' with: 'Zinc-pharo2-forward-compatibility-SvenVanCaekenberghe.1' ]. + spec for: #'pharo3.x' do: [ + spec + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.12'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.8' ] \ No newline at end of file diff --git a/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version270..st b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version270..st new file mode 100644 index 000000000..e62a76b5c --- /dev/null +++ b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version270..st @@ -0,0 +1,54 @@ +versions +version270: spec + + spec for: #pharo do: [ + spec + blessing: #release; + description: 'Update to latest package versions'; + author: 'SvenVanCaekenberghe'; + package: 'Zinc-Character-Encoding-Core' with: 'Zinc-Character-Encoding-Core-SvenVanCaekenberghe.45'; + package: 'Zinc-Character-Encoding-Tests' with: 'Zinc-Character-Encoding-Tests-SvenVanCaekenberghe.27'; + package: 'Zinc-Resource-Meta-Core' with: 'Zinc-Resource-Meta-Core-PavelKrivanek.56'; + package: 'Zinc-Resource-Meta-Tests' with: 'Zinc-Resource-Meta-Tests-SvenVanCaekenberghe.36'; + package: 'Zinc-HTTP' with: 'Zinc-HTTP-SvenVanCaekenberghe.447'; + package: 'Zinc-Tests' with: 'Zinc-Tests-SvenVanCaekenberghe.236'; + package: 'Zinc-AWS' with: 'Zinc-AWS-SvenVanCaekenberghe.18'; + package: 'Zinc-REST' with: 'Zinc-REST-HolgerHansPeterFreyther.20'; + package: 'Zinc-WebDAV' with: 'Zinc-WebDAV-SvenVanCaekenberghe.3'; + package: 'Zinc-WebSocket-Core' with: 'Zinc-WebSocket-Core-LucFabresse.29'; + package: 'Zinc-WebSocket-Tests' with: 'Zinc-WebSocket-Tests-LucFabresse.9'; + package: 'Zinc-SSO-OAuth1-Core' with: 'Zinc-SSO-OAuth1-Core-SvenVanCaekenberghe.13'; + package: 'Zinc-SSO-OAuth2-Core' with: 'Zinc-SSO-OAuth2-Core-JanVanDeSandt.20'; + package: 'Zinc-SSO-OpenID-Core' with: 'Zinc-SSO-OpenID-Core-JanVanDeSandt.6'; + package: 'Zinc-SSO-Demo' with: 'Zinc-SSO-Demo-SvenVanCaekenberghe.5'; + package: 'Zinc-SSO-OAuth1-Tests' with: 'Zinc-SSO-OAuth1-Tests-SvenVanCaekenberghe.2'; + package: 'Zinc-SSO-OpenID-Tests' with: 'Zinc-SSO-OpenID-Tests-JanVanDeSandt.3'; + package: 'Zinc-WWS-Client' with: 'Zinc-WWS-Client-PhilippeBack.3'; + package: 'Zinc-WWS-Server' with: 'Zinc-WWS-Server-SvenVanCaekenberghe.11'; + package: 'Zinc-Zodiac' with: 'Zinc-Zodiac-SvenVanCaekenberghe.35'; + package: 'Zodiac-Core' with: 'Zodiac-Core-SvenVanCaekenberghe.42'; + package: 'Zodiac-Tests' with: 'Zodiac-Tests-SvenVanCaekenberghe.13'; + package: 'Zinc-Seaside' with: 'Zinc-Seaside-JohanBrichau.43' ]. + spec for: #'pharo1.x' do: [ + spec + package: 'Zinc-Patch-HTTPSocket' with: 'Zinc-Patch-HTTPSocket-SvenVanCaekenberghe.1'; + package: 'Zinc-FileSystem-Legacy' with: 'Zinc-FileSystem-Legacy-SvenVanCaekenberghe.5'; + package: 'Zinc-Pharo-Forward-Compatibility' with: 'Zinc-Pharo-Forward-Compatibility-SvenVanCaekenberghe.1' ]. + spec for: #'pharo2.x' do: [ + spec + package: 'Zinc-Patch-HTTPSocket' with: 'Zinc-Patch-HTTPSocket-MarcusDenker.4'; + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.12'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.8'; + package: 'Zinc-pharo2-forward-compatibility' with: 'Zinc-pharo2-forward-compatibility-SvenVanCaekenberghe.1' ]. + spec for: #'pharo3.x' do: [ + spec + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.12'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.8' ]. + spec for: #'pharo4.x' do: [ + spec + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.12'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.8' ]. + spec for: #'pharo5.x' do: [ + spec + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.12'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.8' ] \ No newline at end of file diff --git a/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version271..st b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version271..st new file mode 100644 index 000000000..af3aa1edb --- /dev/null +++ b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version271..st @@ -0,0 +1,54 @@ +versions +version271: spec + + spec for: #pharo do: [ + spec + blessing: #release; + description: 'Update to latest package versions'; + author: 'SvenVanCaekenberghe'; + package: 'Zinc-Character-Encoding-Core' with: 'Zinc-Character-Encoding-Core-SvenVanCaekenberghe.45'; + package: 'Zinc-Character-Encoding-Tests' with: 'Zinc-Character-Encoding-Tests-SvenVanCaekenberghe.27'; + package: 'Zinc-Resource-Meta-Core' with: 'Zinc-Resource-Meta-Core-PavelKrivanek.56'; + package: 'Zinc-Resource-Meta-Tests' with: 'Zinc-Resource-Meta-Tests-SvenVanCaekenberghe.36'; + package: 'Zinc-HTTP' with: 'Zinc-HTTP-SvenVanCaekenberghe.448'; + package: 'Zinc-Tests' with: 'Zinc-Tests-SvenVanCaekenberghe.236'; + package: 'Zinc-AWS' with: 'Zinc-AWS-SvenVanCaekenberghe.18'; + package: 'Zinc-REST' with: 'Zinc-REST-HolgerHansPeterFreyther.20'; + package: 'Zinc-WebDAV' with: 'Zinc-WebDAV-SvenVanCaekenberghe.3'; + package: 'Zinc-WebSocket-Core' with: 'Zinc-WebSocket-Core-LucFabresse.29'; + package: 'Zinc-WebSocket-Tests' with: 'Zinc-WebSocket-Tests-LucFabresse.9'; + package: 'Zinc-SSO-OAuth1-Core' with: 'Zinc-SSO-OAuth1-Core-SvenVanCaekenberghe.13'; + package: 'Zinc-SSO-OAuth2-Core' with: 'Zinc-SSO-OAuth2-Core-JanVanDeSandt.20'; + package: 'Zinc-SSO-OpenID-Core' with: 'Zinc-SSO-OpenID-Core-JanVanDeSandt.6'; + package: 'Zinc-SSO-Demo' with: 'Zinc-SSO-Demo-SvenVanCaekenberghe.5'; + package: 'Zinc-SSO-OAuth1-Tests' with: 'Zinc-SSO-OAuth1-Tests-SvenVanCaekenberghe.2'; + package: 'Zinc-SSO-OpenID-Tests' with: 'Zinc-SSO-OpenID-Tests-JanVanDeSandt.3'; + package: 'Zinc-WWS-Client' with: 'Zinc-WWS-Client-PhilippeBack.3'; + package: 'Zinc-WWS-Server' with: 'Zinc-WWS-Server-SvenVanCaekenberghe.11'; + package: 'Zinc-Zodiac' with: 'Zinc-Zodiac-SvenVanCaekenberghe.35'; + package: 'Zodiac-Core' with: 'Zodiac-Core-SvenVanCaekenberghe.42'; + package: 'Zodiac-Tests' with: 'Zodiac-Tests-SvenVanCaekenberghe.13'; + package: 'Zinc-Seaside' with: 'Zinc-Seaside-JohanBrichau.43' ]. + spec for: #'pharo1.x' do: [ + spec + package: 'Zinc-Patch-HTTPSocket' with: 'Zinc-Patch-HTTPSocket-SvenVanCaekenberghe.1'; + package: 'Zinc-FileSystem-Legacy' with: 'Zinc-FileSystem-Legacy-SvenVanCaekenberghe.5'; + package: 'Zinc-Pharo-Forward-Compatibility' with: 'Zinc-Pharo-Forward-Compatibility-SvenVanCaekenberghe.1' ]. + spec for: #'pharo2.x' do: [ + spec + package: 'Zinc-Patch-HTTPSocket' with: 'Zinc-Patch-HTTPSocket-MarcusDenker.4'; + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.12'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.8'; + package: 'Zinc-pharo2-forward-compatibility' with: 'Zinc-pharo2-forward-compatibility-SvenVanCaekenberghe.1' ]. + spec for: #'pharo3.x' do: [ + spec + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.12'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.8' ]. + spec for: #'pharo4.x' do: [ + spec + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.12'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.8' ]. + spec for: #'pharo5.x' do: [ + spec + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.12'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.8' ] \ No newline at end of file diff --git a/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version280..st b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version280..st new file mode 100644 index 000000000..55dd65014 --- /dev/null +++ b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version280..st @@ -0,0 +1,58 @@ +versions +version280: spec + + spec for: #pharo do: [ + spec + blessing: #release; + description: 'Update to latest package versions'; + author: 'SvenVanCaekenberghe'; + package: 'Zinc-Character-Encoding-Core' with: 'Zinc-Character-Encoding-Core-SvenVanCaekenberghe.45'; + package: 'Zinc-Character-Encoding-Tests' with: 'Zinc-Character-Encoding-Tests-SvenVanCaekenberghe.27'; + package: 'Zinc-Resource-Meta-Core' with: 'Zinc-Resource-Meta-Core-PavelKrivanek.56'; + package: 'Zinc-Resource-Meta-Tests' with: 'Zinc-Resource-Meta-Tests-SvenVanCaekenberghe.36'; + package: 'Zinc-HTTP' with: 'Zinc-HTTP-SvenVanCaekenberghe.448'; + package: 'Zinc-Tests' with: 'Zinc-Tests-SvenVanCaekenberghe.236'; + package: 'Zinc-AWS' with: 'Zinc-AWS-SvenVanCaekenberghe.18'; + package: 'Zinc-REST' with: 'Zinc-REST-HolgerHansPeterFreyther.20'; + package: 'Zinc-WebDAV' with: 'Zinc-WebDAV-SvenVanCaekenberghe.3'; + package: 'Zinc-WebSocket-Core' with: 'Zinc-WebSocket-Core-LucFabresse.29'; + package: 'Zinc-WebSocket-Tests' with: 'Zinc-WebSocket-Tests-LucFabresse.9'; + package: 'Zinc-SSO-OAuth1-Core' with: 'Zinc-SSO-OAuth1-Core-SvenVanCaekenberghe.13'; + package: 'Zinc-SSO-OAuth2-Core' with: 'Zinc-SSO-OAuth2-Core-JanVanDeSandt.20'; + package: 'Zinc-SSO-OpenID-Core' with: 'Zinc-SSO-OpenID-Core-JanVanDeSandt.6'; + package: 'Zinc-SSO-Demo' with: 'Zinc-SSO-Demo-SvenVanCaekenberghe.5'; + package: 'Zinc-SSO-OAuth1-Tests' with: 'Zinc-SSO-OAuth1-Tests-SvenVanCaekenberghe.2'; + package: 'Zinc-SSO-OpenID-Tests' with: 'Zinc-SSO-OpenID-Tests-JanVanDeSandt.3'; + package: 'Zinc-WWS-Client' with: 'Zinc-WWS-Client-PhilippeBack.3'; + package: 'Zinc-WWS-Server' with: 'Zinc-WWS-Server-SvenVanCaekenberghe.11'; + package: 'Zinc-Zodiac' with: 'Zinc-Zodiac-SvenVanCaekenberghe.35'; + package: 'Zodiac-Core' with: 'Zodiac-Core-SvenVanCaekenberghe.42'; + package: 'Zodiac-Tests' with: 'Zodiac-Tests-SvenVanCaekenberghe.13'; + package: 'Zinc-Seaside' with: 'Zinc-Seaside-JohanBrichau.43' ]. + spec for: #'pharo1.x' do: [ + spec + package: 'Zinc-Patch-HTTPSocket' with: 'Zinc-Patch-HTTPSocket-SvenVanCaekenberghe.1'; + package: 'Zinc-FileSystem-Legacy' with: 'Zinc-FileSystem-Legacy-SvenVanCaekenberghe.5'; + package: 'Zinc-Pharo-Forward-Compatibility' with: 'Zinc-Pharo-Forward-Compatibility-SvenVanCaekenberghe.1' ]. + spec for: #'pharo2.x' do: [ + spec + package: 'Zinc-Patch-HTTPSocket' with: 'Zinc-Patch-HTTPSocket-MarcusDenker.4'; + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.12'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.8'; + package: 'Zinc-pharo2-forward-compatibility' with: 'Zinc-pharo2-forward-compatibility-SvenVanCaekenberghe.1' ]. + spec for: #'pharo3.x' do: [ + spec + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.12'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.8' ]. + spec for: #'pharo4.x' do: [ + spec + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.12'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.8' ]. + spec for: #'pharo5.x' do: [ + spec + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.12'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.8' ]. + spec for: #'pharo6.x' do: [ + spec + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.12'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.8' ] \ No newline at end of file diff --git a/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version281..st b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version281..st new file mode 100644 index 000000000..ddb827f76 --- /dev/null +++ b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version281..st @@ -0,0 +1,58 @@ +versions +version281: spec + + spec for: #pharo do: [ + spec + blessing: #release; + description: 'Update to latest package versions'; + author: 'SvenVanCaekenberghe'; + package: 'Zinc-Character-Encoding-Core' with: 'Zinc-Character-Encoding-Core-SvenVanCaekenberghe.45'; + package: 'Zinc-Character-Encoding-Tests' with: 'Zinc-Character-Encoding-Tests-SvenVanCaekenberghe.27'; + package: 'Zinc-Resource-Meta-Core' with: 'Zinc-Resource-Meta-Core-SvenVanCaekenberghe.61'; + package: 'Zinc-Resource-Meta-Tests' with: 'Zinc-Resource-Meta-Tests-SvenVanCaekenberghe.37'; + package: 'Zinc-HTTP' with: 'Zinc-HTTP-SvenVanCaekenberghe.453'; + package: 'Zinc-Tests' with: 'Zinc-Tests-SvenVanCaekenberghe.238'; + package: 'Zinc-AWS' with: 'Zinc-AWS-SvenVanCaekenberghe.18'; + package: 'Zinc-REST' with: 'Zinc-REST-HolgerHansPeterFreyther.20'; + package: 'Zinc-WebDAV' with: 'Zinc-WebDAV-SvenVanCaekenberghe.3'; + package: 'Zinc-WebSocket-Core' with: 'Zinc-WebSocket-Core-LucFabresse.29'; + package: 'Zinc-WebSocket-Tests' with: 'Zinc-WebSocket-Tests-LucFabresse.9'; + package: 'Zinc-SSO-OAuth1-Core' with: 'Zinc-SSO-OAuth1-Core-SvenVanCaekenberghe.13'; + package: 'Zinc-SSO-OAuth2-Core' with: 'Zinc-SSO-OAuth2-Core-JanVanDeSandt.20'; + package: 'Zinc-SSO-OpenID-Core' with: 'Zinc-SSO-OpenID-Core-JanVanDeSandt.6'; + package: 'Zinc-SSO-Demo' with: 'Zinc-SSO-Demo-SvenVanCaekenberghe.5'; + package: 'Zinc-SSO-OAuth1-Tests' with: 'Zinc-SSO-OAuth1-Tests-SvenVanCaekenberghe.2'; + package: 'Zinc-SSO-OpenID-Tests' with: 'Zinc-SSO-OpenID-Tests-JanVanDeSandt.3'; + package: 'Zinc-WWS-Client' with: 'Zinc-WWS-Client-PhilippeBack.3'; + package: 'Zinc-WWS-Server' with: 'Zinc-WWS-Server-SvenVanCaekenberghe.11'; + package: 'Zinc-Zodiac' with: 'Zinc-Zodiac-SvenVanCaekenberghe.36'; + package: 'Zodiac-Core' with: 'Zodiac-Core-SvenVanCaekenberghe.42'; + package: 'Zodiac-Tests' with: 'Zodiac-Tests-SvenVanCaekenberghe.13'; + package: 'Zinc-Seaside' with: 'Zinc-Seaside-JohanBrichau.46' ]. + spec for: #'pharo1.x' do: [ + spec + package: 'Zinc-Patch-HTTPSocket' with: 'Zinc-Patch-HTTPSocket-SvenVanCaekenberghe.1'; + package: 'Zinc-FileSystem-Legacy' with: 'Zinc-FileSystem-Legacy-SvenVanCaekenberghe.5'; + package: 'Zinc-Pharo-Forward-Compatibility' with: 'Zinc-Pharo-Forward-Compatibility-SvenVanCaekenberghe.1' ]. + spec for: #'pharo2.x' do: [ + spec + package: 'Zinc-Patch-HTTPSocket' with: 'Zinc-Patch-HTTPSocket-MarcusDenker.4'; + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.12'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.8'; + package: 'Zinc-pharo2-forward-compatibility' with: 'Zinc-pharo2-forward-compatibility-SvenVanCaekenberghe.1' ]. + spec for: #'pharo3.x' do: [ + spec + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.12'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.8' ]. + spec for: #'pharo4.x' do: [ + spec + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.12'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.8' ]. + spec for: #'pharo5.x' do: [ + spec + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.12'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.8' ]. + spec for: #'pharo6.x' do: [ + spec + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.12'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.8' ] \ No newline at end of file diff --git a/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version2810..st b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version2810..st new file mode 100644 index 000000000..3b26667b9 --- /dev/null +++ b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version2810..st @@ -0,0 +1,62 @@ +versions +version2810: spec + + spec for: #pharo do: [ + spec + blessing: #release; + description: 'Update to latest package versions'; + author: 'SvenVanCaekenberghe'; + package: 'Zinc-Character-Encoding-Core' with: 'Zinc-Character-Encoding-Core-SvenVanCaekenberghe.56'; + package: 'Zinc-Character-Encoding-Tests' with: 'Zinc-Character-Encoding-Tests-SvenVanCaekenberghe.37'; + package: 'Zinc-Resource-Meta-Core' with: 'Zinc-Resource-Meta-Core-SvenVanCaekenberghe.66'; + package: 'Zinc-Resource-Meta-Tests' with: 'Zinc-Resource-Meta-Tests-SvenVanCaekenberghe.38'; + package: 'Zinc-HTTP' with: 'Zinc-HTTP-SvenVanCaekenberghe.471'; + package: 'Zinc-Tests' with: 'Zinc-Tests-SvenVanCaekenberghe.244'; + package: 'Zinc-AWS' with: 'Zinc-AWS-SvenVanCaekenberghe.18'; + package: 'Zinc-REST' with: 'Zinc-REST-HolgerHansPeterFreyther.20'; + package: 'Zinc-WebDAV' with: 'Zinc-WebDAV-SvenVanCaekenberghe.3'; + package: 'Zinc-WebSocket-Core' with: 'Zinc-WebSocket-Core-SvenVanCaekenberghe.30'; + package: 'Zinc-WebSocket-Tests' with: 'Zinc-WebSocket-Tests-LucFabresse.9'; + package: 'Zinc-SSO-OAuth1-Core' with: 'Zinc-SSO-OAuth1-Core-SvenVanCaekenberghe.13'; + package: 'Zinc-SSO-OAuth2-Core' with: 'Zinc-SSO-OAuth2-Core-JanVanDeSandt.20'; + package: 'Zinc-SSO-OpenID-Core' with: 'Zinc-SSO-OpenID-Core-JanVanDeSandt.6'; + package: 'Zinc-SSO-Demo' with: 'Zinc-SSO-Demo-SvenVanCaekenberghe.5'; + package: 'Zinc-SSO-OAuth1-Tests' with: 'Zinc-SSO-OAuth1-Tests-SvenVanCaekenberghe.2'; + package: 'Zinc-SSO-OpenID-Tests' with: 'Zinc-SSO-OpenID-Tests-JanVanDeSandt.3'; + package: 'Zinc-WWS-Client' with: 'Zinc-WWS-Client-PhilippeBack.3'; + package: 'Zinc-WWS-Server' with: 'Zinc-WWS-Server-SvenVanCaekenberghe.11'; + package: 'Zinc-Zodiac' with: 'Zinc-Zodiac-SvenVanCaekenberghe.40'; + package: 'Zodiac-Core' with: 'Zodiac-Core-TheIntegrator.46'; + package: 'Zodiac-Tests' with: 'Zodiac-Tests-SvenVanCaekenberghe.18'; + package: 'Zinc-Seaside' with: 'Zinc-Seaside-SvenVanCaekenberghe.47' ]. + spec for: #'pharo1.x' do: [ + spec + package: 'Zinc-Patch-HTTPSocket' with: 'Zinc-Patch-HTTPSocket-SvenVanCaekenberghe.1'; + package: 'Zinc-FileSystem-Legacy' with: 'Zinc-FileSystem-Legacy-SvenVanCaekenberghe.5'; + package: 'Zinc-Pharo-Forward-Compatibility' with: 'Zinc-Pharo-Forward-Compatibility-SvenVanCaekenberghe.1' ]. + spec for: #'pharo2.x' do: [ + spec + package: 'Zinc-Patch-HTTPSocket' with: 'Zinc-Patch-HTTPSocket-MarcusDenker.4'; + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.13'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.8'; + package: 'Zinc-pharo2-forward-compatibility' with: 'Zinc-pharo2-forward-compatibility-SvenVanCaekenberghe.1' ]. + spec for: #'pharo3.x' do: [ + spec + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.13'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.9' ]. + spec for: #'pharo4.x' do: [ + spec + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.13'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.9' ]. + spec for: #'pharo5.x' do: [ + spec + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.13'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.9' ]. + spec for: #'pharo6.x' do: [ + spec + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.13'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.9' ]. + spec for: #'pharo7.x' do: [ + spec + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.13'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.9' ] \ No newline at end of file diff --git a/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version282..st b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version282..st new file mode 100644 index 000000000..c625b16a8 --- /dev/null +++ b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version282..st @@ -0,0 +1,58 @@ +versions +version282: spec + + spec for: #pharo do: [ + spec + blessing: #release; + description: 'Update to latest package versions'; + author: 'SvenVanCaekenberghe'; + package: 'Zinc-Character-Encoding-Core' with: 'Zinc-Character-Encoding-Core-SvenVanCaekenberghe.45'; + package: 'Zinc-Character-Encoding-Tests' with: 'Zinc-Character-Encoding-Tests-SvenVanCaekenberghe.27'; + package: 'Zinc-Resource-Meta-Core' with: 'Zinc-Resource-Meta-Core-SvenVanCaekenberghe.61'; + package: 'Zinc-Resource-Meta-Tests' with: 'Zinc-Resource-Meta-Tests-SvenVanCaekenberghe.37'; + package: 'Zinc-HTTP' with: 'Zinc-HTTP-SvenVanCaekenberghe.453'; + package: 'Zinc-Tests' with: 'Zinc-Tests-SvenVanCaekenberghe.238'; + package: 'Zinc-AWS' with: 'Zinc-AWS-SvenVanCaekenberghe.18'; + package: 'Zinc-REST' with: 'Zinc-REST-HolgerHansPeterFreyther.20'; + package: 'Zinc-WebDAV' with: 'Zinc-WebDAV-SvenVanCaekenberghe.3'; + package: 'Zinc-WebSocket-Core' with: 'Zinc-WebSocket-Core-LucFabresse.29'; + package: 'Zinc-WebSocket-Tests' with: 'Zinc-WebSocket-Tests-LucFabresse.9'; + package: 'Zinc-SSO-OAuth1-Core' with: 'Zinc-SSO-OAuth1-Core-SvenVanCaekenberghe.13'; + package: 'Zinc-SSO-OAuth2-Core' with: 'Zinc-SSO-OAuth2-Core-JanVanDeSandt.20'; + package: 'Zinc-SSO-OpenID-Core' with: 'Zinc-SSO-OpenID-Core-JanVanDeSandt.6'; + package: 'Zinc-SSO-Demo' with: 'Zinc-SSO-Demo-SvenVanCaekenberghe.5'; + package: 'Zinc-SSO-OAuth1-Tests' with: 'Zinc-SSO-OAuth1-Tests-SvenVanCaekenberghe.2'; + package: 'Zinc-SSO-OpenID-Tests' with: 'Zinc-SSO-OpenID-Tests-JanVanDeSandt.3'; + package: 'Zinc-WWS-Client' with: 'Zinc-WWS-Client-PhilippeBack.3'; + package: 'Zinc-WWS-Server' with: 'Zinc-WWS-Server-SvenVanCaekenberghe.11'; + package: 'Zinc-Zodiac' with: 'Zinc-Zodiac-SvenVanCaekenberghe.36'; + package: 'Zodiac-Core' with: 'Zodiac-Core-SvenVanCaekenberghe.42'; + package: 'Zodiac-Tests' with: 'Zodiac-Tests-SvenVanCaekenberghe.13'; + package: 'Zinc-Seaside' with: 'Zinc-Seaside-SvenVanCaekenberghe.46' ]. + spec for: #'pharo1.x' do: [ + spec + package: 'Zinc-Patch-HTTPSocket' with: 'Zinc-Patch-HTTPSocket-SvenVanCaekenberghe.1'; + package: 'Zinc-FileSystem-Legacy' with: 'Zinc-FileSystem-Legacy-SvenVanCaekenberghe.5'; + package: 'Zinc-Pharo-Forward-Compatibility' with: 'Zinc-Pharo-Forward-Compatibility-SvenVanCaekenberghe.1' ]. + spec for: #'pharo2.x' do: [ + spec + package: 'Zinc-Patch-HTTPSocket' with: 'Zinc-Patch-HTTPSocket-MarcusDenker.4'; + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.12'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.8'; + package: 'Zinc-pharo2-forward-compatibility' with: 'Zinc-pharo2-forward-compatibility-SvenVanCaekenberghe.1' ]. + spec for: #'pharo3.x' do: [ + spec + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.12'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.8' ]. + spec for: #'pharo4.x' do: [ + spec + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.12'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.8' ]. + spec for: #'pharo5.x' do: [ + spec + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.12'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.8' ]. + spec for: #'pharo6.x' do: [ + spec + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.12'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.8' ] \ No newline at end of file diff --git a/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version283..st b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version283..st new file mode 100644 index 000000000..92629ad6b --- /dev/null +++ b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version283..st @@ -0,0 +1,58 @@ +versions +version283: spec + + spec for: #pharo do: [ + spec + blessing: #release; + description: 'Update to latest package versions'; + author: 'SvenVanCaekenberghe'; + package: 'Zinc-Character-Encoding-Core' with: 'Zinc-Character-Encoding-Core-SvenVanCaekenberghe.46'; + package: 'Zinc-Character-Encoding-Tests' with: 'Zinc-Character-Encoding-Tests-SvenVanCaekenberghe.29'; + package: 'Zinc-Resource-Meta-Core' with: 'Zinc-Resource-Meta-Core-SvenVanCaekenberghe.61'; + package: 'Zinc-Resource-Meta-Tests' with: 'Zinc-Resource-Meta-Tests-SvenVanCaekenberghe.37'; + package: 'Zinc-HTTP' with: 'Zinc-HTTP-SvenVanCaekenberghe.453'; + package: 'Zinc-Tests' with: 'Zinc-Tests-SvenVanCaekenberghe.238'; + package: 'Zinc-AWS' with: 'Zinc-AWS-SvenVanCaekenberghe.18'; + package: 'Zinc-REST' with: 'Zinc-REST-HolgerHansPeterFreyther.20'; + package: 'Zinc-WebDAV' with: 'Zinc-WebDAV-SvenVanCaekenberghe.3'; + package: 'Zinc-WebSocket-Core' with: 'Zinc-WebSocket-Core-LucFabresse.29'; + package: 'Zinc-WebSocket-Tests' with: 'Zinc-WebSocket-Tests-LucFabresse.9'; + package: 'Zinc-SSO-OAuth1-Core' with: 'Zinc-SSO-OAuth1-Core-SvenVanCaekenberghe.13'; + package: 'Zinc-SSO-OAuth2-Core' with: 'Zinc-SSO-OAuth2-Core-JanVanDeSandt.20'; + package: 'Zinc-SSO-OpenID-Core' with: 'Zinc-SSO-OpenID-Core-JanVanDeSandt.6'; + package: 'Zinc-SSO-Demo' with: 'Zinc-SSO-Demo-SvenVanCaekenberghe.5'; + package: 'Zinc-SSO-OAuth1-Tests' with: 'Zinc-SSO-OAuth1-Tests-SvenVanCaekenberghe.2'; + package: 'Zinc-SSO-OpenID-Tests' with: 'Zinc-SSO-OpenID-Tests-JanVanDeSandt.3'; + package: 'Zinc-WWS-Client' with: 'Zinc-WWS-Client-PhilippeBack.3'; + package: 'Zinc-WWS-Server' with: 'Zinc-WWS-Server-SvenVanCaekenberghe.11'; + package: 'Zinc-Zodiac' with: 'Zinc-Zodiac-SvenVanCaekenberghe.36'; + package: 'Zodiac-Core' with: 'Zodiac-Core-SvenVanCaekenberghe.42'; + package: 'Zodiac-Tests' with: 'Zodiac-Tests-SvenVanCaekenberghe.13'; + package: 'Zinc-Seaside' with: 'Zinc-Seaside-SvenVanCaekenberghe.46' ]. + spec for: #'pharo1.x' do: [ + spec + package: 'Zinc-Patch-HTTPSocket' with: 'Zinc-Patch-HTTPSocket-SvenVanCaekenberghe.1'; + package: 'Zinc-FileSystem-Legacy' with: 'Zinc-FileSystem-Legacy-SvenVanCaekenberghe.5'; + package: 'Zinc-Pharo-Forward-Compatibility' with: 'Zinc-Pharo-Forward-Compatibility-SvenVanCaekenberghe.1' ]. + spec for: #'pharo2.x' do: [ + spec + package: 'Zinc-Patch-HTTPSocket' with: 'Zinc-Patch-HTTPSocket-MarcusDenker.4'; + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.12'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.8'; + package: 'Zinc-pharo2-forward-compatibility' with: 'Zinc-pharo2-forward-compatibility-SvenVanCaekenberghe.1' ]. + spec for: #'pharo3.x' do: [ + spec + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.12'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.8' ]. + spec for: #'pharo4.x' do: [ + spec + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.12'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.8' ]. + spec for: #'pharo5.x' do: [ + spec + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.12'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.8' ]. + spec for: #'pharo6.x' do: [ + spec + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.12'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.8' ] \ No newline at end of file diff --git a/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version284..st b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version284..st new file mode 100644 index 000000000..008c27634 --- /dev/null +++ b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version284..st @@ -0,0 +1,58 @@ +versions +version284: spec + + spec for: #pharo do: [ + spec + blessing: #release; + description: 'Update to latest package versions'; + author: 'SvenVanCaekenberghe'; + package: 'Zinc-Character-Encoding-Core' with: 'Zinc-Character-Encoding-Core-SvenVanCaekenberghe.51'; + package: 'Zinc-Character-Encoding-Tests' with: 'Zinc-Character-Encoding-Tests-SvenVanCaekenberghe.32'; + package: 'Zinc-Resource-Meta-Core' with: 'Zinc-Resource-Meta-Core-SvenVanCaekenberghe.62'; + package: 'Zinc-Resource-Meta-Tests' with: 'Zinc-Resource-Meta-Tests-SvenVanCaekenberghe.37'; + package: 'Zinc-HTTP' with: 'Zinc-HTTP-SvenVanCaekenberghe.460'; + package: 'Zinc-Tests' with: 'Zinc-Tests-SvenVanCaekenberghe.239'; + package: 'Zinc-AWS' with: 'Zinc-AWS-SvenVanCaekenberghe.18'; + package: 'Zinc-REST' with: 'Zinc-REST-HolgerHansPeterFreyther.20'; + package: 'Zinc-WebDAV' with: 'Zinc-WebDAV-SvenVanCaekenberghe.3'; + package: 'Zinc-WebSocket-Core' with: 'Zinc-WebSocket-Core-LucFabresse.29'; + package: 'Zinc-WebSocket-Tests' with: 'Zinc-WebSocket-Tests-LucFabresse.9'; + package: 'Zinc-SSO-OAuth1-Core' with: 'Zinc-SSO-OAuth1-Core-SvenVanCaekenberghe.13'; + package: 'Zinc-SSO-OAuth2-Core' with: 'Zinc-SSO-OAuth2-Core-JanVanDeSandt.20'; + package: 'Zinc-SSO-OpenID-Core' with: 'Zinc-SSO-OpenID-Core-JanVanDeSandt.6'; + package: 'Zinc-SSO-Demo' with: 'Zinc-SSO-Demo-SvenVanCaekenberghe.5'; + package: 'Zinc-SSO-OAuth1-Tests' with: 'Zinc-SSO-OAuth1-Tests-SvenVanCaekenberghe.2'; + package: 'Zinc-SSO-OpenID-Tests' with: 'Zinc-SSO-OpenID-Tests-JanVanDeSandt.3'; + package: 'Zinc-WWS-Client' with: 'Zinc-WWS-Client-PhilippeBack.3'; + package: 'Zinc-WWS-Server' with: 'Zinc-WWS-Server-SvenVanCaekenberghe.11'; + package: 'Zinc-Zodiac' with: 'Zinc-Zodiac-SvenVanCaekenberghe.36'; + package: 'Zodiac-Core' with: 'Zodiac-Core-SvenVanCaekenberghe.42'; + package: 'Zodiac-Tests' with: 'Zodiac-Tests-SvenVanCaekenberghe.13'; + package: 'Zinc-Seaside' with: 'Zinc-Seaside-SvenVanCaekenberghe.46' ]. + spec for: #'pharo1.x' do: [ + spec + package: 'Zinc-Patch-HTTPSocket' with: 'Zinc-Patch-HTTPSocket-SvenVanCaekenberghe.1'; + package: 'Zinc-FileSystem-Legacy' with: 'Zinc-FileSystem-Legacy-SvenVanCaekenberghe.5'; + package: 'Zinc-Pharo-Forward-Compatibility' with: 'Zinc-Pharo-Forward-Compatibility-SvenVanCaekenberghe.1' ]. + spec for: #'pharo2.x' do: [ + spec + package: 'Zinc-Patch-HTTPSocket' with: 'Zinc-Patch-HTTPSocket-MarcusDenker.4'; + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.13'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.8'; + package: 'Zinc-pharo2-forward-compatibility' with: 'Zinc-pharo2-forward-compatibility-SvenVanCaekenberghe.1' ]. + spec for: #'pharo3.x' do: [ + spec + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.13'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.8' ]. + spec for: #'pharo4.x' do: [ + spec + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.13'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.8' ]. + spec for: #'pharo5.x' do: [ + spec + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.13'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.8' ]. + spec for: #'pharo6.x' do: [ + spec + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.13'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.8' ] \ No newline at end of file diff --git a/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version285..st b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version285..st new file mode 100644 index 000000000..d19407cb8 --- /dev/null +++ b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version285..st @@ -0,0 +1,58 @@ +versions +version285: spec + + spec for: #pharo do: [ + spec + blessing: #release; + description: 'Update to latest package versions'; + author: 'SvenVanCaekenberghe'; + package: 'Zinc-Character-Encoding-Core' with: 'Zinc-Character-Encoding-Core-SvenVanCaekenberghe.51'; + package: 'Zinc-Character-Encoding-Tests' with: 'Zinc-Character-Encoding-Tests-SvenVanCaekenberghe.33'; + package: 'Zinc-Resource-Meta-Core' with: 'Zinc-Resource-Meta-Core-SvenVanCaekenberghe.62'; + package: 'Zinc-Resource-Meta-Tests' with: 'Zinc-Resource-Meta-Tests-SvenVanCaekenberghe.37'; + package: 'Zinc-HTTP' with: 'Zinc-HTTP-SvenVanCaekenberghe.460'; + package: 'Zinc-Tests' with: 'Zinc-Tests-SvenVanCaekenberghe.239'; + package: 'Zinc-AWS' with: 'Zinc-AWS-SvenVanCaekenberghe.18'; + package: 'Zinc-REST' with: 'Zinc-REST-HolgerHansPeterFreyther.20'; + package: 'Zinc-WebDAV' with: 'Zinc-WebDAV-SvenVanCaekenberghe.3'; + package: 'Zinc-WebSocket-Core' with: 'Zinc-WebSocket-Core-LucFabresse.29'; + package: 'Zinc-WebSocket-Tests' with: 'Zinc-WebSocket-Tests-LucFabresse.9'; + package: 'Zinc-SSO-OAuth1-Core' with: 'Zinc-SSO-OAuth1-Core-SvenVanCaekenberghe.13'; + package: 'Zinc-SSO-OAuth2-Core' with: 'Zinc-SSO-OAuth2-Core-JanVanDeSandt.20'; + package: 'Zinc-SSO-OpenID-Core' with: 'Zinc-SSO-OpenID-Core-JanVanDeSandt.6'; + package: 'Zinc-SSO-Demo' with: 'Zinc-SSO-Demo-SvenVanCaekenberghe.5'; + package: 'Zinc-SSO-OAuth1-Tests' with: 'Zinc-SSO-OAuth1-Tests-SvenVanCaekenberghe.2'; + package: 'Zinc-SSO-OpenID-Tests' with: 'Zinc-SSO-OpenID-Tests-JanVanDeSandt.3'; + package: 'Zinc-WWS-Client' with: 'Zinc-WWS-Client-PhilippeBack.3'; + package: 'Zinc-WWS-Server' with: 'Zinc-WWS-Server-SvenVanCaekenberghe.11'; + package: 'Zinc-Zodiac' with: 'Zinc-Zodiac-SvenVanCaekenberghe.36'; + package: 'Zodiac-Core' with: 'Zodiac-Core-SvenVanCaekenberghe.42'; + package: 'Zodiac-Tests' with: 'Zodiac-Tests-SvenVanCaekenberghe.13'; + package: 'Zinc-Seaside' with: 'Zinc-Seaside-SvenVanCaekenberghe.46' ]. + spec for: #'pharo1.x' do: [ + spec + package: 'Zinc-Patch-HTTPSocket' with: 'Zinc-Patch-HTTPSocket-SvenVanCaekenberghe.1'; + package: 'Zinc-FileSystem-Legacy' with: 'Zinc-FileSystem-Legacy-SvenVanCaekenberghe.5'; + package: 'Zinc-Pharo-Forward-Compatibility' with: 'Zinc-Pharo-Forward-Compatibility-SvenVanCaekenberghe.1' ]. + spec for: #'pharo2.x' do: [ + spec + package: 'Zinc-Patch-HTTPSocket' with: 'Zinc-Patch-HTTPSocket-MarcusDenker.4'; + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.13'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.8'; + package: 'Zinc-pharo2-forward-compatibility' with: 'Zinc-pharo2-forward-compatibility-SvenVanCaekenberghe.1' ]. + spec for: #'pharo3.x' do: [ + spec + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.13'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.8' ]. + spec for: #'pharo4.x' do: [ + spec + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.13'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.8' ]. + spec for: #'pharo5.x' do: [ + spec + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.13'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.8' ]. + spec for: #'pharo6.x' do: [ + spec + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.13'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.8' ] \ No newline at end of file diff --git a/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version286..st b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version286..st new file mode 100644 index 000000000..97c14cd56 --- /dev/null +++ b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version286..st @@ -0,0 +1,58 @@ +versions +version286: spec + + spec for: #pharo do: [ + spec + blessing: #release; + description: 'Update to latest package versions'; + author: 'SvenVanCaekenberghe'; + package: 'Zinc-Character-Encoding-Core' with: 'Zinc-Character-Encoding-Core-SvenVanCaekenberghe.51'; + package: 'Zinc-Character-Encoding-Tests' with: 'Zinc-Character-Encoding-Tests-SvenVanCaekenberghe.33'; + package: 'Zinc-Resource-Meta-Core' with: 'Zinc-Resource-Meta-Core-SvenVanCaekenberghe.62'; + package: 'Zinc-Resource-Meta-Tests' with: 'Zinc-Resource-Meta-Tests-SvenVanCaekenberghe.37'; + package: 'Zinc-HTTP' with: 'Zinc-HTTP-SvenVanCaekenberghe.461'; + package: 'Zinc-Tests' with: 'Zinc-Tests-SvenVanCaekenberghe.239'; + package: 'Zinc-AWS' with: 'Zinc-AWS-SvenVanCaekenberghe.18'; + package: 'Zinc-REST' with: 'Zinc-REST-HolgerHansPeterFreyther.20'; + package: 'Zinc-WebDAV' with: 'Zinc-WebDAV-SvenVanCaekenberghe.3'; + package: 'Zinc-WebSocket-Core' with: 'Zinc-WebSocket-Core-LucFabresse.29'; + package: 'Zinc-WebSocket-Tests' with: 'Zinc-WebSocket-Tests-LucFabresse.9'; + package: 'Zinc-SSO-OAuth1-Core' with: 'Zinc-SSO-OAuth1-Core-SvenVanCaekenberghe.13'; + package: 'Zinc-SSO-OAuth2-Core' with: 'Zinc-SSO-OAuth2-Core-JanVanDeSandt.20'; + package: 'Zinc-SSO-OpenID-Core' with: 'Zinc-SSO-OpenID-Core-JanVanDeSandt.6'; + package: 'Zinc-SSO-Demo' with: 'Zinc-SSO-Demo-SvenVanCaekenberghe.5'; + package: 'Zinc-SSO-OAuth1-Tests' with: 'Zinc-SSO-OAuth1-Tests-SvenVanCaekenberghe.2'; + package: 'Zinc-SSO-OpenID-Tests' with: 'Zinc-SSO-OpenID-Tests-JanVanDeSandt.3'; + package: 'Zinc-WWS-Client' with: 'Zinc-WWS-Client-PhilippeBack.3'; + package: 'Zinc-WWS-Server' with: 'Zinc-WWS-Server-SvenVanCaekenberghe.11'; + package: 'Zinc-Zodiac' with: 'Zinc-Zodiac-SvenVanCaekenberghe.36'; + package: 'Zodiac-Core' with: 'Zodiac-Core-SvenVanCaekenberghe.42'; + package: 'Zodiac-Tests' with: 'Zodiac-Tests-SvenVanCaekenberghe.13'; + package: 'Zinc-Seaside' with: 'Zinc-Seaside-SvenVanCaekenberghe.46' ]. + spec for: #'pharo1.x' do: [ + spec + package: 'Zinc-Patch-HTTPSocket' with: 'Zinc-Patch-HTTPSocket-SvenVanCaekenberghe.1'; + package: 'Zinc-FileSystem-Legacy' with: 'Zinc-FileSystem-Legacy-SvenVanCaekenberghe.5'; + package: 'Zinc-Pharo-Forward-Compatibility' with: 'Zinc-Pharo-Forward-Compatibility-SvenVanCaekenberghe.1' ]. + spec for: #'pharo2.x' do: [ + spec + package: 'Zinc-Patch-HTTPSocket' with: 'Zinc-Patch-HTTPSocket-MarcusDenker.4'; + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.13'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.8'; + package: 'Zinc-pharo2-forward-compatibility' with: 'Zinc-pharo2-forward-compatibility-SvenVanCaekenberghe.1' ]. + spec for: #'pharo3.x' do: [ + spec + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.13'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.8' ]. + spec for: #'pharo4.x' do: [ + spec + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.13'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.8' ]. + spec for: #'pharo5.x' do: [ + spec + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.13'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.8' ]. + spec for: #'pharo6.x' do: [ + spec + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.13'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.8' ] \ No newline at end of file diff --git a/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version287..st b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version287..st new file mode 100644 index 000000000..4075c6efa --- /dev/null +++ b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version287..st @@ -0,0 +1,58 @@ +versions +version287: spec + + spec for: #pharo do: [ + spec + blessing: #release; + description: 'Update to latest package versions'; + author: 'SvenVanCaekenberghe'; + package: 'Zinc-Character-Encoding-Core' with: 'Zinc-Character-Encoding-Core-SvenVanCaekenberghe.51'; + package: 'Zinc-Character-Encoding-Tests' with: 'Zinc-Character-Encoding-Tests-SvenVanCaekenberghe.33'; + package: 'Zinc-Resource-Meta-Core' with: 'Zinc-Resource-Meta-Core-SvenVanCaekenberghe.62'; + package: 'Zinc-Resource-Meta-Tests' with: 'Zinc-Resource-Meta-Tests-SvenVanCaekenberghe.37'; + package: 'Zinc-HTTP' with: 'Zinc-HTTP-SvenVanCaekenberghe.461'; + package: 'Zinc-Tests' with: 'Zinc-Tests-SvenVanCaekenberghe.239'; + package: 'Zinc-AWS' with: 'Zinc-AWS-SvenVanCaekenberghe.18'; + package: 'Zinc-REST' with: 'Zinc-REST-HolgerHansPeterFreyther.20'; + package: 'Zinc-WebDAV' with: 'Zinc-WebDAV-SvenVanCaekenberghe.3'; + package: 'Zinc-WebSocket-Core' with: 'Zinc-WebSocket-Core-LucFabresse.29'; + package: 'Zinc-WebSocket-Tests' with: 'Zinc-WebSocket-Tests-LucFabresse.9'; + package: 'Zinc-SSO-OAuth1-Core' with: 'Zinc-SSO-OAuth1-Core-SvenVanCaekenberghe.13'; + package: 'Zinc-SSO-OAuth2-Core' with: 'Zinc-SSO-OAuth2-Core-JanVanDeSandt.20'; + package: 'Zinc-SSO-OpenID-Core' with: 'Zinc-SSO-OpenID-Core-JanVanDeSandt.6'; + package: 'Zinc-SSO-Demo' with: 'Zinc-SSO-Demo-SvenVanCaekenberghe.5'; + package: 'Zinc-SSO-OAuth1-Tests' with: 'Zinc-SSO-OAuth1-Tests-SvenVanCaekenberghe.2'; + package: 'Zinc-SSO-OpenID-Tests' with: 'Zinc-SSO-OpenID-Tests-JanVanDeSandt.3'; + package: 'Zinc-WWS-Client' with: 'Zinc-WWS-Client-PhilippeBack.3'; + package: 'Zinc-WWS-Server' with: 'Zinc-WWS-Server-SvenVanCaekenberghe.11'; + package: 'Zinc-Zodiac' with: 'Zinc-Zodiac-SvenVanCaekenberghe.39'; + package: 'Zodiac-Core' with: 'Zodiac-Core-TheIntegrator.46'; + package: 'Zodiac-Tests' with: 'Zodiac-Tests-SvenVanCaekenberghe.18'; + package: 'Zinc-Seaside' with: 'Zinc-Seaside-SvenVanCaekenberghe.46' ]. + spec for: #'pharo1.x' do: [ + spec + package: 'Zinc-Patch-HTTPSocket' with: 'Zinc-Patch-HTTPSocket-SvenVanCaekenberghe.1'; + package: 'Zinc-FileSystem-Legacy' with: 'Zinc-FileSystem-Legacy-SvenVanCaekenberghe.5'; + package: 'Zinc-Pharo-Forward-Compatibility' with: 'Zinc-Pharo-Forward-Compatibility-SvenVanCaekenberghe.1' ]. + spec for: #'pharo2.x' do: [ + spec + package: 'Zinc-Patch-HTTPSocket' with: 'Zinc-Patch-HTTPSocket-MarcusDenker.4'; + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.13'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.8'; + package: 'Zinc-pharo2-forward-compatibility' with: 'Zinc-pharo2-forward-compatibility-SvenVanCaekenberghe.1' ]. + spec for: #'pharo3.x' do: [ + spec + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.13'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.8' ]. + spec for: #'pharo4.x' do: [ + spec + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.13'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.8' ]. + spec for: #'pharo5.x' do: [ + spec + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.13'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.8' ]. + spec for: #'pharo6.x' do: [ + spec + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.13'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.8' ] \ No newline at end of file diff --git a/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version288..st b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version288..st new file mode 100644 index 000000000..6bc79b3eb --- /dev/null +++ b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version288..st @@ -0,0 +1,58 @@ +versions +version288: spec + + spec for: #pharo do: [ + spec + blessing: #release; + description: 'Update to latest package versions'; + author: 'SvenVanCaekenberghe'; + package: 'Zinc-Character-Encoding-Core' with: 'Zinc-Character-Encoding-Core-SvenVanCaekenberghe.51'; + package: 'Zinc-Character-Encoding-Tests' with: 'Zinc-Character-Encoding-Tests-SvenVanCaekenberghe.33'; + package: 'Zinc-Resource-Meta-Core' with: 'Zinc-Resource-Meta-Core-SvenVanCaekenberghe.62'; + package: 'Zinc-Resource-Meta-Tests' with: 'Zinc-Resource-Meta-Tests-SvenVanCaekenberghe.37'; + package: 'Zinc-HTTP' with: 'Zinc-HTTP-SvenVanCaekenberghe.461'; + package: 'Zinc-Tests' with: 'Zinc-Tests-SvenVanCaekenberghe.239'; + package: 'Zinc-AWS' with: 'Zinc-AWS-SvenVanCaekenberghe.18'; + package: 'Zinc-REST' with: 'Zinc-REST-HolgerHansPeterFreyther.20'; + package: 'Zinc-WebDAV' with: 'Zinc-WebDAV-SvenVanCaekenberghe.3'; + package: 'Zinc-WebSocket-Core' with: 'Zinc-WebSocket-Core-LucFabresse.29'; + package: 'Zinc-WebSocket-Tests' with: 'Zinc-WebSocket-Tests-LucFabresse.9'; + package: 'Zinc-SSO-OAuth1-Core' with: 'Zinc-SSO-OAuth1-Core-SvenVanCaekenberghe.13'; + package: 'Zinc-SSO-OAuth2-Core' with: 'Zinc-SSO-OAuth2-Core-JanVanDeSandt.20'; + package: 'Zinc-SSO-OpenID-Core' with: 'Zinc-SSO-OpenID-Core-JanVanDeSandt.6'; + package: 'Zinc-SSO-Demo' with: 'Zinc-SSO-Demo-SvenVanCaekenberghe.5'; + package: 'Zinc-SSO-OAuth1-Tests' with: 'Zinc-SSO-OAuth1-Tests-SvenVanCaekenberghe.2'; + package: 'Zinc-SSO-OpenID-Tests' with: 'Zinc-SSO-OpenID-Tests-JanVanDeSandt.3'; + package: 'Zinc-WWS-Client' with: 'Zinc-WWS-Client-PhilippeBack.3'; + package: 'Zinc-WWS-Server' with: 'Zinc-WWS-Server-SvenVanCaekenberghe.11'; + package: 'Zinc-Zodiac' with: 'Zinc-Zodiac-SvenVanCaekenberghe.40'; + package: 'Zodiac-Core' with: 'Zodiac-Core-TheIntegrator.46'; + package: 'Zodiac-Tests' with: 'Zodiac-Tests-SvenVanCaekenberghe.18'; + package: 'Zinc-Seaside' with: 'Zinc-Seaside-SvenVanCaekenberghe.46' ]. + spec for: #'pharo1.x' do: [ + spec + package: 'Zinc-Patch-HTTPSocket' with: 'Zinc-Patch-HTTPSocket-SvenVanCaekenberghe.1'; + package: 'Zinc-FileSystem-Legacy' with: 'Zinc-FileSystem-Legacy-SvenVanCaekenberghe.5'; + package: 'Zinc-Pharo-Forward-Compatibility' with: 'Zinc-Pharo-Forward-Compatibility-SvenVanCaekenberghe.1' ]. + spec for: #'pharo2.x' do: [ + spec + package: 'Zinc-Patch-HTTPSocket' with: 'Zinc-Patch-HTTPSocket-MarcusDenker.4'; + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.13'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.8'; + package: 'Zinc-pharo2-forward-compatibility' with: 'Zinc-pharo2-forward-compatibility-SvenVanCaekenberghe.1' ]. + spec for: #'pharo3.x' do: [ + spec + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.13'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.8' ]. + spec for: #'pharo4.x' do: [ + spec + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.13'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.8' ]. + spec for: #'pharo5.x' do: [ + spec + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.13'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.8' ]. + spec for: #'pharo6.x' do: [ + spec + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.13'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.8' ] \ No newline at end of file diff --git a/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version289..st b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version289..st new file mode 100644 index 000000000..7753052bf --- /dev/null +++ b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version289..st @@ -0,0 +1,62 @@ +versions +version289: spec + + spec for: #pharo do: [ + spec + blessing: #release; + description: 'Update to latest package versions'; + author: 'SvenVanCaekenberghe'; + package: 'Zinc-Character-Encoding-Core' with: 'Zinc-Character-Encoding-Core-SvenVanCaekenberghe.54'; + package: 'Zinc-Character-Encoding-Tests' with: 'Zinc-Character-Encoding-Tests-SvenVanCaekenberghe.35'; + package: 'Zinc-Resource-Meta-Core' with: 'Zinc-Resource-Meta-Core-SvenVanCaekenberghe.65'; + package: 'Zinc-Resource-Meta-Tests' with: 'Zinc-Resource-Meta-Tests-SvenVanCaekenberghe.38'; + package: 'Zinc-HTTP' with: 'Zinc-HTTP-SvenVanCaekenberghe.469'; + package: 'Zinc-Tests' with: 'Zinc-Tests-SvenVanCaekenberghe.243'; + package: 'Zinc-AWS' with: 'Zinc-AWS-SvenVanCaekenberghe.18'; + package: 'Zinc-REST' with: 'Zinc-REST-HolgerHansPeterFreyther.20'; + package: 'Zinc-WebDAV' with: 'Zinc-WebDAV-SvenVanCaekenberghe.3'; + package: 'Zinc-WebSocket-Core' with: 'Zinc-WebSocket-Core-LucFabresse.29'; + package: 'Zinc-WebSocket-Tests' with: 'Zinc-WebSocket-Tests-LucFabresse.9'; + package: 'Zinc-SSO-OAuth1-Core' with: 'Zinc-SSO-OAuth1-Core-SvenVanCaekenberghe.13'; + package: 'Zinc-SSO-OAuth2-Core' with: 'Zinc-SSO-OAuth2-Core-JanVanDeSandt.20'; + package: 'Zinc-SSO-OpenID-Core' with: 'Zinc-SSO-OpenID-Core-JanVanDeSandt.6'; + package: 'Zinc-SSO-Demo' with: 'Zinc-SSO-Demo-SvenVanCaekenberghe.5'; + package: 'Zinc-SSO-OAuth1-Tests' with: 'Zinc-SSO-OAuth1-Tests-SvenVanCaekenberghe.2'; + package: 'Zinc-SSO-OpenID-Tests' with: 'Zinc-SSO-OpenID-Tests-JanVanDeSandt.3'; + package: 'Zinc-WWS-Client' with: 'Zinc-WWS-Client-PhilippeBack.3'; + package: 'Zinc-WWS-Server' with: 'Zinc-WWS-Server-SvenVanCaekenberghe.11'; + package: 'Zinc-Zodiac' with: 'Zinc-Zodiac-SvenVanCaekenberghe.40'; + package: 'Zodiac-Core' with: 'Zodiac-Core-TheIntegrator.46'; + package: 'Zodiac-Tests' with: 'Zodiac-Tests-SvenVanCaekenberghe.18'; + package: 'Zinc-Seaside' with: 'Zinc-Seaside-SvenVanCaekenberghe.47' ]. + spec for: #'pharo1.x' do: [ + spec + package: 'Zinc-Patch-HTTPSocket' with: 'Zinc-Patch-HTTPSocket-SvenVanCaekenberghe.1'; + package: 'Zinc-FileSystem-Legacy' with: 'Zinc-FileSystem-Legacy-SvenVanCaekenberghe.5'; + package: 'Zinc-Pharo-Forward-Compatibility' with: 'Zinc-Pharo-Forward-Compatibility-SvenVanCaekenberghe.1' ]. + spec for: #'pharo2.x' do: [ + spec + package: 'Zinc-Patch-HTTPSocket' with: 'Zinc-Patch-HTTPSocket-MarcusDenker.4'; + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.13'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.8'; + package: 'Zinc-pharo2-forward-compatibility' with: 'Zinc-pharo2-forward-compatibility-SvenVanCaekenberghe.1' ]. + spec for: #'pharo3.x' do: [ + spec + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.13'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.8' ]. + spec for: #'pharo4.x' do: [ + spec + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.13'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.8' ]. + spec for: #'pharo5.x' do: [ + spec + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.13'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.8' ]. + spec for: #'pharo6.x' do: [ + spec + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.13'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.8' ]. + spec for: #'pharo7.x' do: [ + spec + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.13'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.8' ] \ No newline at end of file diff --git a/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version291..st b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version291..st new file mode 100644 index 000000000..ddce4698a --- /dev/null +++ b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version291..st @@ -0,0 +1,63 @@ +versions +version291: spec + + spec for: #pharo do: [ + spec + blessing: #release; + description: 'Update to latest package versions'; + author: 'SvenVanCaekenberghe'; + package: 'Zinc-Character-Encoding-Core' with: 'Zinc-Character-Encoding-Core-SvenVanCaekenberghe.58'; + package: 'Zinc-Character-Encoding-Tests' with: 'Zinc-Character-Encoding-Tests-SvenVanCaekenberghe.39'; + package: 'Zinc-Resource-Meta-Core' with: 'Zinc-Resource-Meta-Core-SvenVanCaekenberghe.67'; + package: 'Zinc-Resource-Meta-Tests' with: 'Zinc-Resource-Meta-Tests-SvenVanCaekenberghe.38'; + package: 'Zinc-HTTP' with: 'Zinc-HTTP-SvenVanCaekenberghe.472'; + package: 'Zinc-Tests' with: 'Zinc-Tests-SvenVanCaekenberghe.245'; + package: 'Zinc-AWS' with: 'Zinc-AWS-SvenVanCaekenberghe.18'; + package: 'Zinc-REST' with: 'Zinc-REST-HolgerHansPeterFreyther.20'; + package: 'Zinc-WebDAV' with: 'Zinc-WebDAV-SvenVanCaekenberghe.3'; + package: 'Zinc-WebSocket-Core' with: 'Zinc-WebSocket-Core-SvenVanCaekenberghe.30'; + package: 'Zinc-WebSocket-Tests' with: 'Zinc-WebSocket-Tests-LucFabresse.9'; + package: 'Zinc-SSO-OAuth1-Core' with: 'Zinc-SSO-OAuth1-Core-SvenVanCaekenberghe.13'; + package: 'Zinc-SSO-OAuth2-Core' with: 'Zinc-SSO-OAuth2-Core-JanVanDeSandt.20'; + package: 'Zinc-SSO-OpenID-Core' with: 'Zinc-SSO-OpenID-Core-JanVanDeSandt.6'; + package: 'Zinc-SSO-Demo' with: 'Zinc-SSO-Demo-SvenVanCaekenberghe.5'; + package: 'Zinc-SSO-OAuth1-Tests' with: 'Zinc-SSO-OAuth1-Tests-SvenVanCaekenberghe.2'; + package: 'Zinc-SSO-OpenID-Tests' with: 'Zinc-SSO-OpenID-Tests-JanVanDeSandt.3'; + package: 'Zinc-WWS-Client' with: 'Zinc-WWS-Client-PhilippeBack.3'; + package: 'Zinc-WWS-Server' with: 'Zinc-WWS-Server-SvenVanCaekenberghe.11'; + package: 'Zinc-Zodiac' with: 'Zinc-Zodiac-SvenVanCaekenberghe.43'; + package: 'Zodiac-Core' with: 'Zodiac-Core-SvenVanCaekenberghe.47'; + package: 'Zodiac-Tests' with: 'Zodiac-Tests-SvenVanCaekenberghe.19'; + package: 'Zodiac-Extra' with: 'Zodiac-Extra-SvenVanCaekenberghe.8'; + package: 'Zinc-Seaside' with: 'Zinc-Seaside-SvenVanCaekenberghe.47' ]. + spec for: #'pharo1.x' do: [ + spec + package: 'Zinc-Patch-HTTPSocket' with: 'Zinc-Patch-HTTPSocket-SvenVanCaekenberghe.1'; + package: 'Zinc-FileSystem-Legacy' with: 'Zinc-FileSystem-Legacy-SvenVanCaekenberghe.5'; + package: 'Zinc-Pharo-Forward-Compatibility' with: 'Zinc-Pharo-Forward-Compatibility-SvenVanCaekenberghe.1' ]. + spec for: #'pharo2.x' do: [ + spec + package: 'Zinc-Patch-HTTPSocket' with: 'Zinc-Patch-HTTPSocket-MarcusDenker.4'; + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.15'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.9'; + package: 'Zinc-pharo2-forward-compatibility' with: 'Zinc-pharo2-forward-compatibility-SvenVanCaekenberghe.1' ]. + spec for: #'pharo3.x' do: [ + spec + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.15'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.9' ]. + spec for: #'pharo4.x' do: [ + spec + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.15'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.9' ]. + spec for: #'pharo5.x' do: [ + spec + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.15'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.9' ]. + spec for: #'pharo6.x' do: [ + spec + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.15'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.9' ]. + spec for: #'pharo7.x' do: [ + spec + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.15'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.9' ] \ No newline at end of file diff --git a/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version292..st b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version292..st new file mode 100644 index 000000000..c6555a6b6 --- /dev/null +++ b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version292..st @@ -0,0 +1,63 @@ +versions +version292: spec + + spec for: #pharo do: [ + spec + blessing: #release; + description: 'Update to latest package versions'; + author: 'SvenVanCaekenberghe'; + package: 'Zinc-Character-Encoding-Core' with: 'Zinc-Character-Encoding-Core-SvenVanCaekenberghe.64'; + package: 'Zinc-Character-Encoding-Tests' with: 'Zinc-Character-Encoding-Tests-SvenVanCaekenberghe.43'; + package: 'Zinc-Resource-Meta-Core' with: 'Zinc-Resource-Meta-Core-SvenVanCaekenberghe.68'; + package: 'Zinc-Resource-Meta-Tests' with: 'Zinc-Resource-Meta-Tests-SvenVanCaekenberghe.38'; + package: 'Zinc-HTTP' with: 'Zinc-HTTP-SvenVanCaekenberghe.474'; + package: 'Zinc-Tests' with: 'Zinc-Tests-SvenVanCaekenberghe.245'; + package: 'Zinc-AWS' with: 'Zinc-AWS-SvenVanCaekenberghe.18'; + package: 'Zinc-REST' with: 'Zinc-REST-HolgerHansPeterFreyther.20'; + package: 'Zinc-WebDAV' with: 'Zinc-WebDAV-SvenVanCaekenberghe.3'; + package: 'Zinc-WebSocket-Core' with: 'Zinc-WebSocket-Core-SvenVanCaekenberghe.30'; + package: 'Zinc-WebSocket-Tests' with: 'Zinc-WebSocket-Tests-LucFabresse.9'; + package: 'Zinc-SSO-OAuth1-Core' with: 'Zinc-SSO-OAuth1-Core-SvenVanCaekenberghe.13'; + package: 'Zinc-SSO-OAuth2-Core' with: 'Zinc-SSO-OAuth2-Core-JanVanDeSandt.20'; + package: 'Zinc-SSO-OpenID-Core' with: 'Zinc-SSO-OpenID-Core-JanVanDeSandt.6'; + package: 'Zinc-SSO-Demo' with: 'Zinc-SSO-Demo-SvenVanCaekenberghe.5'; + package: 'Zinc-SSO-OAuth1-Tests' with: 'Zinc-SSO-OAuth1-Tests-SvenVanCaekenberghe.2'; + package: 'Zinc-SSO-OpenID-Tests' with: 'Zinc-SSO-OpenID-Tests-JanVanDeSandt.3'; + package: 'Zinc-WWS-Client' with: 'Zinc-WWS-Client-PhilippeBack.3'; + package: 'Zinc-WWS-Server' with: 'Zinc-WWS-Server-SvenVanCaekenberghe.11'; + package: 'Zinc-Zodiac' with: 'Zinc-Zodiac-SvenVanCaekenberghe.44'; + package: 'Zodiac-Core' with: 'Zodiac-Core-TorstenBergmann.48'; + package: 'Zodiac-Tests' with: 'Zodiac-Tests-SvenVanCaekenberghe.22'; + package: 'Zodiac-Extra' with: 'Zodiac-Extra-SvenVanCaekenberghe.8'; + package: 'Zinc-Seaside' with: 'Zinc-Seaside-SvenVanCaekenberghe.47' ]. + spec for: #'pharo1.x' do: [ + spec + package: 'Zinc-Patch-HTTPSocket' with: 'Zinc-Patch-HTTPSocket-SvenVanCaekenberghe.1'; + package: 'Zinc-FileSystem-Legacy' with: 'Zinc-FileSystem-Legacy-SvenVanCaekenberghe.5'; + package: 'Zinc-Pharo-Forward-Compatibility' with: 'Zinc-Pharo-Forward-Compatibility-SvenVanCaekenberghe.1' ]. + spec for: #'pharo2.x' do: [ + spec + package: 'Zinc-Patch-HTTPSocket' with: 'Zinc-Patch-HTTPSocket-MarcusDenker.4'; + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.15'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.9'; + package: 'Zinc-pharo2-forward-compatibility' with: 'Zinc-pharo2-forward-compatibility-SvenVanCaekenberghe.1' ]. + spec for: #'pharo3.x' do: [ + spec + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.15'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.9' ]. + spec for: #'pharo4.x' do: [ + spec + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.15'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.9' ]. + spec for: #'pharo5.x' do: [ + spec + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.15'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.9' ]. + spec for: #'pharo6.x' do: [ + spec + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.15'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.9' ]. + spec for: #'pharo7.x' do: [ + spec + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.15'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.9' ] \ No newline at end of file diff --git a/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version293..st b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version293..st new file mode 100644 index 000000000..99408e852 --- /dev/null +++ b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version293..st @@ -0,0 +1,63 @@ +versions +version293: spec + + spec for: #pharo do: [ + spec + blessing: #release; + description: 'Update to latest package versions'; + author: 'SvenVanCaekenberghe'; + package: 'Zinc-Character-Encoding-Core' with: 'Zinc-Character-Encoding-Core-SvenVanCaekenberghe.64'; + package: 'Zinc-Character-Encoding-Tests' with: 'Zinc-Character-Encoding-Tests-SvenVanCaekenberghe.43'; + package: 'Zinc-Resource-Meta-Core' with: 'Zinc-Resource-Meta-Core-SvenVanCaekenberghe.68'; + package: 'Zinc-Resource-Meta-Tests' with: 'Zinc-Resource-Meta-Tests-SvenVanCaekenberghe.38'; + package: 'Zinc-HTTP' with: 'Zinc-HTTP-SvenVanCaekenberghe.475'; + package: 'Zinc-Tests' with: 'Zinc-Tests-SvenVanCaekenberghe.245'; + package: 'Zinc-AWS' with: 'Zinc-AWS-SvenVanCaekenberghe.18'; + package: 'Zinc-REST' with: 'Zinc-REST-HolgerHansPeterFreyther.20'; + package: 'Zinc-WebDAV' with: 'Zinc-WebDAV-SvenVanCaekenberghe.3'; + package: 'Zinc-WebSocket-Core' with: 'Zinc-WebSocket-Core-SvenVanCaekenberghe.30'; + package: 'Zinc-WebSocket-Tests' with: 'Zinc-WebSocket-Tests-LucFabresse.9'; + package: 'Zinc-SSO-OAuth1-Core' with: 'Zinc-SSO-OAuth1-Core-SvenVanCaekenberghe.13'; + package: 'Zinc-SSO-OAuth2-Core' with: 'Zinc-SSO-OAuth2-Core-JanVanDeSandt.20'; + package: 'Zinc-SSO-OpenID-Core' with: 'Zinc-SSO-OpenID-Core-JanVanDeSandt.6'; + package: 'Zinc-SSO-Demo' with: 'Zinc-SSO-Demo-SvenVanCaekenberghe.5'; + package: 'Zinc-SSO-OAuth1-Tests' with: 'Zinc-SSO-OAuth1-Tests-SvenVanCaekenberghe.2'; + package: 'Zinc-SSO-OpenID-Tests' with: 'Zinc-SSO-OpenID-Tests-JanVanDeSandt.3'; + package: 'Zinc-WWS-Client' with: 'Zinc-WWS-Client-PhilippeBack.3'; + package: 'Zinc-WWS-Server' with: 'Zinc-WWS-Server-SvenVanCaekenberghe.11'; + package: 'Zinc-Zodiac' with: 'Zinc-Zodiac-SvenVanCaekenberghe.44'; + package: 'Zodiac-Core' with: 'Zodiac-Core-TorstenBergmann.48'; + package: 'Zodiac-Tests' with: 'Zodiac-Tests-SvenVanCaekenberghe.22'; + package: 'Zodiac-Extra' with: 'Zodiac-Extra-SvenVanCaekenberghe.8'; + package: 'Zinc-Seaside' with: 'Zinc-Seaside-SvenVanCaekenberghe.47' ]. + spec for: #'pharo1.x' do: [ + spec + package: 'Zinc-Patch-HTTPSocket' with: 'Zinc-Patch-HTTPSocket-SvenVanCaekenberghe.1'; + package: 'Zinc-FileSystem-Legacy' with: 'Zinc-FileSystem-Legacy-SvenVanCaekenberghe.5'; + package: 'Zinc-Pharo-Forward-Compatibility' with: 'Zinc-Pharo-Forward-Compatibility-SvenVanCaekenberghe.1' ]. + spec for: #'pharo2.x' do: [ + spec + package: 'Zinc-Patch-HTTPSocket' with: 'Zinc-Patch-HTTPSocket-MarcusDenker.4'; + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.16'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.9'; + package: 'Zinc-pharo2-forward-compatibility' with: 'Zinc-pharo2-forward-compatibility-SvenVanCaekenberghe.1' ]. + spec for: #'pharo3.x' do: [ + spec + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.16'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.9' ]. + spec for: #'pharo4.x' do: [ + spec + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.16'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.9' ]. + spec for: #'pharo5.x' do: [ + spec + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.16'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.9' ]. + spec for: #'pharo6.x' do: [ + spec + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.16'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.9' ]. + spec for: #'pharo7.x' do: [ + spec + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.16'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.9' ] \ No newline at end of file diff --git a/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version294..st b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version294..st new file mode 100644 index 000000000..45a169a4e --- /dev/null +++ b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version294..st @@ -0,0 +1,63 @@ +versions +version294: spec + + spec for: #pharo do: [ + spec + blessing: #release; + description: 'Update to latest package versions'; + author: 'SvenVanCaekenberghe'; + package: 'Zinc-Character-Encoding-Core' with: 'Zinc-Character-Encoding-Core-SvenVanCaekenberghe.64'; + package: 'Zinc-Character-Encoding-Tests' with: 'Zinc-Character-Encoding-Tests-SvenVanCaekenberghe.43'; + package: 'Zinc-Resource-Meta-Core' with: 'Zinc-Resource-Meta-Core-SvenVanCaekenberghe.68'; + package: 'Zinc-Resource-Meta-Tests' with: 'Zinc-Resource-Meta-Tests-SvenVanCaekenberghe.38'; + package: 'Zinc-HTTP' with: 'Zinc-HTTP-SvenVanCaekenberghe.475'; + package: 'Zinc-Tests' with: 'Zinc-Tests-SvenVanCaekenberghe.245'; + package: 'Zinc-AWS' with: 'Zinc-AWS-SvenVanCaekenberghe.18'; + package: 'Zinc-REST' with: 'Zinc-REST-HolgerHansPeterFreyther.20'; + package: 'Zinc-WebDAV' with: 'Zinc-WebDAV-SvenVanCaekenberghe.3'; + package: 'Zinc-WebSocket-Core' with: 'Zinc-WebSocket-Core-SvenVanCaekenberghe.30'; + package: 'Zinc-WebSocket-Tests' with: 'Zinc-WebSocket-Tests-LucFabresse.9'; + package: 'Zinc-SSO-OAuth1-Core' with: 'Zinc-SSO-OAuth1-Core-SvenVanCaekenberghe.13'; + package: 'Zinc-SSO-OAuth2-Core' with: 'Zinc-SSO-OAuth2-Core-JanVanDeSandt.20'; + package: 'Zinc-SSO-OpenID-Core' with: 'Zinc-SSO-OpenID-Core-JanVanDeSandt.6'; + package: 'Zinc-SSO-Demo' with: 'Zinc-SSO-Demo-SvenVanCaekenberghe.5'; + package: 'Zinc-SSO-OAuth1-Tests' with: 'Zinc-SSO-OAuth1-Tests-SvenVanCaekenberghe.2'; + package: 'Zinc-SSO-OpenID-Tests' with: 'Zinc-SSO-OpenID-Tests-JanVanDeSandt.3'; + package: 'Zinc-WWS-Client' with: 'Zinc-WWS-Client-PhilippeBack.3'; + package: 'Zinc-WWS-Server' with: 'Zinc-WWS-Server-SvenVanCaekenberghe.11'; + package: 'Zinc-Zodiac' with: 'Zinc-Zodiac-SvenVanCaekenberghe.44'; + package: 'Zodiac-Core' with: 'Zodiac-Core-TorstenBergmann.48'; + package: 'Zodiac-Tests' with: 'Zodiac-Tests-SvenVanCaekenberghe.22'; + package: 'Zodiac-Extra' with: 'Zodiac-Extra-SvenVanCaekenberghe.8'; + package: 'Zinc-Seaside' with: 'Zinc-Seaside-SvenVanCaekenberghe.47' ]. + spec for: #'pharo1.x' do: [ + spec + package: 'Zinc-Patch-HTTPSocket' with: 'Zinc-Patch-HTTPSocket-SvenVanCaekenberghe.1'; + package: 'Zinc-FileSystem-Legacy' with: 'Zinc-FileSystem-Legacy-SvenVanCaekenberghe.5'; + package: 'Zinc-Pharo-Forward-Compatibility' with: 'Zinc-Pharo-Forward-Compatibility-SvenVanCaekenberghe.1' ]. + spec for: #'pharo2.x' do: [ + spec + package: 'Zinc-Patch-HTTPSocket' with: 'Zinc-Patch-HTTPSocket-MarcusDenker.4'; + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.17'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.9'; + package: 'Zinc-pharo2-forward-compatibility' with: 'Zinc-pharo2-forward-compatibility-SvenVanCaekenberghe.1' ]. + spec for: #'pharo3.x' do: [ + spec + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.17'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.9' ]. + spec for: #'pharo4.x' do: [ + spec + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.17'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.9' ]. + spec for: #'pharo5.x' do: [ + spec + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.17'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.9' ]. + spec for: #'pharo6.x' do: [ + spec + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.17'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.9' ]. + spec for: #'pharo7.x' do: [ + spec + package: 'Zinc-FileSystem' with: 'Zinc-FileSystem-SvenVanCaekenberghe.17'; + package: 'Zinc-Resource-Meta-FileSystem' with: 'Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.9' ] \ No newline at end of file diff --git a/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version301..st b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version301..st new file mode 100644 index 000000000..a21211f96 --- /dev/null +++ b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/instance/version301..st @@ -0,0 +1,33 @@ +versions +version301: spec + + spec for: #pharo do: [ + spec + blessing: #release; + description: 'Update to latest package versions'; + author: 'SvenVanCaekenberghe'; + package: 'Zinc-Character-Encoding-Core' with: 'Zinc-Character-Encoding-Core-SvenVanCaekenberghe.66'; + package: 'Zinc-Character-Encoding-Tests' with: 'Zinc-Character-Encoding-Tests-SvenVanCaekenberghe.46'; + package: 'Zinc-Resource-Meta-Core' with: 'Zinc-Resource-Meta-Core-SvenVanCaekenberghe.71'; + package: 'Zinc-Resource-Meta-Tests' with: 'Zinc-Resource-Meta-Tests-SvenVanCaekenberghe.39'; + package: 'Zinc-HTTP' with: 'Zinc-HTTP-SvenVanCaekenberghe.481'; + package: 'Zinc-HTTP-Examples' with: 'Zinc-HTTP-Examples-SvenVanCaekenberghe.3'; + package: 'Zinc-Tests' with: 'Zinc-Tests-SvenVanCaekenberghe.251'; + package: 'Zinc-Zodiac-Core' with: 'Zinc-Zodiac-Core-SvenVanCaekenberghe.1'; + package: 'Zinc-Zodiac-Tests' with: 'Zinc-Zodiac-Tests-SvenVanCaekenberghe.1'; + package: 'Zodiac-Core' with: 'Zodiac-Core-SvenVanCaekenberghe.49'; + package: 'Zodiac-Tests' with: 'Zodiac-Tests-SvenVanCaekenberghe.22'; + package: 'Zinc-Seaside' with: 'Zinc-Seaside-pmm.48'; + package: 'Zinc-REST' with: 'Zinc-REST-HolgerHansPeterFreyther.20'; + package: 'Zinc-WebSocket-Core' with: 'Zinc-WebSocket-Core-SvenVanCaekenberghe.30'; + package: 'Zinc-WebSocket-Tests' with: 'Zinc-WebSocket-Tests-LucFabresse.9'; + package: 'Zinc-AWS' with: 'Zinc-AWS-SvenVanCaekenberghe.18'; + package: 'Zinc-WebDAV' with: 'Zinc-WebDAV-SvenVanCaekenberghe.3'; + package: 'Zinc-SSO-OAuth1-Core' with: 'Zinc-SSO-OAuth1-Core-SvenVanCaekenberghe.13'; + package: 'Zinc-SSO-OAuth2-Core' with: 'Zinc-SSO-OAuth2-Core-JanVanDeSandt.20'; + package: 'Zinc-SSO-OpenID-Core' with: 'Zinc-SSO-OpenID-Core-JanVanDeSandt.6'; + package: 'Zinc-SSO-Demo' with: 'Zinc-SSO-Demo-SvenVanCaekenberghe.5'; + package: 'Zinc-SSO-OAuth1-Tests' with: 'Zinc-SSO-OAuth1-Tests-SvenVanCaekenberghe.2'; + package: 'Zinc-SSO-OpenID-Tests' with: 'Zinc-SSO-OpenID-Tests-JanVanDeSandt.3'; + package: 'Zinc-WWS-Client' with: 'Zinc-WWS-Client-PhilippeBack.3'; + package: 'Zinc-WWS-Server' with: 'Zinc-WWS-Server-SvenVanCaekenberghe.11' ] \ No newline at end of file diff --git a/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/methodProperties.json b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/methodProperties.json deleted file mode 100644 index eed6d7d7d..000000000 --- a/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/methodProperties.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "class" : { - "bootstrapPackage:from:" : "SvenVanCaekenberghe 1/15/2011 17:31", - "catalogChangeLog" : "SvenVanCaekenberghe 6/10/2014 11:18", - "catalogContactInfo" : "SvenVanCaekenberghe 6/10/2014 11:16", - "catalogDescription" : "SvenVanCaekenberghe 6/10/2014 11:23", - "catalogKeyClassesAndExample" : "SvenVanCaekenberghe 6/10/2014 11:21", - "catalogKeywords" : "SvenVanCaekenberghe 6/10/2014 22:21", - "ensureMetacello" : "SvenVanCaekenberghe 1/15/2011 17:31", - "isMetacelloConfig" : "SvenVanCaekenberghe 1/15/2011 17:31", - "lastMetacelloVersionLoad" : "SvenVanCaekenberghe 1/15/2011 17:31", - "load" : "SvenVanCaekenberghe 1/15/2011 17:31", - "metacelloVersion:loads:" : "SvenVanCaekenberghe 1/15/2011 17:31", - "project" : "SvenVanCaekenberghe 1/15/2011 17:31", - "unloadMetacello" : "SvenVanCaekenberghe 1/15/2011 17:31" }, - "instance" : { - "baseline10:" : "dkh 9/1/2011 17:11", - "baseline11:" : "dkh 9/1/2011 17:10", - "baseline12:" : "dkh 9/1/2011 17:13", - "baseline13:" : "PaulDeBruicker 10/25/2011 17:17", - "baseline14:" : "FrancoisStephany 12/12/2011 12:02", - "baseline15:" : "SeanDeNigris 6/7/2012 00:20", - "baseline17:" : "SeanDeNigris 7/5/2012 01:35", - "baseline18:" : "SvenVanCaekenberghe 9/4/2012 09:35", - "baseline19:" : "SvenVanCaekenberghe 9/28/2012 14:25", - "baseline20:" : "SvenVanCaekenberghe 12/12/2012 20:34", - "baseline21:" : "SvenVanCaekenberghe 12/17/2012 22:02", - "baseline22:" : "SvenVanCaekenberghe 1/8/2013 15:31", - "baseline23:" : "SvenVanCaekenberghe 1/21/2013 13:08", - "baseline24:" : "PaulDeBruicker 09/10/2013 10:02", - "project" : "SvenVanCaekenberghe 1/15/2011 17:31", - "stable:" : "SvenVanCaekenberghe 7/3/2014 00:45", - "version10:" : "PaulDeBruicker 6/1/2011 23:13", - "version11:" : "dkh 9/1/2011 17:12", - "version12:" : "dkh 9/1/2011 17:12", - "version13:" : "PaulDeBruicker 10/25/2011 17:17", - "version14:" : "FrancoisStephany 12/12/2011 12:02", - "version151:" : "SeanDeNigris 6/7/2012 00:30", - "version15:" : "SeanDeNigris 6/7/2012 00:18", - "version16:" : "PaulDeBruicker 6/7/2012 07:40", - "version17:" : "SeanDeNigris 7/5/2012 01:34", - "version181:" : "SvenVanCaekenberghe 9/4/2012 16:51", - "version182:" : "SvenVanCaekenberghe 9/12/2012 15:42", - "version18:" : "SvenVanCaekenberghe 9/4/2012 09:51", - "version191:" : "SvenVanCaekenberghe 10/12/2012 13:29", - "version192:" : "SvenVanCaekenberghe 10/13/2012 17:54", - "version193:" : "SvenVanCaekenberghe 10/13/2012 20:56", - "version19:" : "SvenVanCaekenberghe 9/28/2012 14:29", - "version20:" : "SvenVanCaekenberghe 12/12/2012 20:35", - "version211:" : "SvenVanCaekenberghe 12/24/2012 14:53", - "version212:" : "SvenVanCaekenberghe 12/31/2012 17:58", - "version213:" : "SvenVanCaekenberghe 1/8/2013 13:54", - "version21:" : "SvenVanCaekenberghe 12/17/2012 22:04", - "version22:" : "SvenVanCaekenberghe 1/8/2013 15:32", - "version231:" : "SvenVanCaekenberghe 1/31/2013 22:24", - "version232:" : "SvenVanCaekenberghe 2/1/2013 20:06", - "version233:" : "SvenVanCaekenberghe 2/22/2013 15:36", - "version234:" : "SvenVanCaekenberghe 3/14/2013 19:03", - "version23:" : "SvenVanCaekenberghe 1/21/2013 17:00", - "version241:" : "SvenVanCaekenberghe 6/3/2013 20:20", - "version242:" : "SvenVanCaekenberghe 6/7/2013 13:49", - "version243:" : "dkh 07/10/2014 15:58", - "version244:" : "JohanBrichau 7/9/2014 20:54", - "version245:" : "JohanBrichau 7/9/2014 20:54", - "version246:" : "JohanBrichau 7/9/2014 20:54", - "version247:" : "JohanBrichau 7/9/2014 20:54", - "version248:" : "JohanBrichau 7/9/2014 20:54", - "version249:" : "JohanBrichau 7/9/2014 20:55", - "version24:" : "SvenVanCaekenberghe 5/28/2013 20:45", - "version250:" : "JohanBrichau 7/9/2014 20:55", - "version251:" : "JohanBrichau 7/9/2014 20:55", - "version252:" : "JohanBrichau 7/9/2014 20:55" } } diff --git a/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/properties.json b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/properties.json index 3e05c0954..201516329 100644 --- a/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/properties.json +++ b/repository/ConfigurationOfZincHTTPComponents.package/ConfigurationOfZincHTTPComponents.class/properties.json @@ -1,14 +1,15 @@ { + "commentStamp" : "SvenVanCaekenberghe 3/14/2018 16:56", + "super" : "Object", "category" : "ConfigurationOfZincHTTPComponents", - "classinstvars" : [ - ], + "classinstvars" : [ ], + "pools" : [ ], "classvars" : [ - "LastVersionLoad" ], - "commentStamp" : "", + "LastVersionLoad" + ], "instvars" : [ - "project" ], + "project" + ], "name" : "ConfigurationOfZincHTTPComponents", - "pools" : [ - ], - "super" : "Object", - "type" : "normal" } + "type" : "normal" +} \ No newline at end of file diff --git a/repository/ConfigurationOfZincHTTPComponents.package/monticello.meta/categories.st b/repository/ConfigurationOfZincHTTPComponents.package/monticello.meta/categories.st index 9effadb4d..d9d63cf2f 100644 --- a/repository/ConfigurationOfZincHTTPComponents.package/monticello.meta/categories.st +++ b/repository/ConfigurationOfZincHTTPComponents.package/monticello.meta/categories.st @@ -1 +1 @@ -SystemOrganization addCategory: #'ConfigurationOfZincHTTPComponents'! +SystemOrganization addCategory: #ConfigurationOfZincHTTPComponents! diff --git a/repository/ConfigurationOfZincHTTPComponents.package/monticello.meta/version b/repository/ConfigurationOfZincHTTPComponents.package/monticello.meta/version index 3e6180c91..cd9fa1366 100644 --- a/repository/ConfigurationOfZincHTTPComponents.package/monticello.meta/version +++ b/repository/ConfigurationOfZincHTTPComponents.package/monticello.meta/version @@ -1 +1 @@ -(name 'ConfigurationOfZincHTTPComponents-dkh.70' message 'fix some minor zinc config errors' id '6f34105b-3e12-4cf2-94d9-dda27866ac8f' date '07/10/2014' time '16:01:41' author 'dkh' ancestors ((name 'ConfigurationOfZincHTTPComponents-JohanBrichau.69' message 'reference 2.4.3' id '925683fc-f243-4d74-8ad7-f4de5b440da5' date '07/10/2014' time '09:25:35' author 'JohanBrichau' ancestors ((name 'ConfigurationOfZincHTTPComponents-JohanBrichau.68' message '- updated gemstone version 2.4.3 - removed gemstone from all next versions since these were not ported (yet)' id '1863ef03-22d8-464b-b96e-0e88ce100f16' date '07/09/2014' time '09:24:22' author 'JohanBrichau' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.67' message 'update to stable version 2.5.2' id '3622ca39-e17a-4b75-8b51-9e773a76fe13' date '07/03/2014' time '12:46:32' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.66' message 'fix a syntax and portability issue in the #catalogKeywords list (thx Paul DeBruicker)' id '7a18f667-bff7-4989-ab5f-bfefca108754' date '06/10/2014' time '10:22:30' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.65' message 'Updated to stable v2.5.1 Add catalog methods' id 'd25c17c5-e7ce-4f30-8585-c50aa6bd0814' date '06/10/2014' time '11:24:42' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.64' message 'revert Zinc-Tests from 205 to 204 for stable (edit in place; skip #testSpecialPosts that requires experimental Zodiac changes to succeed)' id 'e9438642-1898-4746-90da-dfaf83b8927a' date '04/24/2014' time '03:13:13' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.63' message 'updated to #stable v2.5.0 for Pharo' id 'd9d02baf-74b9-40ea-bd44-90652bf6b270' date '04/24/2014' time '01:54:51' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.62' message 'stable version 2.4.9 for pharo 2 & 3' id 'a2ce8548-05a4-48a9-8f69-2c8bdf1bca04' date '03/03/2014' time '10:59:02' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.61' message 'v 2.4.8' id '1c7153e7-0da6-49c4-aee1-69e54495cd38' date '01/22/2014' time '10:28:03' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.60' message 'v 2.4.7' id '9d42db3c-3279-4656-a596-498047aa4ba2' date '01/21/2014' time '11:04:16' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.59' message 'updated to v246' id '93e20766-9cfb-4694-9d63-fe493940b97b' date '11/15/2013' time '10:20:29' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.58' message 'updated to v245' id 'fb11145e-4576-4a6c-8e75-cb5192dfd896' date '10/07/2013' time '04:33:52' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-PaulDeBruicker.57' message 'reversed where the gemstone definitions are. I earlier put them in the #baseline24: method but they should''ve been in the #version243: and #version244: methods. Having them in the wrong place prevented Metacello from finding the specific Zinc components (e.g. Zinc-REST) and only let it load the ''default'' group. ' id 'd919562a-e056-4fae-99f7-9fa6ee20270c' date '09/10/2013' time '10:40:06' author 'PaulDeBruicker' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.56' message 'Merged updated Metacello specs for Gemstone 2.4.x and 3.1.x (Thanks Paul Debruicker)' id 'de3d32fb-7f88-4ebe-ba73-05f735d7bb99' date '09/06/2013' time '05:05:09' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-PaulDeBruicker.55' message 'fixed the version specifiers for gemstone' id 'daff49d1-67a6-4151-a7ca-3ec8fcedd940' date '09/05/2013' time '22:06:57' author 'PaulDeBruicker' ancestors ((name 'ConfigurationOfZincHTTPComponents-PaulDeBruicker.54' message 'fixed loading into gemstone. The current Gemstone version is 2.4.3. To load into Gemstone requires MetacelloPreview, which I think is included with GLASS 1.0-beta9 by default. In baseline24, version243 and version244 changed the #common section to be #pharo specific. ' id '766724b3-8345-4ce6-bc6d-ddd9326390a5' date '09/05/2013' time '21:49:41' author 'PaulDeBruicker' ancestors ((name 'ConfigurationOfZincHTTPComponents-PaulDeBruicker.53' message 'futzing around to be able to load the Gemstone version from github' id '5ee4c742-7bb0-4239-864f-8a4138502bc6' date '09/05/2013' time '17:22:20' author 'PaulDeBruicker' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.52' message 'Quick patch to reference Zinc-SSO-OAuth2-Core-JanVanDeSandt.16 in current v 2.4.4' id '703372ae-f1b9-4c1a-add5-b0696a4375b1' date '09/03/2013' time '04:45:48' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.51' message 'stable version 2.4.4' id 'db941764-b84f-4c56-a189-cb0a7c00b9a5' date '09/03/2013' time '03:17:26' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.50' message 'v 2.4.3' id '302da4dc-e1c5-4332-95ef-1639565bfbd1' date '06/21/2013' time '10:57:11' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.49' message 'v 2.4.2 including Zinc-Seaside' id '983d7a0a-9f15-401c-ab9e-8a1d3e960423' date '06/07/2013' time '02:01:01' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.48' message 'Updated #stable to 2.4.1' id 'b86460d5-c3d9-4293-8a36-fed9159b981b' date '06/03/2013' time '08:28:40' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.47' message 'upgraded to stable version 2.4 Summary of high impact changes: - ZdcSocketStream is now the default (and Zn no longer uses SocketStream) - ZnEntity IO has been refactored and optimised - ZnUTF8Encoding has been optimised using the ''fast'' trick from Seaside (the assumption being that most characters are ASCII or Latin1 anyway) Summary of new features: - Server side gzip compression and chunking - New demo/debug server handers (/repl & /sunit) - Client curl command line generation - Better fleshed out core object model, more tests' id 'fb70dcd6-31a5-4d81-9be0-3cbdda98761b' date '05/28/2013' time '08:47:26' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.46' message 'updated to 2.3.4' id '42f6943e-f444-42ab-b2ce-306b7c87b1f5' date '03/14/2013' time '07:05:02' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.45' message 'Updated to stable version 2.3.3 (as included in Pharo 2.0)' id '0ebdd697-74fb-4c87-a911-27cd65ed9d3f' date '02/22/2013' time '03:38:22' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.44' message 'upgraded to 2.3.2' id '120f7de0-d551-4f88-8ed8-651c6f98b4d8' date '02/01/2013' time '08:08:03' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.43' message 'updated to version 2.2.3 for Pharo (all versions)' id 'f575109c-b13a-472b-b5a6-760ad7b308d1' date '01/31/2013' time '10:28:43' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.42' message 'stable version 2.3 for pharo 2.0' id 'b6aaec85-fbf2-4138-9219-053d91c25f37' date '01/21/2013' time '05:01:18' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.41' message 'new, not yet stable, version 2.2 containing the Zinc-SSO packages (except the Seaside code) - with fixes' id '6a2f6e91-f85b-4219-8339-ffb6b691ef06' date '01/08/2013' time '03:32:31' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.40' message 'new, not yet stable, version 2.2 containing the Zinc-SSO packages (except the Seaside code)' id '80f2d574-c0ba-4d99-a82b-7900e074aa1f' date '01/08/2013' time '03:07:04' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.39' message 'v2.1.3 with new API to support SSO/SeasideAdaptor ' id '2b67627e-6d89-4ae4-b9e6-c2d0af911a08' date '01/08/2013' time '01:57:29' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.38' message 'updated to 2.1.2 for pharo 2' id 'f30c35cc-6c5a-46a6-bd1e-e9719817023b' date '12/31/2012' time '05:59:30' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.37' message 'stable version 2.1.1 for Pharo 2.0 (http://code.google.com/p/pharo/issues/detail?id=7180)' id 'a96b58ca-68db-4211-a1f5-1d981aed10d2' date '12/24/2012' time '02:58:40' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.36' message 'fixing some bugs in baseline/version 2.1' id '9a0764c1-dd54-485b-8749-4397deb41c6d' date '12/17/2012' time '10:07:33' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.35' message 'version 2.1 with separate Zinc-Character-Encoding as prerequisite for Zinc-Resource-Meta' id '470b15ef-6a3b-4cbe-b5f6-684c4c86a211' date '12/17/2012' time '05:16:49' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.34' message 'updated to version 2.0 with new Zinc-Resource-Meta-*, Zinc-REST with NeoJSON dependency, addition of Zodiac-Tests' id 'db9c0612-3694-4a1d-891d-75eee1eea1ea' date '12/12/2012' time '08:38:34' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.33' message '-> 1.9.3' id 'b76a89ad-e38b-4239-8a45-2e0df9382bb3' date '10/13/2012' time '08:57:27' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.32' message 'version 1.9.2 with updated WebSocket support' id '38870314-aa2c-4eb0-9641-087a0cdde458' date '10/13/2012' time '05:55:17' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.31' message 'updated to stable version 1.9.1 for pharo 2' id '3265f2b8-6e27-43fc-bdf9-eacfccbe34a5' date '10/12/2012' time '01:30:35' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.30' message 'created a new baseline that is using http://mc.stfx.eu created new version 1.9 only updated stable version for #''pharo2.x''' id '53d23edf-5b40-4b49-b218-560a8c8c02f5' date '09/28/2012' time '02:32:39' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.29' message 'updated to 1.8.2' id '0e94bd02-30b2-4a8b-9ae1-d416b9aa4ce8' date '09/12/2012' time '03:43:39' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.28' message 'updated Zinc-WWS-Server version' id '554840de-27d6-4ba4-b1d0-8e924cf96dd8' date '09/04/2012' time '04:52:51' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.27' message 'cleanup/simplification added Zinc-Pharo-Forward-Compatibility for pre 2.0 added #baseline18: and #version18: updated #stable:' id '763fe404-9380-443a-958a-316954bd662e' date '09/04/2012' time '10:21:36' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SeanDeNigris.26' message '* Add baseline 1.7 - add XMLSupport project - update Zinc-AWS to require above - add FileSystem-Legacy to Pharo 1.x and FileSystem to Pharo 2.x'' * Add version 1.7 - update to latest package versions - add FileSystem-Legacy to Pharo 1.x and FileSystem to Pharo 2.x * Declare 1.7 as the stable version for #pharo' id '71c2744d-a6b1-442a-9042-0787d057e184' date '07/05/2012' time '01:45:11' author 'SeanDeNigris' ancestors ((name 'ConfigurationOfZincHTTPComponents-PaulDeBruicker.25' message 'Merge Sean DeNigris''s fixes and fix bug in #stable:' id 'e2fe949c-649b-4ae2-aa07-d9d112382b41' date '06/07/2012' time '07:51:44' author 'PaulDeBruicker' ancestors ((name 'ConfigurationOfZincHTTPComponents-PaulDeBruicker.24' message 'updated to latest versions as of June 6 2012. ' id 'fbad39d5-8e57-457b-afc9-6895ecf1670c' date '06/06/2012' time '13:14:23' author 'PaulDeBruicker' ancestors () stepChildren ())(name 'ConfigurationOfZincHTTPComponents-SeanDeNigris.24' message '* fixed Zodiac-Core package name * updated to latest packages * all tests pass on Pharo 1.4' id '153211df-e9b1-4edd-9e5b-8b7016709b0b' date '06/07/2012' time '12:32:23' author 'SeanDeNigris' ancestors ((name 'ConfigurationOfZincHTTPComponents-PaulDeBruicker.23' message 'fixed a typo' id '77162054-82e4-4e9f-b5b5-ab54147e6ad4' date '04/04/2012' time '10:40:19' author 'PaulDeBruicker' ancestors ((name 'ConfigurationOfZincHTTPComponents-PaulDeBruicker.22' message 'Fixed a typo' id 'a011f142-f0fb-49b1-8a42-bf1b3e847013' date '04/04/2012' time '10:39:27' author 'PaulDeBruicker' ancestors ((name 'ConfigurationOfZincHTTPComponents-PaulDeBruicker.21' message ' made baseline 1.5, made version 1.5. marked version 1.5 as stable. Upgraded to latest packages as of 9 AM pacific US time, April 4 2012. Made no changes to the Gemstone configuration. This should only affect Pharo fixed two package declarations in version 20 of the configuration. I misspelled the names.' id '51cabfad-60d1-464c-bddb-4b3c25bd6f4b' date '04/04/2012' time '09:31:52' author 'PaulDeBruicker' ancestors ((name 'ConfigurationOfZincHTTPComponents-PaulDeBruicker.20' message 'made baseline 1.5, made version 1.5. marked version 1.5 as stable. Upgraded to latest packages as of 9 AM pacific US time, April 4 2012. Made no changes to the Gemstone configuration. This should only affect Pharo' id 'cae869bd-f213-41e6-bdba-ec6ecbcd9a5d' date '04/04/2012' time '09:25:01' author 'PaulDeBruicker' ancestors ((name 'ConfigurationOfZincHTTPComponents-FrancoisStephany.19' message '- Update to the latest version of each package - Change the repository for ''Zinc-Patch-HTTPSocket'' to the pharo repository on squeaksource3 (the latest package does not exist on the Zinc repo). - As I do not have any expertise with Gemstone. I havent updated the Gemstone version.' id '11f0ccf6-3d6c-42ec-8407-23b8ce9dc0c0' date '12/12/2011' time '12:06:06' author 'FrancoisStephany' ancestors ((name 'ConfigurationOfZincHTTPComponents-PaulDeBruicker.18' message 'added Zinc-REST, upgraded versions of other packages' id 'dd34ea5f-cc3b-42a9-be19-909d1c14300f' date '10/25/2011' time '05:18:32' author 'PaulDeBruicker' ancestors ((name 'ConfigurationOfZincHTTPComponents-dkh.17' message '- open 1.2 for development - Move Seaside support into ConfigurationOfSeaside30 - update to latest set of packages. - fix configuration validation errors involving Zodiac support - remove Zodiac packages from 1.0-baseline ... it looked like the Zodiac support wasn''t added until 1.1 - added 1.1-baseline and corrected mispellings' id '0d6b2786-25b2-4e3f-af3e-f7d754ab9b23' date '09/01/2011' time '17:21:40' author 'dkh' ancestors ((name 'ConfigurationOfZincHTTPComponents-PaulDeBruicker.16' message 'Corrected error with Zodiac configuration. If you use this to load Seaside into Gemstone you should wrap the call to commit when almost out of memory. ' id 'faef135c-6f52-41d7-88af-58a615b3fb2b' date '06/02/2011' time '09:46:43' author 'PaulDeBruicker' ancestors ((name 'ConfigurationOfZincHTTPComponents-PaulDeBruicker.15' message 'updated gemstone port to latest on SqueakSource. Added Zodiac to the configuration' id 'aec25cf7-27a0-4a3b-91c9-a81d6dfca2e0' date '06/02/2011' time '09:10:21' author 'PaulDeBruicker' ancestors ((name 'ConfigurationOfZincHTTPComponents-PaulDeBruicker.14' message 'Fixed a typo in the Gemstone Seaside Adaptor spec' id 'c0f76eae-d87d-4782-84a4-f64a12ebcd7a' date '04/14/2011' time '14:34:20' author 'PaulDeBruicker' ancestors ((name 'ConfigurationOfZincHTTPComponents-PaulDeBruicker.13' message 'Added a Seaside adaptor for Gemstone + Zinc' id 'fc45b047-07ad-4f1d-90b3-d880727ee954' date '04/14/2011' time '14:26:23' author 'PaulDeBruicker' ancestors ((name 'ConfigurationOfZincHTTPComponents-PaulDeBruicker.12' message 'made some more changes for Gemstone' id 'f2d583bd-3470-4503-8707-a8db51066605' date '04/13/2011' time '11:33:00' author 'PaulDeBruicker' ancestors ((name 'ConfigurationOfZincHTTPComponents-PaulDeBruicker.11' message 'Increased the version of SocketStream for Gemstone' id '99d7c9df-4098-4282-bb3e-9ec187898ea0' date '04/12/2011' time '16:18:02' author 'PaulDeBruicker' ancestors ((name 'ConfigurationOfZincHTTPComponents-PaulDeBruicker.10' message 'Increased version for Zinc-Gemstone to fix logging issues. Found some new problems with SocketStream on Gemstone. ' id '45a951d0-c4bd-4ab0-9c61-82ab63565825' date '04/12/2011' time '11:06:26' author 'PaulDeBruicker' ancestors ((name 'ConfigurationOfZincHTTPComponents-PaulDeBruicker.9' message 'This version includes a working configuration for Gemstone. Also the package versions for Pharo have been updated to the latest in the ZincHTTPComponents repository' id 'b3dbb2b2-fa9b-4669-aca0-a0e67d42587f' date '04/10/2011' time '12:45:10' author 'PaulDeBruicker' ancestors ((name 'ConfigurationOfZincHTTPComponents-PaulDeBruicker.8' message 'increased versions for gemstone' id '340fbe5d-d1df-4c86-a064-3970e8e16f53' date '04/10/2011' time '12:28:29' author 'PaulDeBruicker' ancestors ((name 'ConfigurationOfZincHTTPComponents-PaulDeBruicker.7' message 'Added Zinc-Gemstone-Preliminary to load some stub classes and methods that Gemstone puts up warnings about when loading the Pharo code.' id '6339a3f1-4b85-4fe7-a040-751fa05d0db1' date '04/10/2011' time '12:18:53' author 'PaulDeBruicker' ancestors ((name 'ConfigurationOfZincHTTPComponents-PaulDeBruicker.6' message 'Increased the versions to reflect changes made to be able to load into gemstone and pharo' id 'dde6671e-e926-40fd-8eb6-90623ba25f2f' date '04/10/2011' time '12:04:45' author 'PaulDeBruicker' ancestors ((name 'ConfigurationOfZincHTTPComponents-PaulDeBruicker.5' message 'Added #stable:' id 'e5b13d4c-7097-461c-9b0f-05f806a8c985' date '04/10/2011' time '11:46:07' author 'PaulDeBruicker' ancestors ((name 'ConfigurationOfZincHTTPComponents-PaulDeBruicker.4' message 'Added config for Gemstone and updated the versions of the Pharo packages' id '7d7b5e1c-1030-4bd0-8d80-a8eb0bd5dfef' date '04/10/2011' time '11:38:25' author 'PaulDeBruicker' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.3' message 'added ''Zinc-Seaside'' group with dependency on Seaside 3.x Core (hopefully correct)' id 'd8ca2ae9-b0fe-42b5-8a1b-d9f0eb8caf77' date '01/17/2011' time '16:44:03' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.2' message 'added Patch-HTTPSocket group' id '59b4d12c-bf68-42b4-85f2-5f456246ea28' date '01/15/2011' time '19:41:38' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.1' message 'First primitive Metacello configuration for Zinc HTTP Components' id '8d018889-1b3e-46dc-ac1c-5a4fd03b9220' date '01/15/2011' time '18:07:58' author 'SvenVanCaekenberghe' ancestors () stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ()) \ No newline at end of file +(name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.120' message 'add the main repository url (in-place edit of 3.0 baseline)' id '930cf60d-a737-0d00-aeec-a37006938782' date '22 November 2018' time '7:48:50.533746 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.119' message 'use http://mc.stfx.eu/Zodiac as repository for Zodiac, not github (in place edit)' id 'f96dc0ef-a537-0d00-aeeb-d08806938782' date '22 November 2018' time '6:28:48.736081 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.118' message 'new baseline 3.0 new stable version 3.0.1' id '812b70e0-a437-0d00-88d0-9c7a01b80444' date '22 November 2018' time '5:12:56.850653 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.117' message 'stable v 2.9.4' id '949d5a24-f62d-0d00-a12c-ead9078b1897' date '22 July 2018' time '12:58:12.362 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.116' message 'stable v 2.9.3' id '19ae0de8-1b2d-0d00-bd46-c17204867404' date '11 July 2018' time '4:36:17.816547 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.115' message 'new stable v 2.9.2 (as synced May 2018 to Pharo 7 dev)' id 'a4690224-dc28-0d00-84dc-69110656fb9a' date '18 May 2018' time '2:50:59.292817 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.114' message 'new 2.9 baseline and 2.9.1 version, not yet declared stable incorporates pharo 7 stream changes by Guille quater' id '99470a1d-d423-0d00-bffd-f5eb0d252b6c' date '15 March 2018' time '1:10:24.49066 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.113' message 'new 2.9 baseline and 2.9.1 version, not yet declared stable incorporates pharo 7 stream changes by Guille ter' id 'ebb9d97d-c623-0d00-bd15-c17e09f900fd' date '14 March 2018' time '8:55:19.156462 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.112' message 'new 2.9 baseline and 2.9.1 version, not yet declared stable incorporates pharo 7 stream changes by Guille bis' id '8ee1085c-c323-0d00-90c2-1cfb0ba4250e' date '14 March 2018' time '5:11:06.919631 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.111' message 'new 2.9 baseline and 2.9.1 version, not yet declared stable incorporates pharo 7 stream changes by Guille' id '2340073e-c323-0d00-90c1-53550ba4250e' date '14 March 2018' time '5:02:43.496161 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-CyrilFerlicot.110' message 'Revert changes to version 2.8.9 and correct version 2.9.10 regarding WebSockets.' id '37db6573-bd23-0d00-863a-68fc0ffabb96' date '14 March 2018' time '10:08:09.084727 am' author 'CyrilFerlicot' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.109' message 'in place edit of v 2.8.9 to load Zinc-WebSocket-Core-SvenVanCaekenberghe.30 instead of Zinc-WebSocket-Core-LucFabresse.29' id '665420b5-ac23-0d00-8b41-c7930e06a0e3' date '13 March 2018' time '2:09:37.380789 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.108' message 'new stable 2.8.10' id '85ac77e7-a923-0d00-b69e-eee909c39d78' date '13 March 2018' time '10:48:57.063827 am' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.107' message 'updated to stable version 2.8.9 added pharo7.x variants' id 'a82cde5c-9718-0d00-89cb-169c043b7b0b' date '23 October 2017' time '2:04:34.431599 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.106' message 'update to stable version 2.8.8' id '4c8e50e8-790e-0d00-a41e-754101f47b74' date '16 June 2017' time '8:44:08.663892 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.105' message 'stable version 2.8.7' id '21872cdd-d10d-0d00-a7a7-9ff50d49453c' date '8 June 2017' time '12:15:07.247641 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.104' message 'stable version 2.8.6' id '21b61269-d00d-0d00-b74d-0be10d670bf8' date '8 June 2017' time '10:31:04.431369 am' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.103' message 'stable version 2.8.5' id '9cb5af8a-0000-0000-b4f2-2bd007f17896' date '1 June 2017' time '12:50:27.914504 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.102' message 'update to stable version 2.8.4' id '530101e4-0000-0000-bf2b-6a710eb69454' date '1 June 2017' time '12:03:51.447213 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.101' message 'stable version 2.8.3' id '7ad7d99f-92a6-4e32-88ac-fdd5b0425a9a' date '8 February 2017' time '9:55:49.482407 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.100' message 'stable version 2.8.2' id '4fc0b155-c68e-4975-b639-d3a331da24b8' date '3 February 2017' time '1:39:30.591263 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.99' message 'stable version 2.8.1' id 'e12c6e7a-661b-4c35-97c1-e2a8003a71b9' date '2 February 2017' time '4:31:31.059952 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.98' message 'stable v 2.8.0 (pharo 6 support)' id '502c9762-dbf3-41de-9d9a-ff22f601b758' date '28 November 2016' time '10:53:00.530293 am' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.97' message 'stable version 2.7.1' id 'e6982921-e4f7-41b1-90cf-dc4355b83819' date '17 April 2016' time '11:19:50.345553 am' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.96' message 'new stable version 2.7.0 new baseline 27 add pharo4.x and pharo5.x variants' id '2cedbee3-748c-420e-81aa-b1a65499f59c' date '18 February 2016' time '2:24:55.31588 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.95' message 'New stable version 2.6.8' id '53f3d13a-892c-44ab-ad77-f59b95eb9249' date '18 February 2016' time '2:09:11.960236 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-StephanEggermont.94' message 'In place fix of version267: ''Zinc-WebSocket-Tests-SvenVanCaekenberghe.9'' doesn''t exist, author is LucFabresse ' id '53736ac3-409a-4fac-a01b-c156c7cb1b2c' date '2 November 2015' time '8:32:36.770746 pm' author 'StephanEggermont' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.93' message 'Upgrade to #stable version 2.6.7 (in place edit)' id '58c6ae81-a382-46b9-b433-c4dc10782d65' date '29 October 2015' time '3:55:06.193329 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.92' message 'Upgrade to #stable version 2.6.7 (in place edit)' id '0f6b1998-7217-41a4-b627-889991933476' date '29 October 2015' time '3:12:31.710259 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.91' message 'Upgrade to #stable version 2.6.7' id '0f4eb36d-7d73-40a1-830c-211d540e0411' date '29 October 2015' time '11:29:05.927514 am' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.89' message 'stable version 2.6.6' id '49945f5a-0674-486e-958d-0c53c19f734d' date '17 September 2015' time '7:25:17.015288 am' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.88' message 'stable version 2.6.5 (fixed a typo)' id '7d80e69d-9e35-4b5c-b01a-83072f305569' date '8 September 2015' time '7:50:50.827157 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.87' message 'stable version 2.6.5' id '95b7162e-42c0-4430-b073-ff9746d7e71d' date '8 September 2015' time '6:42:48.498675 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.86' message 'dirty backwards patch to versions 263 and 264 for pharo 2.x - add explicit Zinc-Resource-Meta-FileSystem-SvenVanCaekenberghe.7 which was missing' id '7a29e032-3048-4563-8821-623bf5044f45' date '9 June 2015' time '4:02:59.301466 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.85' message 'stable version 2.6.4 for Pharo 4 & 5 (fixed a typo)' id 'fd4d19cc-8dfc-4e05-8e92-581e9966234e' date '30 April 2015' time '9:01:58.731116 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.84' message 'stable version 2.6.4 for Pharo 4 & 5' id 'a1bd49f7-14a6-47c3-bfb4-212f0fa31108' date '30 April 2015' time '8:40:15.299139 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.83' message 'moving to stable v 2.6.3 for Pharo 2, 3 & 4' id '2c94f96e-a6e8-48c6-9b5b-bab8c905cebf' date '16 March 2015' time '10:37:23.470236 am' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.82' message 'Stable version 2.6.2 for Pharo 2, 3 & 4' id 'c0470d70-2468-4ee4-bec9-e12dc2f0921a' date '26 February 2015' time '9:54:13.809314 am' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.81' message 'Stable version 2.6.1 for Pharo 2, 3 & 4' id 'f81e1a0d-2ab9-4410-956a-30f2b39648c3' date '24 February 2015' time '11:50:39.455559 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.80' message 'Stable version 2.6.1 for Pharo 2, 3 & 4' id 'b251cb0b-9ed1-4a78-a0ad-22bee029f012' date '24 February 2015' time '11:44:32.500282 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.79' message 'Stable version 2.6.1 for Pharo 2, 3 & 4' id 'fd421c99-ed16-44d2-ab76-a5c8cf41a35b' date '24 February 2015' time '11:40:04.21447 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.78' message 'Update to #stable version 2.5.6 for Pharo 3 & 4 Fixed a typo' id '97e586a8-f625-48b6-9e54-f11a6fbf8378' date '23 February 2015' time '4:20:29.075347 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.77' message 'Update to #stable version 2.5.6 for Pharo 3 & 4' id '6625667f-782f-4f02-934f-b182a73ec122' date '23 February 2015' time '2:58:42.313451 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.76' message 'Added new baseline 2.5 that includes Zinc-Resource-Meta-FileSystem for Pharo 2+ that was previously absent' id '1af94eb1-ceb1-4f22-98ef-5c44b3650a89' date '24 October 2014' time '9:36:46.862427 am' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.75' message '#stable 2.5.5 for pharo' id 'f406b1fc-5d2a-4c16-88a0-8f7411c453a4' date '7 October 2014' time '2:23:32.439855 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.74' message 'Updated v 2.5.4 to #stable for Pharo Fixed a textual typo in some of the latest #baseline methods Fixing some bogus package versions' id 'f9d8dbce-e946-4b07-b03b-359a21a6c328' date '7 October 2014' time '1:45:03.133121 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.73' message 'Updated v 2.5.4 to #stable for Pharo Fixed a textual typo in some of the latest #baseline methods' id 'b298416e-8c8a-41b7-8cab-6c105dde1e9c' date '7 October 2014' time '1:38:51.317549 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.72' message 'stable version 2.5.3 for pharo' id 'f201cf98-0dc4-44eb-a19a-e6a57bcf4a5f' date '22 September 2014' time '10:09:10.350521 am' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.71' message 'merge new Gemstone stuff in' id 'a2308945-c927-47b7-9c9d-c53a82e423d3' date '28 July 2014' time '10:55:07.194118 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-dkh.70' message 'fix some minor zinc config errors' id '6f34105b-3e12-4cf2-94d9-dda27866ac8f' date '10 July 2014' time '4:01:41 pm' author 'dkh' ancestors ((name 'ConfigurationOfZincHTTPComponents-JohanBrichau.69' message 'reference 2.4.3' id '925683fc-f243-4d74-8ad7-f4de5b440da5' date '10 July 2014' time '9:25:35 am' author 'JohanBrichau' ancestors ((name 'ConfigurationOfZincHTTPComponents-JohanBrichau.68' message '- updated gemstone version 2.4.3 - removed gemstone from all next versions since these were not ported (yet)' id '1863ef03-22d8-464b-b96e-0e88ce100f16' date '9 July 2014' time '9:24:22 am' author 'JohanBrichau' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.67' message 'update to stable version 2.5.2' id '3622ca39-e17a-4b75-8b51-9e773a76fe13' date '3 July 2014' time '12:46:32 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.66' message 'fix a syntax and portability issue in the #catalogKeywords list (thx Paul DeBruicker)' id '7a18f667-bff7-4989-ab5f-bfefca108754' date '10 June 2014' time '10:22:30 am' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.65' message 'Updated to stable v2.5.1 Add catalog methods' id 'd25c17c5-e7ce-4f30-8585-c50aa6bd0814' date '10 June 2014' time '11:24:42 am' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.64' message 'revert Zinc-Tests from 205 to 204 for stable (edit in place; skip #testSpecialPosts that requires experimental Zodiac changes to succeed)' id 'e9438642-1898-4746-90da-dfaf83b8927a' date '24 April 2014' time '3:13:13 am' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.63' message 'updated to #stable v2.5.0 for Pharo' id 'd9d02baf-74b9-40ea-bd44-90652bf6b270' date '24 April 2014' time '1:54:51 am' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.62' message 'stable version 2.4.9 for pharo 2 & 3' id 'a2ce8548-05a4-48a9-8f69-2c8bdf1bca04' date '3 March 2014' time '10:59:02 am' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.61' message 'v 2.4.8' id '1c7153e7-0da6-49c4-aee1-69e54495cd38' date '22 January 2014' time '10:28:03 am' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.60' message 'v 2.4.7' id '9d42db3c-3279-4656-a596-498047aa4ba2' date '21 January 2014' time '11:04:16 am' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.59' message 'updated to v246' id '93e20766-9cfb-4694-9d63-fe493940b97b' date '15 November 2013' time '10:20:29 am' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.58' message 'updated to v245' id 'fb11145e-4576-4a6c-8e75-cb5192dfd896' date '7 October 2013' time '4:33:52 am' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-PaulDeBruicker.57' message 'reversed where the gemstone definitions are. I earlier put them in the #baseline24: method but they should''ve been in the #version243: and #version244: methods. Having them in the wrong place prevented Metacello from finding the specific Zinc components (e.g. Zinc-REST) and only let it load the ''default'' group. ' id 'd919562a-e056-4fae-99f7-9fa6ee20270c' date '10 September 2013' time '10:40:06 am' author 'PaulDeBruicker' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.56' message 'Merged updated Metacello specs for Gemstone 2.4.x and 3.1.x (Thanks Paul Debruicker)' id 'de3d32fb-7f88-4ebe-ba73-05f735d7bb99' date '6 September 2013' time '5:05:09 am' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-PaulDeBruicker.55' message 'fixed the version specifiers for gemstone' id 'daff49d1-67a6-4151-a7ca-3ec8fcedd940' date '5 September 2013' time '10:06:57 pm' author 'PaulDeBruicker' ancestors ((name 'ConfigurationOfZincHTTPComponents-PaulDeBruicker.54' message 'fixed loading into gemstone. The current Gemstone version is 2.4.3. To load into Gemstone requires MetacelloPreview, which I think is included with GLASS 1.0-beta9 by default. In baseline24, version243 and version244 changed the #common section to be #pharo specific. ' id '766724b3-8345-4ce6-bc6d-ddd9326390a5' date '5 September 2013' time '9:49:41 pm' author 'PaulDeBruicker' ancestors ((name 'ConfigurationOfZincHTTPComponents-PaulDeBruicker.53' message 'futzing around to be able to load the Gemstone version from github' id '5ee4c742-7bb0-4239-864f-8a4138502bc6' date '5 September 2013' time '5:22:20 pm' author 'PaulDeBruicker' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.52' message 'Quick patch to reference Zinc-SSO-OAuth2-Core-JanVanDeSandt.16 in current v 2.4.4' id '703372ae-f1b9-4c1a-add5-b0696a4375b1' date '3 September 2013' time '4:45:48 am' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.51' message 'stable version 2.4.4' id 'db941764-b84f-4c56-a189-cb0a7c00b9a5' date '3 September 2013' time '3:17:26 am' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.50' message 'v 2.4.3' id '302da4dc-e1c5-4332-95ef-1639565bfbd1' date '21 June 2013' time '10:57:11 am' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.49' message 'v 2.4.2 including Zinc-Seaside' id '983d7a0a-9f15-401c-ab9e-8a1d3e960423' date '7 June 2013' time '2:01:01 am' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.48' message 'Updated #stable to 2.4.1' id 'b86460d5-c3d9-4293-8a36-fed9159b981b' date '3 June 2013' time '8:28:40 am' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.47' message 'upgraded to stable version 2.4 Summary of high impact changes: - ZdcSocketStream is now the default (and Zn no longer uses SocketStream) - ZnEntity IO has been refactored and optimised - ZnUTF8Encoding has been optimised using the ''fast'' trick from Seaside (the assumption being that most characters are ASCII or Latin1 anyway) Summary of new features: - Server side gzip compression and chunking - New demo/debug server handers (/repl & /sunit) - Client curl command line generation - Better fleshed out core object model, more tests' id 'fb70dcd6-31a5-4d81-9be0-3cbdda98761b' date '28 May 2013' time '8:47:26 am' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.46' message 'updated to 2.3.4' id '42f6943e-f444-42ab-b2ce-306b7c87b1f5' date '14 March 2013' time '7:05:02 am' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.45' message 'Updated to stable version 2.3.3 (as included in Pharo 2.0)' id '0ebdd697-74fb-4c87-a911-27cd65ed9d3f' date '22 February 2013' time '3:38:22 am' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.44' message 'upgraded to 2.3.2' id '120f7de0-d551-4f88-8ed8-651c6f98b4d8' date '1 February 2013' time '8:08:03 am' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.43' message 'updated to version 2.2.3 for Pharo (all versions)' id 'f575109c-b13a-472b-b5a6-760ad7b308d1' date '31 January 2013' time '10:28:43 am' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.42' message 'stable version 2.3 for pharo 2.0' id 'b6aaec85-fbf2-4138-9219-053d91c25f37' date '21 January 2013' time '5:01:18 am' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.41' message 'new, not yet stable, version 2.2 containing the Zinc-SSO packages (except the Seaside code) - with fixes' id '6a2f6e91-f85b-4219-8339-ffb6b691ef06' date '8 January 2013' time '3:32:31 am' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.40' message 'new, not yet stable, version 2.2 containing the Zinc-SSO packages (except the Seaside code)' id '80f2d574-c0ba-4d99-a82b-7900e074aa1f' date '8 January 2013' time '3:07:04 am' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.39' message 'v2.1.3 with new API to support SSO/SeasideAdaptor ' id '2b67627e-6d89-4ae4-b9e6-c2d0af911a08' date '8 January 2013' time '1:57:29 am' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.38' message 'updated to 2.1.2 for pharo 2' id 'f30c35cc-6c5a-46a6-bd1e-e9719817023b' date '31 December 2012' time '5:59:30 am' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.37' message 'stable version 2.1.1 for Pharo 2.0 (http://code.google.com/p/pharo/issues/detail?id=7180)' id 'a96b58ca-68db-4211-a1f5-1d981aed10d2' date '24 December 2012' time '2:58:40 am' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.36' message 'fixing some bugs in baseline/version 2.1' id '9a0764c1-dd54-485b-8749-4397deb41c6d' date '17 December 2012' time '10:07:33 am' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.35' message 'version 2.1 with separate Zinc-Character-Encoding as prerequisite for Zinc-Resource-Meta' id '470b15ef-6a3b-4cbe-b5f6-684c4c86a211' date '17 December 2012' time '5:16:49 am' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.34' message 'updated to version 2.0 with new Zinc-Resource-Meta-*, Zinc-REST with NeoJSON dependency, addition of Zodiac-Tests' id 'db9c0612-3694-4a1d-891d-75eee1eea1ea' date '12 December 2012' time '8:38:34 am' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.33' message '-> 1.9.3' id 'b76a89ad-e38b-4239-8a45-2e0df9382bb3' date '13 October 2012' time '8:57:27 am' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.32' message 'version 1.9.2 with updated WebSocket support' id '38870314-aa2c-4eb0-9641-087a0cdde458' date '13 October 2012' time '5:55:17 am' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.31' message 'updated to stable version 1.9.1 for pharo 2' id '3265f2b8-6e27-43fc-bdf9-eacfccbe34a5' date '12 October 2012' time '1:30:35 am' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.30' message 'created a new baseline that is using http://mc.stfx.eu created new version 1.9 only updated stable version for #''pharo2.x''' id '53d23edf-5b40-4b49-b218-560a8c8c02f5' date '28 September 2012' time '2:32:39 am' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.29' message 'updated to 1.8.2' id '0e94bd02-30b2-4a8b-9ae1-d416b9aa4ce8' date '12 September 2012' time '3:43:39 am' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.28' message 'updated Zinc-WWS-Server version' id '554840de-27d6-4ba4-b1d0-8e924cf96dd8' date '4 September 2012' time '4:52:51 am' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.27' message 'cleanup/simplification added Zinc-Pharo-Forward-Compatibility for pre 2.0 added #baseline18: and #version18: updated #stable:' id '763fe404-9380-443a-958a-316954bd662e' date '4 September 2012' time '10:21:36 am' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SeanDeNigris.26' message '* Add baseline 1.7 - add XMLSupport project - update Zinc-AWS to require above - add FileSystem-Legacy to Pharo 1.x and FileSystem to Pharo 2.x'' * Add version 1.7 - update to latest package versions - add FileSystem-Legacy to Pharo 1.x and FileSystem to Pharo 2.x * Declare 1.7 as the stable version for #pharo' id '71c2744d-a6b1-442a-9042-0787d057e184' date '5 July 2012' time '1:45:11 am' author 'SeanDeNigris' ancestors ((name 'ConfigurationOfZincHTTPComponents-PaulDeBruicker.25' message 'Merge Sean DeNigris''s fixes and fix bug in #stable:' id 'e2fe949c-649b-4ae2-aa07-d9d112382b41' date '7 June 2012' time '7:51:44 am' author 'PaulDeBruicker' ancestors ((name 'ConfigurationOfZincHTTPComponents-PaulDeBruicker.24' message 'updated to latest versions as of June 6 2012. ' id 'fbad39d5-8e57-457b-afc9-6895ecf1670c' date '6 June 2012' time '1:14:23 pm' author 'PaulDeBruicker' ancestors () stepChildren ())(name 'ConfigurationOfZincHTTPComponents-SeanDeNigris.24' message '* fixed Zodiac-Core package name * updated to latest packages * all tests pass on Pharo 1.4' id '153211df-e9b1-4edd-9e5b-8b7016709b0b' date '7 June 2012' time '12:32:23 pm' author 'SeanDeNigris' ancestors ((name 'ConfigurationOfZincHTTPComponents-PaulDeBruicker.23' message 'fixed a typo' id '77162054-82e4-4e9f-b5b5-ab54147e6ad4' date '4 April 2012' time '10:40:19 am' author 'PaulDeBruicker' ancestors ((name 'ConfigurationOfZincHTTPComponents-PaulDeBruicker.22' message 'Fixed a typo' id 'a011f142-f0fb-49b1-8a42-bf1b3e847013' date '4 April 2012' time '10:39:27 am' author 'PaulDeBruicker' ancestors ((name 'ConfigurationOfZincHTTPComponents-PaulDeBruicker.21' message ' made baseline 1.5, made version 1.5. marked version 1.5 as stable. Upgraded to latest packages as of 9 AM pacific US time, April 4 2012. Made no changes to the Gemstone configuration. This should only affect Pharo fixed two package declarations in version 20 of the configuration. I misspelled the names.' id '51cabfad-60d1-464c-bddb-4b3c25bd6f4b' date '4 April 2012' time '9:31:52 am' author 'PaulDeBruicker' ancestors ((name 'ConfigurationOfZincHTTPComponents-PaulDeBruicker.20' message 'made baseline 1.5, made version 1.5. marked version 1.5 as stable. Upgraded to latest packages as of 9 AM pacific US time, April 4 2012. Made no changes to the Gemstone configuration. This should only affect Pharo' id 'cae869bd-f213-41e6-bdba-ec6ecbcd9a5d' date '4 April 2012' time '9:25:01 am' author 'PaulDeBruicker' ancestors ((name 'ConfigurationOfZincHTTPComponents-FrancoisStephany.19' message '- Update to the latest version of each package - Change the repository for ''Zinc-Patch-HTTPSocket'' to the pharo repository on squeaksource3 (the latest package does not exist on the Zinc repo). - As I do not have any expertise with Gemstone. I havent updated the Gemstone version.' id '11f0ccf6-3d6c-42ec-8407-23b8ce9dc0c0' date '12 December 2011' time '12:06:06 pm' author 'FrancoisStephany' ancestors ((name 'ConfigurationOfZincHTTPComponents-PaulDeBruicker.18' message 'added Zinc-REST, upgraded versions of other packages' id 'dd34ea5f-cc3b-42a9-be19-909d1c14300f' date '25 October 2011' time '5:18:32 am' author 'PaulDeBruicker' ancestors ((name 'ConfigurationOfZincHTTPComponents-dkh.17' message '- open 1.2 for development - Move Seaside support into ConfigurationOfSeaside30 - update to latest set of packages. - fix configuration validation errors involving Zodiac support - remove Zodiac packages from 1.0-baseline ... it looked like the Zodiac support wasn''t added until 1.1 - added 1.1-baseline and corrected mispellings' id '0d6b2786-25b2-4e3f-af3e-f7d754ab9b23' date '1 September 2011' time '5:21:40 pm' author 'dkh' ancestors ((name 'ConfigurationOfZincHTTPComponents-PaulDeBruicker.16' message 'Corrected error with Zodiac configuration. If you use this to load Seaside into Gemstone you should wrap the call to commit when almost out of memory. ' id 'faef135c-6f52-41d7-88af-58a615b3fb2b' date '2 June 2011' time '9:46:43 am' author 'PaulDeBruicker' ancestors ((name 'ConfigurationOfZincHTTPComponents-PaulDeBruicker.15' message 'updated gemstone port to latest on SqueakSource. Added Zodiac to the configuration' id 'aec25cf7-27a0-4a3b-91c9-a81d6dfca2e0' date '2 June 2011' time '9:10:21 am' author 'PaulDeBruicker' ancestors ((name 'ConfigurationOfZincHTTPComponents-PaulDeBruicker.14' message 'Fixed a typo in the Gemstone Seaside Adaptor spec' id 'c0f76eae-d87d-4782-84a4-f64a12ebcd7a' date '14 April 2011' time '2:34:20 pm' author 'PaulDeBruicker' ancestors ((name 'ConfigurationOfZincHTTPComponents-PaulDeBruicker.13' message 'Added a Seaside adaptor for Gemstone + Zinc' id 'fc45b047-07ad-4f1d-90b3-d880727ee954' date '14 April 2011' time '2:26:23 pm' author 'PaulDeBruicker' ancestors ((name 'ConfigurationOfZincHTTPComponents-PaulDeBruicker.12' message 'made some more changes for Gemstone' id 'f2d583bd-3470-4503-8707-a8db51066605' date '13 April 2011' time '11:33 am' author 'PaulDeBruicker' ancestors ((name 'ConfigurationOfZincHTTPComponents-PaulDeBruicker.11' message 'Increased the version of SocketStream for Gemstone' id '99d7c9df-4098-4282-bb3e-9ec187898ea0' date '12 April 2011' time '4:18:02 pm' author 'PaulDeBruicker' ancestors ((name 'ConfigurationOfZincHTTPComponents-PaulDeBruicker.10' message 'Increased version for Zinc-Gemstone to fix logging issues. Found some new problems with SocketStream on Gemstone. ' id '45a951d0-c4bd-4ab0-9c61-82ab63565825' date '12 April 2011' time '11:06:26 am' author 'PaulDeBruicker' ancestors ((name 'ConfigurationOfZincHTTPComponents-PaulDeBruicker.9' message 'This version includes a working configuration for Gemstone. Also the package versions for Pharo have been updated to the latest in the ZincHTTPComponents repository' id 'b3dbb2b2-fa9b-4669-aca0-a0e67d42587f' date '10 April 2011' time '12:45:10 pm' author 'PaulDeBruicker' ancestors ((name 'ConfigurationOfZincHTTPComponents-PaulDeBruicker.8' message 'increased versions for gemstone' id '340fbe5d-d1df-4c86-a064-3970e8e16f53' date '10 April 2011' time '12:28:29 pm' author 'PaulDeBruicker' ancestors ((name 'ConfigurationOfZincHTTPComponents-PaulDeBruicker.7' message 'Added Zinc-Gemstone-Preliminary to load some stub classes and methods that Gemstone puts up warnings about when loading the Pharo code.' id '6339a3f1-4b85-4fe7-a040-751fa05d0db1' date '10 April 2011' time '12:18:53 pm' author 'PaulDeBruicker' ancestors ((name 'ConfigurationOfZincHTTPComponents-PaulDeBruicker.6' message 'Increased the versions to reflect changes made to be able to load into gemstone and pharo' id 'dde6671e-e926-40fd-8eb6-90623ba25f2f' date '10 April 2011' time '12:04:45 pm' author 'PaulDeBruicker' ancestors ((name 'ConfigurationOfZincHTTPComponents-PaulDeBruicker.5' message 'Added #stable:' id 'e5b13d4c-7097-461c-9b0f-05f806a8c985' date '10 April 2011' time '11:46:07 am' author 'PaulDeBruicker' ancestors ((name 'ConfigurationOfZincHTTPComponents-PaulDeBruicker.4' message 'Added config for Gemstone and updated the versions of the Pharo packages' id '7d7b5e1c-1030-4bd0-8d80-a8eb0bd5dfef' date '10 April 2011' time '11:38:25 am' author 'PaulDeBruicker' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.3' message 'added ''Zinc-Seaside'' group with dependency on Seaside 3.x Core (hopefully correct)' id 'd8ca2ae9-b0fe-42b5-8a1b-d9f0eb8caf77' date '17 January 2011' time '4:44:03 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.2' message 'added Patch-HTTPSocket group' id '59b4d12c-bf68-42b4-85f2-5f456246ea28' date '15 January 2011' time '7:41:38 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.1' message 'First primitive Metacello configuration for Zinc HTTP Components' id '8d018889-1b3e-46dc-ac1c-5a4fd03b9220' date '15 January 2011' time '6:07:58 pm' author 'SvenVanCaekenberghe' ancestors () stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ()) diff --git a/repository/ConfigurationOfZincHTTPComponents.package/properties.json b/repository/ConfigurationOfZincHTTPComponents.package/properties.json index f037444a7..6f31cf5a2 100644 --- a/repository/ConfigurationOfZincHTTPComponents.package/properties.json +++ b/repository/ConfigurationOfZincHTTPComponents.package/properties.json @@ -1,2 +1 @@ -{ - } +{ } \ No newline at end of file diff --git a/repository/SocketStream.package/ConnectionClosed.class/methodProperties.json b/repository/SocketStream.package/ConnectionClosed.class/methodProperties.json deleted file mode 100644 index 0e4a66223..000000000 --- a/repository/SocketStream.package/ConnectionClosed.class/methodProperties.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "class" : { - }, - "instance" : { - } } diff --git a/repository/SocketStream.package/ConnectionTimedOut.class/methodProperties.json b/repository/SocketStream.package/ConnectionTimedOut.class/methodProperties.json deleted file mode 100644 index 0e4a66223..000000000 --- a/repository/SocketStream.package/ConnectionTimedOut.class/methodProperties.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "class" : { - }, - "instance" : { - } } diff --git a/repository/SocketStream.package/GsSocket.extension/methodProperties.json b/repository/SocketStream.package/GsSocket.extension/methodProperties.json deleted file mode 100644 index 6598918c9..000000000 --- a/repository/SocketStream.package/GsSocket.extension/methodProperties.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "class" : { - }, - "instance" : { - "accept:" : "PaulDeBruicker 04/12/2011 16:05", - "isConnected" : "dkh 08/06/2012 16:34", - "listen:acceptingWith:for:" : "PaulDeBruicker 04/12/2011 16:00" } } diff --git a/repository/SocketStream.package/NetworkError.class/methodProperties.json b/repository/SocketStream.package/NetworkError.class/methodProperties.json deleted file mode 100644 index 0e4a66223..000000000 --- a/repository/SocketStream.package/NetworkError.class/methodProperties.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "class" : { - }, - "instance" : { - } } diff --git a/repository/SocketStream.package/SocketStream.class/methodProperties.json b/repository/SocketStream.package/SocketStream.class/methodProperties.json deleted file mode 100644 index 25dc3c215..000000000 --- a/repository/SocketStream.package/SocketStream.class/methodProperties.json +++ /dev/null @@ -1,91 +0,0 @@ -{ - "class" : { - "on:" : "PaulDeBruicker 03/03/2011 11:49", - "openConnectionToHost:port:timeout:" : "dkh 12/11/2014 20:00", - "openConnectionToHostNamed:port:" : "PaulDeBruicker 03/12/2011 11:11" }, - "instance" : { - "<<" : "PaulDeBruicker 03/03/2011 11:55", - "adjustInBuffer:" : "PaulDeBruicker 03/03/2011 11:55", - "adjustOutBuffer:" : "PaulDeBruicker 03/03/2011 12:08", - "ascii" : "PaulDeBruicker 03/03/2011 12:09", - "atEnd" : "PaulDeBruicker 03/03/2011 12:09", - "autoFlush" : "PaulDeBruicker 03/03/2011 12:09", - "autoFlush:" : "PaulDeBruicker 03/03/2011 12:09", - "basicNextPut:" : "PaulDeBruicker 03/03/2011 12:09", - "binary" : "PaulDeBruicker 03/03/2011 12:09", - "bufferSize" : "PaulDeBruicker 03/03/2011 12:09", - "bufferSize:" : "PaulDeBruicker 03/03/2011 12:09", - "checkFlush" : "PaulDeBruicker 03/03/2011 12:09", - "close" : "dkh 01/07/2015 17:44", - "connect" : "dkh 08/06/2012 12:12", - "cr" : "PaulDeBruicker 03/03/2011 12:15", - "crlf" : "PaulDeBruicker 03/03/2011 12:15", - "debug" : "PaulDeBruicker 04/12/2011 15:27", - "destroy" : "dkh 12/08/2014 16:07", - "flush" : "dkh 12/08/2014 16:07", - "flushComet" : "dkh 06/08/2015 14:40", - "greaseNext:putAll:startingAt:" : "PaulDeBruicker 03/03/2011 12:26", - "growInBuffer" : "PaulDeBruicker 03/03/2011 12:27", - "ifStale:" : "PaulDeBruicker 03/03/2011 12:27", - "inBufferSize" : "PaulDeBruicker 03/03/2011 12:27", - "initialize" : "PaulDeBruicker 03/03/2011 12:27", - "isBinary" : "PaulDeBruicker 03/03/2011 12:27", - "isConnected" : "dkh 12/08/2014 16:07", - "isDataAvailable" : "dkh 12/08/2014 16:07", - "isEmpty" : "PaulDeBruicker 03/03/2011 12:28", - "isInBufferEmpty" : "PaulDeBruicker 03/03/2011 12:28", - "isOtherEndConnected" : "dkh 12/08/2014 16:07", - "isStream" : "PaulDeBruicker 03/03/2011 12:28", - "moveInBufferDown" : "PaulDeBruicker 03/03/2011 12:28", - "next" : "dkh 06/05/2014 21:12", - "next:" : "PaulDeBruicker 03/03/2011 12:28", - "next:into:" : "PaulDeBruicker 03/03/2011 12:29", - "next:into:startingAt:" : "PaulDeBruicker 03/03/2011 12:29", - "next:putAll:startingAt:" : "PaulDeBruicker 03/03/2011 12:34", - "nextAllInBuffer" : "PaulDeBruicker 03/03/2011 12:34", - "nextAvailable" : "PaulDeBruicker 03/03/2011 12:34", - "nextAvailable:" : "PaulDeBruicker 03/03/2011 12:34", - "nextInBuffer:" : "PaulDeBruicker 03/03/2011 12:34", - "nextInto:" : "PaulDeBruicker 03/03/2011 12:34", - "nextInto:startingAt:" : "PaulDeBruicker 03/03/2011 12:34", - "nextLine" : "PaulDeBruicker 03/03/2011 12:34", - "nextLineCrLf" : "PaulDeBruicker 03/03/2011 12:34", - "nextLineLf" : "PaulDeBruicker 03/03/2011 12:35", - "nextPut:" : "PaulDeBruicker 03/03/2011 12:35", - "nextPutAll:" : "PaulDeBruicker 03/03/2011 12:35", - "nextPutAllFlush:" : "dkh 12/08/2014 16:08", - "noTimeout" : "PaulDeBruicker 03/03/2011 12:35", - "outBufferSize" : "PaulDeBruicker 03/03/2011 12:35", - "peek" : "PaulDeBruicker 03/03/2011 12:35", - "peek:" : "PaulDeBruicker 03/03/2011 12:35", - "peekFor:" : "PaulDeBruicker 03/03/2011 12:35", - "peekForAll:" : "PaulDeBruicker 03/03/2011 12:35", - "print:" : "PaulDeBruicker 03/03/2011 12:36", - "printOn:" : "PaulDeBruicker 03/03/2011 12:36", - "putOn:" : "PaulDeBruicker 03/03/2011 11:55", - "readInto:startingAt:count:" : "PaulDeBruicker 03/03/2011 12:36", - "receiveAvailableData" : "dkh 12/08/2014 16:08", - "receiveData" : "dkh 12/08/2014 16:08", - "receiveData:" : "PaulDeBruicker 03/03/2011 12:28", - "receiveDataIfAvailable" : "dkh 12/08/2014 16:08", - "recentlyRead" : "PaulDeBruicker 03/03/2011 13:26", - "resetBuffers" : "PaulDeBruicker 03/03/2011 13:26", - "resizeInBuffer:" : "PaulDeBruicker 03/03/2011 13:26", - "sendCommand:" : "PaulDeBruicker 03/03/2011 13:26", - "shouldSignal" : "PaulDeBruicker 03/03/2011 13:26", - "shouldSignal:" : "PaulDeBruicker 03/03/2011 13:26", - "shouldTimeout" : "PaulDeBruicker 03/03/2011 13:26", - "size" : "PaulDeBruicker 03/03/2011 13:26", - "skip:" : "PaulDeBruicker 03/03/2011 13:27", - "socket" : "dkh 12/08/2014 16:08", - "socket:" : "dkh 04/03/2015 11:14", - "space" : "PaulDeBruicker 03/03/2011 13:27", - "streamBuffer:" : "PaulDeBruicker 03/03/2011 13:27", - "timeout" : "PaulDeBruicker 03/12/2011 12:01", - "timeout:" : "PaulDeBruicker 03/03/2011 13:29", - "upTo:" : "PaulDeBruicker 03/03/2011 13:29", - "upTo:limit:" : "PaulDeBruicker 03/03/2011 14:49", - "upToAll:" : "PaulDeBruicker 03/03/2011 13:29", - "upToAll:bufferSize:do:" : "PaulDeBruicker 03/03/2011 13:29", - "upToAll:limit:" : "PaulDeBruicker 03/08/2011 12:26", - "upToEnd" : "PaulDeBruicker 03/03/2011 13:29" } } diff --git a/repository/SocketStream.package/SocketStreamSocket.class/class/standardTimeout.st b/repository/SocketStream.package/SocketStreamSocket.class/class/standardTimeout.st index 8565c8bad..9fdba8162 100644 --- a/repository/SocketStream.package/SocketStreamSocket.class/class/standardTimeout.st +++ b/repository/SocketStream.package/SocketStreamSocket.class/class/standardTimeout.st @@ -1,4 +1,4 @@ as yet unclassified standardTimeout - ^0 \ No newline at end of file + ^45 \ No newline at end of file diff --git a/repository/SocketStream.package/SocketStreamSocket.class/instance/waitForDataFor.ifClosed.ifTimedOut..st b/repository/SocketStream.package/SocketStreamSocket.class/instance/waitForDataFor.ifClosed.ifTimedOut..st index 587879ab3..81eebde52 100644 --- a/repository/SocketStream.package/SocketStreamSocket.class/instance/waitForDataFor.ifClosed.ifTimedOut..st +++ b/repository/SocketStream.package/SocketStreamSocket.class/instance/waitForDataFor.ifClosed.ifTimedOut..st @@ -1,21 +1,14 @@ as yet unclassified waitForDataFor: timeout ifClosed: closedBlock ifTimedOut: timedOutBlock - "Wait for the given nr of seconds for data to arrive." + "Wait for the given nr of seconds for data to arrive. + If it does not, execute . If the connection + is closed before any data arrives, execute ." - | startTime msecsDelta | + | startTime msecsDelta msecsElapsed | startTime := Time millisecondClockValue. msecsDelta := (timeout * 1000) truncated. - [ (Time millisecondsSince: startTime) < msecsDelta ] - whileTrue: [ - self readyForRead - ifTrue: [ ^ self ]. - self isConnected - ifFalse: [ ^ closedBlock value ]. - self - waitForNonBlockingReadActivityUpToMs: - (msecsDelta - (Time millisecondsSince: startTime) max: 0) ]. - self readyForRead - ifFalse: [ - self isConnected - ifTrue: [ ^ timedOutBlock value ] - ifFalse: [ ^ closedBlock value ] ] \ No newline at end of file + [ self dataAvailable ] whileFalse: [ + self isConnected ifFalse: [ ^ closedBlock value ]. + (msecsElapsed := Time millisecondsSince: startTime) < msecsDelta + ifFalse: [ ^ timedOutBlock value ]. + self waitForReadDataUpToMs: msecsDelta - msecsElapsed ] \ No newline at end of file diff --git a/repository/SocketStream.package/SocketStreamSocket.class/methodProperties.json b/repository/SocketStream.package/SocketStreamSocket.class/methodProperties.json deleted file mode 100644 index 28f87fc0e..000000000 --- a/repository/SocketStream.package/SocketStreamSocket.class/methodProperties.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "class" : { - "standardTimeout" : "PaulDeBruicker 04/12/2011 16:07" }, - "instance" : { - "accept" : "dkh 06/08/2015 14:40", - "accept:" : "dkh 12/04/2014 07:49", - "dataAvailable" : "PaulDeBruicker 04/08/2011 08:10", - "destroy" : "PaulDeBruicker 04/08/2011 18:29", - "isConnected" : "PaulDeBruicker 03/12/2011 11:07", - "isValid" : "dkh 12/06/2014 12:21", - "listenOn:backlogSize:" : "PaulDeBruicker 04/07/2011 17:37", - "listenOn:backlogSize:interface:" : "dkh 08/06/2012 14:53", - "localPort" : "PaulDeBruicker 04/10/2011 10:17", - "onNativeSocket:forDomain:type:protocol:" : "dkh 04/03/2015 11:14", - "onNativeclientSocket:for:" : "dkh 04/03/2015 11:14", - "port" : "PaulDeBruicker 03/12/2011 11:08", - "receiveAvailableDataInto:startingAt:" : "PaulDeBruicker 03/12/2011 11:09", - "receiveDataInto:startingAt:" : "PaulDeBruicker 04/12/2011 15:53", - "receiveDataSignallingClosedInto:startingAt:" : "PaulDeBruicker 03/12/2011 11:09", - "receiveDataSignallingTimeout:into:startingAt:" : "dkh 06/27/2014 12:29", - "receiveDataTimeout:into:startingAt:" : "PaulDeBruicker 03/12/2011 11:09", - "receiveSomeDataInto:startingAt:" : "PaulDeBruicker 03/12/2011 11:09", - "remoteAddress" : "PaulDeBruicker 04/08/2011 07:58", - "sendData:count:" : "PaulDeBruicker 03/12/2011 11:09", - "sendSomeData:startIndex:count:" : "PaulDeBruicker 03/12/2011 11:10", - "setOption:value:" : "PaulDeBruicker 04/10/2011 10:18", - "underlyingSocket" : "dkh 12/08/2014 16:12", - "waitForAcceptFor:" : "PaulDeBruicker 04/12/2011 15:56", - "waitForConnectionFor:" : "PaulDeBruicker 03/12/2011 11:10", - "waitForConnectionFor:ifTimedOut:" : "PaulDeBruicker 04/12/2011 16:15", - "waitForData" : "PaulDeBruicker 03/12/2011 11:10", - "waitForDataFor:" : "PaulDeBruicker 03/12/2011 11:10", - "waitForDataFor:ifClosed:ifTimedOut:" : "dkh 06/27/2014 12:46", - "waitForDataIfClosed:" : "PaulDeBruicker 04/12/2011 15:52" } } diff --git a/repository/SocketStream.package/SocketStreamTest.class/methodProperties.json b/repository/SocketStream.package/SocketStreamTest.class/methodProperties.json deleted file mode 100644 index b2026ae8c..000000000 --- a/repository/SocketStream.package/SocketStreamTest.class/methodProperties.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "class" : { - }, - "instance" : { - "setUp" : "PaulDeBruicker 03/12/2011 11:56", - "tearDown" : "PaulDeBruicker 03/03/2011 13:42", - "testNextIntoClose" : "PaulDeBruicker 03/03/2011 13:44", - "testNextIntoCloseNonSignaling" : "PaulDeBruicker 03/03/2011 13:44", - "testUpTo" : "PaulDeBruicker 03/03/2011 13:44", - "testUpToAfterCloseNonSignaling" : "PaulDeBruicker 03/03/2011 13:44", - "testUpToAfterCloseSignaling" : "PaulDeBruicker 03/03/2011 13:44", - "testUpToAll" : "PaulDeBruicker 03/03/2011 13:44", - "testUpToAllAfterCloseNonSignaling" : "PaulDeBruicker 03/03/2011 13:44", - "testUpToAllAfterCloseSignaling" : "PaulDeBruicker 03/03/2011 13:44", - "testUpToAllLimit" : "PaulDeBruicker 03/03/2011 13:45", - "testUpToAllTimeout" : "PaulDeBruicker 03/03/2011 13:45", - "testUpToEndClose" : "PaulDeBruicker 03/03/2011 13:45", - "testUpToEndCloseNonSignaling" : "PaulDeBruicker 03/03/2011 13:45", - "testUpToMax" : "PaulDeBruicker 03/03/2011 13:45", - "testUpToTimeout" : "PaulDeBruicker 03/03/2011 13:45" } } diff --git a/repository/SocketStream.package/monticello.meta/version b/repository/SocketStream.package/monticello.meta/version deleted file mode 100644 index 58578294d..000000000 --- a/repository/SocketStream.package/monticello.meta/version +++ /dev/null @@ -1 +0,0 @@ -(name 'SocketStream-dkh.24' message 'Issue #76: make sure that SPSocketError is inluded in list of handlers for NetworkError' id 'e56afe1e-c4dc-483a-858d-8908eb1a3a6a' date '06/08/2015' time '14:58:48' author 'dkh' ancestors ((name 'SocketStream-dkh.23' message 'Issue #74: proposed bugfix ... based on logic explained here: https://github.com/GsDevKit/gsApplicationTools/issues/29#issuecomment-89381198' id '26c247f1-8652-490e-926a-d37317273eb8' date '04/03/2015' time '11:35:55' author 'dkh' ancestors ((name 'SocketStream-dkh.22' message 'Issue #69: push ZnGemServer up to ZnAbstractGemServer and create sibling ZnNewGemServer that is married with ZnGemServerManagingMultiThreadedServer which is a refactored ZnTransactionSafeManagingMultiThreadedServer/ZnManagingMultiThreadedServer that replaces all of the error handling with gemServer:* calls ... create interfact to delegates so that ZnGemServerManagingMultiThreadedServer can be used with any existing delegates, although by default there are no transactions being performed, but the handleRequest:gemServer: method can changed to add transactions ... no tests for the new boys ... yet' id '54dac9e9-c544-4fb3-9456-cd34ff20a5bf' date '01/07/2015' time '19:52:41' author 'dkh' ancestors ((name 'SocketStream-dkh.21' message 'Issue #59: now pass timeout along to SocketStreamSocket' id '38d8ce7b-5b2b-430e-9e85-7851a733c505' date '12/11/2014' time '20:29:11' author 'dkh' ancestors ((name 'SocketStream-dkh.20' message 'Issue #43: move SocketStream class>>openConnectionToHost:port:timeout: to SocketStream package' id 'df32d528-9c73-435f-9b88-35f3d5a2eee0' date '12/11/2014' time '14:57:42' author 'dkh' ancestors ((name 'SocketStream-dkh.19' message 'Issue #58: make SocketStream and friends continuation friendly by wrapping GsSocket references in a TransientStackValue. Add ZnTransactionSafeManagingMultiThreadedServer a subclass of ZnManagingMultiThreadedServer where all references to GsSockets are wrapped by a TransientStackValue ... including places where GsSockets are passed as arguments ... this makes the server instance transaction safe, so continuations can be snapped off and transactions can be safely used in delegates ...' id '7e18903d-a920-4db3-8d9e-f8b66e07f4b3' date '12/09/2014' time '11:21:16' author 'dkh' ancestors ((name 'SocketStream-dkh.18' message 'Issue #58: flesh out remote breakpoint work ... cannot switch back to native threads, but for development of servers, it can still be useful ... continue following this thread ...' id 'ccc617a8-4e5f-4778-bdc8-630e9a2edd33' date '12/06/2014' time '15:02:51' author 'dkh' ancestors ((name 'SocketStream-dkh.17' message 'Issue #58: fixed{?) an accept problem whereby an accept error in SocketStreamSocket would lead to an infinite loop creating processes and then running out of memory ... Fix Rest test error ... only pass exceptions in debugMode for ZnServer' id '441ec0b2-3e41-4aea-9553-0c7cebb110cb' date '12/04/2014' time '07:52:22' author 'dkh' ancestors ((name 'SocketStream-dkh.16' message 'fix Issue #51, signal ConnectionClosed when zero bytes returned in SocketStreamSocket>>receiveDataSignallingTimeout:into:startingAt: - 282 run, 267 passes, 0 expected defects, 11 failures, 4 errors, 0 unexpected passes' id '4d54a9e5-1441-4e7e-b1ef-b1eafcf07fb7' date '06/27/2014' time '12:49:39' author 'dkh' ancestors ((name 'SocketStream-dkh.15' message 'improve error logging a bit and take symbol creation out of a loop' id 'd977f852-877f-43e8-9142-2887f783afa3' date '06/06/2014' time '07:53:50' author 'dkh' ancestors ((name 'SocketStream-dkh.14' message 'final touches for Zinc port: 226 run, 222 passes, 4 expected failures, 0 failures, 0 errors, 0 unexpected passes' id '59b64c1b-1da3-4c72-8271-e1f8b8d473ab' date '08/06/2012' time '17:48:24' author 'dkh' ancestors ((name 'SocketStream-dkh.13' message 'additional zinc support' id 'ec318e72-459d-4583-9465-a6b7b93cdd26' date '08/06/2012' time '12:28:12' author 'dkh' ancestors ((name 'SocketStream-PaulDeBruicker.12' message 'added a timeout for #accept. use #accept:' id 'f72cef29-376f-4345-93d2-290a478f3594' date '04/13/2011' time '11:28:17' author 'PaulDeBruicker' ancestors ((name 'SocketStream-PaulDeBruicker.11' message 'Revised so now all the tests pass. ' id 'e0ddf9f3-a526-4dfb-a77e-19ae15ba3478' date '04/12/2011' time '16:16:59' author 'PaulDeBruicker' ancestors ((name 'SocketStream-PaulDeBruicker.10' message 'Moved some extensions from Zinc to SocketStream' id '17ebfec6-9e85-45f0-b03e-b4398798b0e2' date '04/10/2011' time '11:32:48' author 'PaulDeBruicker' ancestors ((name 'SocketStream-PaulDeBruicker.9' message 'forgot to include SocketStreamSocket>>#destroy' id '5719a133-c336-4394-9eef-dd7c81910bc7' date '04/08/2011' time '18:32:46' author 'PaulDeBruicker' ancestors ((name 'SocketStream-PaulDeBruicker.8' message 'Changed to remove the testing of whether or not the socket isConnected in waitForAcceptFor:' id '6a99b6a9-6294-47e9-abd2-f6ce7e9341fa' date '04/08/2011' time '10:22:35' author 'PaulDeBruicker' ancestors ((name 'SocketStream-PaulDeBruicker.7' message 'Left a halt in inadvertently ' id 'c202e09a-80d4-4ea9-b26a-9c94fe6096e5' date '04/07/2011' time '20:04:06' author 'PaulDeBruicker' ancestors ((name 'SocketStream-PaulDeBruicker.6' message 'Had a bug where the socket waited at least until the value of standardTimeout before returning data. Things that used to take at least 45 seconds now take a fraction of a second. ' id '36f48d31-f1f1-44fd-a589-13efe4554468' date '04/07/2011' time '20:00:17' author 'PaulDeBruicker' ancestors ((name 'SocketStream-PaulDeBruicker.5' message 'initial release. Works with Chronos, passes 12 of 14 tests. Does not pass those tests which check that the appropriate error is raised when an error occurs. ' id 'fb5fc467-fbb2-4d60-8a50-22aa951cfd22' date '03/12/2011' time '00:00:00' author 'PaulDeBruicker' ancestors ((name 'SocketStream-PaulDeBruicker.4' message 'initial release. Works with Chronos, passes 12 of 14 tests. Does not pass those tests which check that the appropriate error is raised when an error occurs. ' id 'e78a7cda-b5f1-4527-be4d-c4b9fa9c2ae0' date '03/12/2011' time '00:00:00' author 'PaulDeBruicker' ancestors ((name 'SocketStream-PaulDeBruicker.3' message 'Added SocketStreamSocket>>accept' id '0e413f62-ed07-487d-bb4a-c4c7081c7674' date '03/12/2011' time '00:00:00' author 'PaulDeBruicker' ancestors ((name 'SocketStream-PaulDeBruicker.2' message 'Subclassed SpSocket rather than add a bunch of overrides and extensions' id '18cd025b-b808-4e4d-874f-d8a829c84dc7' date '03/12/2011' time '00:00:00' author 'PaulDeBruicker' ancestors ((name 'SocketStream-PaulDeBruicker.1' message 'Renamed in anticipation of uploading to Gemsource.' id '22385bc5-30f4-4c64-8e9f-8bb863e432b2' date '03/09/2011' time '00:00:00' author 'PaulDeBruicker' ancestors () stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ()) \ No newline at end of file diff --git a/repository/Zinc-AWS.package/.filetree b/repository/Zinc-AWS.package/.filetree index 8998102c2..57a679737 100644 --- a/repository/Zinc-AWS.package/.filetree +++ b/repository/Zinc-AWS.package/.filetree @@ -1,4 +1,5 @@ { - "noMethodMetaData" : true, "separateMethodMetaAndSource" : false, - "useCypressPropertiesFile" : true } + "noMethodMetaData" : true, + "useCypressPropertiesFile" : true +} \ No newline at end of file diff --git a/repository/Zinc-AWS.package/ZnAWSS3Client.class/instance/isListBucketResultTruncated..st b/repository/Zinc-AWS.package/ZnAWSS3Client.class/instance/isListBucketResultTruncated..st new file mode 100644 index 000000000..6fe556f54 --- /dev/null +++ b/repository/Zinc-AWS.package/ZnAWSS3Client.class/instance/isListBucketResultTruncated..st @@ -0,0 +1,3 @@ +private +isListBucketResultTruncated: dom + ^ (dom root contentStringAt: 'IsTruncated') = 'true' \ No newline at end of file diff --git a/repository/Zinc-AWS.package/ZnAWSS3Client.class/instance/keysIn.query..st b/repository/Zinc-AWS.package/ZnAWSS3Client.class/instance/keysIn.query..st index 8010ea314..d0816fded 100644 --- a/repository/Zinc-AWS.package/ZnAWSS3Client.class/instance/keysIn.query..st +++ b/repository/Zinc-AWS.package/ZnAWSS3Client.class/instance/keysIn.query..st @@ -3,13 +3,18 @@ keysIn: bucket query: query "Return a collection of ZnAWSS3Key objects describing the keys in bucket using optional URI query fields" - | response | + | response keys dom | self endPoint: (self endPointForBucket: bucket). self httpClient url: '/'. query notNil ifTrue: [ self httpClient queryAddAll: query ]. - response := self executeRequest: #get. - ^ (response isSuccess and: [ response contentType = ZnMimeType applicationXml ]) - ifTrue: [ - self processKeysXml: response contents for: bucket ] - ifFalse: [ - self error: 'Could not list keys' ] \ No newline at end of file + keys := nil. + ^ Array streamContents: [ :out | + [ + keys ifNotNil: [ self httpClient queryAt: 'marker' put: keys last key ]. + response := self executeRequest: #get. + (response isSuccess and: [ response contentType = ZnMimeType applicationXml ]) + ifFalse: [ ^ self error: 'Could not list keys' ]. + dom := XMLDOMParser parse: response contents. + keys:= self processKeysXml: dom for: bucket. + out nextPutAll: keys. + self isListBucketResultTruncated: dom ] whileTrue ] \ No newline at end of file diff --git a/repository/Zinc-AWS.package/ZnAWSS3Client.class/instance/processKeysXml.for..st b/repository/Zinc-AWS.package/ZnAWSS3Client.class/instance/processKeysXml.for..st index bc5dfef50..5d3ed521c 100644 --- a/repository/Zinc-AWS.package/ZnAWSS3Client.class/instance/processKeysXml.for..st +++ b/repository/Zinc-AWS.package/ZnAWSS3Client.class/instance/processKeysXml.for..st @@ -1,7 +1,5 @@ private -processKeysXml: string for: bucket - | dom | - dom := XMLDOMParser parse: string. +processKeysXml: dom for: bucket ^ ((dom allElementsNamed: 'Contents') collect: [ :each | (ZnAWSS3Key fromXml: each) diff --git a/repository/Zinc-AWS.package/ZnAWSS3Client.class/methodProperties.json b/repository/Zinc-AWS.package/ZnAWSS3Client.class/methodProperties.json deleted file mode 100644 index 0ef6dc46c..000000000 --- a/repository/Zinc-AWS.package/ZnAWSS3Client.class/methodProperties.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "class" : { - }, - "instance" : { - "accessKeyId" : "SvenVanCaekenberghe 2/21/2013 16:37", - "accessKeyId:" : "SvenVanCaekenberghe 2/21/2013 16:37", - "addBucket:" : "SvenVanCaekenberghe 11/23/2011 16:16", - "addContentHash" : "SvenVanCaekenberghe 9/17/2011 13:40", - "at:" : "SvenVanCaekenberghe 11/23/2011 16:17", - "at:put:" : "SvenVanCaekenberghe 1/5/2011 20:16", - "at:put:headers:" : "SvenVanCaekenberghe 11/23/2011 16:19", - "buckets" : "SvenVanCaekenberghe 11/23/2011 15:28", - "checkIntegrity" : "SvenVanCaekenberghe 1/5/2011 20:09", - "checkIntegrity:" : "SvenVanCaekenberghe 1/5/2011 20:09", - "close" : "SvenVanCaekenberghe 9/17/2011 11:22", - "downloadFile:fromBucket:" : "SvenVanCaekenberghe 9/27/2012 21:17", - "eTag" : "SvenVanCaekenberghe 11/23/2011 19:49", - "endPoint:" : "SvenVanCaekenberghe 2/21/2013 16:40", - "endPointForBucket:" : "SvenVanCaekenberghe 11/23/2011 15:28", - "enforceContentHash" : "SvenVanCaekenberghe 11/23/2011 19:47", - "executeRequest:" : "SvenVanCaekenberghe 9/17/2011 13:51", - "httpClient" : "SvenVanCaekenberghe 2/21/2013 16:51", - "initialize" : "SvenVanCaekenberghe 2/21/2013 16:37", - "keysIn:" : "SvenVanCaekenberghe 1/5/2011 20:56", - "keysIn:query:" : "SvenVanCaekenberghe 11/23/2011 15:41", - "md5:" : "SvenVanCaekenberghe 1/5/2011 11:30", - "metaAt:" : "SvenVanCaekenberghe 12/1/2011 10:14", - "postProcessResponse" : "SvenVanCaekenberghe 9/17/2011 13:41", - "prepareRequest" : "SvenVanCaekenberghe 2/21/2013 16:46", - "processBucketsXml:" : "SvenVanCaekenberghe 1/5/2011 20:54", - "processKeysXml:for:" : "SvenVanCaekenberghe 1/5/2011 20:55", - "remove:" : "SvenVanCaekenberghe 11/23/2011 16:21", - "removeBucket:" : "SvenVanCaekenberghe 11/23/2011 16:16", - "secretAccessKey" : "SvenVanCaekenberghe 2/21/2013 16:37", - "secretAccessKey:" : "SvenVanCaekenberghe 2/21/2013 16:37", - "standardEndPoint" : "SvenVanCaekenberghe 11/23/2011 15:28", - "uploadFile:inBucket:" : "SvenVanCaekenberghe 11/24/2011 19:46", - "uploadFile:withMd5:inBucket:" : "SvenVanCaekenberghe 9/27/2012 21:59" } } diff --git a/repository/Zinc-AWS.package/ZnAWSS3Client.class/properties.json b/repository/Zinc-AWS.package/ZnAWSS3Client.class/properties.json index 6e92a6144..6ba174fb5 100644 --- a/repository/Zinc-AWS.package/ZnAWSS3Client.class/properties.json +++ b/repository/Zinc-AWS.package/ZnAWSS3Client.class/properties.json @@ -1,16 +1,15 @@ { - "category" : "Zinc-AWS", - "classinstvars" : [ - ], - "classvars" : [ - ], "commentStamp" : "SvenVanCaekenberghe 9/17/2011 14:06", + "super" : "Object", + "category" : "Zinc-AWS", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], "instvars" : [ "signatureTool", "checkIntegrity", - "httpClient" ], + "httpClient" + ], "name" : "ZnAWSS3Client", - "pools" : [ - ], - "super" : "Object", - "type" : "normal" } + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Zinc-AWS.package/ZnAWSS3Key.class/methodProperties.json b/repository/Zinc-AWS.package/ZnAWSS3Key.class/methodProperties.json deleted file mode 100644 index a1652b04f..000000000 --- a/repository/Zinc-AWS.package/ZnAWSS3Key.class/methodProperties.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "class" : { - "bucket:key:" : "SvenVanCaekenberghe 1/8/2011 17:16", - "fromAssociation:" : "SvenVanCaekenberghe 1/8/2011 17:20", - "fromXml:" : "SvenVanCaekenberghe 1/5/2011 15:21" }, - "instance" : { - "asResource" : "SvenVanCaekenberghe 1/8/2011 17:14", - "asUrl" : "SvenVanCaekenberghe 1/8/2011 17:19", - "bucket" : "SvenVanCaekenberghe 1/5/2011 15:20", - "bucket:" : "SvenVanCaekenberghe 1/5/2011 15:20", - "bucketKeyAssociation" : "SvenVanCaekenberghe 1/5/2011 15:37", - "etag" : "SvenVanCaekenberghe 1/5/2011 15:20", - "etag:" : "SvenVanCaekenberghe 1/5/2011 15:20", - "fromXml:" : "SvenVanCaekenberghe 1/5/2011 15:31", - "key" : "SvenVanCaekenberghe 1/5/2011 15:20", - "key:" : "SvenVanCaekenberghe 1/5/2011 15:20", - "printOn:" : "SvenVanCaekenberghe 1/5/2011 15:37", - "size" : "SvenVanCaekenberghe 1/5/2011 15:25", - "size:" : "SvenVanCaekenberghe 1/5/2011 15:20", - "value" : "SvenVanCaekenberghe 1/5/2011 15:43", - "xml" : "SvenVanCaekenberghe 1/5/2011 15:20", - "xml:" : "SvenVanCaekenberghe 1/5/2011 15:20" } } diff --git a/repository/Zinc-AWS.package/ZnAWSS3Key.class/properties.json b/repository/Zinc-AWS.package/ZnAWSS3Key.class/properties.json index d1f6748f3..abe29eaf5 100644 --- a/repository/Zinc-AWS.package/ZnAWSS3Key.class/properties.json +++ b/repository/Zinc-AWS.package/ZnAWSS3Key.class/properties.json @@ -1,19 +1,18 @@ { - "category" : "Zinc-AWS", - "classinstvars" : [ - ], - "classvars" : [ - ], "commentStamp" : "SvenVanCaekenberghe 1/5/2011 16:11", + "super" : "Object", + "category" : "Zinc-AWS", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], "instvars" : [ "key", "size", "etag", "bucket", "xml", - "bucketKeyAssociation" ], + "bucketKeyAssociation" + ], "name" : "ZnAWSS3Key", - "pools" : [ - ], - "super" : "Object", - "type" : "normal" } + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Zinc-AWS.package/ZnAWSS3RequestSignatureTool.class/instance/authorizationFor..st b/repository/Zinc-AWS.package/ZnAWSS3RequestSignatureTool.class/instance/authorizationFor..st index 1ae30bf53..c8e664e1f 100644 --- a/repository/Zinc-AWS.package/ZnAWSS3RequestSignatureTool.class/instance/authorizationFor..st +++ b/repository/Zinc-AWS.package/ZnAWSS3RequestSignatureTool.class/instance/authorizationFor..st @@ -4,4 +4,4 @@ authorizationFor: request request headers at: 'Date' put: ZnUtils httpDate. canonicalString := self canonicalStringFor: request. hmac := self hmacSha1: canonicalString. - ^ ZnUtils encodeBase64: hmac \ No newline at end of file + ^ ZnUtils encodeBase64: hmac \ No newline at end of file diff --git a/repository/Zinc-AWS.package/ZnAWSS3RequestSignatureTool.class/methodProperties.json b/repository/Zinc-AWS.package/ZnAWSS3RequestSignatureTool.class/methodProperties.json deleted file mode 100644 index 7677a5401..000000000 --- a/repository/Zinc-AWS.package/ZnAWSS3RequestSignatureTool.class/methodProperties.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "class" : { - }, - "instance" : { - "accessKeyId" : "SvenVanCaekenberghe 2/21/2013 16:05", - "accessKeyId:" : "SvenVanCaekenberghe 2/21/2013 16:05", - "authorizationFor:" : "SvenVanCaekenberghe 2/21/2013 16:06", - "bucketFromEndPoint:" : "SvenVanCaekenberghe 2/21/2013 16:35", - "canonicalStringFor:" : "SvenVanCaekenberghe 2/21/2013 16:06", - "hmacSha1:" : "SvenVanCaekenberghe 2/21/2013 16:42", - "printAmzHeaders:to:" : "SvenVanCaekenberghe 2/21/2013 16:13", - "secretAccessKey" : "SvenVanCaekenberghe 2/21/2013 16:05", - "secretAccessKey:" : "SvenVanCaekenberghe 2/21/2013 16:05", - "signRequest:" : "SvenVanCaekenberghe 2/21/2013 16:41", - "standardEndPoint" : "SvenVanCaekenberghe 2/21/2013 16:29", - "value:" : "SvenVanCaekenberghe 2/21/2013 16:04" } } diff --git a/repository/Zinc-AWS.package/ZnAWSS3RequestSignatureTool.class/properties.json b/repository/Zinc-AWS.package/ZnAWSS3RequestSignatureTool.class/properties.json index 21c624b97..57b33f08c 100644 --- a/repository/Zinc-AWS.package/ZnAWSS3RequestSignatureTool.class/properties.json +++ b/repository/Zinc-AWS.package/ZnAWSS3RequestSignatureTool.class/properties.json @@ -1,15 +1,14 @@ { - "category" : "Zinc-AWS", - "classinstvars" : [ - ], - "classvars" : [ - ], "commentStamp" : "", + "super" : "Object", + "category" : "Zinc-AWS", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], "instvars" : [ "accessKeyId", - "secretAccessKey" ], + "secretAccessKey" + ], "name" : "ZnAWSS3RequestSignatureTool", - "pools" : [ - ], - "super" : "Object", - "type" : "normal" } + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Zinc-AWS.package/monticello.meta/version b/repository/Zinc-AWS.package/monticello.meta/version deleted file mode 100644 index 4b4a3b8ba..000000000 --- a/repository/Zinc-AWS.package/monticello.meta/version +++ /dev/null @@ -1 +0,0 @@ -(name 'Zinc-AWS-SvenVanCaekenberghe.17' message 'refactored ZnAWSS3Client by using ZnClient>>##prepareRequest: and the newly introduced ZnAWSS3RequestSignatureTool' id '837789c5-248d-44f2-8e8c-e02728eb2974' date '02/21/2013' time '05:11:22' author 'SvenVanCaekenberghe' ancestors ((name 'Zinc-AWS-SvenVanCaekenberghe.16' message 'ported to Pharo 2.0 FileSystem API' id '7b52b3be-bb3d-40be-8ae0-109d84d6a22b' date '09/27/2012' time '10:04:31' author 'SvenVanCaekenberghe' ancestors ((name 'Zinc-AWS-SvenVanCaekenberghe.15' message 'small fix to ZnAWSS3Client>>#uploadFile:withMd5:fromBucket: better use #readOnlyFileNamed:' id 'c9906c39-ddc8-4693-8ff7-4896d8f3f94f' date '12/02/2011' time '14:54:37' author 'SvenVanCaekenberghe' ancestors ((name 'Zinc-AWS-SvenVanCaekenberghe.14' message 'added ZnAWSS3Client>>#downloadFile:fromBucket: and #metaAt:' id '9b651af8-93d6-4b08-89d8-f349c95dcf2a' date '12/01/2011' time '10:34:04' author 'SvenVanCaekenberghe' ancestors ((name 'Zinc-AWS-SvenVanCaekenberghe.13' message 'added ZnAWSS3Client>>#uploadFile:withMd5:inBucket:' id '118e82ea-340e-424d-9f65-1bcda5458f85' date '11/24/2011' time '20:47:49' author 'SvenVanCaekenberghe' ancestors ((name 'Zinc-AWS-SvenVanCaekenberghe.12' message 'fixed ZnAWSS3Client>>#enforceContentHash' id 'c54536c9-aaa1-4b54-bd83-0307372ddb87' date '11/23/2011' time '20:06:12' author 'SvenVanCaekenberghe' ancestors ((name 'Zinc-AWS-SvenVanCaekenberghe.11' message 'changed AWS S3 client to use the virtual bucket style' id '35804904-6724-42ef-a750-fbe35933abb9' date '11/23/2011' time '16:28:27' author 'SvenVanCaekenberghe' ancestors ((name 'Zinc-AWS-SvenVanCaekenberghe.10' message 'tracking the renaming of ZnNeoClient -> ZnClient' id '8d5b9649-1fee-41b5-8887-db8131122e5e' date '11/09/2011' time '09:25:41' author 'SvenVanCaekenberghe' ancestors ((name 'Zinc-AWS-SvenVanCaekenberghe.9' message 'rewrote ZnAWSS3Client to use ZnNeoClient internally' id 'eafb3833-3d74-44ed-995b-499f3e902710' date '09/17/2011' time '14:07:19' author 'SvenVanCaekenberghe' ancestors ((name 'Zinc-AWS-SvenVanCaekenberghe.7' message 'now using ZnUtils class>>#encodeBase64:' id 'be0018d4-037d-45e8-b7e6-72c9bbe79d96' date '03/21/2011' time '20:55:00' author 'SvenVanCaekenberghe' ancestors ((name 'Zinc-AWS-SvenVanCaekenberghe.6' message 'added ZnAWSS3Key>>#asResource and ZnAWSS3Key>>#asUrl; added ZnAWSS3Key class>>#bucket:key: and ZnAWSS3Key class>>#fromAssociation:' id 'cf548b23-80c7-443e-a2c3-735679036b79' date '01/08/2011' time '17:21:36' author 'SvenVanCaekenberghe' ancestors ((name 'Zinc-AWS-SvenVanCaekenberghe.5' message 'added ZnAWSS3Client>>#keysIn:query: to specify optional URI query fields' id '4c83d2aa-d318-4407-8a6b-7bf9c447a62e' date '01/05/2011' time '21:08:18' author 'SvenVanCaekenberghe' ancestors ((name 'Zinc-AWS-SvenVanCaekenberghe.4' message 'added comments to all public methods' id 'a9438ed3-f3c4-46f9-85c7-d749ea6cdb97' date '01/05/2011' time '20:18:46' author 'SvenVanCaekenberghe' ancestors ((name 'Zinc-AWS-SvenVanCaekenberghe.3' message 'added ZnAWSS3Client>>#at:put:headers: to allow setting custom headers (such as x-amz-* headers); implemented adding x-amz-* headers to the canonical string for authorization' id 'b2e778b7-8c9d-4bb5-883c-9f0fd8304bb0' date '01/05/2011' time '20:04:08' author 'SvenVanCaekenberghe' ancestors ((name 'Zinc-AWS-SvenVanCaekenberghe.2' message 'implemented MD5 integrity checking for GET and PUT operations' id '9fd785c9-c343-4e92-b04f-3378ca4a83d4' date '01/05/2011' time '17:10:03' author 'SvenVanCaekenberghe' ancestors ((name 'Zinc-AWS-SvenVanCaekenberghe.1' message 'first working proof of concept of an Amazon Web Services (AWS) Simple Storage Service (S3) Client; this package depends on Zinc HTTP Components and XML Support ' id '05a32ed6-1e74-4821-81eb-12c61761d0c5' date '01/05/2011' time '16:14:45' author 'SvenVanCaekenberghe' ancestors () stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ()) \ No newline at end of file diff --git a/repository/Zinc-AWS.package/properties.json b/repository/Zinc-AWS.package/properties.json index f037444a7..6f31cf5a2 100644 --- a/repository/Zinc-AWS.package/properties.json +++ b/repository/Zinc-AWS.package/properties.json @@ -1,2 +1 @@ -{ - } +{ } \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/.filetree b/repository/Zinc-Character-Encoding-Core.package/.filetree index 8998102c2..57a679737 100644 --- a/repository/Zinc-Character-Encoding-Core.package/.filetree +++ b/repository/Zinc-Character-Encoding-Core.package/.filetree @@ -1,4 +1,5 @@ { - "noMethodMetaData" : true, "separateMethodMetaAndSource" : false, - "useCypressPropertiesFile" : true } + "noMethodMetaData" : true, + "useCypressPropertiesFile" : true +} \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/AbstractCharacter.extension/instance/isOctetCharacter.st b/repository/Zinc-Character-Encoding-Core.package/AbstractCharacter.extension/instance/isOctetCharacter.st deleted file mode 100644 index 601e53fed..000000000 --- a/repository/Zinc-Character-Encoding-Core.package/AbstractCharacter.extension/instance/isOctetCharacter.st +++ /dev/null @@ -1,3 +0,0 @@ -*zinc-character-encoding-core -isOctetCharacter - ^ self asciiValue < 256 \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/AbstractCharacter.extension/methodProperties.json b/repository/Zinc-Character-Encoding-Core.package/AbstractCharacter.extension/methodProperties.json deleted file mode 100644 index d8570267c..000000000 --- a/repository/Zinc-Character-Encoding-Core.package/AbstractCharacter.extension/methodProperties.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "class" : { - }, - "instance" : { - "isOctetCharacter" : "JohanBrichau 01/05/2014 14:47" } } diff --git a/repository/Zinc-Character-Encoding-Core.package/AbstractCharacter.extension/properties.json b/repository/Zinc-Character-Encoding-Core.package/AbstractCharacter.extension/properties.json deleted file mode 100644 index a3706e9f0..000000000 --- a/repository/Zinc-Character-Encoding-Core.package/AbstractCharacter.extension/properties.json +++ /dev/null @@ -1,2 +0,0 @@ -{ - "name" : "AbstractCharacter" } diff --git a/repository/Zinc-Character-Encoding-Core.package/ByteArray.extension/instance/decodeWith..st b/repository/Zinc-Character-Encoding-Core.package/ByteArray.extension/instance/decodeWith..st new file mode 100644 index 000000000..f57116658 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ByteArray.extension/instance/decodeWith..st @@ -0,0 +1,8 @@ +*Zinc-Character-Encoding-Core +decodeWith: encoding + "Produce a String that decodes the receiver, using a specified encoding. + Encoding is either a ZnCharacterEncoder instance or an identifier for one." + + "#[76 101 115 32 195 169 108 195 168 118 101 115 32 102 114 97 110 195 167 97 105 115] decodeWith: #utf8" + + ^ encoding asZnCharacterEncoder decodeBytes: self \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ByteArray.extension/instance/utf8Decoded.st b/repository/Zinc-Character-Encoding-Core.package/ByteArray.extension/instance/utf8Decoded.st new file mode 100644 index 000000000..5c518d076 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ByteArray.extension/instance/utf8Decoded.st @@ -0,0 +1,8 @@ +*Zinc-Character-Encoding-Core +utf8Decoded + "Produce a String decoding the receiver using UTF-8, + the recommended encoding for Strings, unless you know what you are doing." + + "#[76 101 115 32 195 169 108 195 168 118 101 115 32 102 114 97 110 195 167 97 105 115] utf8Decoded" + + ^ self decodeWith: ZnCharacterEncoder utf8 \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ByteArray.extension/properties.json b/repository/Zinc-Character-Encoding-Core.package/ByteArray.extension/properties.json new file mode 100644 index 000000000..f81bcb8d3 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ByteArray.extension/properties.json @@ -0,0 +1,3 @@ +{ + "name" : "ByteArray" +} \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/Character.extension/instance/isOctetCharacter.st b/repository/Zinc-Character-Encoding-Core.package/Character.extension/instance/isOctetCharacter.st deleted file mode 100644 index 601e53fed..000000000 --- a/repository/Zinc-Character-Encoding-Core.package/Character.extension/instance/isOctetCharacter.st +++ /dev/null @@ -1,3 +0,0 @@ -*zinc-character-encoding-core -isOctetCharacter - ^ self asciiValue < 256 \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/Character.extension/methodProperties.json b/repository/Zinc-Character-Encoding-Core.package/Character.extension/methodProperties.json deleted file mode 100644 index 208a88c47..000000000 --- a/repository/Zinc-Character-Encoding-Core.package/Character.extension/methodProperties.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "class" : { - }, - "instance" : { - "isOctetCharacter" : "JohanBrichau 11/18/2013 20:26" } } diff --git a/repository/Zinc-Character-Encoding-Core.package/Character.extension/properties.json b/repository/Zinc-Character-Encoding-Core.package/Character.extension/properties.json deleted file mode 100644 index 7532e33ed..000000000 --- a/repository/Zinc-Character-Encoding-Core.package/Character.extension/properties.json +++ /dev/null @@ -1,2 +0,0 @@ -{ - "name" : "Character" } diff --git a/repository/Zinc-Character-Encoding-Core.package/CharacterCollection.extension/class/findFirstByteInString.inSet.startingAt..st b/repository/Zinc-Character-Encoding-Core.package/CharacterCollection.extension/class/findFirstByteInString.inSet.startingAt..st deleted file mode 100644 index 0f5fcfb59..000000000 --- a/repository/Zinc-Character-Encoding-Core.package/CharacterCollection.extension/class/findFirstByteInString.inSet.startingAt..st +++ /dev/null @@ -1,20 +0,0 @@ -*zinc-character-encoding-core -findFirstByteInString: aString inSet: inclusionMap startingAt: start - "Trivial, non-primitive version" - - | i stringSize ascii more | - inclusionMap size ~= 256 - ifTrue: [ ^ 0 ]. - i := start. - stringSize := aString size. - [ - i <= stringSize - and: [ - ascii := aString basicAt: i. - ascii < 256 - ifTrue: [ (inclusionMap at: ascii + 1) = 0 ] - ifFalse: [ true ] ] ] - whileTrue: [ i := i + 1 ]. - i > stringSize - ifTrue: [ ^ 0 ]. - ^ i \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/CharacterCollection.extension/methodProperties.json b/repository/Zinc-Character-Encoding-Core.package/CharacterCollection.extension/methodProperties.json deleted file mode 100644 index 4ac30be07..000000000 --- a/repository/Zinc-Character-Encoding-Core.package/CharacterCollection.extension/methodProperties.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "class" : { - "findFirstByteInString:inSet:startingAt:" : "dkh 05/25/2014 10:07" }, - "instance" : { - } } diff --git a/repository/Zinc-Character-Encoding-Core.package/SocketStream.extension/instance/rawStream.st b/repository/Zinc-Character-Encoding-Core.package/SocketStream.extension/instance/rawStream.st new file mode 100644 index 000000000..a527c7086 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/SocketStream.extension/instance/rawStream.st @@ -0,0 +1,7 @@ +*Zinc-Character-Encoding-Core +rawStream + "Answer the innermost stream wrapped by the receiver, e.g. a raw binary file stream, + socket stream, or regular Read/WriteStream. + Since this the base stream, answer ourself." + + ^ self \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/SocketStream.extension/instance/wrappedStream.st b/repository/Zinc-Character-Encoding-Core.package/SocketStream.extension/instance/wrappedStream.st new file mode 100644 index 000000000..1b11b96a2 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/SocketStream.extension/instance/wrappedStream.st @@ -0,0 +1,6 @@ +*Zinc-Character-Encoding-Core +wrappedStream + "Answer the stream that the receiver wraps. + Since this the base stream, answer nil" + + ^ nil \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/SocketStream.extension/properties.json b/repository/Zinc-Character-Encoding-Core.package/SocketStream.extension/properties.json new file mode 100644 index 000000000..797e09e50 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/SocketStream.extension/properties.json @@ -0,0 +1,3 @@ +{ + "name" : "SocketStream" +} \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/Stream.extension/instance/rawStream.st b/repository/Zinc-Character-Encoding-Core.package/Stream.extension/instance/rawStream.st new file mode 100644 index 000000000..a527c7086 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/Stream.extension/instance/rawStream.st @@ -0,0 +1,7 @@ +*Zinc-Character-Encoding-Core +rawStream + "Answer the innermost stream wrapped by the receiver, e.g. a raw binary file stream, + socket stream, or regular Read/WriteStream. + Since this the base stream, answer ourself." + + ^ self \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/Stream.extension/instance/wrappedStream.st b/repository/Zinc-Character-Encoding-Core.package/Stream.extension/instance/wrappedStream.st new file mode 100644 index 000000000..1b11b96a2 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/Stream.extension/instance/wrappedStream.st @@ -0,0 +1,6 @@ +*Zinc-Character-Encoding-Core +wrappedStream + "Answer the stream that the receiver wraps. + Since this the base stream, answer nil" + + ^ nil \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/Stream.extension/properties.json b/repository/Zinc-Character-Encoding-Core.package/Stream.extension/properties.json new file mode 100644 index 000000000..80152a31f --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/Stream.extension/properties.json @@ -0,0 +1,3 @@ +{ + "name" : "Stream" +} \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/String.extension/instance/asZnCharacterEncoder.st b/repository/Zinc-Character-Encoding-Core.package/String.extension/instance/asZnCharacterEncoder.st new file mode 100644 index 000000000..7db71db4d --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/String.extension/instance/asZnCharacterEncoder.st @@ -0,0 +1,7 @@ +*Zinc-Character-Encoding-Core +asZnCharacterEncoder + "Return a ZnCharacterEncoder instance using the receiver as identifier" + + " 'UTF-8' asZnCharacterEncoder " + + ^ ZnCharacterEncoder newForEncoding: self \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/String.extension/instance/encodeWith..st b/repository/Zinc-Character-Encoding-Core.package/String.extension/instance/encodeWith..st new file mode 100644 index 000000000..645d615aa --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/String.extension/instance/encodeWith..st @@ -0,0 +1,8 @@ +*Zinc-Character-Encoding-Core +encodeWith: encoding + "Produce a ByteArray that encodes the receiver, using a specified encoding. + Encoding is either a ZnCharacterEncoder instance or an identifier for one." + + " 'Les élèves français' encodeWith: #utf8 " + + ^ encoding asZnCharacterEncoder encodeString: self \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/String.extension/instance/urlDecoded.st b/repository/Zinc-Character-Encoding-Core.package/String.extension/instance/urlDecoded.st index 6403973f2..b04902f3b 100644 --- a/repository/Zinc-Character-Encoding-Core.package/String.extension/instance/urlDecoded.st +++ b/repository/Zinc-Character-Encoding-Core.package/String.extension/instance/urlDecoded.st @@ -1,3 +1,6 @@ *Zinc-Character-Encoding-Core urlDecoded + "URL Decode the receiver and return the resulting String. + This is an encoding where characters that are illegal in a URL are escaped." + ^ ZnPercentEncoder new decode: self \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/String.extension/instance/urlEncoded.st b/repository/Zinc-Character-Encoding-Core.package/String.extension/instance/urlEncoded.st index 31ba8132e..330fc54a5 100644 --- a/repository/Zinc-Character-Encoding-Core.package/String.extension/instance/urlEncoded.st +++ b/repository/Zinc-Character-Encoding-Core.package/String.extension/instance/urlEncoded.st @@ -1,3 +1,6 @@ *Zinc-Character-Encoding-Core urlEncoded - ^ ZnPercentEncoder new encode: self + "URL Encode the receiver and return the resulting String. + This is an encoding where characters that are illegal in a URL are escaped." + + ^ ZnPercentEncoder new encode: self \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/String.extension/instance/utf8Encoded.st b/repository/Zinc-Character-Encoding-Core.package/String.extension/instance/utf8Encoded.st new file mode 100644 index 000000000..3532ea0f4 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/String.extension/instance/utf8Encoded.st @@ -0,0 +1,8 @@ +*Zinc-Character-Encoding-Core +utf8Encoded + "Produce a ByteArray encoding the receiver using UTF-8, + the recommended encoding for Strings, unless you know what you are doing." + + " 'Les élèves français' utf8Encoded " + + ^ self encodeWith: ZnCharacterEncoder utf8 \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/String.extension/methodProperties.json b/repository/Zinc-Character-Encoding-Core.package/String.extension/methodProperties.json deleted file mode 100644 index d4c22652d..000000000 --- a/repository/Zinc-Character-Encoding-Core.package/String.extension/methodProperties.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "class" : { - }, - "instance" : { - "urlDecoded" : "CamilloBruni 3/26/2013 23:18", - "urlEncoded" : "CamilloBruni 3/26/2013 23:18" } } diff --git a/repository/Zinc-Character-Encoding-Core.package/String.extension/properties.json b/repository/Zinc-Character-Encoding-Core.package/String.extension/properties.json index c21385076..b20f2de3b 100644 --- a/repository/Zinc-Character-Encoding-Core.package/String.extension/properties.json +++ b/repository/Zinc-Character-Encoding-Core.package/String.extension/properties.json @@ -1,2 +1,3 @@ { - "name" : "String" } + "name" : "String" +} \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/README.md b/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/README.md index 967dc1b49..758e344f6 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/README.md +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/README.md @@ -4,7 +4,12 @@ Base64 encoding is a technique to encode binary data as a string of characters t The most commonly used alphabet is 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'. One or two equal signs (= or ==) are used for padding. -The encoded data can optionally be broken into lines. Characters not part of the alphabet are considered as white space and are ignored. + ZnBase64Encoder new encode: #[0 1 2 3 4 5]. + ZnBase64Encoder new encode: #[10 20] + ZnBase64Encoder new decode: 'BQQDAgEA'. + ZnBase64Encoder new decode: 'FAo='. + +The encoded data can optionally be broken into lines. Characters not part of the alphabet are considered as white space and are ignored when inbetween groups of 4 characters. My #encode: method works from ByteArray to String, while my #decode: method works from String to ByteArray. @@ -12,4 +17,13 @@ Note that to encode a String as Base64, you first have to encode the characters See also http://en.wikipedia.org/wiki/Base64 +I can be configured with + +- a custom alphabet (#alphabet: #standardAlphabetWith:and:) +- optional line breaking (#breakLines #breakLinesAt:) +- the line end convention to use when breaking lines (#lineEndConvention:) +- custom padding character or no padding (#padding: #noPadding) +- optional enforcing of padding on input (#beStrict #beLenient) +- what kind of whitespace I accept (#whitespace:) + Part of Zinc HTTP Components. \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/class/initialize.st b/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/class/initialize.st index 010b0ae8d..6cb9c7e13 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/class/initialize.st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/class/initialize.st @@ -2,7 +2,7 @@ class initialization initialize DefaultAlphabet := String withAll: ($A to: $Z) , ($a to: $z) , ($0 to: $9) , #($+ $/). DefaultInverse := Array new: 128. - 0 to: 127 do: [ :each | + 0 to: 127 do: [ :each | | offset | offset := DefaultAlphabet indexOf: each asCharacter ifAbsent: [ nil ]. DefaultInverse at: each + 1 put: (offset ifNotNil: [ offset - 1 ]) ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/instance/alphabet..st b/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/instance/alphabet..st index 18ad7828c..21d92cc3b 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/instance/alphabet..st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/instance/alphabet..st @@ -1,12 +1,12 @@ -initialize-release +initialization alphabet: string "Set the alphabet to use to string, containing 64 characters to represent 64 byte values. I automatically compute the inverse used for fast decoding." - + self assert: string size = 64 description: '64 characters are needed for a Base64 alphabet'. alphabet := string. inverse := Array new: 128. - 0 to: 127 do: [ :each | + 0 to: 127 do: [ :each | | offset | offset := alphabet indexOf: each asCharacter ifAbsent: [ nil ]. inverse at: each + 1 put: (offset ifNotNil: [ offset - 1 ]) ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/instance/alphabet.st b/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/instance/alphabet.st new file mode 100644 index 000000000..de2d4f3d5 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/instance/alphabet.st @@ -0,0 +1,5 @@ +accessing +alphabet + "Return the alphabet that I am using to encode byte values" + + ^ alphabet \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/instance/beForURLEncoding.st b/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/instance/beForURLEncoding.st new file mode 100644 index 000000000..a655fc248 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/instance/beForURLEncoding.st @@ -0,0 +1,12 @@ +initialization +beForURLEncoding + "Configure me for 'base64url' encoding, used for filenames and URLs. + In particular I am using $- instead of $+ and $_ instead of $/ + with no padding, line breaking or whitespace allowed. + See https://tools.ietf.org/html/rfc4648#section-5. + See https://en.wikipedia.org/wiki/Base64#URL_applications" + + self standardAlphabetWith: $- and: $_. + self noPadding. + self beLenient. + self whitespace: nil \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/instance/beLenient.st b/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/instance/beLenient.st new file mode 100644 index 000000000..a9bc60c6b --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/instance/beLenient.st @@ -0,0 +1,5 @@ +initialization +beLenient + "Configure me to allow optional padding when decoding" + + strict := false \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/instance/beStrict.st b/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/instance/beStrict.st new file mode 100644 index 000000000..15bc1ea44 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/instance/beStrict.st @@ -0,0 +1,5 @@ +initialization +beStrict + "Configure me to enforce padding when decoding" + + strict := true \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/instance/breakLines.st b/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/instance/breakLines.st index c19f61193..005e15fa4 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/instance/breakLines.st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/instance/breakLines.st @@ -1,4 +1,4 @@ -initialize-release +initialization breakLines "Configure me to break lines and insert newlines every 76 characters while encoding" diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/instance/breakLinesAt..st b/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/instance/breakLinesAt..st index 9f92c548c..d98515590 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/instance/breakLinesAt..st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/instance/breakLinesAt..st @@ -1,4 +1,4 @@ -initialize-release +initialization breakLinesAt: length "Configure me to break lines at lenth, a multiple of 4, and insert newlines" diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/instance/byteCountFor..st b/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/instance/byteCountFor..st new file mode 100644 index 000000000..98dfcbf9b --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/instance/byteCountFor..st @@ -0,0 +1,12 @@ +private +byteCountFor: string + | stringSize byteCount | + "This assumes there are no line breaks in string and that padding is used" + stringSize := string size. + byteCount := stringSize // 4 * 3. + ^ (stringSize > 1 and: [ (string at: stringSize) = $= ]) + ifTrue: [ + (stringSize > 2 and: [ (string at: stringSize - 1) = $= ]) + ifTrue: [ byteCount - 2 ] + ifFalse: [ byteCount - 1 ] ] + ifFalse: [ byteCount ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/instance/characterCountFor..st b/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/instance/characterCountFor..st new file mode 100644 index 000000000..2d72e74b6 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/instance/characterCountFor..st @@ -0,0 +1,9 @@ +private +characterCountFor: bytes + | byteSize characterCount | + "This assumes that padding is used" + byteSize := bytes size. + characterCount := (byteSize // 3 + (byteSize \\ 3) sign) * 4. + ^ lineLength + ifNil: [ characterCount ] + ifNotNil: [ characterCount + (characterCount // lineLength * lineEnd size) ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/instance/characterForValue..st b/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/instance/characterForValue..st new file mode 100644 index 000000000..fc22cea23 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/instance/characterForValue..st @@ -0,0 +1,3 @@ +private +characterForValue: value + ^ alphabet at: value + 1 \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/instance/decode..st b/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/instance/decode..st index 02fa972eb..ce36e8d94 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/instance/decode..st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/instance/decode..st @@ -1,7 +1,8 @@ converting decode: string "Decode a Base64 encoded string and return the resulting byte array" - + ^ ByteArray - new: string size - streamContents: [ :byteStream | self decode: string readStream to: byteStream ] \ No newline at end of file + new: (self byteCountFor: string) + streamContents: [ :byteStream | + self decode: string readStream to: byteStream ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/instance/decode.and.and.and.to..st b/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/instance/decode.and.and.and.to..st index e839c6d43..23daba19a 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/instance/decode.and.and.and.to..st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/instance/decode.and.and.and.to..st @@ -3,11 +3,10 @@ decode: char1 and: char2 and: char3 and: char4 to: stream | v1 v2 v3 v4 | v1 := self valueForCharacter: char1. v2 := self valueForCharacter: char2. + stream nextPut: (v1 << 2 bitXor: (v2 ifNil: [ 0 ]) >> 4). + (char3 isNil or: [ char3 = padding ]) ifTrue: [ ^ self ]. v3 := self valueForCharacter: char3. + stream nextPut: ((v2 bitAnd: 2r1111) << 4 bitXor: (v3 ifNil: [ 0 ]) >> 2). + (char4 isNil or: [ char4 = padding ]) ifTrue: [ ^ self ]. v4 := self valueForCharacter: char4. - stream nextPut: (v1 << 2 bitXor: (v2 ifNil: [ 0 ]) >> 4). - char3 ~= $= - ifTrue: [ - stream nextPut: ((v2 bitAnd: 2r1111) << 4 bitXor: (v3 ifNil: [ 0 ]) >> 2). - char4 ~= $= - ifTrue: [ stream nextPut: ((v3 bitAnd: 2r11) << 6 bitXor: v4) ] ] \ No newline at end of file + stream nextPut: ((v3 bitAnd: 2r11) << 6 bitXor: v4) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/instance/decode.to..st b/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/instance/decode.to..st index 8c29864c5..ce0c94601 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/instance/decode.to..st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/instance/decode.to..st @@ -3,12 +3,13 @@ decode: stringStream to: byteStream [ stringStream atEnd ] whileFalse: [ | char1 char2 char3 char4 | - self skipWhiteSpace: stringStream. + self skipWhitespace: stringStream. + stringStream atEnd ifTrue: [ ^ self ]. char1 := stringStream next. char2 := stringStream next. char3 := stringStream next. char4 := stringStream next. - char1 isNil | char2 isNil | char3 isNil | char4 isNil + ((char1 isNil | char2 isNil) or: [ strict and: [ char3 isNil | char4 isNil ] ]) ifTrue: [ ZnCharacterEncodingError signal: 'Illegal Base64 input' ]. self decode: char1 diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/instance/encode..st b/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/instance/encode..st index e3fc9823e..08cf6917a 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/instance/encode..st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/instance/encode..st @@ -1,7 +1,8 @@ converting encode: byteArray "Encode byteArray using Base64 encoding and return the resulting string" - + ^ String - new: byteArray size - streamContents: [ :stringStream | self encode: byteArray readStream to: stringStream ] \ No newline at end of file + new: (self characterCountFor: byteArray) + streamContents: [ :stringStream | + self encode: byteArray readStream to: stringStream ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/instance/encode.and.and.to..st b/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/instance/encode.and.and.to..st index 10b31d253..edd6616b1 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/instance/encode.and.and.to..st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/instance/encode.and.and.to..st @@ -1,12 +1,10 @@ private encode: byte1 and: byte2 and: byte3 to: stream - stream - nextPut: (alphabet at: (byte1 >> 2) + 1); - nextPut: (alphabet at: ((byte1 bitAnd: 2r11) << 4 bitXor: (byte2 ifNil: [ 0 ]) >> 4) + 1). + stream nextPut: (self characterForValue: (byte1 >> 2)); + nextPut: (self characterForValue: ((byte1 bitAnd: 2r11) << 4 bitXor: (byte2 ifNil: [ 0 ]) >> 4)). byte2 - ifNil: [ stream nextPutAll: '==' ] - ifNotNil: [ - stream nextPut: (alphabet at: ((byte2 bitAnd: 2r1111) << 2 bitXor: (byte3 ifNil: [ 0 ]) >> 6) + 1). + ifNil: [ padding ifNotNil: [ stream nextPut: padding; nextPut: padding ] ] + ifNotNil: [ stream nextPut: (self characterForValue: ((byte2 bitAnd: 2r1111) << 2 bitXor: (byte3 ifNil: [ 0 ]) >> 6)). byte3 - ifNil: [ stream nextPut: $= ] - ifNotNil: [ stream nextPut: (alphabet at: (byte3 bitAnd: 2r111111) + 1) ] ] \ No newline at end of file + ifNil: [ padding ifNotNil: [ stream nextPut: $= ] ] + ifNotNil: [ stream nextPut: (self characterForValue: (byte3 bitAnd: 2r111111)) ] ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/instance/initialize.st b/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/instance/initialize.st index b90d1ebf4..702ec2d5e 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/instance/initialize.st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/instance/initialize.st @@ -1,5 +1,8 @@ -initialize-release +initialization initialize super initialize. alphabet := DefaultAlphabet. - inverse := DefaultInverse \ No newline at end of file + inverse := DefaultInverse. + self padding: $=. + self whitespace: #any. + self beStrict \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/instance/isWhitespaceCharacter..st b/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/instance/isWhitespaceCharacter..st new file mode 100644 index 000000000..67990fd2a --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/instance/isWhitespaceCharacter..st @@ -0,0 +1,14 @@ +private +isWhitespaceCharacter: character + "Return true when character should be considered whitespace" + + whitespace + ifNil: [ "No whitespace allowed" + ^ false ]. + whitespace = #separator + ifTrue: [ "Only separators are considered whitespace" + ^ character isSeparator ]. + whitespace = #any + ifTrue: [ "All non-legal (non-alphabet) characters are considered whitespace" + ^ (self isLegalCharacter: character) not ]. + ^ false \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/instance/lineEndConvention..st b/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/instance/lineEndConvention..st index d99b17dac..dac898a50 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/instance/lineEndConvention..st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/instance/lineEndConvention..st @@ -1,7 +1,7 @@ -initialize-release +initialization lineEndConvention: symbol "Set the end of line convention to be used. Either #cr, #lf or #crlf (the default)." - + self assert: (#(cr lf crlf) includes: symbol). lineEnd := String perform: symbol \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/instance/noPadding.st b/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/instance/noPadding.st new file mode 100644 index 000000000..cf9f88823 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/instance/noPadding.st @@ -0,0 +1,5 @@ +initialization +noPadding + "Configure me to output no padding" + + self padding: nil \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/instance/padding..st b/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/instance/padding..st new file mode 100644 index 000000000..aa4a6c874 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/instance/padding..st @@ -0,0 +1,7 @@ +initialization +padding: character + "Configure me to use character as padding. + One or two padding character might be needed to complete each quad. + Use nil to disable padding." + + padding := character \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/instance/skipWhiteSpace..st b/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/instance/skipWhiteSpace..st deleted file mode 100644 index 3be83c72c..000000000 --- a/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/instance/skipWhiteSpace..st +++ /dev/null @@ -1,4 +0,0 @@ -private -skipWhiteSpace: stream - [ stream atEnd not and: [ (self valueForCharacter: stream peek) isNil ] ] - whileTrue: [ stream next ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/instance/skipWhitespace..st b/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/instance/skipWhitespace..st new file mode 100644 index 000000000..a21e3820f --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/instance/skipWhitespace..st @@ -0,0 +1,4 @@ +private +skipWhitespace: stream + [ stream atEnd not and: [ (self isWhitespaceCharacter: stream peek) ] ] + whileTrue: [ stream next ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/instance/standardAlphabetWith.and..st b/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/instance/standardAlphabetWith.and..st new file mode 100644 index 000000000..3e2f3344e --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/instance/standardAlphabetWith.and..st @@ -0,0 +1,10 @@ +initialization +standardAlphabetWith: beforeLastCharacter and: lastCharacter + "Typically more alphabets use the same first 62 characters, A-Z, a-z, 0-9, + and only differ in the last two characters used. + Configure me to use the first 62 standard characters with + beforeLastCharacter and lastCharacter as final two." + + | characters | + characters := ($A to: $Z) , ($a to: $z) , ($0 to: $9), { beforeLastCharacter. lastCharacter }. + ^ self alphabet: (String withAll: characters) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/instance/valueForCharacter..st b/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/instance/valueForCharacter..st deleted file mode 100644 index 32f945222..000000000 --- a/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/instance/valueForCharacter..st +++ /dev/null @@ -1,7 +0,0 @@ -private -valueForCharacter: char - | code | - code := char charCode. - ^ (code between: 0 and: 127) - ifTrue: [ inverse at: code + 1 ] - ifFalse: [ nil ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/instance/whitespace..st b/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/instance/whitespace..st new file mode 100644 index 000000000..0c4a43096 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/instance/whitespace..st @@ -0,0 +1,9 @@ +initialization +whitespace: mode + "Set the whitespace mode: + nil is no whitespace allowed, + #separator is CR, LF, FF, SPACE, TAB allowed, + #any is all non-alphabet characters allowed (the default)" + + self assert: (#(nil separator any) includes: mode). + whitespace := mode \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/methodProperties.json b/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/methodProperties.json deleted file mode 100644 index f93b453b8..000000000 --- a/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/methodProperties.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "class" : { - "initialize" : "SvenVanCaekenberghe 12/16/2012 12:54" }, - "instance" : { - "alphabet:" : "SvenVanCaekenberghe 12/16/2012 15:15", - "breakLines" : "SvenVanCaekenberghe 12/15/2012 14:06", - "breakLinesAt:" : "SvenVanCaekenberghe 12/16/2012 15:13", - "decode:" : "SvenVanCaekenberghe 12/15/2012 14:07", - "decode:and:and:and:to:" : "SvenVanCaekenberghe 12/15/2012 00:41", - "decode:to:" : "SvenVanCaekenberghe 12/16/2012 15:13", - "encode:" : "SvenVanCaekenberghe 12/15/2012 14:08", - "encode:and:and:to:" : "SvenVanCaekenberghe 12/15/2012 00:42", - "encode:to:" : "SvenVanCaekenberghe 12/15/2012 00:54", - "initialize" : "SvenVanCaekenberghe 12/15/2012 13:48", - "lineEndConvention:" : "SvenVanCaekenberghe 12/15/2012 00:50", - "skipWhiteSpace:" : "SvenVanCaekenberghe 12/16/2012 16:42", - "valueForCharacter:" : "SvenVanCaekenberghe 12/15/2012 00:31" } } diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/properties.json b/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/properties.json index dc030cb35..8a636b615 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/properties.json +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBase64Encoder.class/properties.json @@ -1,18 +1,22 @@ { + "commentStamp" : "", + "super" : "Object", "category" : "Zinc-Character-Encoding-Core", - "classinstvars" : [ - ], + "classinstvars" : [ ], + "pools" : [ ], "classvars" : [ "DefaultAlphabet", - "DefaultInverse" ], - "commentStamp" : "", + "DefaultInverse" + ], "instvars" : [ "alphabet", "inverse", "lineLength", - "lineEnd" ], + "lineEnd", + "whitespace", + "padding", + "strict" + ], "name" : "ZnBase64Encoder", - "pools" : [ - ], - "super" : "Object", - "type" : "normal" } + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/atEnd.st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/atEnd.st index 8441429eb..7cd0bf3a4 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/atEnd.st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/atEnd.st @@ -1,4 +1,3 @@ testing atEnd - ^ position > limit and: [ stream atEnd ] - \ No newline at end of file + ^ position > limit and: [ stream atEnd ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/back.st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/back.st new file mode 100644 index 000000000..b1a3eb910 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/back.st @@ -0,0 +1,23 @@ +accessing +back + "Move backwards one element and return it" + + ^ position > limit + ifTrue: [ + stream back ] + ifFalse: [ | targetPosition bufferPosition char | + position = 1 ifTrue: + [ stream position = 0 ifTrue: + [ self error: 'Cannot move back from beginning' ] + ifFalse: + [ targetPosition := self position - 1. + "Assume that the caller may want to go back a few elements before reading forward again" + bufferPosition := targetPosition - 10 max: 0. + self position: bufferPosition. + self nextBuffer. + self position: targetPosition. + self peek ] ] + ifFalse: + [ char := buffer at: position. + position := position - 1. + char ] ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/closed.st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/closed.st new file mode 100644 index 000000000..40254d1cb --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/closed.st @@ -0,0 +1,3 @@ +testing +closed + ^ stream closed \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/contents.st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/contents.st new file mode 100644 index 000000000..d6b6ff9a6 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/contents.st @@ -0,0 +1,4 @@ +accessing +contents + + ^ self upToEnd \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/discardBuffer.st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/discardBuffer.st new file mode 100644 index 000000000..02b3648ce --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/discardBuffer.st @@ -0,0 +1,4 @@ +private +discardBuffer + limit := 0. + position := 1 \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/initialize.st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/initialize.st index 4b1936a0c..ecced00e1 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/initialize.st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/initialize.st @@ -1,4 +1,4 @@ -initialize-release +initialization initialize super initialize. position := 1. diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/int16.st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/int16.st new file mode 100644 index 000000000..c326064de --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/int16.st @@ -0,0 +1,3 @@ +accessing - bytes +int16 + ^ self nextIntegerOfSize: 2 signed: true bigEndian: true \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/int32.st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/int32.st new file mode 100644 index 000000000..a51317867 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/int32.st @@ -0,0 +1,3 @@ +accessing - bytes +int32 + ^ self nextIntegerOfSize: 4 signed: true bigEndian: true \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/int8.st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/int8.st new file mode 100644 index 000000000..9fb36a286 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/int8.st @@ -0,0 +1,3 @@ +accessing - bytes +int8 + ^ self nextIntegerOfSize: 1 signed: true bigEndian: true \ No newline at end of file diff --git a/repository/Zodiac-Core.package/ZdcAbstractSocketStream.class/instance/isStream.st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/isStream.st similarity index 100% rename from repository/Zodiac-Core.package/ZdcAbstractSocketStream.class/instance/isStream.st rename to repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/isStream.st diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/next..st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/next..st index 746fc9e45..760fcbbf9 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/next..st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/next..st @@ -1,8 +1,8 @@ accessing -next: requestedCount +next: requestedCount "Read requestedCount elements and return them as a collection. If less are available, a smaller collection will be returned." - ^ self - next: requestedCount + ^ self + next: requestedCount into: (self collectionSpecies new: requestedCount) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/next.into..st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/next.into..st index 887a2a67a..f7138006e 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/next.into..st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/next.into..st @@ -2,8 +2,8 @@ accessing next: requestedCount into: collection "Read requestedCount elements into collection, returning a copy if less elements are available" - - ^ self - next: requestedCount - into: collection + + ^ self + next: requestedCount + into: collection startingAt: 1 \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/next.into.startingAt..st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/next.into.startingAt..st index 091e2592a..1766eb600 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/next.into.startingAt..st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/next.into.startingAt..st @@ -2,12 +2,12 @@ accessing next: requestedCount into: collection startingAt: offset "Read requestedCount elements into collection starting at offset, returning a copy if less elements are available" - + | read | - read := self - readInto: collection - startingAt: offset + read := self + readInto: collection + startingAt: offset count: requestedCount. - ^ read = requestedCount + ^ read = requestedCount ifTrue: [ collection ] ifFalse: [ collection copyFrom: 1 to: offset + read - 1 ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/next.st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/next.st index 2b0ee0b17..04b20bb5f 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/next.st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/next.st @@ -1,11 +1,11 @@ accessing next "Return the next element and move over it" - + position > limit ifTrue: [ self nextBuffer ]. ^ position <= limit - ifTrue: [ + ifTrue: [ | char | char := buffer at: position. position := position + 1. diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/nextInt32.st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/nextInt32.st new file mode 100644 index 000000000..fefbc9ddc --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/nextInt32.st @@ -0,0 +1,3 @@ +accessing - bytes +nextInt32 + ^ self nextIntegerOfSize: 4 signed: true bigEndian: true \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/nextIntegerOfSize.signed.bigEndian..st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/nextIntegerOfSize.signed.bigEndian..st new file mode 100644 index 000000000..fd2cd8d84 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/nextIntegerOfSize.signed.bigEndian..st @@ -0,0 +1,20 @@ +accessing - bytes +nextIntegerOfSize: numberOfBytes signed: signed bigEndian: bigEndian + "Assuming the receiver is a stream of bytes, read the next integer of size numberOfBytes. + If bigEndian is true, use network byte order, most significant byte first, + else use little endian order, least significant byte first. + If signed is true, interpret as a two-complement signed value, + else interpret as a plain unsigned value." + + | value | + value := 0. + bigEndian + ifTrue: [ + (numberOfBytes - 1) * 8 to: 0 by: -8 do: [ :shift | + value := value + (self next bitShift: shift) ] ] + ifFalse: [ + 0 to: (numberOfBytes - 1) * 8 by: 8 do: [ :shift | + value := value + (self next bitShift: shift) ] ]. + ^ (signed and: [ (value bitAt: numberOfBytes * 8) = 1 ]) + ifTrue: [ value - (1 << (numberOfBytes * 8)) ] + ifFalse: [ value ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/nextInto..st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/nextInto..st index 072328039..a1d1dd5d5 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/nextInto..st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/nextInto..st @@ -2,7 +2,7 @@ accessing nextInto: collection "Read the next elements of the receiver into collection, returning a copy if less elements are available" - + ^ self next: collection size into: collection \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/nextLittleEndianNumber..st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/nextLittleEndianNumber..st new file mode 100644 index 000000000..c60ff9793 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/nextLittleEndianNumber..st @@ -0,0 +1,3 @@ +accessing - bytes +nextLittleEndianNumber: numberOfBytes + ^ self nextIntegerOfSize: numberOfBytes signed: false bigEndian: false \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/nextNumber..st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/nextNumber..st new file mode 100644 index 000000000..f56a1a035 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/nextNumber..st @@ -0,0 +1,3 @@ +accessing - bytes +nextNumber: numberOfBytes + ^ self nextIntegerOfSize: numberOfBytes signed: false bigEndian: true \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/nextWord.st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/nextWord.st new file mode 100644 index 000000000..decc03b4f --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/nextWord.st @@ -0,0 +1,3 @@ +accessing - bytes +nextWord + ^ self nextIntegerOfSize: 2 signed: false bigEndian: true \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/peek.st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/peek.st index a6f5d599d..fd2ab0807 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/peek.st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/peek.st @@ -1,7 +1,7 @@ accessing peek "Return the next element but do not move over it" - + position > limit ifTrue: [ self nextBuffer ]. ^ position <= limit diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/peekFor..st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/peekFor..st index be86475db..03e71cc73 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/peekFor..st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/peekFor..st @@ -1,10 +1,10 @@ accessing peekFor: object - "Answer false and do not move over the next element if it is not equal to object, or if the receiver is at the end. + "Answer false and do not move over the next element if it is not equal to object, or if the receiver is at the end. Answer true and move over the next element when it is equal to object." ^ self peek = object - ifTrue: [ + ifTrue: [ self next. true ] ifFalse: [ false ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/position..st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/position..st new file mode 100644 index 000000000..187016e37 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/position..st @@ -0,0 +1,11 @@ +accessing +position: anInteger + | bufferEnd bufferStart | + bufferEnd := stream position. + bufferStart := bufferEnd - limit. + (anInteger between: bufferStart and: bufferEnd) + ifTrue: [ position := anInteger - bufferStart + 1 ] + ifFalse: [ + "We reset the buffer and update the position in the underlying stream" + self discardBuffer. + stream position: anInteger ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/position.st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/position.st new file mode 100644 index 000000000..c3a22490d --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/position.st @@ -0,0 +1,6 @@ +accessing +position + "If the buffer advanced, we need to check the original stream position, minus what we have read. + The -1 is because the buffer is base 1" + + ^ stream position - limit + position - 1 \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/rawStream.st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/rawStream.st new file mode 100644 index 000000000..3f9aee222 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/rawStream.st @@ -0,0 +1,7 @@ +accessing +rawStream + "Answer the innermost stream wrapped by the receiver, e.g. a raw binary file stream, + socket stream, or regular Read/WriteStream. + Defer to the wrappedStream." + + ^ self wrappedStream rawStream \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/readFromBufferInto.startingAt.count..st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/readFromBufferInto.startingAt.count..st new file mode 100644 index 000000000..5548ccc7c --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/readFromBufferInto.startingAt.count..st @@ -0,0 +1,17 @@ +private +readFromBufferInto: collection startingAt: offset count: requestedCount + "Read up to requestedCount elements into collection starting at offset, + from my buffer, answering the number of elements read. + There could be fewer elements buffered." + + | read | + read := 0. + position <= limit + ifTrue: [ read := limit - position + 1 min: requestedCount. + collection + replaceFrom: offset + to: offset + read - 1 + with: buffer + startingAt: position. + position := position + read ]. + ^ read \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/readInto.startingAt.count..st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/readInto.startingAt.count..st index 9c82b5351..f81a4e0fe 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/readInto.startingAt.count..st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/readInto.startingAt.count..st @@ -1,24 +1,22 @@ accessing readInto: collection startingAt: offset count: requestedCount "Read requestedCount elements into collection starting at offset, - returning the number of elements read, there could be less elements available." + answering the number of elements read, there could be fewer elements available." - | read | - read := 0. - position <= limit - ifTrue: [ - read := (limit - position + 1) min: requestedCount. - collection replaceFrom: offset to: offset + read - 1 with: buffer startingAt: position. - position := position + read. - read = requestedCount ifTrue: [ ^ requestedCount ] ]. - ^ read - + - (requestedCount - read < (buffer size / 2) - ifTrue: [ - stream atEnd - ifTrue: [ 0 ] - ifFalse: [ - self - nextBuffer; - readInto: collection startingAt: offset + read count: requestedCount - read ] ] - ifFalse: [ stream readInto: collection startingAt: offset + read count: requestedCount - read ]) \ No newline at end of file + | countRead countYetToRead | + "First, read from elements already in my buffer." + countRead := self readFromBufferInto: collection startingAt: offset count: requestedCount. + countYetToRead := requestedCount - countRead. + countYetToRead > 0 + ifTrue: [ "See if there are more elements to be read from the underlying stream" + | newOffset | + newOffset := offset + countRead. + (self shouldBufferReadOfCount: countYetToRead) + ifTrue: [ + self nextBuffer. + limit > 0 + ifTrue: [ countRead := countRead + (self readInto: collection startingAt: newOffset count: countYetToRead) ] ] + ifFalse: [ + self discardBuffer. + countRead := countRead + (stream readInto: collection startingAt: newOffset count: countYetToRead) ] ]. + ^ countRead \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/readStream.st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/readStream.st new file mode 100644 index 000000000..6f19a3b33 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/readStream.st @@ -0,0 +1,3 @@ +accessing +readStream + ^ self \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/setToEnd.st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/setToEnd.st new file mode 100644 index 000000000..14deb3e99 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/setToEnd.st @@ -0,0 +1,4 @@ +accessing +setToEnd + + self position: stream size \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/shouldBufferReadOfCount..st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/shouldBufferReadOfCount..st new file mode 100644 index 000000000..1e54b5ea6 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/shouldBufferReadOfCount..st @@ -0,0 +1,5 @@ +private +shouldBufferReadOfCount: elementCount + "For larger read requests, buffering fails to give an advantage." + + ^ elementCount < (buffer size / 2) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/size.st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/size.st new file mode 100644 index 000000000..658324434 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/size.st @@ -0,0 +1,4 @@ +accessing +size + + ^ stream size \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/skip..st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/skip..st index 0bc3938aa..dc2340208 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/skip..st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/skip..st @@ -2,5 +2,6 @@ accessing skip: count "Skip over count elements. This could be further optimzed." - + + count < 0 ifTrue: [ self error: 'cannot skip backwards' ]. count timesRepeat: [ self next ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/uint16.st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/uint16.st new file mode 100644 index 000000000..7913386d0 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/uint16.st @@ -0,0 +1,3 @@ +accessing - bytes +uint16 + ^ self nextIntegerOfSize: 2 signed: false bigEndian: true \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/uint32.st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/uint32.st new file mode 100644 index 000000000..d887d1ce0 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/uint32.st @@ -0,0 +1,3 @@ +accessing - bytes +uint32 + ^ self nextIntegerOfSize: 4 signed: false bigEndian: true \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/uint8.st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/uint8.st new file mode 100644 index 000000000..09c5409e4 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/uint8.st @@ -0,0 +1,3 @@ +accessing - bytes +uint8 + ^ self nextIntegerOfSize: 1 signed: false bigEndian: true \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/upTo..st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/upTo..st index 23850fdb2..89db4e339 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/upTo..st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/upTo..st @@ -1,10 +1,10 @@ accessing -upTo: value +upTo: value "Read upto but not including value and return them as a collection. If value is not found, return the entire contents of the stream. This could be further optimzed." - - ^ self collectionSpecies + + ^ self collectionSpecies streamContents: [ :writeStream | | element | - [ self atEnd or: [ (element := self next) = value ] ] whileFalse: [ + [ self atEnd or: [ (element := self next) = value ] ] whileFalse: [ writeStream nextPut: element ] ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/upToEnd.st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/upToEnd.st index 900c4b5dc..27fda5e38 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/upToEnd.st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/upToEnd.st @@ -2,10 +2,21 @@ accessing upToEnd "Read elements until the stream is atEnd and return them as a collection." - ^ self collectionSpecies - streamContents: [ :out | - [ self atEnd ] whileFalse: [ - position > limit - ifTrue: [ self nextBuffer ]. - out next: limit - position + 1 putAll: buffer startingAt: position. - position := limit + 1 ] ] \ No newline at end of file + | streamSize result remaining | + "If the stream knows its size we can reduce overhead by allocating a buffer of the correct size. + If the size is an over-estimate, #next: will copy the results in to a buffer of the correct size." + streamSize := [ self size ] on: Error do: [ 0 ]. + result := streamSize > 0 + ifTrue: [ self next: (streamSize - self position) ] + ifFalse: [ self collectionSpecies new ]. + "If the size is an under-estimate we're not at the end, get the rest and append to the result" + ^ self atEnd + ifTrue: [ result ] + ifFalse: [ + remaining := self collectionSpecies streamContents: [ :out | + [ self atEnd ] whileFalse: [ + position > limit + ifTrue: [ self nextBuffer ]. + out next: limit - position + 1 putAll: buffer startingAt: position. + position := limit + 1 ] ]. + result := result , remaining ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/methodProperties.json b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/methodProperties.json deleted file mode 100644 index 4e70d80f2..000000000 --- a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/methodProperties.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "class" : { - "on:" : "SvenVanCaekenberghe 11/30/2012 10:57", - "on:do:" : "SvenVanCaekenberghe 12/2/2012 19:23" }, - "instance" : { - "atEnd" : "SvenVanCaekenberghe 11/30/2012 10:39", - "close" : "SvenVanCaekenberghe 11/30/2012 10:28", - "collectionSpecies" : "SvenVanCaekenberghe 11/30/2012 20:18", - "defaultBufferSize" : "SvenVanCaekenberghe 11/30/2012 20:15", - "initialize" : "SvenVanCaekenberghe 11/30/2012 20:15", - "isBinary" : "SvenVanCaekenberghe 11/30/2012 21:28", - "next" : "SvenVanCaekenberghe 12/1/2012 20:48", - "next:" : "SvenVanCaekenberghe 11/30/2012 20:18", - "next:into:" : "SvenVanCaekenberghe 11/30/2012 20:11", - "next:into:startingAt:" : "SvenVanCaekenberghe 11/30/2012 20:11", - "nextBuffer" : "SvenVanCaekenberghe 11/30/2012 11:15", - "nextInto:" : "SvenVanCaekenberghe 11/30/2012 20:11", - "on:" : "SvenVanCaekenberghe 11/30/2012 20:15", - "peek" : "SvenVanCaekenberghe 12/1/2012 20:48", - "peekFor:" : "SvenVanCaekenberghe 12/1/2012 20:47", - "readInto:startingAt:count:" : "SvenVanCaekenberghe 11/30/2012 22:16", - "sizeBuffer:" : "SvenVanCaekenberghe 11/30/2012 20:19", - "skip:" : "SvenVanCaekenberghe 11/30/2012 21:36", - "upTo:" : "SvenVanCaekenberghe 11/30/2012 21:33", - "upToEnd" : "SvenVanCaekenberghe 12/16/2012 16:31", - "wrappedStream" : "SvenVanCaekenberghe 11/30/2012 10:27" } } diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/properties.json b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/properties.json index ff619b451..b2dfc3cf5 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/properties.json +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/properties.json @@ -1,17 +1,16 @@ { + "commentStamp" : "", + "super" : "Object", "category" : "Zinc-Character-Encoding-Core", - "classinstvars" : [ - ], - "classvars" : [ - ], - "commentStamp" : "", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], "instvars" : [ "stream", "buffer", "position", - "limit" ], + "limit" + ], "name" : "ZnBufferedReadStream", - "pools" : [ - ], - "super" : "Object", - "type" : "normal" } + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/README.md b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/README.md new file mode 100644 index 000000000..bf9708843 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/README.md @@ -0,0 +1,11 @@ +I am ZnBufferedReadWriteStream. +I wrap a buffered read stream and a buffered write stream on the same file. + +I discard my read buffer on writes, and flush my write buffer on reads. +Make sure to always send me #flush or #close when you're done, +otherwise the last buffer might not yet have been written. +My class side's #on:do: helps to ensure this. + +I can wrap both binary or character streams and act accordingly. + +Part of Zinc HTTP Components. \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/class/on..st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/class/on..st new file mode 100644 index 000000000..49723c84a --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/class/on..st @@ -0,0 +1,5 @@ +instance creation +on: writeStream + ^ self basicNew + on: writeStream; + yourself \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/class/on.do..st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/class/on.do..st new file mode 100644 index 000000000..a693ceac8 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/class/on.do..st @@ -0,0 +1,6 @@ +convenience +on: readStream do: block + "Execute block with as argument a ZnBufferedReadStream on readStream. + Return the value of block." + + ^ block value: (self on: readStream) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/atEnd.st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/atEnd.st new file mode 100644 index 000000000..c826b4160 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/atEnd.st @@ -0,0 +1,4 @@ +testing +atEnd + + ^ self readingActionDo: [ readStream atEnd ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/close.st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/close.st new file mode 100644 index 000000000..8b7b575ae --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/close.st @@ -0,0 +1,5 @@ +accessing +close + + writeStream flush. + writeStream close \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/closed.st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/closed.st new file mode 100644 index 000000000..f6c9af364 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/closed.st @@ -0,0 +1,3 @@ +testing +closed + ^ readStream closed \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/flush.st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/flush.st new file mode 100644 index 000000000..54b0e3427 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/flush.st @@ -0,0 +1,4 @@ +accessing +flush + + self writingActionDo: [ writeStream flush ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/isBinary.st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/isBinary.st new file mode 100644 index 000000000..be2970b60 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/isBinary.st @@ -0,0 +1,4 @@ +testing +isBinary + + ^ readStream isBinary \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/isReadOnly.st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/isReadOnly.st new file mode 100644 index 000000000..eff479d1f --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/isReadOnly.st @@ -0,0 +1,4 @@ +testing +isReadOnly + + ^ false \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/isStream.st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/isStream.st new file mode 100644 index 000000000..decd406d8 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/isStream.st @@ -0,0 +1,4 @@ +testing +isStream + + ^ true \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/next..st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/next..st new file mode 100644 index 000000000..5c5619452 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/next..st @@ -0,0 +1,5 @@ +accessing +next: anInteger + + ^ self readingActionDo: [ + readStream next: anInteger ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/next.putAll..st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/next.putAll..st new file mode 100644 index 000000000..d30dc2557 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/next.putAll..st @@ -0,0 +1,5 @@ +accessing +next: count putAll: collection + + self writingActionDo: [ + writeStream next: count putAll: collection ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/next.putAll.startingAt..st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/next.putAll.startingAt..st new file mode 100644 index 000000000..49bf06103 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/next.putAll.startingAt..st @@ -0,0 +1,5 @@ +accessing +next: count putAll: collection startingAt: offset + + self writingActionDo: [ + writeStream next: count putAll: collection startingAt: offset ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/next.st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/next.st new file mode 100644 index 000000000..0521db698 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/next.st @@ -0,0 +1,5 @@ +accessing +next + + ^ self readingActionDo: [ + readStream next ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/nextPut..st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/nextPut..st new file mode 100644 index 000000000..02b161620 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/nextPut..st @@ -0,0 +1,4 @@ +accessing +nextPut: aCharacter + + self writingActionDo: [ writeStream nextPut: aCharacter ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/nextPutAll..st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/nextPutAll..st new file mode 100644 index 000000000..41e44792b --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/nextPutAll..st @@ -0,0 +1,4 @@ +accessing +nextPutAll: aString + + ^ self writingActionDo: [ writeStream nextPutAll: aString ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/on..st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/on..st new file mode 100644 index 000000000..3affa82fc --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/on..st @@ -0,0 +1,6 @@ +instance creation +on: aStream + + lastRead := true. + readStream := ZnBufferedReadStream on: aStream. + writeStream := ZnBufferedWriteStream on: aStream \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/peek.st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/peek.st new file mode 100644 index 000000000..94f131421 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/peek.st @@ -0,0 +1,5 @@ +accessing +peek + + ^ self readingActionDo: [ + readStream peek ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/position..st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/position..st new file mode 100644 index 000000000..90281920c --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/position..st @@ -0,0 +1,5 @@ +accessing +position: anInteger + + self writingActionDo: [ + writeStream position: anInteger ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/position.st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/position.st new file mode 100644 index 000000000..7dcff3fb4 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/position.st @@ -0,0 +1,6 @@ +accessing +position + + ^ lastRead + ifTrue: [ readStream position ] + ifFalse: [ writeStream position ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/rawStream.st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/rawStream.st new file mode 100644 index 000000000..3f9aee222 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/rawStream.st @@ -0,0 +1,7 @@ +accessing +rawStream + "Answer the innermost stream wrapped by the receiver, e.g. a raw binary file stream, + socket stream, or regular Read/WriteStream. + Defer to the wrappedStream." + + ^ self wrappedStream rawStream \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/readInto.startingAt.count..st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/readInto.startingAt.count..st new file mode 100644 index 000000000..952d5de26 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/readInto.startingAt.count..st @@ -0,0 +1,5 @@ +accessing +readInto: collection startingAt: offset count: requestedCount + + ^ self readingActionDo: [ + readStream readInto: collection startingAt: offset count: requestedCount ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/readingActionDo..st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/readingActionDo..st new file mode 100644 index 000000000..bcb4d61a2 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/readingActionDo..st @@ -0,0 +1,13 @@ +private +readingActionDo: aBlock + + "Reading from the read stream. + We should + - flush the write stream + - discard the read buffer (which may contain incorrect data). + - and then perform the read." + + lastRead ifFalse: [ + writeStream flush. + readStream discardBuffer ]. + ^ aBlock ensure: [ lastRead := true ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/setToEnd.st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/setToEnd.st new file mode 100644 index 000000000..863758021 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/setToEnd.st @@ -0,0 +1,5 @@ +accessing +setToEnd + + ^ self writingActionDo: [ + writeStream setToEnd ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/size.st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/size.st new file mode 100644 index 000000000..9681856a0 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/size.st @@ -0,0 +1,3 @@ +accessing +size + ^ readStream size \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/sizeBuffer..st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/sizeBuffer..st new file mode 100644 index 000000000..42bab7a32 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/sizeBuffer..st @@ -0,0 +1,5 @@ +initialize-release +sizeBuffer: anInteger + + readStream sizeBuffer: anInteger. + writeStream sizeBuffer: anInteger \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/skip..st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/skip..st new file mode 100644 index 000000000..1c1271a34 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/skip..st @@ -0,0 +1,5 @@ +accessing +skip: anInteger + anInteger < 0 ifTrue: [ self error: 'cannot skip backwards' ]. + self readingActionDo: [ + readStream skip: anInteger ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/truncate..st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/truncate..st new file mode 100644 index 000000000..a72899e26 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/truncate..st @@ -0,0 +1,4 @@ +accessing +truncate: anInteger + + self writingActionDo: [ writeStream truncate: anInteger ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/truncate.st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/truncate.st new file mode 100644 index 000000000..9bdc55192 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/truncate.st @@ -0,0 +1,4 @@ +accessing +truncate + + self writingActionDo: [ writeStream truncate ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/upTo..st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/upTo..st new file mode 100644 index 000000000..fd4d30eff --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/upTo..st @@ -0,0 +1,4 @@ +accessing +upTo: aCharacter + + ^ self readingActionDo: [ readStream upTo: aCharacter ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/upToEnd.st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/upToEnd.st new file mode 100644 index 000000000..89622b44c --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/upToEnd.st @@ -0,0 +1,4 @@ +accessing +upToEnd + + ^ self readingActionDo: [ readStream upToEnd ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/wrappedStream.st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/wrappedStream.st new file mode 100644 index 000000000..30bdae29c --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/wrappedStream.st @@ -0,0 +1,4 @@ +accessing +wrappedStream + + ^ readStream wrappedStream \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/writingActionDo..st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/writingActionDo..st new file mode 100644 index 000000000..3b62f49e9 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/instance/writingActionDo..st @@ -0,0 +1,11 @@ +accessing +writingActionDo: aBlock + + "Writing to the write stream. + We should + - write the write stream + - discard the read buffer (which may contain incorrect data)" + lastRead ifTrue: [ + writeStream discardBuffer ]. + readStream discardBuffer. + ^ aBlock ensure: [ lastRead := false ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/properties.json b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/properties.json new file mode 100644 index 000000000..99516ff0b --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadWriteStream.class/properties.json @@ -0,0 +1,15 @@ +{ + "commentStamp" : "", + "super" : "Object", + "category" : "Zinc-Character-Encoding-Core", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ + "readStream", + "writeStream", + "lastRead" + ], + "name" : "ZnBufferedReadWriteStream", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/class/on.do..st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/class/on.do..st index f50163fbf..c72717280 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/class/on.do..st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/class/on.do..st @@ -2,7 +2,7 @@ convenience on: writeStream do: block "Execute block with as argument a ZnBufferedWriteStream on writeStream, making sure #flush is called at the end. Return the value of block." - + | bufferedWriteStream result | bufferedWriteStream := self on: writeStream. result := block value: bufferedWriteStream. diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/buffer.st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/buffer.st index 4be0714ad..d936831fb 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/buffer.st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/buffer.st @@ -1,5 +1,5 @@ private buffer - buffer isNil - ifTrue: [ self sizeBuffer: self defaultBufferSize ]. + + buffer ifNil: [ self sizeBuffer: self defaultBufferSize ]. ^ buffer \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/bufferSize.st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/bufferSize.st index f5b516b64..6dd6db6e2 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/bufferSize.st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/bufferSize.st @@ -1,5 +1,4 @@ accessing bufferSize - ^ buffer isNil - ifTrue: [ self defaultBufferSize ] - ifFalse: [ buffer size ] \ No newline at end of file + + ^ buffer ifNil: [ self defaultBufferSize ] ifNotNil: [ buffer size ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/closed.st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/closed.st new file mode 100644 index 000000000..40254d1cb --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/closed.st @@ -0,0 +1,3 @@ +testing +closed + ^ stream closed \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/cr.st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/cr.st new file mode 100644 index 000000000..7715791a6 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/cr.st @@ -0,0 +1,3 @@ +accessing +cr + self nextPut: Character cr \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/crlf.st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/crlf.st new file mode 100644 index 000000000..d8f3a5170 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/crlf.st @@ -0,0 +1,3 @@ +accessing +crlf + self cr; lf \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/discardBuffer.st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/discardBuffer.st new file mode 100644 index 000000000..132860f1e --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/discardBuffer.st @@ -0,0 +1,4 @@ +private +discardBuffer + + position := 0 \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/flushBufferIfFull.st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/flushBufferIfFull.st index 550a7fef7..434d97328 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/flushBufferIfFull.st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/flushBufferIfFull.st @@ -1,4 +1,4 @@ private flushBufferIfFull - position = self bufferSize - ifTrue: [ self flushBuffer ] + position = self bufferSize + ifTrue: [ self flushBuffer ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/int16..st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/int16..st new file mode 100644 index 000000000..cd8cf7109 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/int16..st @@ -0,0 +1,3 @@ +accessing - bytes +int16: integer + ^ self nextIntegerOfSize: 2 signed: true bigEndian: true put: integer \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/int32..st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/int32..st new file mode 100644 index 000000000..d8d375c89 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/int32..st @@ -0,0 +1,3 @@ +accessing - bytes +int32: integer + ^ self nextIntegerOfSize: 4 signed: true bigEndian: true put: integer \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/int8..st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/int8..st new file mode 100644 index 000000000..76102f81f --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/int8..st @@ -0,0 +1,3 @@ +accessing - bytes +int8: integer + ^ self nextIntegerOfSize: 1 signed: true bigEndian: true put: integer \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/isBinary.st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/isBinary.st new file mode 100644 index 000000000..4f1eb78e5 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/isBinary.st @@ -0,0 +1,4 @@ +testing +isBinary + + ^ stream isBinary \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/isStream.st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/isStream.st new file mode 100644 index 000000000..decd406d8 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/isStream.st @@ -0,0 +1,4 @@ +testing +isStream + + ^ true \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/lf.st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/lf.st new file mode 100644 index 000000000..3aaebb344 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/lf.st @@ -0,0 +1,3 @@ +accessing +lf + self nextPut: Character lf \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/next.putAll..st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/next.putAll..st index 685e4cc14..960bbb688 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/next.putAll..st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/next.putAll..st @@ -1,8 +1,8 @@ accessing next: count putAll: collection "Write count elements from collection" - - self - next: count - putAll: collection + + self + next: count + putAll: collection startingAt: 1 \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/next.putAll.startingAt..st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/next.putAll.startingAt..st index 7132e83e7..f8ba857b4 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/next.putAll.startingAt..st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/next.putAll.startingAt..st @@ -1,7 +1,7 @@ accessing next: count putAll: collection startingAt: offset "Write count elements from collection starting at offset." - + self flushBufferIfFull. count <= self bufferFreeSize ifTrue: [ @@ -11,4 +11,4 @@ next: count putAll: collection startingAt: offset self flushBuffer. count > (self bufferSize / 2) ifTrue: [ stream next: count putAll: collection startingAt: offset ] - ifFalse: [ self next: count putAll: collection startingAt: offset ] ] + ifFalse: [ self next: count putAll: collection startingAt: offset ] ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/nextInt32Put..st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/nextInt32Put..st new file mode 100644 index 000000000..932287052 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/nextInt32Put..st @@ -0,0 +1,3 @@ +accessing - bytes +nextInt32Put: integer + ^ self nextIntegerOfSize: 4 signed: true bigEndian: true put: integer \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/nextIntegerOfSize.signed.bigEndian.put..st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/nextIntegerOfSize.signed.bigEndian.put..st new file mode 100644 index 000000000..bf6f3eb90 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/nextIntegerOfSize.signed.bigEndian.put..st @@ -0,0 +1,22 @@ +accessing - bytes +nextIntegerOfSize: numberOfBytes signed: signed bigEndian: bigEndian put: value + "Assuming the receiver is a stream of bytes, write value as the next integer of size numberOfBytes. + If bigEndian is true, use network byte order, most significant byte first, + else use little endian order, least significant byte first. + If signed is true, encode as a two-complement signed value, + else encode as a plain unsigned value." + + | unsignedValue | + unsignedValue := (signed and: [ value negative ]) + ifTrue: [ (1 << (numberOfBytes * 8)) + value ] + ifFalse: [ value ]. + (unsignedValue between: 0 and: (2 ** (numberOfBytes * 8)) - 1) + ifFalse: [ DomainError signalFrom: 0 to: (2 ** (numberOfBytes * 8)) - 1 ]. + bigEndian + ifTrue: [ + numberOfBytes to: 1 by: -1 do: [ :index | + self nextPut: (unsignedValue byteAt: index) ] ] + ifFalse: [ + 1 to: numberOfBytes do: [ :index | + self nextPut: (unsignedValue byteAt: index) ] ]. + ^ value \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/nextLittleEndianNumber.put..st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/nextLittleEndianNumber.put..st new file mode 100644 index 000000000..155835655 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/nextLittleEndianNumber.put..st @@ -0,0 +1,3 @@ +accessing - bytes +nextLittleEndianNumber: numberOfBytes put: integer + ^ self nextIntegerOfSize: numberOfBytes signed: false bigEndian: false put: integer \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/nextNumber.put..st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/nextNumber.put..st new file mode 100644 index 000000000..99f3fc614 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/nextNumber.put..st @@ -0,0 +1,3 @@ +accessing - bytes +nextNumber: numberOfBytes put: integer + ^ self nextIntegerOfSize: numberOfBytes signed: false bigEndian: true put: integer \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/nextPutAll..st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/nextPutAll..st index 8360b274a..3ed548aee 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/nextPutAll..st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/nextPutAll..st @@ -1,8 +1,8 @@ accessing nextPutAll: collection "Write a collection" - - self - next: collection size - putAll: collection + + self + next: collection size + putAll: collection startingAt: 1 \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/nextWordPut..st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/nextWordPut..st new file mode 100644 index 000000000..9b4b4b710 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/nextWordPut..st @@ -0,0 +1,3 @@ +accessing - bytes +nextWordPut: integer + ^ self nextIntegerOfSize: 2 signed: false bigEndian: true put: integer \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/position..st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/position..st new file mode 100644 index 000000000..21f60dace --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/position..st @@ -0,0 +1,4 @@ +accessing +position: anInteger + self flush. + stream position: anInteger \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/position.st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/position.st new file mode 100644 index 000000000..5cff6e70e --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/position.st @@ -0,0 +1,4 @@ +accessing +position + + ^ stream position + position \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/printOn..st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/printOn..st index 3fcd2037e..a57c0f06b 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/printOn..st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/printOn..st @@ -1,5 +1,5 @@ printing printOn: aStream - aStream - nextPutAll: 'a '; + aStream + nextPutAll: 'a '; nextPutAll: self class name \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/rawStream.st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/rawStream.st new file mode 100644 index 000000000..b10e770d8 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/rawStream.st @@ -0,0 +1,7 @@ +initialize-release +rawStream + "Answer the innermost stream wrapped by the receiver, e.g. a raw binary file stream, + socket stream, or regular Read/WriteStream. + Defer to the wrappedStream." + + ^ self wrappedStream rawStream \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/reset.st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/reset.st new file mode 100644 index 000000000..5054d483f --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/reset.st @@ -0,0 +1,4 @@ +accessing +reset + self flushBuffer. + stream reset \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/setToEnd.st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/setToEnd.st new file mode 100644 index 000000000..1c0e662ef --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/setToEnd.st @@ -0,0 +1,5 @@ +accessing +setToEnd + + self flush. + stream setToEnd \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/tab.st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/tab.st new file mode 100644 index 000000000..c3cda2363 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/tab.st @@ -0,0 +1,3 @@ +accessing +tab + self nextPut: Character tab \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/truncate..st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/truncate..st new file mode 100644 index 000000000..287872b51 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/truncate..st @@ -0,0 +1,5 @@ +accessing +truncate: anInteger + + self flushBuffer. + stream truncate: anInteger \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/truncate.st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/truncate.st new file mode 100644 index 000000000..e4929b76f --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/truncate.st @@ -0,0 +1,5 @@ +accessing +truncate + + self flushBuffer. + stream truncate \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/uint16..st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/uint16..st new file mode 100644 index 000000000..331b951c8 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/uint16..st @@ -0,0 +1,3 @@ +accessing - bytes +uint16: integer + ^ self nextIntegerOfSize: 2 signed: false bigEndian: true put: integer \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/uint32..st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/uint32..st new file mode 100644 index 000000000..6b8b74c6e --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/uint32..st @@ -0,0 +1,3 @@ +accessing - bytes +uint32: integer + ^ self nextIntegerOfSize: 4 signed: false bigEndian: true put: integer \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/uint8..st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/uint8..st new file mode 100644 index 000000000..c684d38d2 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/uint8..st @@ -0,0 +1,3 @@ +accessing - bytes +uint8: integer + ^ self nextIntegerOfSize: 1 signed: false bigEndian: true put: integer \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/wrappedStream.st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/wrappedStream.st new file mode 100644 index 000000000..1ea871be1 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/wrappedStream.st @@ -0,0 +1,4 @@ +initialize-release +wrappedStream + + ^ stream \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/methodProperties.json b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/methodProperties.json deleted file mode 100644 index eb4d246b9..000000000 --- a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/methodProperties.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "class" : { - "on:" : "SvenVanCaekenberghe 12/7/2010 21:20", - "on:do:" : "SvenVanCaekenberghe 12/2/2012 19:23" }, - "instance" : { - "buffer" : "SvenVanCaekenberghe 12/8/2010 10:15", - "bufferFreeSize" : "SvenVanCaekenberghe 12/7/2010 23:42", - "bufferSize" : "SvenVanCaekenberghe 12/8/2010 10:08", - "close" : "SvenVanCaekenberghe 12/7/2010 21:22", - "defaultBufferSize" : "SvenVanCaekenberghe 11/30/2012 21:22", - "finish" : "SvenVanCaekenberghe 5/18/2013 20:17", - "flush" : "SvenVanCaekenberghe 12/7/2010 21:23", - "flushBuffer" : "SvenVanCaekenberghe 12/7/2010 23:48", - "flushBufferIfFull" : "SvenVanCaekenberghe 12/7/2010 23:39", - "next:putAll:" : "SvenVanCaekenberghe 11/30/2012 20:01", - "next:putAll:startingAt:" : "SvenVanCaekenberghe 11/30/2012 21:20", - "nextPut:" : "SvenVanCaekenberghe 12/8/2010 10:16", - "nextPutAll:" : "SvenVanCaekenberghe 11/30/2012 20:02", - "on:" : "SvenVanCaekenberghe 12/7/2010 21:30", - "print:" : "SvenVanCaekenberghe 11/30/2012 22:21", - "printOn:" : "SvenVanCaekenberghe 12/7/2010 21:19", - "sizeBuffer:" : "SvenVanCaekenberghe 12/7/2010 21:28", - "space" : "SvenVanCaekenberghe 12/7/2010 21:20" } } diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/properties.json b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/properties.json index 615b83307..135de2655 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/properties.json +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/properties.json @@ -1,16 +1,15 @@ { + "commentStamp" : "", + "super" : "Object", "category" : "Zinc-Character-Encoding-Core", - "classinstvars" : [ - ], - "classvars" : [ - ], - "commentStamp" : "", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], "instvars" : [ "stream", "buffer", - "position" ], + "position" + ], "name" : "ZnBufferedWriteStream", - "pools" : [ - ], - "super" : "Object", - "type" : "normal" } + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/README.md b/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/README.md index 1f6e61d19..7973a2640 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/README.md +++ b/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/README.md @@ -1,7 +1,12 @@ I am ZnByteEncoder, a concrete subclass of ZnCharacterEncoder. -I handle single byte encodings where byte values 0 to 127 map to ASCII -and 128 to 255 are a permutation to Unicode characters. +I handle single byte encodings where byte values 0 to 127 map to ASCII and 128 to 255 are a permutation to Unicode characters. I derive my mappings by parsing official unicode.org specifications. +The list of encodings and their names/aliases was taken from http://encoding.spec.whatwg.org/#legacy-single-byte-encodings + +I basically support ISO/IEC 8859 1, 2, 3, 4, 5, 6, 7, 8, 10, 13, 14, 15 and 16, Windows Codepages 866, 874, 1250, 1251, 1252, 1253, 1253, 1254, 1255, 1256, 1257, 1258, KOI8 R & U as well as Mac Roman & Cyrillic - each of these with a number of aliases like latin1, latin2, latin3, latin4, latin5, latin6, cyrillic, arabic, greek and hebrew. See #mappingToIdentifiers + +Note that most/all of these encodings should be considered legacy, with UTF-8 being the preferred encoding going forward. + Part of Zinc HTTP Components. \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/cp1250Mapping.st b/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/cp1250Mapping.st index 2c1a042c4..883857537 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/cp1250Mapping.st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/cp1250Mapping.st @@ -3,19 +3,19 @@ cp1250Mapping "self generateByteToUnicodeSpec: 'http://unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1250.TXT'" ^ #( - 16r20AC nil 16r201A nil 16r201E 16r2026 16r2020 16r2021 - nil 16r2030 16r0160 16r2039 16r015A 16r0164 16r017D 16r0179 - nil 16r2018 16r2019 16r201C 16r201D 16r2022 16r2013 16r2014 - nil 16r2122 16r0161 16r203A 16r015B 16r0165 16r017E 16r017A - 16r00A0 16r02C7 16r02D8 16r0141 16r00A4 16r0104 16r00A6 16r00A7 - 16r00A8 16r00A9 16r015E 16r00AB 16r00AC 16r00AD 16r00AE 16r017B - 16r00B0 16r00B1 16r02DB 16r0142 16r00B4 16r00B5 16r00B6 16r00B7 - 16r00B8 16r0105 16r015F 16r00BB 16r013D 16r02DD 16r013E 16r017C - 16r0154 16r00C1 16r00C2 16r0102 16r00C4 16r0139 16r0106 16r00C7 - 16r010C 16r00C9 16r0118 16r00CB 16r011A 16r00CD 16r00CE 16r010E - 16r0110 16r0143 16r0147 16r00D3 16r00D4 16r0150 16r00D6 16r00D7 - 16r0158 16r016E 16r00DA 16r0170 16r00DC 16r00DD 16r0162 16r00DF - 16r0155 16r00E1 16r00E2 16r0103 16r00E4 16r013A 16r0107 16r00E7 - 16r010D 16r00E9 16r0119 16r00EB 16r011B 16r00ED 16r00EE 16r010F - 16r0111 16r0144 16r0148 16r00F3 16r00F4 16r0151 16r00F6 16r00F7 + 16r20AC nil 16r201A nil 16r201E 16r2026 16r2020 16r2021 + nil 16r2030 16r0160 16r2039 16r015A 16r0164 16r017D 16r0179 + nil 16r2018 16r2019 16r201C 16r201D 16r2022 16r2013 16r2014 + nil 16r2122 16r0161 16r203A 16r015B 16r0165 16r017E 16r017A + 16r00A0 16r02C7 16r02D8 16r0141 16r00A4 16r0104 16r00A6 16r00A7 + 16r00A8 16r00A9 16r015E 16r00AB 16r00AC 16r00AD 16r00AE 16r017B + 16r00B0 16r00B1 16r02DB 16r0142 16r00B4 16r00B5 16r00B6 16r00B7 + 16r00B8 16r0105 16r015F 16r00BB 16r013D 16r02DD 16r013E 16r017C + 16r0154 16r00C1 16r00C2 16r0102 16r00C4 16r0139 16r0106 16r00C7 + 16r010C 16r00C9 16r0118 16r00CB 16r011A 16r00CD 16r00CE 16r010E + 16r0110 16r0143 16r0147 16r00D3 16r00D4 16r0150 16r00D6 16r00D7 + 16r0158 16r016E 16r00DA 16r0170 16r00DC 16r00DD 16r0162 16r00DF + 16r0155 16r00E1 16r00E2 16r0103 16r00E4 16r013A 16r0107 16r00E7 + 16r010D 16r00E9 16r0119 16r00EB 16r011B 16r00ED 16r00EE 16r010F + 16r0111 16r0144 16r0148 16r00F3 16r00F4 16r0151 16r00F6 16r00F7 16r0159 16r016F 16r00FA 16r0171 16r00FC 16r00FD 16r0163 16r02D9 ) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/cp1251Mapping.st b/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/cp1251Mapping.st new file mode 100644 index 000000000..645f7dc8a --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/cp1251Mapping.st @@ -0,0 +1,21 @@ +mappings +cp1251Mapping + "self generateByteToUnicodeSpec: 'http://unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1251.TXT'" + + ^ #( + 16r0402 16r0403 16r201A 16r0453 16r201E 16r2026 16r2020 16r2021 + 16r20AC 16r2030 16r0409 16r2039 16r040A 16r040C 16r040B 16r040F + 16r0452 16r2018 16r2019 16r201C 16r201D 16r2022 16r2013 16r2014 + nil 16r2122 16r0459 16r203A 16r045A 16r045C 16r045B 16r045F + 16r00A0 16r040E 16r045E 16r0408 16r00A4 16r0490 16r00A6 16r00A7 + 16r0401 16r00A9 16r0404 16r00AB 16r00AC 16r00AD 16r00AE 16r0407 + 16r00B0 16r00B1 16r0406 16r0456 16r0491 16r00B5 16r00B6 16r00B7 + 16r0451 16r2116 16r0454 16r00BB 16r0458 16r0405 16r0455 16r0457 + 16r0410 16r0411 16r0412 16r0413 16r0414 16r0415 16r0416 16r0417 + 16r0418 16r0419 16r041A 16r041B 16r041C 16r041D 16r041E 16r041F + 16r0420 16r0421 16r0422 16r0423 16r0424 16r0425 16r0426 16r0427 + 16r0428 16r0429 16r042A 16r042B 16r042C 16r042D 16r042E 16r042F + 16r0430 16r0431 16r0432 16r0433 16r0434 16r0435 16r0436 16r0437 + 16r0438 16r0439 16r043A 16r043B 16r043C 16r043D 16r043E 16r043F + 16r0440 16r0441 16r0442 16r0443 16r0444 16r0445 16r0446 16r0447 + 16r0448 16r0449 16r044A 16r044B 16r044C 16r044D 16r044E 16r044F ) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/cp1252Mapping.st b/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/cp1252Mapping.st index bb9254b64..dcae85b4b 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/cp1252Mapping.st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/cp1252Mapping.st @@ -3,19 +3,19 @@ cp1252Mapping "self generateByteToUnicodeSpec: 'http://unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1252.TXT'" ^ #( - 16r20AC nil 16r201A 16r0192 16r201E 16r2026 16r2020 16r2021 - 16r02C6 16r2030 16r0160 16r2039 16r0152 nil 16r017D nil - nil 16r2018 16r2019 16r201C 16r201D 16r2022 16r2013 16r2014 - 16r02DC 16r2122 16r0161 16r203A 16r0153 nil 16r017E 16r0178 - 16r00A0 16r00A1 16r00A2 16r00A3 16r00A4 16r00A5 16r00A6 16r00A7 - 16r00A8 16r00A9 16r00AA 16r00AB 16r00AC 16r00AD 16r00AE 16r00AF - 16r00B0 16r00B1 16r00B2 16r00B3 16r00B4 16r00B5 16r00B6 16r00B7 - 16r00B8 16r00B9 16r00BA 16r00BB 16r00BC 16r00BD 16r00BE 16r00BF - 16r00C0 16r00C1 16r00C2 16r00C3 16r00C4 16r00C5 16r00C6 16r00C7 - 16r00C8 16r00C9 16r00CA 16r00CB 16r00CC 16r00CD 16r00CE 16r00CF - 16r00D0 16r00D1 16r00D2 16r00D3 16r00D4 16r00D5 16r00D6 16r00D7 - 16r00D8 16r00D9 16r00DA 16r00DB 16r00DC 16r00DD 16r00DE 16r00DF - 16r00E0 16r00E1 16r00E2 16r00E3 16r00E4 16r00E5 16r00E6 16r00E7 - 16r00E8 16r00E9 16r00EA 16r00EB 16r00EC 16r00ED 16r00EE 16r00EF - 16r00F0 16r00F1 16r00F2 16r00F3 16r00F4 16r00F5 16r00F6 16r00F7 + 16r20AC nil 16r201A 16r0192 16r201E 16r2026 16r2020 16r2021 + 16r02C6 16r2030 16r0160 16r2039 16r0152 nil 16r017D nil + nil 16r2018 16r2019 16r201C 16r201D 16r2022 16r2013 16r2014 + 16r02DC 16r2122 16r0161 16r203A 16r0153 nil 16r017E 16r0178 + 16r00A0 16r00A1 16r00A2 16r00A3 16r00A4 16r00A5 16r00A6 16r00A7 + 16r00A8 16r00A9 16r00AA 16r00AB 16r00AC 16r00AD 16r00AE 16r00AF + 16r00B0 16r00B1 16r00B2 16r00B3 16r00B4 16r00B5 16r00B6 16r00B7 + 16r00B8 16r00B9 16r00BA 16r00BB 16r00BC 16r00BD 16r00BE 16r00BF + 16r00C0 16r00C1 16r00C2 16r00C3 16r00C4 16r00C5 16r00C6 16r00C7 + 16r00C8 16r00C9 16r00CA 16r00CB 16r00CC 16r00CD 16r00CE 16r00CF + 16r00D0 16r00D1 16r00D2 16r00D3 16r00D4 16r00D5 16r00D6 16r00D7 + 16r00D8 16r00D9 16r00DA 16r00DB 16r00DC 16r00DD 16r00DE 16r00DF + 16r00E0 16r00E1 16r00E2 16r00E3 16r00E4 16r00E5 16r00E6 16r00E7 + 16r00E8 16r00E9 16r00EA 16r00EB 16r00EC 16r00ED 16r00EE 16r00EF + 16r00F0 16r00F1 16r00F2 16r00F3 16r00F4 16r00F5 16r00F6 16r00F7 16r00F8 16r00F9 16r00FA 16r00FB 16r00FC 16r00FD 16r00FE 16r00FF ) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/cp1253Mapping.st b/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/cp1253Mapping.st index a5b5d92a0..2b06e948f 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/cp1253Mapping.st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/cp1253Mapping.st @@ -3,19 +3,19 @@ cp1253Mapping "self generateByteToUnicodeSpec: 'http://unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1253.TXT'" ^ #( - 16r20AC nil 16r201A 16r0192 16r201E 16r2026 16r2020 16r2021 - nil 16r2030 nil 16r2039 nil nil nil nil - nil 16r2018 16r2019 16r201C 16r201D 16r2022 16r2013 16r2014 - nil 16r2122 nil 16r203A nil nil nil nil - 16r00A0 16r0385 16r0386 16r00A3 16r00A4 16r00A5 16r00A6 16r00A7 - 16r00A8 16r00A9 nil 16r00AB 16r00AC 16r00AD 16r00AE 16r2015 - 16r00B0 16r00B1 16r00B2 16r00B3 16r0384 16r00B5 16r00B6 16r00B7 - 16r0388 16r0389 16r038A 16r00BB 16r038C 16r00BD 16r038E 16r038F - 16r0390 16r0391 16r0392 16r0393 16r0394 16r0395 16r0396 16r0397 - 16r0398 16r0399 16r039A 16r039B 16r039C 16r039D 16r039E 16r039F - 16r03A0 16r03A1 nil 16r03A3 16r03A4 16r03A5 16r03A6 16r03A7 - 16r03A8 16r03A9 16r03AA 16r03AB 16r03AC 16r03AD 16r03AE 16r03AF - 16r03B0 16r03B1 16r03B2 16r03B3 16r03B4 16r03B5 16r03B6 16r03B7 - 16r03B8 16r03B9 16r03BA 16r03BB 16r03BC 16r03BD 16r03BE 16r03BF - 16r03C0 16r03C1 16r03C2 16r03C3 16r03C4 16r03C5 16r03C6 16r03C7 + 16r20AC nil 16r201A 16r0192 16r201E 16r2026 16r2020 16r2021 + nil 16r2030 nil 16r2039 nil nil nil nil + nil 16r2018 16r2019 16r201C 16r201D 16r2022 16r2013 16r2014 + nil 16r2122 nil 16r203A nil nil nil nil + 16r00A0 16r0385 16r0386 16r00A3 16r00A4 16r00A5 16r00A6 16r00A7 + 16r00A8 16r00A9 nil 16r00AB 16r00AC 16r00AD 16r00AE 16r2015 + 16r00B0 16r00B1 16r00B2 16r00B3 16r0384 16r00B5 16r00B6 16r00B7 + 16r0388 16r0389 16r038A 16r00BB 16r038C 16r00BD 16r038E 16r038F + 16r0390 16r0391 16r0392 16r0393 16r0394 16r0395 16r0396 16r0397 + 16r0398 16r0399 16r039A 16r039B 16r039C 16r039D 16r039E 16r039F + 16r03A0 16r03A1 nil 16r03A3 16r03A4 16r03A5 16r03A6 16r03A7 + 16r03A8 16r03A9 16r03AA 16r03AB 16r03AC 16r03AD 16r03AE 16r03AF + 16r03B0 16r03B1 16r03B2 16r03B3 16r03B4 16r03B5 16r03B6 16r03B7 + 16r03B8 16r03B9 16r03BA 16r03BB 16r03BC 16r03BD 16r03BE 16r03BF + 16r03C0 16r03C1 16r03C2 16r03C3 16r03C4 16r03C5 16r03C6 16r03C7 16r03C8 16r03C9 16r03CA 16r03CB 16r03CC 16r03CD 16r03CE nil ) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/cp1254Mapping.st b/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/cp1254Mapping.st new file mode 100644 index 000000000..8e4e58a49 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/cp1254Mapping.st @@ -0,0 +1,21 @@ +mappings +cp1254Mapping + "self generateByteToUnicodeSpec: 'http://unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1254.TXT'" + + ^ #( + 16r20AC nil 16r201A 16r0192 16r201E 16r2026 16r2020 16r2021 + 16r02C6 16r2030 16r0160 16r2039 16r0152 nil nil nil + nil 16r2018 16r2019 16r201C 16r201D 16r2022 16r2013 16r2014 + 16r02DC 16r2122 16r0161 16r203A 16r0153 nil nil 16r0178 + 16r00A0 16r00A1 16r00A2 16r00A3 16r00A4 16r00A5 16r00A6 16r00A7 + 16r00A8 16r00A9 16r00AA 16r00AB 16r00AC 16r00AD 16r00AE 16r00AF + 16r00B0 16r00B1 16r00B2 16r00B3 16r00B4 16r00B5 16r00B6 16r00B7 + 16r00B8 16r00B9 16r00BA 16r00BB 16r00BC 16r00BD 16r00BE 16r00BF + 16r00C0 16r00C1 16r00C2 16r00C3 16r00C4 16r00C5 16r00C6 16r00C7 + 16r00C8 16r00C9 16r00CA 16r00CB 16r00CC 16r00CD 16r00CE 16r00CF + 16r011E 16r00D1 16r00D2 16r00D3 16r00D4 16r00D5 16r00D6 16r00D7 + 16r00D8 16r00D9 16r00DA 16r00DB 16r00DC 16r0130 16r015E 16r00DF + 16r00E0 16r00E1 16r00E2 16r00E3 16r00E4 16r00E5 16r00E6 16r00E7 + 16r00E8 16r00E9 16r00EA 16r00EB 16r00EC 16r00ED 16r00EE 16r00EF + 16r011F 16r00F1 16r00F2 16r00F3 16r00F4 16r00F5 16r00F6 16r00F7 + 16r00F8 16r00F9 16r00FA 16r00FB 16r00FC 16r0131 16r015F 16r00FF ) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/cp1255Mapping.st b/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/cp1255Mapping.st new file mode 100644 index 000000000..717fadb39 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/cp1255Mapping.st @@ -0,0 +1,21 @@ +mappings +cp1255Mapping + "self generateByteToUnicodeSpec: 'http://unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1255.TXT'" + + ^ #( + 16r20AC nil 16r201A 16r0192 16r201E 16r2026 16r2020 16r2021 + 16r02C6 16r2030 nil 16r2039 nil nil nil nil + nil 16r2018 16r2019 16r201C 16r201D 16r2022 16r2013 16r2014 + 16r02DC 16r2122 nil 16r203A nil nil nil nil + 16r00A0 16r00A1 16r00A2 16r00A3 16r20AA 16r00A5 16r00A6 16r00A7 + 16r00A8 16r00A9 16r00D7 16r00AB 16r00AC 16r00AD 16r00AE 16r00AF + 16r00B0 16r00B1 16r00B2 16r00B3 16r00B4 16r00B5 16r00B6 16r00B7 + 16r00B8 16r00B9 16r00F7 16r00BB 16r00BC 16r00BD 16r00BE 16r00BF + 16r05B0 16r05B1 16r05B2 16r05B3 16r05B4 16r05B5 16r05B6 16r05B7 + 16r05B8 16r05B9 nil 16r05BB 16r05BC 16r05BD 16r05BE 16r05BF + 16r05C0 16r05C1 16r05C2 16r05C3 16r05F0 16r05F1 16r05F2 16r05F3 + 16r05F4 nil nil nil nil nil nil nil + 16r05D0 16r05D1 16r05D2 16r05D3 16r05D4 16r05D5 16r05D6 16r05D7 + 16r05D8 16r05D9 16r05DA 16r05DB 16r05DC 16r05DD 16r05DE 16r05DF + 16r05E0 16r05E1 16r05E2 16r05E3 16r05E4 16r05E5 16r05E6 16r05E7 + 16r05E8 16r05E9 16r05EA nil nil 16r200E 16r200F nil ) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/cp1256Mapping.st b/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/cp1256Mapping.st new file mode 100644 index 000000000..af469af26 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/cp1256Mapping.st @@ -0,0 +1,21 @@ +mappings +cp1256Mapping + "self generateByteToUnicodeSpec: 'http://unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1256.TXT'" + + ^ #( + 16r20AC 16r067E 16r201A 16r0192 16r201E 16r2026 16r2020 16r2021 + 16r02C6 16r2030 16r0679 16r2039 16r0152 16r0686 16r0698 16r0688 + 16r06AF 16r2018 16r2019 16r201C 16r201D 16r2022 16r2013 16r2014 + 16r06A9 16r2122 16r0691 16r203A 16r0153 16r200C 16r200D 16r06BA + 16r00A0 16r060C 16r00A2 16r00A3 16r00A4 16r00A5 16r00A6 16r00A7 + 16r00A8 16r00A9 16r06BE 16r00AB 16r00AC 16r00AD 16r00AE 16r00AF + 16r00B0 16r00B1 16r00B2 16r00B3 16r00B4 16r00B5 16r00B6 16r00B7 + 16r00B8 16r00B9 16r061B 16r00BB 16r00BC 16r00BD 16r00BE 16r061F + 16r06C1 16r0621 16r0622 16r0623 16r0624 16r0625 16r0626 16r0627 + 16r0628 16r0629 16r062A 16r062B 16r062C 16r062D 16r062E 16r062F + 16r0630 16r0631 16r0632 16r0633 16r0634 16r0635 16r0636 16r00D7 + 16r0637 16r0638 16r0639 16r063A 16r0640 16r0641 16r0642 16r0643 + 16r00E0 16r0644 16r00E2 16r0645 16r0646 16r0647 16r0648 16r00E7 + 16r00E8 16r00E9 16r00EA 16r00EB 16r0649 16r064A 16r00EE 16r00EF + 16r064B 16r064C 16r064D 16r064E 16r00F4 16r064F 16r0650 16r00F7 + 16r0651 16r00F9 16r0652 16r00FB 16r00FC 16r200E 16r200F 16r06D2 ) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/cp1257Mapping.st b/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/cp1257Mapping.st new file mode 100644 index 000000000..d161dd670 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/cp1257Mapping.st @@ -0,0 +1,21 @@ +mappings +cp1257Mapping + "self generateByteToUnicodeSpec: 'http://unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1257.TXT'" + + ^ #( + 16r20AC nil 16r201A nil 16r201E 16r2026 16r2020 16r2021 + nil 16r2030 nil 16r2039 nil 16r00A8 16r02C7 16r00B8 + nil 16r2018 16r2019 16r201C 16r201D 16r2022 16r2013 16r2014 + nil 16r2122 nil 16r203A nil 16r00AF 16r02DB nil + 16r00A0 nil 16r00A2 16r00A3 16r00A4 nil 16r00A6 16r00A7 + 16r00D8 16r00A9 16r0156 16r00AB 16r00AC 16r00AD 16r00AE 16r00C6 + 16r00B0 16r00B1 16r00B2 16r00B3 16r00B4 16r00B5 16r00B6 16r00B7 + 16r00F8 16r00B9 16r0157 16r00BB 16r00BC 16r00BD 16r00BE 16r00E6 + 16r0104 16r012E 16r0100 16r0106 16r00C4 16r00C5 16r0118 16r0112 + 16r010C 16r00C9 16r0179 16r0116 16r0122 16r0136 16r012A 16r013B + 16r0160 16r0143 16r0145 16r00D3 16r014C 16r00D5 16r00D6 16r00D7 + 16r0172 16r0141 16r015A 16r016A 16r00DC 16r017B 16r017D 16r00DF + 16r0105 16r012F 16r0101 16r0107 16r00E4 16r00E5 16r0119 16r0113 + 16r010D 16r00E9 16r017A 16r0117 16r0123 16r0137 16r012B 16r013C + 16r0161 16r0144 16r0146 16r00F3 16r014D 16r00F5 16r00F6 16r00F7 + 16r0173 16r0142 16r015B 16r016B 16r00FC 16r017C 16r017E 16r02D9 ) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/cp1258Mapping.st b/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/cp1258Mapping.st new file mode 100644 index 000000000..db5ebede9 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/cp1258Mapping.st @@ -0,0 +1,21 @@ +mappings +cp1258Mapping + "self generateByteToUnicodeSpec: 'http://unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1258.TXT'" + + ^ #( + 16r20AC nil 16r201A 16r0192 16r201E 16r2026 16r2020 16r2021 + 16r02C6 16r2030 nil 16r2039 16r0152 nil nil nil + nil 16r2018 16r2019 16r201C 16r201D 16r2022 16r2013 16r2014 + 16r02DC 16r2122 nil 16r203A 16r0153 nil nil 16r0178 + 16r00A0 16r00A1 16r00A2 16r00A3 16r00A4 16r00A5 16r00A6 16r00A7 + 16r00A8 16r00A9 16r00AA 16r00AB 16r00AC 16r00AD 16r00AE 16r00AF + 16r00B0 16r00B1 16r00B2 16r00B3 16r00B4 16r00B5 16r00B6 16r00B7 + 16r00B8 16r00B9 16r00BA 16r00BB 16r00BC 16r00BD 16r00BE 16r00BF + 16r00C0 16r00C1 16r00C2 16r0102 16r00C4 16r00C5 16r00C6 16r00C7 + 16r00C8 16r00C9 16r00CA 16r00CB 16r0300 16r00CD 16r00CE 16r00CF + 16r0110 16r00D1 16r0309 16r00D3 16r00D4 16r01A0 16r00D6 16r00D7 + 16r00D8 16r00D9 16r00DA 16r00DB 16r00DC 16r01AF 16r0303 16r00DF + 16r00E0 16r00E1 16r00E2 16r0103 16r00E4 16r00E5 16r00E6 16r00E7 + 16r00E8 16r00E9 16r00EA 16r00EB 16r0301 16r00ED 16r00EE 16r00EF + 16r0111 16r00F1 16r0323 16r00F3 16r00F4 16r01A1 16r00F6 16r00F7 + 16r00F8 16r00F9 16r00FA 16r00FB 16r00FC 16r01B0 16r20AB 16r00FF ) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/cp850Mapping.st b/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/cp850Mapping.st new file mode 100644 index 000000000..f62921c6b --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/cp850Mapping.st @@ -0,0 +1,27 @@ +mappings +cp850Mapping + "This is not included in the MS mappings on the Unicode site, + but still in modern use as the default codepage in + the Windows Command Shell for multilingual locales" + "Technically, due to structure of ByteEncoder, it is incomplete, + as the lower range corresponds not to ASCII, but to cp437, + where character 0 - 31 and 127 have different meanings." + "See also http://en.wikipedia.org/wiki/Code_page_850" + + ^ #( + 16r00C7 16r00FC 16r00E9 16r00E2 16r00E4 16r00E0 16r00E5 16r00E7 + 16r00EA 16r00EB 16r00E8 16r00EF 16r00EE 16r00EC 16r00C4 16r00C5 + 16r00C9 16r00E6 16r00C6 16r00F4 16r00F6 16r00F2 16r00FB 16r00F9 + 16r00FF 16r00D6 16r00DC 16r00F8 16r00A3 16r00D8 16r00D7 16r0192 + 16r00E1 16r00ED 16r00F3 16r00FA 16r00F1 16r00D1 16r00AA 16r00BA + 16r00BF 16r00AE 16r00AC 16r00BD 16r00BC 16r00A1 16r00AB 16r00BB + 16r2591 16r2592 16r2593 16r2502 16r2524 16r00C1 16r00C2 16r00C0 + 16r00A9 16r2563 16r2551 16r2557 16r255D 16r00A2 16r00A5 16r2510 + 16r2514 16r2534 16r252C 16r251C 16r2500 16r253C 16r00E3 16r00C3 + 16r255A 16r2554 16r2569 16r2566 16r2560 16r2550 16r256C 16r00A4 + 16r00F0 16r00D0 16r00CA 16r00CB 16r00C8 16r0131 16r00CD 16r00CE + 16r00CF 16r2518 16r250C 16r2588 16r2584 16r00A6 16r00CC 16r2580 + 16r00D3 16r00DF 16r00D4 16r00D2 16r00F5 16r00D5 16r00B5 16r00FE + 16r00DE 16r00DA 16r00DB 16r00D9 16r00FD 16r00DD 16r00AF 16r00B4 + 16r00AD 16r00B1 16r2017 16r00BE 16r00B6 16r00A7 16r00F7 16r00B8 + 16r00B0 16r00A8 16r00B7 16r00B9 16r00B3 16r00B2 16r25A0 16r00A0 ) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/cp866Mapping.st b/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/cp866Mapping.st new file mode 100644 index 000000000..682f8d6d8 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/cp866Mapping.st @@ -0,0 +1,21 @@ +mappings +cp866Mapping + "self generateByteToUnicodeSpec: 'http://unicode.org/Public/MAPPINGS/VENDORS/MICSFT/PC/CP866.TXT'" + + ^ #( + 16r0410 16r0411 16r0412 16r0413 16r0414 16r0415 16r0416 16r0417 + 16r0418 16r0419 16r041A 16r041B 16r041C 16r041D 16r041E 16r041F + 16r0420 16r0421 16r0422 16r0423 16r0424 16r0425 16r0426 16r0427 + 16r0428 16r0429 16r042A 16r042B 16r042C 16r042D 16r042E 16r042F + 16r0430 16r0431 16r0432 16r0433 16r0434 16r0435 16r0436 16r0437 + 16r0438 16r0439 16r043A 16r043B 16r043C 16r043D 16r043E 16r043F + 16r2591 16r2592 16r2593 16r2502 16r2524 16r2561 16r2562 16r2556 + 16r2555 16r2563 16r2551 16r2557 16r255D 16r255C 16r255B 16r2510 + 16r2514 16r2534 16r252C 16r251C 16r2500 16r253C 16r255E 16r255F + 16r255A 16r2554 16r2569 16r2566 16r2560 16r2550 16r256C 16r2567 + 16r2568 16r2564 16r2565 16r2559 16r2558 16r2552 16r2553 16r256B + 16r256A 16r2518 16r250C 16r2588 16r2584 16r258C 16r2590 16r2580 + 16r0440 16r0441 16r0442 16r0443 16r0444 16r0445 16r0446 16r0447 + 16r0448 16r0449 16r044A 16r044B 16r044C 16r044D 16r044E 16r044F + 16r0401 16r0451 16r0404 16r0454 16r0407 16r0457 16r040E 16r045E + 16r00B0 16r2219 16r00B7 16r221A 16r2116 16r00A4 16r25A0 16r00A0 ) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/cp874Mapping.st b/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/cp874Mapping.st new file mode 100644 index 000000000..3aa1e09ab --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/cp874Mapping.st @@ -0,0 +1,21 @@ +mappings +cp874Mapping + "self generateByteToUnicodeSpec: 'http://unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP874.TXT'" + + ^ #( + 16r20AC nil nil nil nil 16r2026 nil nil + nil nil nil nil nil nil nil nil + nil 16r2018 16r2019 16r201C 16r201D 16r2022 16r2013 16r2014 + nil nil nil nil nil nil nil nil + 16r00A0 16r0E01 16r0E02 16r0E03 16r0E04 16r0E05 16r0E06 16r0E07 + 16r0E08 16r0E09 16r0E0A 16r0E0B 16r0E0C 16r0E0D 16r0E0E 16r0E0F + 16r0E10 16r0E11 16r0E12 16r0E13 16r0E14 16r0E15 16r0E16 16r0E17 + 16r0E18 16r0E19 16r0E1A 16r0E1B 16r0E1C 16r0E1D 16r0E1E 16r0E1F + 16r0E20 16r0E21 16r0E22 16r0E23 16r0E24 16r0E25 16r0E26 16r0E27 + 16r0E28 16r0E29 16r0E2A 16r0E2B 16r0E2C 16r0E2D 16r0E2E 16r0E2F + 16r0E30 16r0E31 16r0E32 16r0E33 16r0E34 16r0E35 16r0E36 16r0E37 + 16r0E38 16r0E39 16r0E3A nil nil nil nil 16r0E3F + 16r0E40 16r0E41 16r0E42 16r0E43 16r0E44 16r0E45 16r0E46 16r0E47 + 16r0E48 16r0E49 16r0E4A 16r0E4B 16r0E4C 16r0E4D 16r0E4E 16r0E4F + 16r0E50 16r0E51 16r0E52 16r0E53 16r0E54 16r0E55 16r0E56 16r0E57 + 16r0E58 16r0E59 16r0E5A 16r0E5B nil nil nil nil ) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/generateByteToUnicodeSpec..st b/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/generateByteToUnicodeSpec..st index 3dccf8efe..5fe9cc9c8 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/generateByteToUnicodeSpec..st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/generateByteToUnicodeSpec..st @@ -1,16 +1,17 @@ -accessing +utilties generateByteToUnicodeSpec: url - "Return the formatted source code for an array mapping + "Return the formatted source code for an array mapping the top 128 byte to unicode values from a Unicode.org url" "self generateByteToUnicodeSpec: 'http://unicode.org/Public/MAPPINGS/ISO8859/8859-2.TXT'." | mapping | - mapping := self parseUnicodeOrgSpec: url. + mapping := self parseUnicodeOrgSpec: url. ^ String streamContents: [ :stream | - stream tab; << '"'; << 'self generateByteToUnicodeSpec: '; print: url; << '"'; cr; cr; tab; << '^ #('. - 128 to: 255 do: [ :each | | unicode | - each \\ 8 = 0 ifTrue: [ stream cr; tab ]. - (unicode := mapping at: each ifAbsent: [ nil ]) isNil - ifTrue: [ stream print: nil; space ] - ifFalse: [ stream << '16r' << (unicode printPaddedWith: $0 to: 4 base: 16); space ] ]. - stream nextPut: $); cr ] \ No newline at end of file + stream tab; << '"'; << 'self generateByteToUnicodeSpec: '; print: url; << '"'; cr; cr; tab; << '^ #('. + (self top128FromUnicodeSpec: mapping) doWithIndex: [ :each :index | + index - 1 \\ 8 = 0 ifTrue: [ stream cr; tab ]. + each + ifNil: [ stream print: nil; space ] + ifNotNil: [ (stream << '16r') << (each printPaddedWith: $0 to: 4 base: 16); space ] + ]. + stream nextPut: $); cr ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/handlesEncoding..st b/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/handlesEncoding..st deleted file mode 100644 index ccdf7c724..000000000 --- a/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/handlesEncoding..st +++ /dev/null @@ -1,5 +0,0 @@ -accessing -handlesEncoding: string - "Return true when my instances handle the encoding described by string" - - ^ ByteTextConverters includesKey: string \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/initialize.st b/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/initialize.st deleted file mode 100644 index 8ae3917e2..000000000 --- a/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/initialize.st +++ /dev/null @@ -1,7 +0,0 @@ -class initialization -initialize - "Initialize and cache the converters that I know of. - This method must be changed to make sure it runs - when loading in images where it is already present." - - self initializeByteTextConverters \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/initializeByteTextConverters.st b/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/initializeByteTextConverters.st deleted file mode 100644 index ada8c4ee0..000000000 --- a/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/initializeByteTextConverters.st +++ /dev/null @@ -1,10 +0,0 @@ -private -initializeByteTextConverters - "Initialize and cache convertors based on specifications in methods that were autogenerated." - - ByteTextConverters := Dictionary new. - self mappingToIdentifiers - keysAndValuesDo: [ :mapping :identifiers | - | tables | - tables := self tablesFromSpec: (self perform: mapping). - identifiers do: [ :each | ByteTextConverters at: each put: tables ] ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/iso885910Mapping.st b/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/iso885910Mapping.st new file mode 100644 index 000000000..5c2c0d7f1 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/iso885910Mapping.st @@ -0,0 +1,21 @@ +mappings +iso885910Mapping + "self generateByteToUnicodeSpec: 'http://unicode.org/Public/MAPPINGS/ISO8859/8859-10.TXT'" + + ^ #( + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + 16r00A0 16r0104 16r0112 16r0122 16r012A 16r0128 16r0136 16r00A7 + 16r013B 16r0110 16r0160 16r0166 16r017D 16r00AD 16r016A 16r014A + 16r00B0 16r0105 16r0113 16r0123 16r012B 16r0129 16r0137 16r00B7 + 16r013C 16r0111 16r0161 16r0167 16r017E 16r2015 16r016B 16r014B + 16r0100 16r00C1 16r00C2 16r00C3 16r00C4 16r00C5 16r00C6 16r012E + 16r010C 16r00C9 16r0118 16r00CB 16r0116 16r00CD 16r00CE 16r00CF + 16r00D0 16r0145 16r014C 16r00D3 16r00D4 16r00D5 16r00D6 16r0168 + 16r00D8 16r0172 16r00DA 16r00DB 16r00DC 16r00DD 16r00DE 16r00DF + 16r0101 16r00E1 16r00E2 16r00E3 16r00E4 16r00E5 16r00E6 16r012F + 16r010D 16r00E9 16r0119 16r00EB 16r0117 16r00ED 16r00EE 16r00EF + 16r00F0 16r0146 16r014D 16r00F3 16r00F4 16r00F5 16r00F6 16r0169 + 16r00F8 16r0173 16r00FA 16r00FB 16r00FC 16r00FD 16r00FE 16r0138 ) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/iso885913Mapping.st b/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/iso885913Mapping.st new file mode 100644 index 000000000..984860645 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/iso885913Mapping.st @@ -0,0 +1,21 @@ +mappings +iso885913Mapping + "self generateByteToUnicodeSpec: 'http://unicode.org/Public/MAPPINGS/ISO8859/8859-13.TXT'" + + ^ #( + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + 16r00A0 16r201D 16r00A2 16r00A3 16r00A4 16r201E 16r00A6 16r00A7 + 16r00D8 16r00A9 16r0156 16r00AB 16r00AC 16r00AD 16r00AE 16r00C6 + 16r00B0 16r00B1 16r00B2 16r00B3 16r201C 16r00B5 16r00B6 16r00B7 + 16r00F8 16r00B9 16r0157 16r00BB 16r00BC 16r00BD 16r00BE 16r00E6 + 16r0104 16r012E 16r0100 16r0106 16r00C4 16r00C5 16r0118 16r0112 + 16r010C 16r00C9 16r0179 16r0116 16r0122 16r0136 16r012A 16r013B + 16r0160 16r0143 16r0145 16r00D3 16r014C 16r00D5 16r00D6 16r00D7 + 16r0172 16r0141 16r015A 16r016A 16r00DC 16r017B 16r017D 16r00DF + 16r0105 16r012F 16r0101 16r0107 16r00E4 16r00E5 16r0119 16r0113 + 16r010D 16r00E9 16r017A 16r0117 16r0123 16r0137 16r012B 16r013C + 16r0161 16r0144 16r0146 16r00F3 16r014D 16r00F5 16r00F6 16r00F7 + 16r0173 16r0142 16r015B 16r016B 16r00FC 16r017C 16r017E 16r2019 ) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/iso885914Mapping.st b/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/iso885914Mapping.st new file mode 100644 index 000000000..5291921ee --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/iso885914Mapping.st @@ -0,0 +1,21 @@ +mappings +iso885914Mapping + "self generateByteToUnicodeSpec: 'http://unicode.org/Public/MAPPINGS/ISO8859/8859-14.TXT'" + + ^ #( + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + 16r00A0 16r1E02 16r1E03 16r00A3 16r010A 16r010B 16r1E0A 16r00A7 + 16r1E80 16r00A9 16r1E82 16r1E0B 16r1EF2 16r00AD 16r00AE 16r0178 + 16r1E1E 16r1E1F 16r0120 16r0121 16r1E40 16r1E41 16r00B6 16r1E56 + 16r1E81 16r1E57 16r1E83 16r1E60 16r1EF3 16r1E84 16r1E85 16r1E61 + 16r00C0 16r00C1 16r00C2 16r00C3 16r00C4 16r00C5 16r00C6 16r00C7 + 16r00C8 16r00C9 16r00CA 16r00CB 16r00CC 16r00CD 16r00CE 16r00CF + 16r0174 16r00D1 16r00D2 16r00D3 16r00D4 16r00D5 16r00D6 16r1E6A + 16r00D8 16r00D9 16r00DA 16r00DB 16r00DC 16r00DD 16r0176 16r00DF + 16r00E0 16r00E1 16r00E2 16r00E3 16r00E4 16r00E5 16r00E6 16r00E7 + 16r00E8 16r00E9 16r00EA 16r00EB 16r00EC 16r00ED 16r00EE 16r00EF + 16r0175 16r00F1 16r00F2 16r00F3 16r00F4 16r00F5 16r00F6 16r1E6B + 16r00F8 16r00F9 16r00FA 16r00FB 16r00FC 16r00FD 16r0177 16r00FF ) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/iso885915Mapping.st b/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/iso885915Mapping.st index 65f2a3d50..83664a98b 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/iso885915Mapping.st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/iso885915Mapping.st @@ -3,19 +3,19 @@ iso885915Mapping "self generateByteToUnicodeSpec: 'http://unicode.org/Public/MAPPINGS/ISO8859/8859-15.TXT'" ^ #( - nil nil nil nil nil nil nil nil - nil nil nil nil nil nil nil nil - nil nil nil nil nil nil nil nil - nil nil nil nil nil nil nil nil - 16r00A0 16r00A1 16r00A2 16r00A3 16r20AC 16r00A5 16r0160 16r00A7 - 16r0161 16r00A9 16r00AA 16r00AB 16r00AC 16r00AD 16r00AE 16r00AF - 16r00B0 16r00B1 16r00B2 16r00B3 16r017D 16r00B5 16r00B6 16r00B7 - 16r017E 16r00B9 16r00BA 16r00BB 16r0152 16r0153 16r0178 16r00BF - 16r00C0 16r00C1 16r00C2 16r00C3 16r00C4 16r00C5 16r00C6 16r00C7 - 16r00C8 16r00C9 16r00CA 16r00CB 16r00CC 16r00CD 16r00CE 16r00CF - 16r00D0 16r00D1 16r00D2 16r00D3 16r00D4 16r00D5 16r00D6 16r00D7 - 16r00D8 16r00D9 16r00DA 16r00DB 16r00DC 16r00DD 16r00DE 16r00DF - 16r00E0 16r00E1 16r00E2 16r00E3 16r00E4 16r00E5 16r00E6 16r00E7 - 16r00E8 16r00E9 16r00EA 16r00EB 16r00EC 16r00ED 16r00EE 16r00EF - 16r00F0 16r00F1 16r00F2 16r00F3 16r00F4 16r00F5 16r00F6 16r00F7 + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + 16r00A0 16r00A1 16r00A2 16r00A3 16r20AC 16r00A5 16r0160 16r00A7 + 16r0161 16r00A9 16r00AA 16r00AB 16r00AC 16r00AD 16r00AE 16r00AF + 16r00B0 16r00B1 16r00B2 16r00B3 16r017D 16r00B5 16r00B6 16r00B7 + 16r017E 16r00B9 16r00BA 16r00BB 16r0152 16r0153 16r0178 16r00BF + 16r00C0 16r00C1 16r00C2 16r00C3 16r00C4 16r00C5 16r00C6 16r00C7 + 16r00C8 16r00C9 16r00CA 16r00CB 16r00CC 16r00CD 16r00CE 16r00CF + 16r00D0 16r00D1 16r00D2 16r00D3 16r00D4 16r00D5 16r00D6 16r00D7 + 16r00D8 16r00D9 16r00DA 16r00DB 16r00DC 16r00DD 16r00DE 16r00DF + 16r00E0 16r00E1 16r00E2 16r00E3 16r00E4 16r00E5 16r00E6 16r00E7 + 16r00E8 16r00E9 16r00EA 16r00EB 16r00EC 16r00ED 16r00EE 16r00EF + 16r00F0 16r00F1 16r00F2 16r00F3 16r00F4 16r00F5 16r00F6 16r00F7 16r00F8 16r00F9 16r00FA 16r00FB 16r00FC 16r00FD 16r00FE 16r00FF ) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/iso885916Mapping.st b/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/iso885916Mapping.st new file mode 100644 index 000000000..7214ef6af --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/iso885916Mapping.st @@ -0,0 +1,21 @@ +mappings +iso885916Mapping + "self generateByteToUnicodeSpec: 'http://unicode.org/Public/MAPPINGS/ISO8859/8859-16.TXT'" + + ^ #( + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + 16r00A0 16r0104 16r0105 16r0141 16r20AC 16r201E 16r0160 16r00A7 + 16r0161 16r00A9 16r0218 16r00AB 16r0179 16r00AD 16r017A 16r017B + 16r00B0 16r00B1 16r010C 16r0142 16r017D 16r201D 16r00B6 16r00B7 + 16r017E 16r010D 16r0219 16r00BB 16r0152 16r0153 16r0178 16r017C + 16r00C0 16r00C1 16r00C2 16r0102 16r00C4 16r0106 16r00C6 16r00C7 + 16r00C8 16r00C9 16r00CA 16r00CB 16r00CC 16r00CD 16r00CE 16r00CF + 16r0110 16r0143 16r00D2 16r00D3 16r00D4 16r0150 16r00D6 16r015A + 16r0170 16r00D9 16r00DA 16r00DB 16r00DC 16r0118 16r021A 16r00DF + 16r00E0 16r00E1 16r00E2 16r0103 16r00E4 16r0107 16r00E6 16r00E7 + 16r00E8 16r00E9 16r00EA 16r00EB 16r00EC 16r00ED 16r00EE 16r00EF + 16r0111 16r0144 16r00F2 16r00F3 16r00F4 16r0151 16r00F6 16r015B + 16r0171 16r00F9 16r00FA 16r00FB 16r00FC 16r0119 16r021B 16r00FF ) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/iso88591Mapping.st b/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/iso88591Mapping.st deleted file mode 100644 index 702842600..000000000 --- a/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/iso88591Mapping.st +++ /dev/null @@ -1,21 +0,0 @@ -mappings -iso88591Mapping - "self generateByteToUnicodeSpec: 'http://unicode.org/Public/MAPPINGS/ISO8859/8859-1.TXT'" - - ^ #( - nil nil nil nil nil nil nil nil - nil nil nil nil nil nil nil nil - nil nil nil nil nil nil nil nil - nil nil nil nil nil nil nil nil - 16r00A0 16r00A1 16r00A2 16r00A3 16r00A4 16r00A5 16r00A6 16r00A7 - 16r00A8 16r00A9 16r00AA 16r00AB 16r00AC 16r00AD 16r00AE 16r00AF - 16r00B0 16r00B1 16r00B2 16r00B3 16r00B4 16r00B5 16r00B6 16r00B7 - 16r00B8 16r00B9 16r00BA 16r00BB 16r00BC 16r00BD 16r00BE 16r00BF - 16r00C0 16r00C1 16r00C2 16r00C3 16r00C4 16r00C5 16r00C6 16r00C7 - 16r00C8 16r00C9 16r00CA 16r00CB 16r00CC 16r00CD 16r00CE 16r00CF - 16r00D0 16r00D1 16r00D2 16r00D3 16r00D4 16r00D5 16r00D6 16r00D7 - 16r00D8 16r00D9 16r00DA 16r00DB 16r00DC 16r00DD 16r00DE 16r00DF - 16r00E0 16r00E1 16r00E2 16r00E3 16r00E4 16r00E5 16r00E6 16r00E7 - 16r00E8 16r00E9 16r00EA 16r00EB 16r00EC 16r00ED 16r00EE 16r00EF - 16r00F0 16r00F1 16r00F2 16r00F3 16r00F4 16r00F5 16r00F6 16r00F7 - 16r00F8 16r00F9 16r00FA 16r00FB 16r00FC 16r00FD 16r00FE 16r00FF ) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/iso88592Mapping.st b/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/iso88592Mapping.st index 0f92e0f95..25edd743b 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/iso88592Mapping.st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/iso88592Mapping.st @@ -3,19 +3,19 @@ iso88592Mapping "self generateByteToUnicodeSpec: 'http://unicode.org/Public/MAPPINGS/ISO8859/8859-2.TXT'" ^ #( - nil nil nil nil nil nil nil nil - nil nil nil nil nil nil nil nil - nil nil nil nil nil nil nil nil - nil nil nil nil nil nil nil nil - 16r00A0 16r0104 16r02D8 16r0141 16r00A4 16r013D 16r015A 16r00A7 - 16r00A8 16r0160 16r015E 16r0164 16r0179 16r00AD 16r017D 16r017B - 16r00B0 16r0105 16r02DB 16r0142 16r00B4 16r013E 16r015B 16r02C7 - 16r00B8 16r0161 16r015F 16r0165 16r017A 16r02DD 16r017E 16r017C - 16r0154 16r00C1 16r00C2 16r0102 16r00C4 16r0139 16r0106 16r00C7 - 16r010C 16r00C9 16r0118 16r00CB 16r011A 16r00CD 16r00CE 16r010E - 16r0110 16r0143 16r0147 16r00D3 16r00D4 16r0150 16r00D6 16r00D7 - 16r0158 16r016E 16r00DA 16r0170 16r00DC 16r00DD 16r0162 16r00DF - 16r0155 16r00E1 16r00E2 16r0103 16r00E4 16r013A 16r0107 16r00E7 - 16r010D 16r00E9 16r0119 16r00EB 16r011B 16r00ED 16r00EE 16r010F - 16r0111 16r0144 16r0148 16r00F3 16r00F4 16r0151 16r00F6 16r00F7 + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + 16r00A0 16r0104 16r02D8 16r0141 16r00A4 16r013D 16r015A 16r00A7 + 16r00A8 16r0160 16r015E 16r0164 16r0179 16r00AD 16r017D 16r017B + 16r00B0 16r0105 16r02DB 16r0142 16r00B4 16r013E 16r015B 16r02C7 + 16r00B8 16r0161 16r015F 16r0165 16r017A 16r02DD 16r017E 16r017C + 16r0154 16r00C1 16r00C2 16r0102 16r00C4 16r0139 16r0106 16r00C7 + 16r010C 16r00C9 16r0118 16r00CB 16r011A 16r00CD 16r00CE 16r010E + 16r0110 16r0143 16r0147 16r00D3 16r00D4 16r0150 16r00D6 16r00D7 + 16r0158 16r016E 16r00DA 16r0170 16r00DC 16r00DD 16r0162 16r00DF + 16r0155 16r00E1 16r00E2 16r0103 16r00E4 16r013A 16r0107 16r00E7 + 16r010D 16r00E9 16r0119 16r00EB 16r011B 16r00ED 16r00EE 16r010F + 16r0111 16r0144 16r0148 16r00F3 16r00F4 16r0151 16r00F6 16r00F7 16r0159 16r016F 16r00FA 16r0171 16r00FC 16r00FD 16r0163 16r02D9 ) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/iso88593Mapping.st b/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/iso88593Mapping.st new file mode 100644 index 000000000..074d3b189 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/iso88593Mapping.st @@ -0,0 +1,21 @@ +mappings +iso88593Mapping + "self generateByteToUnicodeSpec: 'http://unicode.org/Public/MAPPINGS/ISO8859/8859-3.TXT'" + + ^ #( + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + 16r00A0 16r0126 16r02D8 16r00A3 16r00A4 nil 16r0124 16r00A7 + 16r00A8 16r0130 16r015E 16r011E 16r0134 16r00AD nil 16r017B + 16r00B0 16r0127 16r00B2 16r00B3 16r00B4 16r00B5 16r0125 16r00B7 + 16r00B8 16r0131 16r015F 16r011F 16r0135 16r00BD nil 16r017C + 16r00C0 16r00C1 16r00C2 nil 16r00C4 16r010A 16r0108 16r00C7 + 16r00C8 16r00C9 16r00CA 16r00CB 16r00CC 16r00CD 16r00CE 16r00CF + nil 16r00D1 16r00D2 16r00D3 16r00D4 16r0120 16r00D6 16r00D7 + 16r011C 16r00D9 16r00DA 16r00DB 16r00DC 16r016C 16r015C 16r00DF + 16r00E0 16r00E1 16r00E2 nil 16r00E4 16r010B 16r0109 16r00E7 + 16r00E8 16r00E9 16r00EA 16r00EB 16r00EC 16r00ED 16r00EE 16r00EF + nil 16r00F1 16r00F2 16r00F3 16r00F4 16r0121 16r00F6 16r00F7 + 16r011D 16r00F9 16r00FA 16r00FB 16r00FC 16r016D 16r015D 16r02D9 ) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/iso88594Mapping.st b/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/iso88594Mapping.st new file mode 100644 index 000000000..79773dd63 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/iso88594Mapping.st @@ -0,0 +1,21 @@ +mappings +iso88594Mapping + "self generateByteToUnicodeSpec: 'http://unicode.org/Public/MAPPINGS/ISO8859/8859-4.TXT'" + + ^ #( + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + 16r00A0 16r0104 16r0138 16r0156 16r00A4 16r0128 16r013B 16r00A7 + 16r00A8 16r0160 16r0112 16r0122 16r0166 16r00AD 16r017D 16r00AF + 16r00B0 16r0105 16r02DB 16r0157 16r00B4 16r0129 16r013C 16r02C7 + 16r00B8 16r0161 16r0113 16r0123 16r0167 16r014A 16r017E 16r014B + 16r0100 16r00C1 16r00C2 16r00C3 16r00C4 16r00C5 16r00C6 16r012E + 16r010C 16r00C9 16r0118 16r00CB 16r0116 16r00CD 16r00CE 16r012A + 16r0110 16r0145 16r014C 16r0136 16r00D4 16r00D5 16r00D6 16r00D7 + 16r00D8 16r0172 16r00DA 16r00DB 16r00DC 16r0168 16r016A 16r00DF + 16r0101 16r00E1 16r00E2 16r00E3 16r00E4 16r00E5 16r00E6 16r012F + 16r010D 16r00E9 16r0119 16r00EB 16r0117 16r00ED 16r00EE 16r012B + 16r0111 16r0146 16r014D 16r0137 16r00F4 16r00F5 16r00F6 16r00F7 + 16r00F8 16r0173 16r00FA 16r00FB 16r00FC 16r0169 16r016B 16r02D9 ) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/iso88595Mapping.st b/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/iso88595Mapping.st new file mode 100644 index 000000000..14d98c15c --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/iso88595Mapping.st @@ -0,0 +1,21 @@ +mappings +iso88595Mapping + "self generateByteToUnicodeSpec: 'http://unicode.org/Public/MAPPINGS/ISO8859/8859-5.TXT'" + + ^ #( + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + 16r00A0 16r0401 16r0402 16r0403 16r0404 16r0405 16r0406 16r0407 + 16r0408 16r0409 16r040A 16r040B 16r040C 16r00AD 16r040E 16r040F + 16r0410 16r0411 16r0412 16r0413 16r0414 16r0415 16r0416 16r0417 + 16r0418 16r0419 16r041A 16r041B 16r041C 16r041D 16r041E 16r041F + 16r0420 16r0421 16r0422 16r0423 16r0424 16r0425 16r0426 16r0427 + 16r0428 16r0429 16r042A 16r042B 16r042C 16r042D 16r042E 16r042F + 16r0430 16r0431 16r0432 16r0433 16r0434 16r0435 16r0436 16r0437 + 16r0438 16r0439 16r043A 16r043B 16r043C 16r043D 16r043E 16r043F + 16r0440 16r0441 16r0442 16r0443 16r0444 16r0445 16r0446 16r0447 + 16r0448 16r0449 16r044A 16r044B 16r044C 16r044D 16r044E 16r044F + 16r2116 16r0451 16r0452 16r0453 16r0454 16r0455 16r0456 16r0457 + 16r0458 16r0459 16r045A 16r045B 16r045C 16r00A7 16r045E 16r045F ) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/iso88596Mapping.st b/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/iso88596Mapping.st new file mode 100644 index 000000000..88f033ff5 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/iso88596Mapping.st @@ -0,0 +1,21 @@ +mappings +iso88596Mapping + "self generateByteToUnicodeSpec: 'http://unicode.org/Public/MAPPINGS/ISO8859/8859-6.TXT'" + + ^ #( + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + 16r00A0 nil nil nil 16r00A4 nil nil nil + nil nil nil nil 16r060C 16r00AD nil nil + nil nil nil nil nil nil nil nil + nil nil nil 16r061B nil nil nil 16r061F + nil 16r0621 16r0622 16r0623 16r0624 16r0625 16r0626 16r0627 + 16r0628 16r0629 16r062A 16r062B 16r062C 16r062D 16r062E 16r062F + 16r0630 16r0631 16r0632 16r0633 16r0634 16r0635 16r0636 16r0637 + 16r0638 16r0639 16r063A nil nil nil nil nil + 16r0640 16r0641 16r0642 16r0643 16r0644 16r0645 16r0646 16r0647 + 16r0648 16r0649 16r064A 16r064B 16r064C 16r064D 16r064E 16r064F + 16r0650 16r0651 16r0652 nil nil nil nil nil + nil nil nil nil nil nil nil nil ) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/iso88597Mapping.st b/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/iso88597Mapping.st index 2d910cc2c..bfb028ace 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/iso88597Mapping.st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/iso88597Mapping.st @@ -3,19 +3,19 @@ iso88597Mapping "self generateByteToUnicodeSpec: 'http://unicode.org/Public/MAPPINGS/ISO8859/8859-7.TXT'" ^ #( - nil nil nil nil nil nil nil nil - nil nil nil nil nil nil nil nil - nil nil nil nil nil nil nil nil - nil nil nil nil nil nil nil nil - 16r00A0 16r2018 16r2019 16r00A3 16r20AC 16r20AF 16r00A6 16r00A7 - 16r00A8 16r00A9 16r037A 16r00AB 16r00AC 16r00AD nil 16r2015 - 16r00B0 16r00B1 16r00B2 16r00B3 16r0384 16r0385 16r0386 16r00B7 - 16r0388 16r0389 16r038A 16r00BB 16r038C 16r00BD 16r038E 16r038F - 16r0390 16r0391 16r0392 16r0393 16r0394 16r0395 16r0396 16r0397 - 16r0398 16r0399 16r039A 16r039B 16r039C 16r039D 16r039E 16r039F - 16r03A0 16r03A1 nil 16r03A3 16r03A4 16r03A5 16r03A6 16r03A7 - 16r03A8 16r03A9 16r03AA 16r03AB 16r03AC 16r03AD 16r03AE 16r03AF - 16r03B0 16r03B1 16r03B2 16r03B3 16r03B4 16r03B5 16r03B6 16r03B7 - 16r03B8 16r03B9 16r03BA 16r03BB 16r03BC 16r03BD 16r03BE 16r03BF - 16r03C0 16r03C1 16r03C2 16r03C3 16r03C4 16r03C5 16r03C6 16r03C7 + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + 16r00A0 16r2018 16r2019 16r00A3 16r20AC 16r20AF 16r00A6 16r00A7 + 16r00A8 16r00A9 16r037A 16r00AB 16r00AC 16r00AD nil 16r2015 + 16r00B0 16r00B1 16r00B2 16r00B3 16r0384 16r0385 16r0386 16r00B7 + 16r0388 16r0389 16r038A 16r00BB 16r038C 16r00BD 16r038E 16r038F + 16r0390 16r0391 16r0392 16r0393 16r0394 16r0395 16r0396 16r0397 + 16r0398 16r0399 16r039A 16r039B 16r039C 16r039D 16r039E 16r039F + 16r03A0 16r03A1 nil 16r03A3 16r03A4 16r03A5 16r03A6 16r03A7 + 16r03A8 16r03A9 16r03AA 16r03AB 16r03AC 16r03AD 16r03AE 16r03AF + 16r03B0 16r03B1 16r03B2 16r03B3 16r03B4 16r03B5 16r03B6 16r03B7 + 16r03B8 16r03B9 16r03BA 16r03BB 16r03BC 16r03BD 16r03BE 16r03BF + 16r03C0 16r03C1 16r03C2 16r03C3 16r03C4 16r03C5 16r03C6 16r03C7 16r03C8 16r03C9 16r03CA 16r03CB 16r03CC 16r03CD 16r03CE nil ) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/iso88598Mapping.st b/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/iso88598Mapping.st new file mode 100644 index 000000000..8ff25afcf --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/iso88598Mapping.st @@ -0,0 +1,21 @@ +mappings +iso88598Mapping + "self generateByteToUnicodeSpec: 'http://unicode.org/Public/MAPPINGS/ISO8859/8859-8.TXT'" + + ^ #( + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + 16r00A0 nil 16r00A2 16r00A3 16r00A4 16r00A5 16r00A6 16r00A7 + 16r00A8 16r00A9 16r00D7 16r00AB 16r00AC 16r00AD 16r00AE 16r00AF + 16r00B0 16r00B1 16r00B2 16r00B3 16r00B4 16r00B5 16r00B6 16r00B7 + 16r00B8 16r00B9 16r00F7 16r00BB 16r00BC 16r00BD 16r00BE nil + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil 16r2017 + 16r05D0 16r05D1 16r05D2 16r05D3 16r05D4 16r05D5 16r05D6 16r05D7 + 16r05D8 16r05D9 16r05DA 16r05DB 16r05DC 16r05DD 16r05DE 16r05DF + 16r05E0 16r05E1 16r05E2 16r05E3 16r05E4 16r05E5 16r05E6 16r05E7 + 16r05E8 16r05E9 16r05EA nil nil 16r200E 16r200F nil ) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/koi8rMapping.st b/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/koi8rMapping.st index b3ec828b6..731276915 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/koi8rMapping.st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/koi8rMapping.st @@ -3,19 +3,19 @@ koi8rMapping "self generateByteToUnicodeSpec: 'http://unicode.org/Public/MAPPINGS/VENDORS/MISC/KOI8-R.TXT'" ^ #( - 16r2500 16r2502 16r250C 16r2510 16r2514 16r2518 16r251C 16r2524 - 16r252C 16r2534 16r253C 16r2580 16r2584 16r2588 16r258C 16r2590 - 16r2591 16r2592 16r2593 16r2320 16r25A0 16r2219 16r221A 16r2248 - 16r2264 16r2265 16r00A0 16r2321 16r00B0 16r00B2 16r00B7 16r00F7 - 16r2550 16r2551 16r2552 16r0451 16r2553 16r2554 16r2555 16r2556 - 16r2557 16r2558 16r2559 16r255A 16r255B 16r255C 16r255D 16r255E - 16r255F 16r2560 16r2561 16r0401 16r2562 16r2563 16r2564 16r2565 - 16r2566 16r2567 16r2568 16r2569 16r256A 16r256B 16r256C 16r00A9 - 16r044E 16r0430 16r0431 16r0446 16r0434 16r0435 16r0444 16r0433 - 16r0445 16r0438 16r0439 16r043A 16r043B 16r043C 16r043D 16r043E - 16r043F 16r044F 16r0440 16r0441 16r0442 16r0443 16r0436 16r0432 - 16r044C 16r044B 16r0437 16r0448 16r044D 16r0449 16r0447 16r044A - 16r042E 16r0410 16r0411 16r0426 16r0414 16r0415 16r0424 16r0413 - 16r0425 16r0418 16r0419 16r041A 16r041B 16r041C 16r041D 16r041E - 16r041F 16r042F 16r0420 16r0421 16r0422 16r0423 16r0416 16r0412 + 16r2500 16r2502 16r250C 16r2510 16r2514 16r2518 16r251C 16r2524 + 16r252C 16r2534 16r253C 16r2580 16r2584 16r2588 16r258C 16r2590 + 16r2591 16r2592 16r2593 16r2320 16r25A0 16r2219 16r221A 16r2248 + 16r2264 16r2265 16r00A0 16r2321 16r00B0 16r00B2 16r00B7 16r00F7 + 16r2550 16r2551 16r2552 16r0451 16r2553 16r2554 16r2555 16r2556 + 16r2557 16r2558 16r2559 16r255A 16r255B 16r255C 16r255D 16r255E + 16r255F 16r2560 16r2561 16r0401 16r2562 16r2563 16r2564 16r2565 + 16r2566 16r2567 16r2568 16r2569 16r256A 16r256B 16r256C 16r00A9 + 16r044E 16r0430 16r0431 16r0446 16r0434 16r0435 16r0444 16r0433 + 16r0445 16r0438 16r0439 16r043A 16r043B 16r043C 16r043D 16r043E + 16r043F 16r044F 16r0440 16r0441 16r0442 16r0443 16r0436 16r0432 + 16r044C 16r044B 16r0437 16r0448 16r044D 16r0449 16r0447 16r044A + 16r042E 16r0410 16r0411 16r0426 16r0414 16r0415 16r0424 16r0413 + 16r0425 16r0418 16r0419 16r041A 16r041B 16r041C 16r041D 16r041E + 16r041F 16r042F 16r0420 16r0421 16r0422 16r0423 16r0416 16r0412 16r042C 16r042B 16r0417 16r0428 16r042D 16r0429 16r0427 16r042A ) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/koi8uMapping.st b/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/koi8uMapping.st new file mode 100644 index 000000000..6010eb520 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/koi8uMapping.st @@ -0,0 +1,21 @@ +mappings +koi8uMapping + "self generateByteToUnicodeSpec: 'http://unicode.org/Public/MAPPINGS/VENDORS/MISC/KOI8-U.TXT'" + + ^ #( + 16r2500 16r2502 16r250C 16r2510 16r2514 16r2518 16r251C 16r2524 + 16r252C 16r2534 16r253C 16r2580 16r2584 16r2588 16r258C 16r2590 + 16r2591 16r2592 16r2593 16r2320 16r25A0 16r2219 16r221A 16r2248 + 16r2264 16r2265 16r00A0 16r2321 16r00B0 16r00B2 16r00B7 16r00F7 + 16r2550 16r2551 16r2552 16r0451 16r0454 16r2554 16r0456 16r0457 + 16r2557 16r2558 16r2559 16r255A 16r255B 16r0491 16r255D 16r255E + 16r255F 16r2560 16r2561 16r0401 16r0404 16r2563 16r0406 16r0407 + 16r2566 16r2567 16r2568 16r2569 16r256A 16r0490 16r256C 16r00A9 + 16r044E 16r0430 16r0431 16r0446 16r0434 16r0435 16r0444 16r0433 + 16r0445 16r0438 16r0439 16r043A 16r043B 16r043C 16r043D 16r043E + 16r043F 16r044F 16r0440 16r0441 16r0442 16r0443 16r0436 16r0432 + 16r044C 16r044B 16r0437 16r0448 16r044D 16r0449 16r0447 16r044A + 16r042E 16r0410 16r0411 16r0426 16r0414 16r0415 16r0424 16r0413 + 16r0425 16r0418 16r0419 16r041A 16r041B 16r041C 16r041D 16r041E + 16r041F 16r042F 16r0420 16r0421 16r0422 16r0423 16r0416 16r0412 + 16r042C 16r042B 16r0417 16r0428 16r042D 16r0429 16r0427 16r042A ) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/macCyrillicMapping.st b/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/macCyrillicMapping.st new file mode 100644 index 000000000..8e304ed93 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/macCyrillicMapping.st @@ -0,0 +1,21 @@ +mappings +macCyrillicMapping + "self generateByteToUnicodeSpec: 'http://unicode.org/Public/MAPPINGS/VENDORS/APPLE/CYRILLIC.TXT'" + + ^ #( + 16r0410 16r0411 16r0412 16r0413 16r0414 16r0415 16r0416 16r0417 + 16r0418 16r0419 16r041A 16r041B 16r041C 16r041D 16r041E 16r041F + 16r0420 16r0421 16r0422 16r0423 16r0424 16r0425 16r0426 16r0427 + 16r0428 16r0429 16r042A 16r042B 16r042C 16r042D 16r042E 16r042F + 16r2020 16r00B0 16r0490 16r00A3 16r00A7 16r2022 16r00B6 16r0406 + 16r00AE 16r00A9 16r2122 16r0402 16r0452 16r2260 16r0403 16r0453 + 16r221E 16r00B1 16r2264 16r2265 16r0456 16r00B5 16r0491 16r0408 + 16r0404 16r0454 16r0407 16r0457 16r0409 16r0459 16r040A 16r045A + 16r0458 16r0405 16r00AC 16r221A 16r0192 16r2248 16r2206 16r00AB + 16r00BB 16r2026 16r00A0 16r040B 16r045B 16r040C 16r045C 16r0455 + 16r2013 16r2014 16r201C 16r201D 16r2018 16r2019 16r00F7 16r201E + 16r040E 16r045E 16r040F 16r045F 16r2116 16r0401 16r0451 16r044F + 16r0430 16r0431 16r0432 16r0433 16r0434 16r0435 16r0436 16r0437 + 16r0438 16r0439 16r043A 16r043B 16r043C 16r043D 16r043E 16r043F + 16r0440 16r0441 16r0442 16r0443 16r0444 16r0445 16r0446 16r0447 + 16r0448 16r0449 16r044A 16r044B 16r044C 16r044D 16r044E 16r20AC ) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/macRomanMapping.st b/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/macRomanMapping.st index c09f69f77..83c8a8035 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/macRomanMapping.st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/macRomanMapping.st @@ -3,19 +3,19 @@ macRomanMapping "self generateByteToUnicodeSpec: 'http://unicode.org/Public/MAPPINGS/VENDORS/APPLE/ROMAN.TXT'" ^ #( - 16r00C4 16r00C5 16r00C7 16r00C9 16r00D1 16r00D6 16r00DC 16r00E1 - 16r00E0 16r00E2 16r00E4 16r00E3 16r00E5 16r00E7 16r00E9 16r00E8 - 16r00EA 16r00EB 16r00ED 16r00EC 16r00EE 16r00EF 16r00F1 16r00F3 - 16r00F2 16r00F4 16r00F6 16r00F5 16r00FA 16r00F9 16r00FB 16r00FC - 16r2020 16r00B0 16r00A2 16r00A3 16r00A7 16r2022 16r00B6 16r00DF - 16r00AE 16r00A9 16r2122 16r00B4 16r00A8 16r2260 16r00C6 16r00D8 - 16r221E 16r00B1 16r2264 16r2265 16r00A5 16r00B5 16r2202 16r2211 - 16r220F 16r03C0 16r222B 16r00AA 16r00BA 16r03A9 16r00E6 16r00F8 - 16r00BF 16r00A1 16r00AC 16r221A 16r0192 16r2248 16r2206 16r00AB - 16r00BB 16r2026 16r00A0 16r00C0 16r00C3 16r00D5 16r0152 16r0153 - 16r2013 16r2014 16r201C 16r201D 16r2018 16r2019 16r00F7 16r25CA - 16r00FF 16r0178 16r2044 16r20AC 16r2039 16r203A 16rFB01 16rFB02 - 16r2021 16r00B7 16r201A 16r201E 16r2030 16r00C2 16r00CA 16r00C1 - 16r00CB 16r00C8 16r00CD 16r00CE 16r00CF 16r00CC 16r00D3 16r00D4 - 16rF8FF 16r00D2 16r00DA 16r00DB 16r00D9 16r0131 16r02C6 16r02DC + 16r00C4 16r00C5 16r00C7 16r00C9 16r00D1 16r00D6 16r00DC 16r00E1 + 16r00E0 16r00E2 16r00E4 16r00E3 16r00E5 16r00E7 16r00E9 16r00E8 + 16r00EA 16r00EB 16r00ED 16r00EC 16r00EE 16r00EF 16r00F1 16r00F3 + 16r00F2 16r00F4 16r00F6 16r00F5 16r00FA 16r00F9 16r00FB 16r00FC + 16r2020 16r00B0 16r00A2 16r00A3 16r00A7 16r2022 16r00B6 16r00DF + 16r00AE 16r00A9 16r2122 16r00B4 16r00A8 16r2260 16r00C6 16r00D8 + 16r221E 16r00B1 16r2264 16r2265 16r00A5 16r00B5 16r2202 16r2211 + 16r220F 16r03C0 16r222B 16r00AA 16r00BA 16r03A9 16r00E6 16r00F8 + 16r00BF 16r00A1 16r00AC 16r221A 16r0192 16r2248 16r2206 16r00AB + 16r00BB 16r2026 16r00A0 16r00C0 16r00C3 16r00D5 16r0152 16r0153 + 16r2013 16r2014 16r201C 16r201D 16r2018 16r2019 16r00F7 16r25CA + 16r00FF 16r0178 16r2044 16r20AC 16r2039 16r203A 16rFB01 16rFB02 + 16r2021 16r00B7 16r201A 16r201E 16r2030 16r00C2 16r00CA 16r00C1 + 16r00CB 16r00C8 16r00CD 16r00CE 16r00CF 16r00CC 16r00D3 16r00D4 + 16rF8FF 16r00D2 16r00DA 16r00DB 16r00D9 16r0131 16r02C6 16r02DC 16r00AF 16r02D8 16r02D9 16r02DA 16r00B8 16r02DD 16r02DB 16r02C7 ) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/mappingToIdentifiers.st b/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/mappingToIdentifiers.st index aa746795d..0d59582f8 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/mappingToIdentifiers.st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/mappingToIdentifiers.st @@ -1,14 +1,35 @@ mappings mappingToIdentifiers "Return a dictionay mapping from encoding specifications to a list of encoding names." - + ^ Dictionary newFromPairs: #( - #cp1250Mapping #('cp-1250') - #cp1252Mapping #('cp-1252') - #cp1253Mapping #('cp1253') - #iso885915Mapping #('iso-8859-15') - #iso88591Mapping #('iso-8859-1' 'latin1' 'latin-1') - #iso88592Mapping #('iso-8859-2' 'latin2' 'latin-2') - #iso88597Mapping #('iso-8859-7') - #koi8rMapping #('iso-8859-15') - #macRomanMapping #('mac-roman' 'macintosh') ) \ No newline at end of file + "#asciiMapping #('ascii')" + "#iso88591Mapping #('iso88591' 'latin1')" + #iso88592Mapping #('iso88592' 'latin2') + #iso88593Mapping #('iso88593' 'latin3') + #iso88594Mapping #('iso88594' 'latin4') + #iso88595Mapping #('iso88595' 'cyrillic') + #iso88596Mapping #('iso88596' 'arabic') + #iso88597Mapping #('iso88597' 'greek') + #iso88598Mapping #('iso88598' 'hebrew') + #iso885910Mapping #('iso885910' 'latin6') + #iso885913Mapping #('iso885913') + #iso885914Mapping #('iso885914') + #iso885915Mapping #('iso885915') + #iso885916Mapping #('iso885916') + #cp1250Mapping #('cp1250' 'windows1250' 'xcp1250') + #cp1251Mapping #('cp1251' 'windows1251' 'xcp1251') + #cp1252Mapping #('cp1252' 'windows1252' 'xcp1252' 'ibm819') + #cp1253Mapping #('cp1253' 'windows1253' 'xcp1253') + #cp1254Mapping #('cp1254' 'windows1254' 'xcp1254' 'iso88599' 'latin5') + #cp1255Mapping #('cp1255' 'windows1255' 'xcp1255') + #cp1256Mapping #('cp1256' 'windows1256' 'xcp1256') + #cp1257Mapping #('cp1257' 'windows1257' 'xcp1257') + #cp1258Mapping #('cp1258' 'windows1258' 'xcp1258') + #cp850Mapping #('cp850' 'ibm850' 'oem850' 'doslatin1') + #cp866Mapping #('cp866' 'ibm866') + #cp874Mapping #('cp874' 'iso885911' 'windows874' 'dos874') + #koi8rMapping #('koi8r' 'koi8') + #koi8uMapping #('koi8u') + #macRomanMapping #('macroman' 'xmacroman' 'mac' 'macintosh') + #macCyrillicMapping #('maccyrillic' 'xmaccyrillic') ) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/newForEncoding..st b/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/newForEncoding..st deleted file mode 100644 index 86fcbec7d..000000000 --- a/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/newForEncoding..st +++ /dev/null @@ -1,12 +0,0 @@ -instance creation -newForEncoding: string - "Return a new character encoder object for an encoding described by string. - We use our precomputed ByteTextConverters tables." - - | tables | - tables := ByteTextConverters at: string. - ^ self new - identifier: string; - byteToUnicode: tables first; - unicodeToByte: tables second; - yourself \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/newFromUrl..st b/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/newFromUrl..st new file mode 100644 index 000000000..de26cf274 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/newFromUrl..st @@ -0,0 +1,15 @@ +instance creation +newFromUrl: url + "Instanciate a new encoder directly from a Unicode.org url" + "self newFromUrl: 'http://unicode.org/Public/MAPPINGS/ISO8859/8859-2.TXT'" + "self newFromUrl: 'http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/PC/CP437.TXT'" + + | mapping spec tables | + mapping := self parseUnicodeOrgSpec: url. + spec := self top128FromUnicodeSpec: mapping. + tables := self tablesFromSpec: spec. + ^ self new + identifier: url; + byteToUnicode: tables first; + unicodeToByte: tables second; + yourself \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/parseUnicodeOrgSpec..st b/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/parseUnicodeOrgSpec..st index 38ef4d976..e2826ef2d 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/parseUnicodeOrgSpec..st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/parseUnicodeOrgSpec..st @@ -1,16 +1,17 @@ -accessing +utilties parseUnicodeOrgSpec: url "Parse and return a mapping from byte to unicode values from url." + "Basic syntax: lines starting with # are comments, else first two fields are read as 0x hex values" "self parseUnicodeOrgSpec: 'http://unicode.org/Public/MAPPINGS/ISO8859/8859-2.TXT'." - + | mapping | mapping := Dictionary new: 256. url asZnUrl retrieveContents linesDo: [ :each | (each isEmpty or: [ each beginsWith: '#' ]) ifFalse: [ | tokens hexReader | hexReader := [ :string | Integer readFrom: (string readStream skip: 2; yourself) base: 16 ]. - tokens := each findTokens: String tab. - (tokens last = '' or: [ tokens last = '#UNDEFINED' ]) ifFalse: [ + tokens := each findTokens: String tab. + (tokens size < 3 or: [ tokens last = '' or: [ tokens last = '#UNDEFINED' ] ]) ifFalse: [ mapping at: (hexReader value: tokens first) put: (hexReader value: tokens second) ] ] ]. diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/tablesFromSpec..st b/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/tablesFromSpec..st deleted file mode 100644 index 6576722d4..000000000 --- a/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/tablesFromSpec..st +++ /dev/null @@ -1,15 +0,0 @@ -private -tablesFromSpec: mapping - "Initialize the mappings to and from Unicode based on the 128 element array mapping" - - | byteToUnicode unicodeToByte | - byteToUnicode := Array new: 128. - unicodeToByte := Dictionary new. - "Mind the offset because first 128 characters are not stored into byteToUnicodeSpec" - "Note that some entries are nil" - mapping - keysAndValuesDo: [ :index :unicode | - unicode ifNotNil: [ - byteToUnicode at: index put: (Character value: unicode). - unicodeToByte at: unicode put: 127 + index ] ]. - ^ Array with: byteToUnicode with: unicodeToByte \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/top128FromUnicodeSpec..st b/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/top128FromUnicodeSpec..st new file mode 100644 index 000000000..928ca08f1 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/class/top128FromUnicodeSpec..st @@ -0,0 +1,7 @@ +utilties +top128FromUnicodeSpec: mapping + "Return an array mapping the top 128 byte to unicode values from a Unicode.org specification map" + + ^ Array new: 128 streamContents: [ :stream | + 128 to: 255 do: [ :each | + stream nextPut: (mapping at: each ifAbsent: [ nil ]) ] ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/instance/beLenient.st b/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/instance/beLenient.st deleted file mode 100644 index 7362d93ba..000000000 --- a/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/instance/beLenient.st +++ /dev/null @@ -1,6 +0,0 @@ -initialize-release -beLenient - "Don't be strict, which is the default. - This means that holes in the mapping are let to pass through." - - strict := false \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/instance/byteToUnicode..st b/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/instance/byteToUnicode..st deleted file mode 100644 index 2ee7d6772..000000000 --- a/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/instance/byteToUnicode..st +++ /dev/null @@ -1,3 +0,0 @@ -initialize-release -byteToUnicode: map - byteToUnicode := map \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/instance/decodeBytesIntoWideString..st b/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/instance/decodeBytesIntoWideString..st new file mode 100644 index 000000000..e1781f7f8 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/instance/decodeBytesIntoWideString..st @@ -0,0 +1,10 @@ +convenience +decodeBytesIntoWideString: bytes + "Variant of #decodeBytes: that is faster when you know upfront + that a WideString is probably needed" + + | byteStream | + byteStream := bytes readStream. + ^ WideString streamContents: [ :stream | + [ byteStream atEnd ] whileFalse: [ + stream nextPut: (self nextFromStream: byteStream) ] ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/instance/encodedByteCountFor..st b/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/instance/encodedByteCountFor..st deleted file mode 100644 index 142610d47..000000000 --- a/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/instance/encodedByteCountFor..st +++ /dev/null @@ -1,3 +0,0 @@ -converting -encodedByteCountFor: character - ^ 1 \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/instance/identifier..st b/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/instance/identifier..st deleted file mode 100644 index b56d2d6ee..000000000 --- a/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/instance/identifier..st +++ /dev/null @@ -1,3 +0,0 @@ -initialize-release -identifier: object - identifier := object \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/instance/initialize.st b/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/instance/initialize.st deleted file mode 100644 index 81aa0d85c..000000000 --- a/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/instance/initialize.st +++ /dev/null @@ -1,4 +0,0 @@ -initialize-release -initialize - super initialize. - strict := true \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/instance/nextFromStream..st b/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/instance/nextFromStream..st deleted file mode 100644 index b8581e603..000000000 --- a/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/instance/nextFromStream..st +++ /dev/null @@ -1,14 +0,0 @@ -converting -nextFromStream: stream - "In non-strict mode, we let byte values for holes in our mapping pass through" - - | byteValue | - ^ (byteValue := stream next) < 128 - ifTrue: [ Character value: byteValue ] - ifFalse: [ - (byteToUnicode at: byteValue - 127 ifAbsent: [ nil ]) - ifNotNil: [ :unicode | unicode ] - ifNil: [ - strict - ifTrue: [ self error: 'Character outside encoder range' ] - ifFalse: [ Character value: byteValue ] ] ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/instance/nextPut.toStream..st b/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/instance/nextPut.toStream..st deleted file mode 100644 index 05d3c316f..000000000 --- a/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/instance/nextPut.toStream..st +++ /dev/null @@ -1,13 +0,0 @@ -converting -nextPut: character toStream: stream - "In non-strict mode, we let characters for holes in our mapping table pass through" - - | code | - (code := character codePoint) < 128 - ifTrue: [ stream nextPut: code ] - ifFalse: [ - | byte | - byte := unicodeToByte at: code ifAbsent: [ nil ]. - (byte isNil and: [ strict or: [ code > 255 ] ]) - ifTrue: [ self error: 'Character code outside encoder range' ]. - stream nextPut: (byte ifNil: [ code ]) ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/instance/unicodeToByte..st b/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/instance/unicodeToByte..st deleted file mode 100644 index 65e010c72..000000000 --- a/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/instance/unicodeToByte..st +++ /dev/null @@ -1,3 +0,0 @@ -initialize-release -unicodeToByte: map - unicodeToByte := map \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/methodProperties.json b/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/methodProperties.json deleted file mode 100644 index fe6425cd0..000000000 --- a/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/methodProperties.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "class" : { - "cp1250Mapping" : "SvenVanCaekenberghe 12/15/2012 19:34", - "cp1252Mapping" : "SvenVanCaekenberghe 12/15/2012 19:39", - "cp1253Mapping" : "SvenVanCaekenberghe 12/15/2012 19:35", - "generateByteToUnicodeSpec:" : "SvenVanCaekenberghe 12/15/2012 20:02", - "handlesEncoding:" : "SvenVanCaekenberghe 1/25/2011 13:02", - "initialize" : "SvenVanCaekenberghe 1/15/2013 17:03", - "initializeByteTextConverters" : "SvenVanCaekenberghe 1/15/2013 17:01", - "iso885915Mapping" : "SvenVanCaekenberghe 12/15/2012 19:37", - "iso88591Mapping" : "SvenVanCaekenberghe 12/15/2012 19:36", - "iso88592Mapping" : "SvenVanCaekenberghe 12/15/2012 19:36", - "iso88597Mapping" : "SvenVanCaekenberghe 12/15/2012 19:39", - "koi8rMapping" : "SvenVanCaekenberghe 12/15/2012 19:38", - "macRomanMapping" : "SvenVanCaekenberghe 12/15/2012 19:38", - "mappingToIdentifiers" : "SvenVanCaekenberghe 12/15/2012 21:38", - "newForEncoding:" : "SvenVanCaekenberghe 12/15/2012 21:58", - "parseUnicodeOrgSpec:" : "SvenVanCaekenberghe 1/15/2013 14:54", - "tablesFromSpec:" : "SvenVanCaekenberghe 12/15/2012 21:31" }, - "instance" : { - "beLenient" : "SvenVanCaekenberghe 12/17/2012 15:40", - "byteToUnicode:" : "SvenVanCaekenberghe 1/25/2011 12:31", - "encodedByteCountFor:" : "SvenVanCaekenberghe 1/25/2011 12:19", - "identifier:" : "SvenVanCaekenberghe 12/15/2012 21:51", - "initialize" : "SvenVanCaekenberghe 12/17/2012 14:46", - "nextFromStream:" : "SvenVanCaekenberghe 12/17/2012 15:38", - "nextPut:toStream:" : "SvenVanCaekenberghe 12/17/2012 15:39", - "printOn:" : "SvenVanCaekenberghe 1/15/2013 16:58", - "unicodeToByte:" : "SvenVanCaekenberghe 1/25/2011 12:31" } } diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/properties.json b/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/properties.json index c260d7d46..682735a64 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/properties.json +++ b/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/properties.json @@ -1,17 +1,11 @@ { + "commentStamp" : "", + "super" : "ZnSimplifiedByteEncoder", "category" : "Zinc-Character-Encoding-Core", - "classinstvars" : [ - ], - "classvars" : [ - "ByteTextConverters" ], - "commentStamp" : "", - "instvars" : [ - "identifier", - "byteToUnicode", - "unicodeToByte", - "strict" ], + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], "name" : "ZnByteEncoder", - "pools" : [ - ], - "super" : "ZnCharacterEncoder", - "type" : "normal" } + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnByteStringBecameWideString.class/README.md b/repository/Zinc-Character-Encoding-Core.package/ZnByteStringBecameWideString.class/README.md index 928ecab02..5b961f8b7 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnByteStringBecameWideString.class/README.md +++ b/repository/Zinc-Character-Encoding-Core.package/ZnByteStringBecameWideString.class/README.md @@ -1,4 +1,4 @@ -I am ZnByteStringBecameWideString, a Notification signalled to indicate that some byteString was changed to a wideString. +I am ZnByteStringBecameWideString, a resumable Error signalled to indicate that some byteString was changed to a wideString. Used by ZnUTF8Encoder>>#readInto:startingAt:count:fromStream: to avoid a #becomeForward: when a ByteString automagically changes into a WideString. diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnByteStringBecameWideString.class/instance/becomeForward.st b/repository/Zinc-Character-Encoding-Core.package/ZnByteStringBecameWideString.class/instance/becomeForward.st new file mode 100644 index 000000000..8130128b3 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnByteStringBecameWideString.class/instance/becomeForward.st @@ -0,0 +1,5 @@ +convenience +becomeForward + "Switch the identities of byteString and wideString using #becomeForward:" + + byteString becomeForward: wideString \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnByteStringBecameWideString.class/instance/isResumable.st b/repository/Zinc-Character-Encoding-Core.package/ZnByteStringBecameWideString.class/instance/isResumable.st new file mode 100644 index 000000000..da51855cc --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnByteStringBecameWideString.class/instance/isResumable.st @@ -0,0 +1,3 @@ +private - testing +isResumable + ^ true \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnByteStringBecameWideString.class/methodProperties.json b/repository/Zinc-Character-Encoding-Core.package/ZnByteStringBecameWideString.class/methodProperties.json deleted file mode 100644 index dcf57730f..000000000 --- a/repository/Zinc-Character-Encoding-Core.package/ZnByteStringBecameWideString.class/methodProperties.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "class" : { - "convert:" : "JohanBrichau 11/23/2013 10:39" }, - "instance" : { - "byteString" : "SvenVanCaekenberghe 6/11/2013 14:44", - "byteString:" : "SvenVanCaekenberghe 6/11/2013 14:44", - "defaultAction" : "dkh 05/25/2014 20:16", - "wideString" : "SvenVanCaekenberghe 6/11/2013 14:44", - "wideString:" : "SvenVanCaekenberghe 6/11/2013 14:44" } } diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnByteStringBecameWideString.class/properties.json b/repository/Zinc-Character-Encoding-Core.package/ZnByteStringBecameWideString.class/properties.json index 665176164..95ba84d8e 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnByteStringBecameWideString.class/properties.json +++ b/repository/Zinc-Character-Encoding-Core.package/ZnByteStringBecameWideString.class/properties.json @@ -1,15 +1,14 @@ { + "commentStamp" : "", + "super" : "Error", "category" : "Zinc-Character-Encoding-Core", - "classinstvars" : [ - ], - "classvars" : [ - ], - "commentStamp" : "", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], "instvars" : [ "byteString", - "wideString" ], + "wideString" + ], "name" : "ZnByteStringBecameWideString", - "pools" : [ - ], - "super" : "Notification", - "type" : "normal" } + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCRLFReadStream.class/README.md b/repository/Zinc-Character-Encoding-Core.package/ZnCRLFReadStream.class/README.md new file mode 100644 index 000000000..951d75e6c --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCRLFReadStream.class/README.md @@ -0,0 +1,20 @@ +ZnCRLFReadStream wraps a binary stream with any of the common line endings (CR, LF, CRLF) and converts them to CRLF. + +RFC 2045 (https://tools.ietf.org/html/rfc2045) states that MIME documents use CRLF as the line end marker, however email documents as stored on disk often use the local line enging, e.g. LF. + + +Public API and Key Messages + +- on: - supply the stream to be wrapped +- The public API is the standard Stream API + + One simple example is simply gorgeous. + +Internal Representation and Key Implementation Points. + + Instance Variables + next: + stream: + + + Implementation Points \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCRLFReadStream.class/class/initialize.st b/repository/Zinc-Character-Encoding-Core.package/ZnCRLFReadStream.class/class/initialize.st new file mode 100644 index 000000000..d220bc0d6 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCRLFReadStream.class/class/initialize.st @@ -0,0 +1,5 @@ +class initialization +initialize + + Cr := Character cr asInteger. + Lf := Character lf asInteger \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCRLFReadStream.class/class/on..st b/repository/Zinc-Character-Encoding-Core.package/ZnCRLFReadStream.class/class/on..st new file mode 100644 index 000000000..41a0aff5a --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCRLFReadStream.class/class/on..st @@ -0,0 +1,4 @@ +instance creation +on: aBinaryReadStream + + ^self new on: aBinaryReadStream \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCRLFReadStream.class/instance/atEnd.st b/repository/Zinc-Character-Encoding-Core.package/ZnCRLFReadStream.class/instance/atEnd.st new file mode 100644 index 000000000..05d66dc70 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCRLFReadStream.class/instance/atEnd.st @@ -0,0 +1,4 @@ +accessing +atEnd + + ^stream atEnd \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCRLFReadStream.class/instance/close.st b/repository/Zinc-Character-Encoding-Core.package/ZnCRLFReadStream.class/instance/close.st new file mode 100644 index 000000000..e8a698a40 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCRLFReadStream.class/instance/close.st @@ -0,0 +1,4 @@ +open/close +close + + stream close \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCRLFReadStream.class/instance/isBinary.st b/repository/Zinc-Character-Encoding-Core.package/ZnCRLFReadStream.class/instance/isBinary.st new file mode 100644 index 000000000..64bb61b94 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCRLFReadStream.class/instance/isBinary.st @@ -0,0 +1,4 @@ +accessing +isBinary + + ^true \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCRLFReadStream.class/instance/next.into..st b/repository/Zinc-Character-Encoding-Core.package/ZnCRLFReadStream.class/instance/next.into..st new file mode 100644 index 000000000..b0bfa7570 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCRLFReadStream.class/instance/next.into..st @@ -0,0 +1,6 @@ +accessing +next: n into: aCollection + "Read n objects into the given collection. + Return aCollection or a partial copy if less than + n elements have been read." + ^self next: n into: aCollection startingAt: 1 \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCRLFReadStream.class/instance/next.into.startingAt..st b/repository/Zinc-Character-Encoding-Core.package/ZnCRLFReadStream.class/instance/next.into.startingAt..st new file mode 100644 index 000000000..4abc0ceb5 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCRLFReadStream.class/instance/next.into.startingAt..st @@ -0,0 +1,10 @@ +accessing +next: requestedCount into: aCollection startingAt: startIndex + "Read requestedCount objects into the given collection. + Return aCollection or a partial copy if less elements have been read." + + | readCount | + readCount := self readInto: aCollection startingAt: startIndex count: requestedCount. + ^ readCount = requestedCount + ifTrue: [ aCollection ] + ifFalse: [ aCollection copyFrom: 1 to: startIndex + readCount - 1 ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCRLFReadStream.class/instance/next.st b/repository/Zinc-Character-Encoding-Core.package/ZnCRLFReadStream.class/instance/next.st new file mode 100644 index 000000000..351dc5747 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCRLFReadStream.class/instance/next.st @@ -0,0 +1,23 @@ +accessing +next + "Answer the next character from the stream, converting end-of-lines to CRLF" + + | byte | + + next ifNotNil: + [ byte := next. + next := nil. + ^byte ]. + stream atEnd ifTrue: [ ^nil ]. + (byte := stream next) ifNil: [ ^nil ]. + byte == Cr ifTrue: + "Consume the Cr and ensure that a Lf is answered next. + If the following character is Lf, consume it." + [ stream peek == Lf ifTrue: + [ stream next ]. + next := Lf ] + ifFalse: [ byte == Lf ifTrue: + [ "Answer a Cr instead, and then a Lf" + byte := Cr. + next := Lf ] ]. + ^byte \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCRLFReadStream.class/instance/on..st b/repository/Zinc-Character-Encoding-Core.package/ZnCRLFReadStream.class/instance/on..st new file mode 100644 index 000000000..d0edae62b --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCRLFReadStream.class/instance/on..st @@ -0,0 +1,5 @@ +accessing +on: aBinaryReadStream + + self assert: aBinaryReadStream isBinary. + stream := aBinaryReadStream \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCRLFReadStream.class/instance/peek.st b/repository/Zinc-Character-Encoding-Core.package/ZnCRLFReadStream.class/instance/peek.st new file mode 100644 index 000000000..c907e4271 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCRLFReadStream.class/instance/peek.st @@ -0,0 +1,11 @@ +accessing +peek + "Answer the next character from the stream, converting end-of-lines to CRLF" + + | byte | + + next ifNotNil: [ ^next ]. + stream atEnd ifTrue: [ ^nil ]. + (byte := stream peek) ifNil: [ ^nil ]. + byte == Lf ifTrue: [ ^Cr ]. + ^byte \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCRLFReadStream.class/instance/readInto.startingAt.count..st b/repository/Zinc-Character-Encoding-Core.package/ZnCRLFReadStream.class/instance/readInto.startingAt.count..st new file mode 100644 index 000000000..4aec2bc18 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCRLFReadStream.class/instance/readInto.startingAt.count..st @@ -0,0 +1,7 @@ +accessing +readInto: collection startingAt: offset count: requestedCount + + 0 to: requestedCount - 1 do: [ :count | | byte | + (byte := self next) ifNil: [ ^ count ]. + collection at: offset + count put: byte ]. + ^ requestedCount \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCRLFReadStream.class/instance/readStream.st b/repository/Zinc-Character-Encoding-Core.package/ZnCRLFReadStream.class/instance/readStream.st new file mode 100644 index 000000000..6f19a3b33 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCRLFReadStream.class/instance/readStream.st @@ -0,0 +1,3 @@ +accessing +readStream + ^ self \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCRLFReadStream.class/instance/upToEnd.st b/repository/Zinc-Character-Encoding-Core.package/ZnCRLFReadStream.class/instance/upToEnd.st new file mode 100644 index 000000000..99ba78ee1 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCRLFReadStream.class/instance/upToEnd.st @@ -0,0 +1,7 @@ +accessing +upToEnd + "Answer a ByteArray of the stream from the current position to the last" + + ^ByteArray streamContents: [ :newStream | | nextByte | + [ (nextByte := self next) isNil ] whileFalse: + [ newStream nextPut: nextByte ] ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCRLFReadStream.class/properties.json b/repository/Zinc-Character-Encoding-Core.package/ZnCRLFReadStream.class/properties.json new file mode 100644 index 000000000..5bb76717e --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCRLFReadStream.class/properties.json @@ -0,0 +1,17 @@ +{ + "commentStamp" : "", + "super" : "Object", + "category" : "Zinc-Character-Encoding-Core", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ + "Cr", + "Lf" + ], + "instvars" : [ + "stream", + "next" + ], + "name" : "ZnCRLFReadStream", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/README.md b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/README.md index 428d944ee..0d77c7718 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/README.md +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/README.md @@ -4,6 +4,7 @@ I am an abstract class with following protocol: #nextFromStream: #nextPut:toStream: #encodedByteCountFor: +#backOnStream: The first two are compatible with TextConverter and subclasses. @@ -15,4 +16,19 @@ I add some convenience methods: Contrary to older encoders, I work strictly from strings to bytes and vice versa and I will throw errors instead of silently ignoring them. +I also implement optimized bulk operations: + +#next:putAll:startingAt:toStream: +#readInto:startingAt:count:fromStream: + +Additionally, I can encode Integer code points to a binary stream as well as read Integer code points from a binary stream. This is in a sense a more fundamental operation that avoids instanciating Character objects. + +#nextCodePointFromStream: +#nextPutCodePoint:toStream: +#encodedByteCountForCodePoint: + +#decodeAsCodePoints: +#encodeCodePoints: +#encodedByteCountForCodePoints: + Part of Zinc HTTP Components. \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/class/ascii.st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/class/ascii.st new file mode 100644 index 000000000..63b50a4e7 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/class/ascii.st @@ -0,0 +1,3 @@ +convenience +ascii + ^ self newForEncoding: 'ASCII' \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/class/canonicalEncodingIdentifier..st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/class/canonicalEncodingIdentifier..st new file mode 100644 index 000000000..74f36b063 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/class/canonicalEncodingIdentifier..st @@ -0,0 +1,3 @@ +accessing +canonicalEncodingIdentifier: string + ^ (string select: [ :each | each isAlphaNumeric ]) asLowercase \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/class/default.st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/class/default.st new file mode 100644 index 000000000..31576f15a --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/class/default.st @@ -0,0 +1,6 @@ +accessing +default + "Return the default ZnCharacterEncoder to be used + when none is otherwise specified." + + ^ ZnDefaultCharacterEncoder value \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/class/detectEncoding..st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/class/detectEncoding..st new file mode 100644 index 000000000..046307c8a --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/class/detectEncoding..st @@ -0,0 +1,17 @@ +instance creation +detectEncoding: bytes + "Return one of my instances capable of decoding bytes. + This is done by successively trying known encodings in a specific order. + If no one is found, signal ZnCharacterEncodingError. + This is a heuristic and unreliable [https://en.wikipedia.org/wiki/Charset_detection]." + + | candidates | + "Set up an ordered candidates list, 7-bit ascii and utf8 are reasonably reliable, iso88591 is a reasonable default" + candidates := #('ascii' 'utf8' 'iso88591'). + candidates := candidates , (ZnByteEncoder knownEncodingIdentifiers difference: candidates). + candidates := candidates , (self knownEncodingIdentifiers difference: candidates). + "Try each and return the first one that succeeeds." + candidates do: [ :identifier | | encoder | + encoder := self newForEncoding: identifier. + [ ^ encoder decodeBytes: bytes; yourself ] on: ZnCharacterEncodingError do: [ ] ]. + ZnCharacterEncodingError signal: 'No suitable encoder found' diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/class/handlesEncoding..st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/class/handlesEncoding..st index 37c4f5470..25fa56c5d 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/class/handlesEncoding..st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/class/handlesEncoding..st @@ -1,5 +1,5 @@ accessing handlesEncoding: string "Return true when my instances handle the encoding described by string" - + self subclassResponsibility \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/class/isAbstract.st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/class/isAbstract.st new file mode 100644 index 000000000..ef117b027 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/class/isAbstract.st @@ -0,0 +1,4 @@ +testing +isAbstract + + ^ self == ZnCharacterEncoder \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/class/iso88591.st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/class/iso88591.st new file mode 100644 index 000000000..804bcff70 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/class/iso88591.st @@ -0,0 +1,3 @@ +convenience +iso88591 + ^ self newForEncoding: 'iso-8859-1' \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/class/knownEncodingIdentifiers.st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/class/knownEncodingIdentifiers.st new file mode 100644 index 000000000..d1c1f9dfe --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/class/knownEncodingIdentifiers.st @@ -0,0 +1,8 @@ +accessing +knownEncodingIdentifiers + "Return a collection of all known encoding identifiers in the system" + + self = ZnCharacterEncoder ifFalse: [ ^ #() ]. + ^ Array streamContents: [ :all | + self allSubclassesDo: [ :subClass | + all nextPutAll: subClass knownEncodingIdentifiers ] ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/class/latin1.st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/class/latin1.st new file mode 100644 index 000000000..9e5562a1f --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/class/latin1.st @@ -0,0 +1,3 @@ +convenience +latin1 + ^ self newForEncoding: 'latin1' \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/class/newForEncoding..st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/class/newForEncoding..st index 1d163b642..56d550967 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/class/newForEncoding..st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/class/newForEncoding..st @@ -1,12 +1,10 @@ instance creation newForEncoding: string "Return a new character encoder object for an encoding described by string. - Search for a subclass that handles it and delegate (subclassResponsibility). - We default to ZnNullEncoder." - - | concreteSubclass encoding | - encoding := string asLowercase. - concreteSubclass := self subclasses - detect: [ :each | each handlesEncoding: encoding ] - ifNone: [ ZnNullEncoder ]. - ^ concreteSubclass newForEncoding: encoding \ No newline at end of file + Search for a subclass that handles it and delegate (subclassResponsibility)." + + | concreteSubclass | + concreteSubclass := self allSubclasses + detect: [ :each | each handlesEncoding: string ] + ifNone: [ ^ self default ]. + ^ concreteSubclass newForEncoding: string \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/class/utf8.st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/class/utf8.st new file mode 100644 index 000000000..84587d12a --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/class/utf8.st @@ -0,0 +1,3 @@ +convenience +utf8 + ^ ZnUTF8Encoder default \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/asZnCharacterEncoder.st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/asZnCharacterEncoder.st new file mode 100644 index 000000000..6aab13516 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/asZnCharacterEncoder.st @@ -0,0 +1,3 @@ +converting +asZnCharacterEncoder + ^ self \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/backOnStream..st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/backOnStream..st new file mode 100644 index 000000000..34f3963f7 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/backOnStream..st @@ -0,0 +1,5 @@ +encoding - decoding +backOnStream: stream + "Move back one character on stream, assuming stream understands #back" + + self subclassResponsibility \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/beLenient.st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/beLenient.st index 89b8e7e3c..87e6fb6cc 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/beLenient.st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/beLenient.st @@ -1,3 +1,3 @@ -initialize-release +initialization beLenient "Don't be strict, which is the default" \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/decodeAsCodePoints..st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/decodeAsCodePoints..st new file mode 100644 index 000000000..b56cf7e26 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/decodeAsCodePoints..st @@ -0,0 +1,9 @@ +convenience +decodeAsCodePoints: bytes + "Decode bytes and return the resulting code points" + + | byteStream | + byteStream := bytes readStream. + ^ Array streamContents: [ :stream | + [ byteStream atEnd ] whileFalse: [ + stream nextPut: (self nextCodePointFromStream: byteStream) ] ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/decodeBytes..st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/decodeBytes..st index ca0567746..9aeb76c46 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/decodeBytes..st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/decodeBytes..st @@ -1,7 +1,7 @@ convenience decodeBytes: bytes "Decode bytes and return the resulting string" - + | byteStream | byteStream := bytes readStream. ^ String streamContents: [ :stream | diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/encodeCodePoints..st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/encodeCodePoints..st new file mode 100644 index 000000000..29298338c --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/encodeCodePoints..st @@ -0,0 +1,7 @@ +convenience +encodeCodePoints: codePoints + "Encode codePoints and return the resulting byte array" + + ^ ByteArray streamContents: [ :stream | + codePoints do: [ :each | + self nextPutCodePoint: each toStream: stream ] ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/encodeString..st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/encodeString..st index 52472998c..e60c6e201 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/encodeString..st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/encodeString..st @@ -1,6 +1,11 @@ convenience encodeString: string "Encode string and return the resulting byte array" - - ^ ByteArray streamContents: [ :stream | - self next: string size putAll: string startingAt: 1 toStream: stream ] \ No newline at end of file + + ^ ByteArray + streamContents: [ :stream | + self + next: string size + putAll: string + startingAt: 1 + toStream: stream ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/encodedByteCountFor..st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/encodedByteCountFor..st index cef903517..fa9799c98 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/encodedByteCountFor..st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/encodedByteCountFor..st @@ -1,5 +1,7 @@ -converting +encoding - decoding encodedByteCountFor: character "Return how many bytes are needed to encode character" - - self subclassResponsibility \ No newline at end of file + + "We should use #codePoint but #asInteger is faster" + + ^ self encodedByteCountForCodePoint: character asInteger \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/encodedByteCountForCodePoint..st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/encodedByteCountForCodePoint..st new file mode 100644 index 000000000..599c4532e --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/encodedByteCountForCodePoint..st @@ -0,0 +1,5 @@ +encoding - decoding +encodedByteCountForCodePoint: codePoint + "Return how many bytes are needed to encode integer code point" + + self subclassResponsibility \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/encodedByteCountForCodePoints..st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/encodedByteCountForCodePoints..st new file mode 100644 index 000000000..6f36ba4b6 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/encodedByteCountForCodePoints..st @@ -0,0 +1,8 @@ +convenience +encodedByteCountForCodePoints: codePoints + "Return the exact number of bytes it would take to encode codePoints as a byte array" + + ^ codePoints + inject: 0 + into: [ :sum :each | + sum + (self encodedByteCountForCodePoint: each) ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/encodedByteCountForString..st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/encodedByteCountForString..st index a40c48cb5..3a9366efb 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/encodedByteCountForString..st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/encodedByteCountForString..st @@ -2,7 +2,7 @@ convenience encodedByteCountForString: string "Return the exact number of bytes it would take to encode string as a byte array" - ^ string - inject: 0 + ^ string + inject: 0 into: [ :sum :each | sum + (self encodedByteCountFor: each) ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/endianness.st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/endianness.st new file mode 100644 index 000000000..bb054472e --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/endianness.st @@ -0,0 +1,3 @@ +accessing +endianness + ^ #'N/A' \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/ensureAtBeginOfCodePointOnStream..st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/ensureAtBeginOfCodePointOnStream..st new file mode 100644 index 000000000..6e9074e5b --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/ensureAtBeginOfCodePointOnStream..st @@ -0,0 +1,7 @@ +encoding - decoding +ensureAtBeginOfCodePointOnStream: stream + "Ensure that the current position of stream is a the beginning of an encoded code point, + if not move further backwards. This is necessary when a position in the binary stream is set, + not knowing if that position is on a proper encoded character boundary." + + self subclassResponsibility \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/error..st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/error..st index efafebec6..5895358f8 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/error..st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/error..st @@ -1,3 +1,3 @@ error handling error: message - ZnCharacterEncodingError signal: message \ No newline at end of file + ^ ZnCharacterEncodingError signal: message \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/errorIncomplete.st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/errorIncomplete.st new file mode 100644 index 000000000..7efbb94df --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/errorIncomplete.st @@ -0,0 +1,3 @@ +error handling +errorIncomplete + ^ ZnIncomplete signal: 'Incomplete input for character decoding' \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/errorIncompleteFrom..st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/errorIncompleteFrom..st new file mode 100644 index 000000000..f0e7cd5ee --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/errorIncompleteFrom..st @@ -0,0 +1,3 @@ +error handling +errorIncompleteFrom: stream + ^ self errorIncomplete \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/errorOutsideRange.from..st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/errorOutsideRange.from..st new file mode 100644 index 000000000..6df032a44 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/errorOutsideRange.from..st @@ -0,0 +1,4 @@ +error handling +errorOutsideRange: codePoint from: stream + self errorOutsideRange. + ^ 0 \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/errorOutsideRange.st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/errorOutsideRange.st new file mode 100644 index 000000000..d5b8d9781 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/errorOutsideRange.st @@ -0,0 +1,3 @@ +error handling +errorOutsideRange + ^ self error: 'Character Unicode code point outside encoder range' \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/errorOutsideRange.to..st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/errorOutsideRange.to..st new file mode 100644 index 000000000..bec8527fb --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/errorOutsideRange.to..st @@ -0,0 +1,3 @@ +error handling +errorOutsideRange: codePoint to: stream + ^ self errorOutsideRange \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/errorOutsideRangeByteCount..st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/errorOutsideRangeByteCount..st new file mode 100644 index 000000000..12c1a3265 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/errorOutsideRangeByteCount..st @@ -0,0 +1,4 @@ +error handling +errorOutsideRangeByteCount: codePoint + self errorOutsideRange. + ^ 0 \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/hash.st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/hash.st index 0f4b9c8bf..4482adb9a 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/hash.st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/hash.st @@ -1,3 +1,3 @@ comparing hash - ^ self class name hash \ No newline at end of file + ^ self class hash \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/identifier.st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/identifier.st new file mode 100644 index 000000000..15c498ab0 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/identifier.st @@ -0,0 +1,3 @@ +accessing +identifier + ^ self subclassResponsibility \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/isFixedLength.st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/isFixedLength.st new file mode 100644 index 000000000..646c7f20e --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/isFixedLength.st @@ -0,0 +1,5 @@ +testing +isFixedLength + "Return true when I am a fixed length encoding" + + ^ true \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/isStrict.st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/isStrict.st new file mode 100644 index 000000000..830d40acd --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/isStrict.st @@ -0,0 +1,3 @@ +testing +isStrict + ^ false \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/isVariableLength.st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/isVariableLength.st new file mode 100644 index 000000000..c6386e78c --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/isVariableLength.st @@ -0,0 +1,5 @@ +testing +isVariableLength + "Return true when I am a variable length encoding" + + ^ self isFixedLength not \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/next.putAll.startingAt.toStream..st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/next.putAll.startingAt.toStream..st index e1200fa81..0bb412d78 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/next.putAll.startingAt.toStream..st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/next.putAll.startingAt.toStream..st @@ -1,6 +1,6 @@ convenience next: count putAll: string startingAt: offset toStream: stream "Write count characters from string starting at offset to stream." - - 0 to: count - 1 do: [ :each | - self nextPut: (string at: offset + each) toStream: stream ] \ No newline at end of file + + offset to: offset + count - 1 do: [ :index | + self nextPut: (string at: index) toStream: stream ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/nextCodePointFromStream..st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/nextCodePointFromStream..st new file mode 100644 index 000000000..323345e00 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/nextCodePointFromStream..st @@ -0,0 +1,5 @@ +encoding - decoding +nextCodePointFromStream: stream + "Read and return the next integer code point from stream" + + self subclassResponsibility \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/nextFromStream..st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/nextFromStream..st index 2baaaf763..b422f274d 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/nextFromStream..st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/nextFromStream..st @@ -1,5 +1,7 @@ -converting +encoding - decoding nextFromStream: stream "Read and return the next character from stream" - - self subclassResponsibility \ No newline at end of file + + "We should use #codePoint: but #value: is faster" + + ^ Character value: (self nextCodePointFromStream: stream) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/nextPut.toStream..st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/nextPut.toStream..st index f4e750287..a5c0d70e2 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/nextPut.toStream..st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/nextPut.toStream..st @@ -1,5 +1,7 @@ -converting +encoding - decoding nextPut: character toStream: stream "Write the encoding for character to stream" - - self subclassResponsibility \ No newline at end of file + + "We should use #codePoint but #asInteger is faster" + + self nextPutCodePoint: character asInteger toStream: stream \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/nextPutCodePoint.toStream..st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/nextPutCodePoint.toStream..st new file mode 100644 index 000000000..b1a0324f9 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/nextPutCodePoint.toStream..st @@ -0,0 +1,5 @@ +encoding - decoding +nextPutCodePoint: codePoint toStream: stream + "Write the encoding for Integer code point to stream" + + self subclassResponsibility \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/readInto.startingAt.count.fromStream..st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/readInto.startingAt.count.fromStream..st index bde62c3cc..6e5a68cac 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/readInto.startingAt.count.fromStream..st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/readInto.startingAt.count.fromStream..st @@ -3,7 +3,7 @@ readInto: string startingAt: offset count: requestedCount fromStream: stream "Read requestedCount characters into string starting at offset, returning the number read, there could be less available when stream is atEnd" - 0 to: requestedCount - 1 do: [ :count | - stream atEnd ifTrue: [ ^ count ]. - string at: offset + count put: (self nextFromStream: stream) ]. + offset to: offset + requestedCount - 1 do: [ :index | + stream atEnd ifTrue: [ ^ index - offset ]. + string at: index put: (self nextFromStream: stream) ]. ^ requestedCount \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/skipToBeginOfCodePointOnStream..st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/skipToBeginOfCodePointOnStream..st new file mode 100644 index 000000000..a729219e6 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/instance/skipToBeginOfCodePointOnStream..st @@ -0,0 +1,7 @@ +encoding - decoding +skipToBeginOfCodePointOnStream: stream + "Ensure that the current position of stream is a the beginning of an encoded code point, + if not move further forward. This is necessary when a position in the binary stream is set, + not knowing if that position is on a proper encoded character boundary." + + self subclassResponsibility \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/methodProperties.json b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/methodProperties.json deleted file mode 100644 index a0b6c85e7..000000000 --- a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/methodProperties.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "class" : { - "handlesEncoding:" : "SvenVanCaekenberghe 1/25/2011 11:07", - "newForEncoding:" : "SvenVanCaekenberghe 1/25/2011 13:27" }, - "instance" : { - "=" : "SvenVanCaekenberghe 12/14/2010 11:56", - "beLenient" : "SvenVanCaekenberghe 12/17/2012 14:47", - "decodeBytes:" : "SvenVanCaekenberghe 12/16/2012 15:17", - "encodeString:" : "SvenVanCaekenberghe 5/21/2013 21:51", - "encodedByteCountFor:" : "SvenVanCaekenberghe 11/29/2010 21:17", - "encodedByteCountForString:" : "SvenVanCaekenberghe 12/16/2012 15:18", - "error:" : "SvenVanCaekenberghe 12/16/2012 15:21", - "hash" : "SvenVanCaekenberghe 4/20/2011 12:19", - "next:putAll:startingAt:toStream:" : "SvenVanCaekenberghe 5/21/2013 21:55", - "nextFromStream:" : "SvenVanCaekenberghe 11/29/2010 21:16", - "nextPut:toStream:" : "SvenVanCaekenberghe 11/29/2010 21:16", - "readInto:startingAt:count:fromStream:" : "SvenVanCaekenberghe 5/23/2013 09:25" } } diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/properties.json b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/properties.json index e2faf1b16..1cd2a8929 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/properties.json +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/properties.json @@ -1,14 +1,11 @@ { + "commentStamp" : "", + "super" : "Object", "category" : "Zinc-Character-Encoding-Core", - "classinstvars" : [ - ], - "classvars" : [ - ], - "commentStamp" : "", - "instvars" : [ - ], + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], "name" : "ZnCharacterEncoder", - "pools" : [ - ], - "super" : "Object", - "type" : "normal" } + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncodingError.class/methodProperties.json b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncodingError.class/methodProperties.json deleted file mode 100644 index 0e4a66223..000000000 --- a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncodingError.class/methodProperties.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "class" : { - }, - "instance" : { - } } diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncodingError.class/properties.json b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncodingError.class/properties.json index d2aa6cd32..106071dbd 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncodingError.class/properties.json +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncodingError.class/properties.json @@ -1,14 +1,11 @@ { + "commentStamp" : "", + "super" : "Error", "category" : "Zinc-Character-Encoding-Core", - "classinstvars" : [ - ], - "classvars" : [ - ], - "commentStamp" : "", - "instvars" : [ - ], + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], "name" : "ZnCharacterEncodingError", - "pools" : [ - ], - "super" : "Error", - "type" : "normal" } + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadStream.class/class/defaultEncoder.st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadStream.class/class/defaultEncoder.st deleted file mode 100644 index d33faea25..000000000 --- a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadStream.class/class/defaultEncoder.st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -defaultEncoder - ^ ZnUTF8Encoder new \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadStream.class/class/on..st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadStream.class/class/on..st deleted file mode 100644 index a86977493..000000000 --- a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadStream.class/class/on..st +++ /dev/null @@ -1,5 +0,0 @@ -instance creation -on: readStream - ^ self new - on: readStream; - yourself \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadStream.class/class/on.encoding..st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadStream.class/class/on.encoding..st deleted file mode 100644 index a9dadaf2b..000000000 --- a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadStream.class/class/on.encoding..st +++ /dev/null @@ -1,6 +0,0 @@ -instance creation -on: readStream encoding: encoding - ^ self new - on: readStream; - encoding: encoding; - yourself \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadStream.class/instance/atEnd.st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadStream.class/instance/atEnd.st deleted file mode 100644 index 1b523e516..000000000 --- a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadStream.class/instance/atEnd.st +++ /dev/null @@ -1,3 +0,0 @@ -testing -atEnd - ^ peekedCharacter isNil and: [ stream atEnd ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadStream.class/instance/contents.st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadStream.class/instance/contents.st deleted file mode 100644 index 099d85638..000000000 --- a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadStream.class/instance/contents.st +++ /dev/null @@ -1,5 +0,0 @@ -accessing -contents - "This is technically not correct, but it is better than nothing" - - ^ self upToEnd \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadStream.class/instance/encoding..st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadStream.class/instance/encoding..st deleted file mode 100644 index e88783773..000000000 --- a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadStream.class/instance/encoding..st +++ /dev/null @@ -1,3 +0,0 @@ -initialize-release -encoding: encoding - encoder := ZnCharacterEncoder newForEncoding: encoding \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadStream.class/instance/match..st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadStream.class/instance/match..st new file mode 100644 index 000000000..b69586a4a --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadStream.class/instance/match..st @@ -0,0 +1,16 @@ +accessing +match: subCollection + "Set the access position of the receiver to be past the next occurrence of the subCollection. Answer whether subCollection is found. No wildcards, and case does matter." + | pattern startMatch | + pattern := subCollection readStream. + startMatch := nil. + [ pattern atEnd ] whileFalse: + [ self atEnd ifTrue: [ ^ false ]. + self next = pattern next + ifTrue: [ pattern position = 1 ifTrue: [ startMatch := self position ] ] + ifFalse: + [ pattern position: 0. + startMatch ifNotNil: + [ self position: startMatch. + startMatch := nil ] ] ]. + ^ true \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadStream.class/instance/next..st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadStream.class/instance/next..st deleted file mode 100644 index 163efb83c..000000000 --- a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadStream.class/instance/next..st +++ /dev/null @@ -1,8 +0,0 @@ -accessing -next: requestedCount - "Read requestedCount elements into new collection and return it, - it could be that less elements were available" - - ^ self - next: requestedCount - into: (self collectionSpecies new: requestedCount) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadStream.class/instance/next.into..st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadStream.class/instance/next.into..st deleted file mode 100644 index 66797ac19..000000000 --- a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadStream.class/instance/next.into..st +++ /dev/null @@ -1,9 +0,0 @@ -accessing -next: requestedCount into: collection - "Read requestedCount elements into collection, - returning a copy if less elements are available" - - ^ self - next: requestedCount - into: collection - startingAt: 1 \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadStream.class/instance/next.into.startingAt..st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadStream.class/instance/next.into.startingAt..st deleted file mode 100644 index a2d45e811..000000000 --- a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadStream.class/instance/next.into.startingAt..st +++ /dev/null @@ -1,13 +0,0 @@ -accessing -next: requestedCount into: collection startingAt: offset - "Read requestedCount elements into collection starting at offset, - returning a copy if less elements are available" - - | readCount | - readCount := self - readInto: collection - startingAt: offset - count: requestedCount. - ^ requestedCount = readCount - ifTrue: [ collection ] - ifFalse: [ collection copyFrom: 1 to: offset + readCount - 1 ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadStream.class/instance/next.st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadStream.class/instance/next.st deleted file mode 100644 index 41d822e0d..000000000 --- a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadStream.class/instance/next.st +++ /dev/null @@ -1,10 +0,0 @@ -accessing -next - ^ peekedCharacter - ifNil: [ - stream atEnd - ifFalse: [ self encoder nextFromStream: stream ] ] - ifNotNil: [ | character | - character := peekedCharacter. - peekedCharacter := nil. - character ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadStream.class/instance/nextElement.st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadStream.class/instance/nextElement.st new file mode 100644 index 000000000..a62de922d --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadStream.class/instance/nextElement.st @@ -0,0 +1,3 @@ +private +nextElement + ^ self encoder nextFromStream: stream \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadStream.class/instance/nextLine.st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadStream.class/instance/nextLine.st new file mode 100644 index 000000000..6d551a94e --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadStream.class/instance/nextLine.st @@ -0,0 +1,15 @@ +accessing +nextLine + "Read a CR, LF or CRLF terminated line, returning the contents of the line without the EOL. Return nil when the receiver is #atEnd." + + self atEnd ifTrue: [ ^ nil ]. + ^ self collectionSpecies streamContents: [ :out | | eol char | + eol := false. + [ eol ] whileFalse: [ + char := self next. + (char isNil or: [ char = Character lf ]) + ifTrue: [ eol := true ] + ifFalse: [ + char = Character cr + ifTrue: [ eol := true. self peekFor: Character lf ] + ifFalse: [ out nextPut: char ] ] ] ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadStream.class/instance/on..st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadStream.class/instance/on..st deleted file mode 100644 index 35be90dd3..000000000 --- a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadStream.class/instance/on..st +++ /dev/null @@ -1,3 +0,0 @@ -initialize-release -on: readStream - stream := readStream \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadStream.class/instance/peek.st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadStream.class/instance/peek.st deleted file mode 100644 index f08b3de96..000000000 --- a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadStream.class/instance/peek.st +++ /dev/null @@ -1,7 +0,0 @@ -accessing -peek - ^ peekedCharacter - ifNil: [ - stream atEnd - ifFalse: [ - peekedCharacter := self encoder nextFromStream: stream ] ] diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadStream.class/instance/peekFor..st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadStream.class/instance/peekFor..st deleted file mode 100644 index e1d692fe1..000000000 --- a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadStream.class/instance/peekFor..st +++ /dev/null @@ -1,7 +0,0 @@ -accessing -peekFor: object - ^ self peek = object - ifTrue: [ - self next. - true ] - ifFalse: [ false ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadStream.class/instance/readInto.startingAt.count..st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadStream.class/instance/readInto.startingAt.count..st index d7fcfc049..0c2529f17 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadStream.class/instance/readInto.startingAt.count..st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadStream.class/instance/readInto.startingAt.count..st @@ -1,10 +1,23 @@ accessing -readInto: collection startingAt: offset count: requestedCount +readInto: collection startingAt: offset count: requestedCount "Read count elements and place them in collection starting at offset. - Return the number of elements actually read. - This is an inefficient implementation, reading characters one by one." - - 0 to: requestedCount - 1 do: [ :count | | object | - (object := self next) ifNil: [ ^ count ]. - collection at: offset + count put: object ]. - ^ requestedCount \ No newline at end of file + Return the number of elements actually read." + + ^ peeked + ifNil: [ | readCount | + [ readCount := self encoder + readInto: collection + startingAt: offset + count: requestedCount + fromStream: stream ] + on: ZnByteStringBecameWideString + do: [ :byteStringBecameWideString | + byteStringBecameWideString becomeForward; resume ]. + readCount ] + ifNotNil: [ + collection at: offset put: peeked. + peeked := nil. + (self + readInto: collection + startingAt: offset + 1 + count: requestedCount - 1) + 1 ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadStream.class/instance/skip..st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadStream.class/instance/skip..st deleted file mode 100644 index 352fb6234..000000000 --- a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadStream.class/instance/skip..st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -skip: count - count timesRepeat: [ self next ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadStream.class/instance/upTo..st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadStream.class/instance/upTo..st deleted file mode 100644 index a1177b14e..000000000 --- a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadStream.class/instance/upTo..st +++ /dev/null @@ -1,6 +0,0 @@ -accessing -upTo: anObject - ^ self collectionSpecies - streamContents: [ :out | | element | - [ self atEnd or: [ (element := self next) = anObject ] ] whileFalse: [ - out nextPut: element ] ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadStream.class/instance/upToAll..st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadStream.class/instance/upToAll..st new file mode 100644 index 000000000..48202c045 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadStream.class/instance/upToAll..st @@ -0,0 +1,17 @@ +accessing +upToAll: aCollection + "Answer a subcollection from the current access position to the occurrence (if any, but not inclusive) of aCollection. If aCollection is not in the stream, answer the entire rest of the stream." + + ^ self collectionSpecies streamContents: [ :out | | pattern | + pattern := aCollection readStream. + ([ self atEnd or: [ pattern atEnd ] ]) whileFalse: [ + self peek = pattern peek + ifTrue: [ + self next. pattern next ] + ifFalse: [ + pattern position = 0 + ifTrue: [ out nextPut: self next ] + ifFalse: [ out next: pattern position putAll: aCollection ]. + pattern reset ] ]. + pattern atEnd + ifFalse: [ out next: pattern position putAll: aCollection ] ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadStream.class/instance/upToEnd.st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadStream.class/instance/upToEnd.st deleted file mode 100644 index c85ee7e12..000000000 --- a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadStream.class/instance/upToEnd.st +++ /dev/null @@ -1,5 +0,0 @@ -accessing -upToEnd - ^ self collectionSpecies - streamContents: [ :collectionStream | - [ self atEnd ] whileFalse: [ collectionStream nextPut: self next ] ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadStream.class/methodProperties.json b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadStream.class/methodProperties.json deleted file mode 100644 index 72b9874af..000000000 --- a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadStream.class/methodProperties.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "class" : { - "defaultEncoder" : "SvenVanCaekenberghe 5/3/2012 14:43", - "on:" : "SvenVanCaekenberghe 5/3/2012 14:40", - "on:encoding:" : "SvenVanCaekenberghe 5/3/2012 15:13" }, - "instance" : { - "atEnd" : "SvenVanCaekenberghe 5/3/2012 21:29", - "close" : "SvenVanCaekenberghe 5/3/2012 14:39", - "collectionSpecies" : "SvenVanCaekenberghe 5/3/2012 15:09", - "contents" : "SvenVanCaekenberghe 5/3/2012 15:12", - "encoder" : "SvenVanCaekenberghe 5/3/2012 14:42", - "encoder:" : "SvenVanCaekenberghe 5/3/2012 14:41", - "encoding:" : "SvenVanCaekenberghe 12/3/2012 13:41", - "isBinary" : "SvenVanCaekenberghe 5/3/2012 15:07", - "next" : "SvenVanCaekenberghe 5/3/2012 15:46", - "next:" : "SvenVanCaekenberghe 5/3/2012 15:18", - "next:into:" : "SvenVanCaekenberghe 5/3/2012 15:18", - "next:into:startingAt:" : "SvenVanCaekenberghe 5/3/2012 15:19", - "on:" : "SvenVanCaekenberghe 5/3/2012 14:40", - "peek" : "SvenVanCaekenberghe 5/3/2012 15:35", - "peekFor:" : "SvenVanCaekenberghe 12/3/2012 13:05", - "readInto:startingAt:count:" : "SvenVanCaekenberghe 5/3/2012 15:57", - "skip:" : "SvenVanCaekenberghe 5/3/2012 15:11", - "upTo:" : "SvenVanCaekenberghe 5/3/2012 15:17", - "upToEnd" : "SvenVanCaekenberghe 12/16/2012 15:42", - "wrappedStream" : "SvenVanCaekenberghe 5/3/2012 14:41" } } diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadStream.class/properties.json b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadStream.class/properties.json index f633510e9..6d782d3e5 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadStream.class/properties.json +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadStream.class/properties.json @@ -1,16 +1,11 @@ { + "commentStamp" : "", + "super" : "ZnEncodedReadStream", "category" : "Zinc-Character-Encoding-Core", - "classinstvars" : [ - ], - "classvars" : [ - ], - "commentStamp" : "", - "instvars" : [ - "stream", - "encoder", - "peekedCharacter" ], + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], "name" : "ZnCharacterReadStream", - "pools" : [ - ], - "super" : "Object", - "type" : "normal" } + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadWriteStream.class/README.md b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadWriteStream.class/README.md new file mode 100644 index 000000000..fe1e7e7ae --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadWriteStream.class/README.md @@ -0,0 +1 @@ +I am a read-write character stream. I am mainly used to open the Pharo source and changes files. \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadWriteStream.class/class/on.encoding..st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadWriteStream.class/class/on.encoding..st new file mode 100644 index 000000000..4203b1f1b --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadWriteStream.class/class/on.encoding..st @@ -0,0 +1,6 @@ +instance creation +on: wrappedStream encoding: encoding + + ^ self new + on: wrappedStream encoding: encoding; + yourself \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadWriteStream.class/instance/atEnd.st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadWriteStream.class/instance/atEnd.st new file mode 100644 index 000000000..d900ad97c --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadWriteStream.class/instance/atEnd.st @@ -0,0 +1,4 @@ +accessing +atEnd + + ^ readStream atEnd \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadWriteStream.class/instance/close.st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadWriteStream.class/instance/close.st new file mode 100644 index 000000000..01fd0e5dc --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadWriteStream.class/instance/close.st @@ -0,0 +1,4 @@ +accessing +close + + writeStream close \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadWriteStream.class/instance/closed.st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadWriteStream.class/instance/closed.st new file mode 100644 index 000000000..07f5bbc13 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadWriteStream.class/instance/closed.st @@ -0,0 +1,3 @@ +testing +closed + ^ writeStream closed \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadWriteStream.class/instance/collectionSpecies.st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadWriteStream.class/instance/collectionSpecies.st new file mode 100644 index 000000000..48a938b7d --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadWriteStream.class/instance/collectionSpecies.st @@ -0,0 +1,3 @@ +accessing +collectionSpecies + ^ String \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadWriteStream.class/instance/cr.st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadWriteStream.class/instance/cr.st new file mode 100644 index 000000000..f5bf64256 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadWriteStream.class/instance/cr.st @@ -0,0 +1,4 @@ +accessing +cr + + writeStream cr \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadWriteStream.class/instance/flush.st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadWriteStream.class/instance/flush.st new file mode 100644 index 000000000..b83d40908 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadWriteStream.class/instance/flush.st @@ -0,0 +1,4 @@ +accessing +flush + + writeStream flush \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadWriteStream.class/instance/isReadOnly.st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadWriteStream.class/instance/isReadOnly.st new file mode 100644 index 000000000..eff479d1f --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadWriteStream.class/instance/isReadOnly.st @@ -0,0 +1,4 @@ +testing +isReadOnly + + ^ false \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadWriteStream.class/instance/next..st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadWriteStream.class/instance/next..st new file mode 100644 index 000000000..0608711bd --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadWriteStream.class/instance/next..st @@ -0,0 +1,4 @@ +accessing +next: anInteger + + ^ readStream next: anInteger \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadWriteStream.class/instance/next.st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadWriteStream.class/instance/next.st new file mode 100644 index 000000000..e67364964 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadWriteStream.class/instance/next.st @@ -0,0 +1,4 @@ +accessing +next + + ^ readStream next \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadWriteStream.class/instance/nextPut..st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadWriteStream.class/instance/nextPut..st new file mode 100644 index 000000000..5e79002b6 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadWriteStream.class/instance/nextPut..st @@ -0,0 +1,4 @@ +accessing +nextPut: aCharacter + + ^ writeStream nextPut: aCharacter \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadWriteStream.class/instance/nextPutAll..st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadWriteStream.class/instance/nextPutAll..st new file mode 100644 index 000000000..8483ce438 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadWriteStream.class/instance/nextPutAll..st @@ -0,0 +1,4 @@ +accessing +nextPutAll: aString + + ^ writeStream nextPutAll: aString \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadWriteStream.class/instance/on.encoding..st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadWriteStream.class/instance/on.encoding..st new file mode 100644 index 000000000..573583282 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadWriteStream.class/instance/on.encoding..st @@ -0,0 +1,6 @@ +instance creation +on: aStream encoding: encoding + | encoder | + encoder := encoding asZnCharacterEncoder. + readStream := ZnCharacterReadStream on: aStream encoding: encoder. + writeStream := ZnCharacterWriteStream on: aStream encoding: encoder \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadWriteStream.class/instance/peek.st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadWriteStream.class/instance/peek.st new file mode 100644 index 000000000..e03d0bac1 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadWriteStream.class/instance/peek.st @@ -0,0 +1,4 @@ +accessing +peek + + ^ readStream peek \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadWriteStream.class/instance/position..st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadWriteStream.class/instance/position..st new file mode 100644 index 000000000..1d2453d0b --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadWriteStream.class/instance/position..st @@ -0,0 +1,4 @@ +accessing +position: anInteger + + readStream position: anInteger \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadWriteStream.class/instance/position.st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadWriteStream.class/instance/position.st new file mode 100644 index 000000000..e57fd867f --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadWriteStream.class/instance/position.st @@ -0,0 +1,4 @@ +accessing +position + + ^ readStream position \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadWriteStream.class/instance/print..st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadWriteStream.class/instance/print..st new file mode 100644 index 000000000..163ea4a52 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadWriteStream.class/instance/print..st @@ -0,0 +1,4 @@ +accessing +print: object + + writeStream print: object \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadWriteStream.class/instance/readOnlyCopy.st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadWriteStream.class/instance/readOnlyCopy.st new file mode 100644 index 000000000..0feeb8eca --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadWriteStream.class/instance/readOnlyCopy.st @@ -0,0 +1,4 @@ +accessing +readOnlyCopy + + ^ readStream \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadWriteStream.class/instance/setToEnd.st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadWriteStream.class/instance/setToEnd.st new file mode 100644 index 000000000..90a005990 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadWriteStream.class/instance/setToEnd.st @@ -0,0 +1,4 @@ +accessing +setToEnd + + writeStream setToEnd \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadWriteStream.class/instance/size.st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadWriteStream.class/instance/size.st new file mode 100644 index 000000000..7552db783 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadWriteStream.class/instance/size.st @@ -0,0 +1,4 @@ +accessing +size + + ^ readStream size \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadWriteStream.class/instance/skip..st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadWriteStream.class/instance/skip..st new file mode 100644 index 000000000..3ca03ec2a --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadWriteStream.class/instance/skip..st @@ -0,0 +1,4 @@ +accessing +skip: anInteger + anInteger < 0 ifTrue: [ self error: 'cannot skip backwards' ]. + readStream skip: anInteger \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadWriteStream.class/instance/space.st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadWriteStream.class/instance/space.st new file mode 100644 index 000000000..e75f6b300 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadWriteStream.class/instance/space.st @@ -0,0 +1,4 @@ +accessing +space + + writeStream space \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadWriteStream.class/instance/tab.st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadWriteStream.class/instance/tab.st new file mode 100644 index 000000000..6d3b62662 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadWriteStream.class/instance/tab.st @@ -0,0 +1,4 @@ +accessing +tab + + writeStream tab \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadWriteStream.class/instance/upToAll..st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadWriteStream.class/instance/upToAll..st new file mode 100644 index 000000000..48202c045 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadWriteStream.class/instance/upToAll..st @@ -0,0 +1,17 @@ +accessing +upToAll: aCollection + "Answer a subcollection from the current access position to the occurrence (if any, but not inclusive) of aCollection. If aCollection is not in the stream, answer the entire rest of the stream." + + ^ self collectionSpecies streamContents: [ :out | | pattern | + pattern := aCollection readStream. + ([ self atEnd or: [ pattern atEnd ] ]) whileFalse: [ + self peek = pattern peek + ifTrue: [ + self next. pattern next ] + ifFalse: [ + pattern position = 0 + ifTrue: [ out nextPut: self next ] + ifFalse: [ out next: pattern position putAll: aCollection ]. + pattern reset ] ]. + pattern atEnd + ifFalse: [ out next: pattern position putAll: aCollection ] ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadWriteStream.class/instance/upToEnd.st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadWriteStream.class/instance/upToEnd.st new file mode 100644 index 000000000..cad5a1961 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadWriteStream.class/instance/upToEnd.st @@ -0,0 +1,4 @@ +accessing +upToEnd + + ^ readStream upToEnd \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadWriteStream.class/properties.json b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadWriteStream.class/properties.json new file mode 100644 index 000000000..f98536578 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadWriteStream.class/properties.json @@ -0,0 +1,14 @@ +{ + "commentStamp" : "", + "super" : "Object", + "category" : "Zinc-Character-Encoding-Core", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ + "readStream", + "writeStream" + ], + "name" : "ZnCharacterReadWriteStream", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterWriteStream.class/class/defaultEncoder.st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterWriteStream.class/class/defaultEncoder.st deleted file mode 100644 index d33faea25..000000000 --- a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterWriteStream.class/class/defaultEncoder.st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -defaultEncoder - ^ ZnUTF8Encoder new \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterWriteStream.class/class/on.encoding..st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterWriteStream.class/class/on.encoding..st deleted file mode 100644 index e164ffbea..000000000 --- a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterWriteStream.class/class/on.encoding..st +++ /dev/null @@ -1,6 +0,0 @@ -instance creation -on: writeStream encoding: encoding - ^ self new - on: writeStream; - encoding: encoding; - yourself \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterWriteStream.class/instance/^less.less.st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterWriteStream.class/instance/^less.less.st deleted file mode 100644 index 98d34e4da..000000000 --- a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterWriteStream.class/instance/^less.less.st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -<< collection - ^ self nextPutAll: collection \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterWriteStream.class/instance/cr.st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterWriteStream.class/instance/cr.st new file mode 100644 index 000000000..7715791a6 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterWriteStream.class/instance/cr.st @@ -0,0 +1,3 @@ +accessing +cr + self nextPut: Character cr \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterWriteStream.class/instance/crlf.st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterWriteStream.class/instance/crlf.st new file mode 100644 index 000000000..d8f3a5170 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterWriteStream.class/instance/crlf.st @@ -0,0 +1,3 @@ +accessing +crlf + self cr; lf \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterWriteStream.class/instance/encoder..st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterWriteStream.class/instance/encoder..st deleted file mode 100644 index f90a65185..000000000 --- a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterWriteStream.class/instance/encoder..st +++ /dev/null @@ -1,3 +0,0 @@ -initialize-release -encoder: characterEncoder - encoder := characterEncoder \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterWriteStream.class/instance/encoder.st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterWriteStream.class/instance/encoder.st deleted file mode 100644 index b4c887a51..000000000 --- a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterWriteStream.class/instance/encoder.st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -encoder - ^ encoder ifNil: [ encoder := self class defaultEncoder ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterWriteStream.class/instance/encoding..st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterWriteStream.class/instance/encoding..st deleted file mode 100644 index e88783773..000000000 --- a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterWriteStream.class/instance/encoding..st +++ /dev/null @@ -1,3 +0,0 @@ -initialize-release -encoding: encoding - encoder := ZnCharacterEncoder newForEncoding: encoding \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterWriteStream.class/instance/isBinary.st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterWriteStream.class/instance/isBinary.st deleted file mode 100644 index 37868db5b..000000000 --- a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterWriteStream.class/instance/isBinary.st +++ /dev/null @@ -1,3 +0,0 @@ -testing -isBinary - ^ false \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterWriteStream.class/instance/lf.st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterWriteStream.class/instance/lf.st new file mode 100644 index 000000000..3aaebb344 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterWriteStream.class/instance/lf.st @@ -0,0 +1,3 @@ +accessing +lf + self nextPut: Character lf \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterWriteStream.class/instance/next.putAll..st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterWriteStream.class/instance/next.putAll..st deleted file mode 100644 index 86cad8ae2..000000000 --- a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterWriteStream.class/instance/next.putAll..st +++ /dev/null @@ -1,6 +0,0 @@ -accessing -next: count putAll: collection - self - next: count - putAll: collection - startingAt: 1 \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterWriteStream.class/instance/next.putAll.startingAt..st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterWriteStream.class/instance/next.putAll.startingAt..st index 7b710f1e0..52c39984a 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterWriteStream.class/instance/next.putAll.startingAt..st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterWriteStream.class/instance/next.putAll.startingAt..st @@ -1,7 +1,9 @@ accessing next: count putAll: collection startingAt: offset - "Write count characters from collection starting at offset. - This is an inefficient implementation, writing characters one by one." - - 0 to: count - 1 do: [ :each | - self nextPut: (collection at: offset + each) ] \ No newline at end of file + "Write count characters from collection starting at offset." + + self encoder + next: count + putAll: collection + startingAt: offset + toStream: stream \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterWriteStream.class/instance/nextPut..st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterWriteStream.class/instance/nextPut..st index 7e5ab447c..1c3909a19 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterWriteStream.class/instance/nextPut..st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterWriteStream.class/instance/nextPut..st @@ -1,6 +1,6 @@ accessing nextPut: object - self encoder - nextPut: object + self encoder + nextPut: object toStream: stream. ^ object \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterWriteStream.class/instance/nextPutAll..st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterWriteStream.class/instance/nextPutAll..st deleted file mode 100644 index 8e46790a0..000000000 --- a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterWriteStream.class/instance/nextPutAll..st +++ /dev/null @@ -1,6 +0,0 @@ -accessing -nextPutAll: collection - self - next: collection size - putAll: collection - startingAt: 1 \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterWriteStream.class/instance/print..st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterWriteStream.class/instance/print..st new file mode 100644 index 000000000..8463372af --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterWriteStream.class/instance/print..st @@ -0,0 +1,3 @@ +accessing +print: object + object printOn: self \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterWriteStream.class/instance/tab.st b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterWriteStream.class/instance/tab.st new file mode 100644 index 000000000..c3cda2363 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterWriteStream.class/instance/tab.st @@ -0,0 +1,3 @@ +accessing +tab + self nextPut: Character tab \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterWriteStream.class/methodProperties.json b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterWriteStream.class/methodProperties.json deleted file mode 100644 index 3ed5d1442..000000000 --- a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterWriteStream.class/methodProperties.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "class" : { - "defaultEncoder" : "SvenVanCaekenberghe 5/3/2012 15:50", - "on:" : "SvenVanCaekenberghe 5/3/2012 15:51", - "on:encoding:" : "SvenVanCaekenberghe 5/3/2012 15:51" }, - "instance" : { - "<<" : "SvenVanCaekenberghe 5/3/2012 15:59", - "close" : "SvenVanCaekenberghe 5/3/2012 15:51", - "encoder" : "SvenVanCaekenberghe 5/3/2012 18:47", - "encoder:" : "SvenVanCaekenberghe 5/3/2012 15:51", - "encoding:" : "SvenVanCaekenberghe 4/19/2013 12:49", - "flush" : "SvenVanCaekenberghe 5/3/2012 15:52", - "isBinary" : "SvenVanCaekenberghe 5/3/2012 15:52", - "next:putAll:" : "SvenVanCaekenberghe 5/3/2012 15:54", - "next:putAll:startingAt:" : "SvenVanCaekenberghe 5/3/2012 15:57", - "nextPut:" : "SvenVanCaekenberghe 5/3/2012 15:56", - "nextPutAll:" : "SvenVanCaekenberghe 5/3/2012 15:56", - "on:" : "SvenVanCaekenberghe 5/3/2012 15:51", - "space" : "SvenVanCaekenberghe 5/3/2012 15:52", - "wrappedStream" : "SvenVanCaekenberghe 5/3/2012 18:47" } } diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterWriteStream.class/properties.json b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterWriteStream.class/properties.json index 500c5de87..1e55209bf 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterWriteStream.class/properties.json +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCharacterWriteStream.class/properties.json @@ -1,15 +1,11 @@ { + "commentStamp" : "", + "super" : "ZnEncodedWriteStream", "category" : "Zinc-Character-Encoding-Core", - "classinstvars" : [ - ], - "classvars" : [ - ], - "commentStamp" : "", - "instvars" : [ - "stream", - "encoder" ], + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], "name" : "ZnCharacterWriteStream", - "pools" : [ - ], - "super" : "Object", - "type" : "normal" } + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCodePointReadStream.class/README.md b/repository/Zinc-Character-Encoding-Core.package/ZnCodePointReadStream.class/README.md new file mode 100644 index 000000000..a98e5045c --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCodePointReadStream.class/README.md @@ -0,0 +1,6 @@ +I am ZnCodePointReadStream. +I wrap another binary ReadStream and use a ZnCharacerEncoder to allow Integer code points to be read. + +I am not positionable, but I do allow a one code point peek using a one code point internal buffer. + +Part of Zinc HTTP Components. diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCodePointReadStream.class/instance/collectionSpecies.st b/repository/Zinc-Character-Encoding-Core.package/ZnCodePointReadStream.class/instance/collectionSpecies.st new file mode 100644 index 000000000..350f88f9d --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCodePointReadStream.class/instance/collectionSpecies.st @@ -0,0 +1,3 @@ +accessing +collectionSpecies + ^ Array \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCodePointReadStream.class/instance/nextElement.st b/repository/Zinc-Character-Encoding-Core.package/ZnCodePointReadStream.class/instance/nextElement.st new file mode 100644 index 000000000..7bddede2b --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCodePointReadStream.class/instance/nextElement.st @@ -0,0 +1,3 @@ +private +nextElement + ^ self encoder nextCodePointFromStream: stream \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCodePointReadStream.class/properties.json b/repository/Zinc-Character-Encoding-Core.package/ZnCodePointReadStream.class/properties.json new file mode 100644 index 000000000..b0c421077 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCodePointReadStream.class/properties.json @@ -0,0 +1,11 @@ +{ + "commentStamp" : "", + "super" : "ZnEncodedReadStream", + "category" : "Zinc-Character-Encoding-Core", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "ZnCodePointReadStream", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCodePointWriteStream.class/README.md b/repository/Zinc-Character-Encoding-Core.package/ZnCodePointWriteStream.class/README.md new file mode 100644 index 000000000..0e99b640c --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCodePointWriteStream.class/README.md @@ -0,0 +1,4 @@ +I am ZnCodePointWriteStream. +I wrap another binary WriteStream and use a ZnCharacerEncoder to allow Integer code points to be written. + +Part of Zinc HTTP Components. \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCodePointWriteStream.class/instance/nextPut..st b/repository/Zinc-Character-Encoding-Core.package/ZnCodePointWriteStream.class/instance/nextPut..st new file mode 100644 index 000000000..472e7d108 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCodePointWriteStream.class/instance/nextPut..st @@ -0,0 +1,6 @@ +accessing +nextPut: object + self encoder + nextPutCodePoint: object + toStream: stream. + ^ object \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCodePointWriteStream.class/properties.json b/repository/Zinc-Character-Encoding-Core.package/ZnCodePointWriteStream.class/properties.json new file mode 100644 index 000000000..37100145f --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCodePointWriteStream.class/properties.json @@ -0,0 +1,11 @@ +{ + "commentStamp" : "", + "super" : "ZnEncodedWriteStream", + "category" : "Zinc-Character-Encoding-Core", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "ZnCodePointWriteStream", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCrPortableWriteStream.class/README.md b/repository/Zinc-Character-Encoding-Core.package/ZnCrPortableWriteStream.class/README.md new file mode 100644 index 000000000..f9f9e30d9 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCrPortableWriteStream.class/README.md @@ -0,0 +1 @@ +This class has been replaced by ZnNewLineWriterStream \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCrPortableWriteStream.class/class/on..st b/repository/Zinc-Character-Encoding-Core.package/ZnCrPortableWriteStream.class/class/on..st new file mode 100644 index 000000000..3db360862 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCrPortableWriteStream.class/class/on..st @@ -0,0 +1,7 @@ +instance creation +on: aStream + + ^ self basicNew + initialize; + stream: aStream; + yourself \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCrPortableWriteStream.class/instance/initialize.st b/repository/Zinc-Character-Encoding-Core.package/ZnCrPortableWriteStream.class/instance/initialize.st new file mode 100644 index 000000000..8d79181fd --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCrPortableWriteStream.class/instance/initialize.st @@ -0,0 +1,6 @@ +initialization +initialize + + super initialize. + cr := Character cr. + lf := Character lf \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCrPortableWriteStream.class/instance/newLine.st b/repository/Zinc-Character-Encoding-Core.package/ZnCrPortableWriteStream.class/instance/newLine.st new file mode 100644 index 000000000..a0e080194 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCrPortableWriteStream.class/instance/newLine.st @@ -0,0 +1,4 @@ +accessing +newLine + previous := nil. + stream nextPutAll: OSPlatform current lineEnding \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCrPortableWriteStream.class/instance/nextPut..st b/repository/Zinc-Character-Encoding-Core.package/ZnCrPortableWriteStream.class/instance/nextPut..st new file mode 100644 index 000000000..f1845c7d3 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCrPortableWriteStream.class/instance/nextPut..st @@ -0,0 +1,11 @@ +accessing +nextPut: aCharacter + "Write aCharacter to the receivers stream. + Convert all line end combinations, i.e cr, lf, crlf, to the platform convention" + + (previous == cr and: [ aCharacter == lf ]) ifFalse: [ + (aCharacter == cr or: [ aCharacter == lf ]) ifTrue: + [ self newLine ] + ifFalse: + [ stream nextPut: aCharacter ] ]. + previous := aCharacter \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCrPortableWriteStream.class/instance/stream..st b/repository/Zinc-Character-Encoding-Core.package/ZnCrPortableWriteStream.class/instance/stream..st new file mode 100644 index 000000000..2208df8c9 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCrPortableWriteStream.class/instance/stream..st @@ -0,0 +1,3 @@ +accessing +stream: aWriteStream + stream := aWriteStream \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCrPortableWriteStream.class/properties.json b/repository/Zinc-Character-Encoding-Core.package/ZnCrPortableWriteStream.class/properties.json new file mode 100644 index 000000000..e7c3c9d58 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnCrPortableWriteStream.class/properties.json @@ -0,0 +1,16 @@ +{ + "commentStamp" : "", + "super" : "WriteStream", + "category" : "Zinc-Character-Encoding-Core", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ + "stream", + "cr", + "lf", + "previous" + ], + "name" : "ZnCrPortableWriteStream", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnDebuggingUTF8Encoder.class/README.md b/repository/Zinc-Character-Encoding-Core.package/ZnDebuggingUTF8Encoder.class/README.md new file mode 100644 index 000000000..0b83d265b --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnDebuggingUTF8Encoder.class/README.md @@ -0,0 +1,8 @@ +I am ZnDebuggingUTF8Encoder.. +I am a ZnLossyUTF8Decoder and a ZnUTF8Decoder. + +I behave like my superclass but will output a verbose error when I am asked to write a Unicode code point that I cannot encode. + +For reading I inherit from my superclass. + +Part of Zinc HTTP Components. \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnDebuggingUTF8Encoder.class/class/handlesEncoding..st b/repository/Zinc-Character-Encoding-Core.package/ZnDebuggingUTF8Encoder.class/class/handlesEncoding..st new file mode 100644 index 000000000..6be0877ec --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnDebuggingUTF8Encoder.class/class/handlesEncoding..st @@ -0,0 +1,5 @@ +accessing +handlesEncoding: string + "Return true when my instances handle the encoding described by string" + + ^ (self canonicalEncodingIdentifier: string) = 'utf8debug' \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnDebuggingUTF8Encoder.class/class/knownEncodingIdentifiers.st b/repository/Zinc-Character-Encoding-Core.package/ZnDebuggingUTF8Encoder.class/class/knownEncodingIdentifiers.st new file mode 100644 index 000000000..1071d9092 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnDebuggingUTF8Encoder.class/class/knownEncodingIdentifiers.st @@ -0,0 +1,3 @@ +accessing +knownEncodingIdentifiers + ^ #( 'utf8debug' ) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnDebuggingUTF8Encoder.class/instance/defaultWriteErrorBlock.st b/repository/Zinc-Character-Encoding-Core.package/ZnDebuggingUTF8Encoder.class/instance/defaultWriteErrorBlock.st new file mode 100644 index 000000000..c602e63f4 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnDebuggingUTF8Encoder.class/instance/defaultWriteErrorBlock.st @@ -0,0 +1,4 @@ +accessing +defaultWriteErrorBlock + ^ [ :codePoint | + '' format: { codePoint } ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnDebuggingUTF8Encoder.class/instance/errorOutsideRange.to..st b/repository/Zinc-Character-Encoding-Core.package/ZnDebuggingUTF8Encoder.class/instance/errorOutsideRange.to..st new file mode 100644 index 000000000..2d2780d6b --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnDebuggingUTF8Encoder.class/instance/errorOutsideRange.to..st @@ -0,0 +1,7 @@ +error handling +errorOutsideRange: codePoint to: stream + | errorMessage | + errorMessage := self writeErrorBlock value: codePoint. + errorMessage isByteString + ifFalse: [ errorMessage := self defaultWriteErrorBlock value: codePoint ]. + stream nextPutAll: errorMessage asByteArray \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnDebuggingUTF8Encoder.class/instance/identifier.st b/repository/Zinc-Character-Encoding-Core.package/ZnDebuggingUTF8Encoder.class/instance/identifier.st new file mode 100644 index 000000000..ce501d9fe --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnDebuggingUTF8Encoder.class/instance/identifier.st @@ -0,0 +1,3 @@ +accessing +identifier + ^ 'utf8debug' \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnDebuggingUTF8Encoder.class/instance/writeErrorBlock..st b/repository/Zinc-Character-Encoding-Core.package/ZnDebuggingUTF8Encoder.class/instance/writeErrorBlock..st new file mode 100644 index 000000000..eb4ab388e --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnDebuggingUTF8Encoder.class/instance/writeErrorBlock..st @@ -0,0 +1,3 @@ +accessing +writeErrorBlock: aOneArgumentBlock + writeErrorBlock := aOneArgumentBlock \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnDebuggingUTF8Encoder.class/instance/writeErrorBlock.st b/repository/Zinc-Character-Encoding-Core.package/ZnDebuggingUTF8Encoder.class/instance/writeErrorBlock.st new file mode 100644 index 000000000..91d97f7ae --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnDebuggingUTF8Encoder.class/instance/writeErrorBlock.st @@ -0,0 +1,3 @@ +accessing +writeErrorBlock + ^ writeErrorBlock ifNil: [ writeErrorBlock := self defaultWriteErrorBlock ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnDebuggingUTF8Encoder.class/properties.json b/repository/Zinc-Character-Encoding-Core.package/ZnDebuggingUTF8Encoder.class/properties.json new file mode 100644 index 000000000..749883e20 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnDebuggingUTF8Encoder.class/properties.json @@ -0,0 +1,13 @@ +{ + "commentStamp" : "", + "super" : "ZnLossyUTF8Encoder", + "category" : "Zinc-Character-Encoding-Core", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ + "writeErrorBlock" + ], + "name" : "ZnDebuggingUTF8Encoder", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnDefaultCharacterEncoder.class/README.md b/repository/Zinc-Character-Encoding-Core.package/ZnDefaultCharacterEncoder.class/README.md new file mode 100644 index 000000000..ccff7bea3 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnDefaultCharacterEncoder.class/README.md @@ -0,0 +1,8 @@ +I am ZnDefaultCharacterEncoder. +I am a DynamicVariable and a ProcessSpecificVariable. + +I can be used to modify the default ZnCharacteEncoder on a per process basis, for example: + +ZnDefaultCharacterEncoder + value: ZnUTF8Encoder latin1 + during: [ ZnClient new get: 'http://zn.stfx.eu/zn/small.html' ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnDefaultCharacterEncoder.class/instance/default.st b/repository/Zinc-Character-Encoding-Core.package/ZnDefaultCharacterEncoder.class/instance/default.st new file mode 100644 index 000000000..a4a6dc256 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnDefaultCharacterEncoder.class/instance/default.st @@ -0,0 +1,4 @@ +accessing +default + "Pharo needs it on instance side" + ^ ZnCharacterEncoder utf8 \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnDefaultCharacterEncoder.class/properties.json b/repository/Zinc-Character-Encoding-Core.package/ZnDefaultCharacterEncoder.class/properties.json new file mode 100644 index 000000000..e7d7b9e16 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnDefaultCharacterEncoder.class/properties.json @@ -0,0 +1,11 @@ +{ + "commentStamp" : "", + "super" : "DynamicVariable", + "category" : "Zinc-Character-Encoding-Core", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "ZnDefaultCharacterEncoder", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnEncodedReadStream.class/README.md b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedReadStream.class/README.md new file mode 100644 index 000000000..9050c6d9b --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedReadStream.class/README.md @@ -0,0 +1,3 @@ +I am ZnEncodedReadStream, an abstract support class for read streams on a binary encoded wrapped stream. + +Part of Zinc HTTP Components \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnEncodedReadStream.class/class/isAbstract.st b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedReadStream.class/class/isAbstract.st new file mode 100644 index 000000000..7b5ef11e1 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedReadStream.class/class/isAbstract.st @@ -0,0 +1,4 @@ +testing +isAbstract + + ^ self == ZnEncodedReadStream \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnEncodedReadStream.class/instance/atEnd.st b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedReadStream.class/instance/atEnd.st new file mode 100644 index 000000000..a7c90e6d1 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedReadStream.class/instance/atEnd.st @@ -0,0 +1,3 @@ +testing +atEnd + ^ peeked isNil and: [ stream atEnd ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnEncodedReadStream.class/instance/back.st b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedReadStream.class/instance/back.st new file mode 100644 index 000000000..1cb7037b1 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedReadStream.class/instance/back.st @@ -0,0 +1,7 @@ +accessing +back + self encoder backOnStream: stream. + peeked ifNotNil: [ + self encoder backOnStream: stream. + peeked := nil ]. + ^ nil \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnEncodedReadStream.class/instance/collectionSpecies.st b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedReadStream.class/instance/collectionSpecies.st new file mode 100644 index 000000000..9d11ddb06 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedReadStream.class/instance/collectionSpecies.st @@ -0,0 +1,3 @@ +accessing +collectionSpecies + ^ self subclassResponsibility \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnEncodedReadStream.class/instance/contents.st b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedReadStream.class/instance/contents.st new file mode 100644 index 000000000..b86578209 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedReadStream.class/instance/contents.st @@ -0,0 +1,5 @@ +accessing +contents + "This is technically not correct, but it is better than nothing" + + ^ self upToEnd \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnEncodedReadStream.class/instance/isReadOnly.st b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedReadStream.class/instance/isReadOnly.st new file mode 100644 index 000000000..39a54a244 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedReadStream.class/instance/isReadOnly.st @@ -0,0 +1,4 @@ +testing +isReadOnly + + ^ true \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnEncodedReadStream.class/instance/next..st b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedReadStream.class/instance/next..st new file mode 100644 index 000000000..4b1757138 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedReadStream.class/instance/next..st @@ -0,0 +1,8 @@ +accessing +next: requestedCount + "Read requestedCount elements into new collection and return it, + it could be that less elements were available" + + ^ self + next: requestedCount + into: (self collectionSpecies new: requestedCount) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnEncodedReadStream.class/instance/next.into..st b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedReadStream.class/instance/next.into..st new file mode 100644 index 000000000..f7138006e --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedReadStream.class/instance/next.into..st @@ -0,0 +1,9 @@ +accessing +next: requestedCount into: collection + "Read requestedCount elements into collection, + returning a copy if less elements are available" + + ^ self + next: requestedCount + into: collection + startingAt: 1 \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnEncodedReadStream.class/instance/next.into.startingAt..st b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedReadStream.class/instance/next.into.startingAt..st new file mode 100644 index 000000000..d25feacec --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedReadStream.class/instance/next.into.startingAt..st @@ -0,0 +1,13 @@ +accessing +next: requestedCount into: collection startingAt: offset + "Read requestedCount elements into collection starting at offset, + returning a copy if less elements are available" + + | readCount | + readCount := self + readInto: collection + startingAt: offset + count: requestedCount. + ^ requestedCount = readCount + ifTrue: [ collection ] + ifFalse: [ collection copyFrom: 1 to: offset + readCount - 1 ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnEncodedReadStream.class/instance/next.st b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedReadStream.class/instance/next.st new file mode 100644 index 000000000..ba348bfc7 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedReadStream.class/instance/next.st @@ -0,0 +1,9 @@ +accessing +next + ^ peeked + ifNil: [ + stream atEnd ifFalse: [ self nextElement ] ] + ifNotNil: [ | character | + character := peeked. + peeked := nil. + character ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnEncodedReadStream.class/instance/nextElement.st b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedReadStream.class/instance/nextElement.st new file mode 100644 index 000000000..c6b1f5899 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedReadStream.class/instance/nextElement.st @@ -0,0 +1,3 @@ +private +nextElement + self subclassResponsibility \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnEncodedReadStream.class/instance/nextInto..st b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedReadStream.class/instance/nextInto..st new file mode 100644 index 000000000..a1d1dd5d5 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedReadStream.class/instance/nextInto..st @@ -0,0 +1,8 @@ +accessing +nextInto: collection + "Read the next elements of the receiver into collection, + returning a copy if less elements are available" + + ^ self + next: collection size + into: collection \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnEncodedReadStream.class/instance/peek.st b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedReadStream.class/instance/peek.st new file mode 100644 index 000000000..1d0b8634d --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedReadStream.class/instance/peek.st @@ -0,0 +1,5 @@ +accessing +peek + ^ peeked + ifNil: [ + stream atEnd ifFalse: [ peeked := self nextElement ] ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnEncodedReadStream.class/instance/peekFor..st b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedReadStream.class/instance/peekFor..st new file mode 100644 index 000000000..bcc0b1419 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedReadStream.class/instance/peekFor..st @@ -0,0 +1,7 @@ +accessing +peekFor: object + ^ self peek = object + ifTrue: [ + self next. + true ] + ifFalse: [ false ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnEncodedReadStream.class/instance/position..st b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedReadStream.class/instance/position..st new file mode 100644 index 000000000..8637ec5d8 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedReadStream.class/instance/position..st @@ -0,0 +1,9 @@ +accessing +position: aPosition + "Set the byte position in the underlying/wrapped binary stream to aPosition. + This is not a character based position! Positions are zero based. + I will move further backward if aPosition is not at the beginning of a code point." + + super position: aPosition. + self encoder ensureAtBeginOfCodePointOnStream: stream. + peeked := nil \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnEncodedReadStream.class/instance/position.st b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedReadStream.class/instance/position.st new file mode 100644 index 000000000..d358ccb90 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedReadStream.class/instance/position.st @@ -0,0 +1,4 @@ +accessing +position + + ^ super position - (peeked ifNil: [ 0 ] ifNotNil: [ 1 ]) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnEncodedReadStream.class/instance/positionForward..st b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedReadStream.class/instance/positionForward..st new file mode 100644 index 000000000..8af58b648 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedReadStream.class/instance/positionForward..st @@ -0,0 +1,9 @@ +accessing +positionForward: aPosition + "Set the byte position in the underlying/wrapped binary stream to aPosition. + This is not a character based position! Positions are zero based. + I will move further forward if aPosition is not at the beginning of a code point." + + super position: aPosition. + self encoder skipToBeginOfCodePointOnStream: stream. + peeked := nil \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnEncodedReadStream.class/instance/readInto.startingAt.count..st b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedReadStream.class/instance/readInto.startingAt.count..st new file mode 100644 index 000000000..508a53f81 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedReadStream.class/instance/readInto.startingAt.count..st @@ -0,0 +1,10 @@ +accessing +readInto: collection startingAt: offset count: requestedCount + "Read requestedCount elements into collection starting at offset, + returning the number of elements read, there could be less elements available. + This is an inefficient abstract implementation, reading one by one." + + 0 to: requestedCount - 1 do: [ :count | | object | + (object := self next) ifNil: [ ^ count ]. + collection at: offset + count put: object ]. + ^ requestedCount \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnEncodedReadStream.class/instance/readStream.st b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedReadStream.class/instance/readStream.st new file mode 100644 index 000000000..6f19a3b33 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedReadStream.class/instance/readStream.st @@ -0,0 +1,3 @@ +accessing +readStream + ^ self \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnEncodedReadStream.class/instance/skip..st b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedReadStream.class/instance/skip..st new file mode 100644 index 000000000..2d1aa4aab --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedReadStream.class/instance/skip..st @@ -0,0 +1,4 @@ +accessing +skip: count + count < 0 ifTrue: [ self error: 'cannot skip backwards' ]. + count timesRepeat: [ self next ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnEncodedReadStream.class/instance/upTo..st b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedReadStream.class/instance/upTo..st new file mode 100644 index 000000000..534bbc816 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedReadStream.class/instance/upTo..st @@ -0,0 +1,6 @@ +accessing +upTo: anObject + ^ self collectionSpecies + streamContents: [ :out | | element | + [ self atEnd or: [ (element := self next) = anObject ] ] whileFalse: [ + out nextPut: element ] ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnEncodedReadStream.class/instance/upToEnd.st b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedReadStream.class/instance/upToEnd.st new file mode 100644 index 000000000..8c722e7ff --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedReadStream.class/instance/upToEnd.st @@ -0,0 +1,5 @@ +accessing +upToEnd + ^ self collectionSpecies + streamContents: [ :collectionStream | + [ self atEnd ] whileFalse: [ collectionStream nextPut: self next ] ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnEncodedReadStream.class/properties.json b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedReadStream.class/properties.json new file mode 100644 index 000000000..ead0da838 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedReadStream.class/properties.json @@ -0,0 +1,13 @@ +{ + "commentStamp" : "", + "super" : "ZnEncodedStream", + "category" : "Zinc-Character-Encoding-Core", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ + "peeked" + ], + "name" : "ZnEncodedReadStream", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnEncodedStream.class/README.md b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedStream.class/README.md new file mode 100644 index 000000000..c8781c9b0 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedStream.class/README.md @@ -0,0 +1,3 @@ +I am ZnEncodedStream, an abstract support class for read and write streams on an encoded binary stream. + +Part of Zinc HTTP Components \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnEncodedStream.class/class/defaultEncoder.st b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedStream.class/class/defaultEncoder.st new file mode 100644 index 000000000..edd25041c --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedStream.class/class/defaultEncoder.st @@ -0,0 +1,3 @@ +accessing +defaultEncoder + ^ ZnCharacterEncoder utf8 \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnEncodedStream.class/class/isAbstract.st b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedStream.class/class/isAbstract.st new file mode 100644 index 000000000..0a22e299b --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedStream.class/class/isAbstract.st @@ -0,0 +1,4 @@ +testing +isAbstract + + ^ self == ZnEncodedStream \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnEncodedStream.class/class/on..st b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedStream.class/class/on..st new file mode 100644 index 000000000..251b33ac6 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedStream.class/class/on..st @@ -0,0 +1,5 @@ +instance creation +on: wrappedStream + ^ self new + on: wrappedStream; + yourself \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnEncodedStream.class/class/on.encoding..st b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedStream.class/class/on.encoding..st new file mode 100644 index 000000000..ddba966a1 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedStream.class/class/on.encoding..st @@ -0,0 +1,6 @@ +instance creation +on: wrappedStream encoding: encoding + ^ self new + on: wrappedStream; + encoding: encoding; + yourself \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadStream.class/instance/close.st b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedStream.class/instance/close.st similarity index 100% rename from repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadStream.class/instance/close.st rename to repository/Zinc-Character-Encoding-Core.package/ZnEncodedStream.class/instance/close.st diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnEncodedStream.class/instance/closed.st b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedStream.class/instance/closed.st new file mode 100644 index 000000000..40254d1cb --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedStream.class/instance/closed.st @@ -0,0 +1,3 @@ +testing +closed + ^ stream closed \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadStream.class/instance/encoder..st b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedStream.class/instance/encoder..st similarity index 100% rename from repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadStream.class/instance/encoder..st rename to repository/Zinc-Character-Encoding-Core.package/ZnEncodedStream.class/instance/encoder..st diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadStream.class/instance/encoder.st b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedStream.class/instance/encoder.st similarity index 100% rename from repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadStream.class/instance/encoder.st rename to repository/Zinc-Character-Encoding-Core.package/ZnEncodedStream.class/instance/encoder.st diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnEncodedStream.class/instance/encoding..st b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedStream.class/instance/encoding..st new file mode 100644 index 000000000..050cf23ee --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedStream.class/instance/encoding..st @@ -0,0 +1,3 @@ +initialize-release +encoding: encoding + encoder := encoding asZnCharacterEncoder \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnEncodedStream.class/instance/flush.st b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedStream.class/instance/flush.st new file mode 100644 index 000000000..d1c76a54d --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedStream.class/instance/flush.st @@ -0,0 +1,3 @@ +accessing +flush + ^ stream flush \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadStream.class/instance/isBinary.st b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedStream.class/instance/isBinary.st similarity index 100% rename from repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadStream.class/instance/isBinary.st rename to repository/Zinc-Character-Encoding-Core.package/ZnEncodedStream.class/instance/isBinary.st diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnEncodedStream.class/instance/isStream.st b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedStream.class/instance/isStream.st new file mode 100644 index 000000000..fc57ade8a --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedStream.class/instance/isStream.st @@ -0,0 +1,3 @@ +testing +isStream + ^ true \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnEncodedStream.class/instance/on..st b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedStream.class/instance/on..st new file mode 100644 index 000000000..a5effebb4 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedStream.class/instance/on..st @@ -0,0 +1,3 @@ +initialize-release +on: wrappedStream + stream := wrappedStream \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnEncodedStream.class/instance/position..st b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedStream.class/instance/position..st new file mode 100644 index 000000000..ae5331661 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedStream.class/instance/position..st @@ -0,0 +1,3 @@ +accessing +position: aPosition + stream position: aPosition \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnEncodedStream.class/instance/position.st b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedStream.class/instance/position.st new file mode 100644 index 000000000..dfa3787db --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedStream.class/instance/position.st @@ -0,0 +1,6 @@ +accessing +position + "Return the byte position in the underlying/wrapped binary stream, zero based. + This is not a character based position! But it is always at the beginning of a code point." + + ^ stream position \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnEncodedStream.class/instance/rawStream.st b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedStream.class/instance/rawStream.st new file mode 100644 index 000000000..3f9aee222 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedStream.class/instance/rawStream.st @@ -0,0 +1,7 @@ +accessing +rawStream + "Answer the innermost stream wrapped by the receiver, e.g. a raw binary file stream, + socket stream, or regular Read/WriteStream. + Defer to the wrappedStream." + + ^ self wrappedStream rawStream \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnEncodedStream.class/instance/reset.st b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedStream.class/instance/reset.st new file mode 100644 index 000000000..6aeabd64e --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedStream.class/instance/reset.st @@ -0,0 +1,4 @@ +initialization +reset + + ^ stream reset \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnEncodedStream.class/instance/setToEnd.st b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedStream.class/instance/setToEnd.st new file mode 100644 index 000000000..9be85a505 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedStream.class/instance/setToEnd.st @@ -0,0 +1,3 @@ +accessing +setToEnd + stream setToEnd \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnEncodedStream.class/instance/size.st b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedStream.class/instance/size.st new file mode 100644 index 000000000..d63392c3e --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedStream.class/instance/size.st @@ -0,0 +1,3 @@ +accessing +size + ^ stream size \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnEncodedStream.class/instance/truncate..st b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedStream.class/instance/truncate..st new file mode 100644 index 000000000..db2d1f125 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedStream.class/instance/truncate..st @@ -0,0 +1,3 @@ +accessing +truncate: anInteger + stream truncate: anInteger \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnEncodedStream.class/instance/truncate.st b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedStream.class/instance/truncate.st new file mode 100644 index 000000000..9ad20c255 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedStream.class/instance/truncate.st @@ -0,0 +1,3 @@ +accessing +truncate + stream truncate \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadStream.class/instance/wrappedStream.st b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedStream.class/instance/wrappedStream.st similarity index 100% rename from repository/Zinc-Character-Encoding-Core.package/ZnCharacterReadStream.class/instance/wrappedStream.st rename to repository/Zinc-Character-Encoding-Core.package/ZnEncodedStream.class/instance/wrappedStream.st diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnEncodedStream.class/properties.json b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedStream.class/properties.json new file mode 100644 index 000000000..91355d2f9 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedStream.class/properties.json @@ -0,0 +1,14 @@ +{ + "commentStamp" : "", + "super" : "Object", + "category" : "Zinc-Character-Encoding-Core", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ + "stream", + "encoder" + ], + "name" : "ZnEncodedStream", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnEncodedWriteStream.class/README.md b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedWriteStream.class/README.md new file mode 100644 index 000000000..d38cd68d0 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedWriteStream.class/README.md @@ -0,0 +1,3 @@ +I am ZnEncodedWriteStream, an abstract support class for write streams on a binary encoded wrapped stream. + +Part of Zinc HTTP Components \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnEncodedWriteStream.class/class/isAbstract.st b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedWriteStream.class/class/isAbstract.st new file mode 100644 index 000000000..3ed952fd2 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedWriteStream.class/class/isAbstract.st @@ -0,0 +1,4 @@ +testing +isAbstract + + ^ self == ZnEncodedWriteStream \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnEncodedWriteStream.class/instance/^less.less.st b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedWriteStream.class/instance/^less.less.st new file mode 100644 index 000000000..ef81d0e46 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedWriteStream.class/instance/^less.less.st @@ -0,0 +1,9 @@ +accessing +<< anObject + "Write anObject to the receiver, dispatching using #putOn: + This is a shortcut for both nextPut: and nextPutAll: since anObject can be both + the element type of the receiver as well as a collection of those elements. + No further conversions of anObject are applied. + Return self to accomodate chaining." + + anObject putOn: self \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCharacterWriteStream.class/instance/flush.st b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedWriteStream.class/instance/flush.st similarity index 100% rename from repository/Zinc-Character-Encoding-Core.package/ZnCharacterWriteStream.class/instance/flush.st rename to repository/Zinc-Character-Encoding-Core.package/ZnEncodedWriteStream.class/instance/flush.st diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnEncodedWriteStream.class/instance/next.putAll..st b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedWriteStream.class/instance/next.putAll..st new file mode 100644 index 000000000..ff2fef981 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedWriteStream.class/instance/next.putAll..st @@ -0,0 +1,6 @@ +accessing +next: count putAll: collection + self + next: count + putAll: collection + startingAt: 1 \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnEncodedWriteStream.class/instance/next.putAll.startingAt..st b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedWriteStream.class/instance/next.putAll.startingAt..st new file mode 100644 index 000000000..e12d9a97f --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedWriteStream.class/instance/next.putAll.startingAt..st @@ -0,0 +1,7 @@ +accessing +next: count putAll: collection startingAt: offset + "Write count items from collection starting at offset. + This is an inefficient abstract implementation writing one by one." + + 0 to: count - 1 do: [ :each | + self nextPut: (collection at: offset + each) ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnEncodedWriteStream.class/instance/nextPut..st b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedWriteStream.class/instance/nextPut..st new file mode 100644 index 000000000..5c5820fe1 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedWriteStream.class/instance/nextPut..st @@ -0,0 +1,3 @@ +accessing +nextPut: anObject + self subclassResponsibility \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnEncodedWriteStream.class/instance/nextPutAll..st b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedWriteStream.class/instance/nextPutAll..st new file mode 100644 index 000000000..15eb1a5ba --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedWriteStream.class/instance/nextPutAll..st @@ -0,0 +1,6 @@ +accessing +nextPutAll: collection + self + next: collection size + putAll: collection + startingAt: 1 \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnEncodedWriteStream.class/properties.json b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedWriteStream.class/properties.json new file mode 100644 index 000000000..e47a6c765 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnEncodedWriteStream.class/properties.json @@ -0,0 +1,11 @@ +{ + "commentStamp" : "", + "super" : "ZnEncodedStream", + "category" : "Zinc-Character-Encoding-Core", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "ZnEncodedWriteStream", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnEndianSensitiveUTFEncoder.class/README.md b/repository/Zinc-Character-Encoding-Core.package/ZnEndianSensitiveUTFEncoder.class/README.md new file mode 100644 index 000000000..6c0d30767 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnEndianSensitiveUTFEncoder.class/README.md @@ -0,0 +1,4 @@ +I am ZnEndianSensitiveUTFEncoder. +I am a ZnCharacterEncoder. +I add support for UTF encodings that are sensitive to endianness. +The default is big endian. \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnEndianSensitiveUTFEncoder.class/class/handlesEncoding..st b/repository/Zinc-Character-Encoding-Core.package/ZnEndianSensitiveUTFEncoder.class/class/handlesEncoding..st new file mode 100644 index 000000000..4cb9521a7 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnEndianSensitiveUTFEncoder.class/class/handlesEncoding..st @@ -0,0 +1,5 @@ +accessing +handlesEncoding: string + "Return true when my instances handle the encoding described by string" + + ^ false \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnEndianSensitiveUTFEncoder.class/class/isAbstract.st b/repository/Zinc-Character-Encoding-Core.package/ZnEndianSensitiveUTFEncoder.class/class/isAbstract.st new file mode 100644 index 000000000..deebb9199 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnEndianSensitiveUTFEncoder.class/class/isAbstract.st @@ -0,0 +1,3 @@ +testing +isAbstract + ^ self = ZnEndianSensitiveUTFEncoder \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnEndianSensitiveUTFEncoder.class/class/newForEncoding..st b/repository/Zinc-Character-Encoding-Core.package/ZnEndianSensitiveUTFEncoder.class/class/newForEncoding..st new file mode 100644 index 000000000..e93793046 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnEndianSensitiveUTFEncoder.class/class/newForEncoding..st @@ -0,0 +1,11 @@ +instance creation +newForEncoding: string + "Return a new character encoder object for an encoding described by string. + Try to infer endianness from string, defaulting to big endian." + + | encoder | + encoder := self new. + encoder identifier: string. + (string asLowercase endsWith: 'be') ifTrue: [ encoder beBigEndian ]. + (string asLowercase endsWith: 'le') ifTrue: [ encoder beLittleEndian ]. + ^ encoder \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnEndianSensitiveUTFEncoder.class/instance/^equals.st b/repository/Zinc-Character-Encoding-Core.package/ZnEndianSensitiveUTFEncoder.class/instance/^equals.st new file mode 100644 index 000000000..873be250d --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnEndianSensitiveUTFEncoder.class/instance/^equals.st @@ -0,0 +1,3 @@ +comparing += anObject + ^ super = anObject and: [ self identifier == anObject identifier ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnEndianSensitiveUTFEncoder.class/instance/beBigEndian.st b/repository/Zinc-Character-Encoding-Core.package/ZnEndianSensitiveUTFEncoder.class/instance/beBigEndian.st new file mode 100644 index 000000000..fc3b61b57 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnEndianSensitiveUTFEncoder.class/instance/beBigEndian.st @@ -0,0 +1,3 @@ +initialization +beBigEndian + endianness := #big \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnEndianSensitiveUTFEncoder.class/instance/beLittleEndian.st b/repository/Zinc-Character-Encoding-Core.package/ZnEndianSensitiveUTFEncoder.class/instance/beLittleEndian.st new file mode 100644 index 000000000..57f36e444 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnEndianSensitiveUTFEncoder.class/instance/beLittleEndian.st @@ -0,0 +1,3 @@ +initialization +beLittleEndian + endianness := #little \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnEndianSensitiveUTFEncoder.class/instance/endianness.st b/repository/Zinc-Character-Encoding-Core.package/ZnEndianSensitiveUTFEncoder.class/instance/endianness.st new file mode 100644 index 000000000..486f7c40c --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnEndianSensitiveUTFEncoder.class/instance/endianness.st @@ -0,0 +1,3 @@ +accessing +endianness + ^ endianness \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnEndianSensitiveUTFEncoder.class/instance/hash.st b/repository/Zinc-Character-Encoding-Core.package/ZnEndianSensitiveUTFEncoder.class/instance/hash.st new file mode 100644 index 000000000..f5af769e9 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnEndianSensitiveUTFEncoder.class/instance/hash.st @@ -0,0 +1,3 @@ +comparing +hash + ^ self identifier hash \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnEndianSensitiveUTFEncoder.class/instance/identifier..st b/repository/Zinc-Character-Encoding-Core.package/ZnEndianSensitiveUTFEncoder.class/instance/identifier..st new file mode 100644 index 000000000..eb195a155 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnEndianSensitiveUTFEncoder.class/instance/identifier..st @@ -0,0 +1,3 @@ +accessing +identifier: anObject + identifier := anObject \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnEndianSensitiveUTFEncoder.class/instance/identifier.st b/repository/Zinc-Character-Encoding-Core.package/ZnEndianSensitiveUTFEncoder.class/instance/identifier.st new file mode 100644 index 000000000..c7b817464 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnEndianSensitiveUTFEncoder.class/instance/identifier.st @@ -0,0 +1,3 @@ +accessing +identifier + ^ identifier \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnEndianSensitiveUTFEncoder.class/instance/initialize.st b/repository/Zinc-Character-Encoding-Core.package/ZnEndianSensitiveUTFEncoder.class/instance/initialize.st new file mode 100644 index 000000000..511d04fa7 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnEndianSensitiveUTFEncoder.class/instance/initialize.st @@ -0,0 +1,3 @@ +initialization +initialize + endianness := #big \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnEndianSensitiveUTFEncoder.class/instance/isBigEndian.st b/repository/Zinc-Character-Encoding-Core.package/ZnEndianSensitiveUTFEncoder.class/instance/isBigEndian.st new file mode 100644 index 000000000..e4760229e --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnEndianSensitiveUTFEncoder.class/instance/isBigEndian.st @@ -0,0 +1,3 @@ +testing +isBigEndian + ^ endianness = #big \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnEndianSensitiveUTFEncoder.class/instance/isLittleEndian.st b/repository/Zinc-Character-Encoding-Core.package/ZnEndianSensitiveUTFEncoder.class/instance/isLittleEndian.st new file mode 100644 index 000000000..530b70ca3 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnEndianSensitiveUTFEncoder.class/instance/isLittleEndian.st @@ -0,0 +1,3 @@ +testing +isLittleEndian + ^ endianness = #little \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnEndianSensitiveUTFEncoder.class/instance/printOn..st b/repository/Zinc-Character-Encoding-Core.package/ZnEndianSensitiveUTFEncoder.class/instance/printOn..st new file mode 100644 index 000000000..b77a7f420 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnEndianSensitiveUTFEncoder.class/instance/printOn..st @@ -0,0 +1,7 @@ +printing +printOn: stream + super printOn: stream. + stream nextPut: $(. + stream print: self identifier asString; space. + stream nextPutAll: endianness; nextPutAll: ' endian'. + stream nextPut: $) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnEndianSensitiveUTFEncoder.class/instance/swapEndianness.st b/repository/Zinc-Character-Encoding-Core.package/ZnEndianSensitiveUTFEncoder.class/instance/swapEndianness.st new file mode 100644 index 000000000..9e4f17cdd --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnEndianSensitiveUTFEncoder.class/instance/swapEndianness.st @@ -0,0 +1,5 @@ +private +swapEndianness + self isLittleEndian + ifTrue: [ self beBigEndian ] + ifFalse: [ self beLittleEndian ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnEndianSensitiveUTFEncoder.class/properties.json b/repository/Zinc-Character-Encoding-Core.package/ZnEndianSensitiveUTFEncoder.class/properties.json new file mode 100644 index 000000000..6bd4d17f5 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnEndianSensitiveUTFEncoder.class/properties.json @@ -0,0 +1,14 @@ +{ + "commentStamp" : "", + "super" : "ZnUTFEncoder", + "category" : "Zinc-Character-Encoding-Core", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ + "endianness", + "identifier" + ], + "name" : "ZnEndianSensitiveUTFEncoder", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnEndianessReadWriteStream.class/README.md b/repository/Zinc-Character-Encoding-Core.package/ZnEndianessReadWriteStream.class/README.md new file mode 100644 index 000000000..ae52d2c0e --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnEndianessReadWriteStream.class/README.md @@ -0,0 +1 @@ +I am a stream decorator that knows how to read and write little endian numbers from my underlying stream. \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnEndianessReadWriteStream.class/class/on..st b/repository/Zinc-Character-Encoding-Core.package/ZnEndianessReadWriteStream.class/class/on..st new file mode 100644 index 000000000..49723c84a --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnEndianessReadWriteStream.class/class/on..st @@ -0,0 +1,5 @@ +instance creation +on: writeStream + ^ self basicNew + on: writeStream; + yourself \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnEndianessReadWriteStream.class/class/on.do..st b/repository/Zinc-Character-Encoding-Core.package/ZnEndianessReadWriteStream.class/class/on.do..st new file mode 100644 index 000000000..fcaae6693 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnEndianessReadWriteStream.class/class/on.do..st @@ -0,0 +1,10 @@ +instance creation +on: writeStream do: block + "Execute block with as argument a ZnBufferedWriteStream on writeStream, + making sure #flush is called at the end. Return the value of block." + + | bufferedWriteStream result | + bufferedWriteStream := self on: writeStream. + result := block value: bufferedWriteStream. + bufferedWriteStream flush. + ^ result \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnEndianessReadWriteStream.class/instance/nextLittleEndianNumber..st b/repository/Zinc-Character-Encoding-Core.package/ZnEndianessReadWriteStream.class/instance/nextLittleEndianNumber..st new file mode 100644 index 000000000..03f62bf38 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnEndianessReadWriteStream.class/instance/nextLittleEndianNumber..st @@ -0,0 +1,9 @@ +endianess +nextLittleEndianNumber: n + "Answer the next n bytes as a positive Integer or LargePositiveInteger, where the bytes are ordered from least significant to most significant." + + | bytes s | + bytes := stream next: n. + s := 0. + n to: 1 by: -1 do: [:i | s := (s bitShift: 8) bitOr: (bytes at: i)]. + ^ s \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnEndianessReadWriteStream.class/instance/nextLittleEndianNumber.put..st b/repository/Zinc-Character-Encoding-Core.package/ZnEndianessReadWriteStream.class/instance/nextLittleEndianNumber.put..st new file mode 100644 index 000000000..69556284d --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnEndianessReadWriteStream.class/instance/nextLittleEndianNumber.put..st @@ -0,0 +1,7 @@ +endianess +nextLittleEndianNumber: n put: value + "Answer the next n bytes as a positive Integer or LargePositiveInteger, where the bytes are ordered from least significant to most significant." + | bytes | + bytes := ByteArray new: n. + 1 to: n do: [:i | bytes at: i put: (value byteAt: i)]. + stream nextPutAll: bytes \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnEndianessReadWriteStream.class/instance/on..st b/repository/Zinc-Character-Encoding-Core.package/ZnEndianessReadWriteStream.class/instance/on..st new file mode 100644 index 000000000..9a091a797 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnEndianessReadWriteStream.class/instance/on..st @@ -0,0 +1,4 @@ +initialize-release +on: aStream + + stream := aStream \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnEndianessReadWriteStream.class/properties.json b/repository/Zinc-Character-Encoding-Core.package/ZnEndianessReadWriteStream.class/properties.json new file mode 100644 index 000000000..5682f7ba9 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnEndianessReadWriteStream.class/properties.json @@ -0,0 +1,13 @@ +{ + "commentStamp" : "", + "super" : "Object", + "category" : "Zinc-Character-Encoding-Core", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ + "stream" + ], + "name" : "ZnEndianessReadWriteStream", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnFastLineReader.class/README.md b/repository/Zinc-Character-Encoding-Core.package/ZnFastLineReader.class/README.md new file mode 100644 index 000000000..d1fbc3cbc --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnFastLineReader.class/README.md @@ -0,0 +1 @@ +I am ZnFastLineReader, a helper to efficiently read CR, LF or CRLF terminated lines from a character stream. \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnFastLineReader.class/class/on..st b/repository/Zinc-Character-Encoding-Core.package/ZnFastLineReader.class/class/on..st new file mode 100644 index 000000000..764dfc268 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnFastLineReader.class/class/on..st @@ -0,0 +1,5 @@ +instance creation +on: characterReadStream + ^ self new + on: characterReadStream; + yourself \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnFastLineReader.class/instance/atEnd.st b/repository/Zinc-Character-Encoding-Core.package/ZnFastLineReader.class/instance/atEnd.st new file mode 100644 index 000000000..b761ce7e9 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnFastLineReader.class/instance/atEnd.st @@ -0,0 +1,3 @@ +testing +atEnd + ^ readStream atEnd \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnFastLineReader.class/instance/beWide.st b/repository/Zinc-Character-Encoding-Core.package/ZnFastLineReader.class/instance/beWide.st new file mode 100644 index 000000000..828993bd8 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnFastLineReader.class/instance/beWide.st @@ -0,0 +1,3 @@ +initialize +beWide + self bufferStream: (WideString new: 32) writeStream \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnFastLineReader.class/instance/bufferStream..st b/repository/Zinc-Character-Encoding-Core.package/ZnFastLineReader.class/instance/bufferStream..st new file mode 100644 index 000000000..a4493fa5d --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnFastLineReader.class/instance/bufferStream..st @@ -0,0 +1,3 @@ +initialize +bufferStream: characterWriteStream + ^ bufferStream := characterWriteStream \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnFastLineReader.class/instance/close.st b/repository/Zinc-Character-Encoding-Core.package/ZnFastLineReader.class/instance/close.st new file mode 100644 index 000000000..4342c782a --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnFastLineReader.class/instance/close.st @@ -0,0 +1,3 @@ +initialize +close + readStream close \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnFastLineReader.class/instance/initialize.st b/repository/Zinc-Character-Encoding-Core.package/ZnFastLineReader.class/instance/initialize.st new file mode 100644 index 000000000..298f14551 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnFastLineReader.class/instance/initialize.st @@ -0,0 +1,5 @@ +initialization +initialize + super initialize. + cr := Character cr. + lf := Character lf \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnFastLineReader.class/instance/linesDo..st b/repository/Zinc-Character-Encoding-Core.package/ZnFastLineReader.class/instance/linesDo..st new file mode 100644 index 000000000..561ee70dd --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnFastLineReader.class/instance/linesDo..st @@ -0,0 +1,4 @@ +accessing +linesDo: block + + [ self atEnd ] whileFalse: [ self nextLine ifNotNil: block ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnFastLineReader.class/instance/nextLine.st b/repository/Zinc-Character-Encoding-Core.package/ZnFastLineReader.class/instance/nextLine.st new file mode 100644 index 000000000..da1d17cc3 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnFastLineReader.class/instance/nextLine.st @@ -0,0 +1,15 @@ +accessing +nextLine + "Read a CR, LF or CRLF terminated line, returning the contents of the line without the EOL. Return nil when the receiver is #atEnd." + + self atEnd ifTrue: [ ^ nil ]. + ^ self streamContents: [ :out | | eol char | + eol := false. + [ eol ] whileFalse: [ + char := readStream next. + (char isNil or: [ char == lf ]) + ifTrue: [ eol := true ] + ifFalse: [ + char == cr + ifTrue: [ eol := true. readStream peekFor: lf ] + ifFalse: [ out nextPut: char ] ] ] ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnFastLineReader.class/instance/on..st b/repository/Zinc-Character-Encoding-Core.package/ZnFastLineReader.class/instance/on..st new file mode 100644 index 000000000..f94c9bd39 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnFastLineReader.class/instance/on..st @@ -0,0 +1,3 @@ +initialize +on: characterReadStream + readStream := characterReadStream \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnFastLineReader.class/instance/streamContents..st b/repository/Zinc-Character-Encoding-Core.package/ZnFastLineReader.class/instance/streamContents..st new file mode 100644 index 000000000..29cdab814 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnFastLineReader.class/instance/streamContents..st @@ -0,0 +1,11 @@ +private +streamContents: block + "Like readStream collectionSpecies streamContents: block + but reusing the underlying buffer for improved efficiency" + + bufferStream + ifNil: [ + bufferStream := (readStream collectionSpecies new: 32) writeStream ]. + bufferStream reset. + block value: bufferStream. + ^ bufferStream contents \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnFastLineReader.class/properties.json b/repository/Zinc-Character-Encoding-Core.package/ZnFastLineReader.class/properties.json new file mode 100644 index 000000000..e869b1337 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnFastLineReader.class/properties.json @@ -0,0 +1,16 @@ +{ + "commentStamp" : "", + "super" : "Object", + "category" : "Zinc-Character-Encoding-Core", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ + "readStream", + "cr", + "lf", + "bufferStream" + ], + "name" : "ZnFastLineReader", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnIncomplete.class/README.md b/repository/Zinc-Character-Encoding-Core.package/ZnIncomplete.class/README.md new file mode 100644 index 000000000..529898796 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnIncomplete.class/README.md @@ -0,0 +1,9 @@ +I am ZnIncomplete. +I am a ZnCharacterEncodingError. +I am an Error. + +I signal when the binary stream from which a character is read does not contain enough data to form a full character. This typically occurs when the stream is #atEnd, a file is EOF or a network connection is closed - when the end of a stream is reached when more data is expected/needed. + +I can be used to ignore wrongly encoded input by resuming me. By default a question mark will be inserted for each problem and decoding will continue. This is not recommended, as faulty input should not be accepted. + +Part of Zinc HTTP Components \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnIncomplete.class/instance/defaultResumeValue.st b/repository/Zinc-Character-Encoding-Core.package/ZnIncomplete.class/instance/defaultResumeValue.st new file mode 100644 index 000000000..738ae0a46 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnIncomplete.class/instance/defaultResumeValue.st @@ -0,0 +1,5 @@ +private +defaultResumeValue + "$? codePoint" + + ^ 63 \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnIncomplete.class/instance/isResumable.st b/repository/Zinc-Character-Encoding-Core.package/ZnIncomplete.class/instance/isResumable.st new file mode 100644 index 000000000..db1f6cd8c --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnIncomplete.class/instance/isResumable.st @@ -0,0 +1,3 @@ +testing +isResumable + ^ true \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnIncomplete.class/properties.json b/repository/Zinc-Character-Encoding-Core.package/ZnIncomplete.class/properties.json new file mode 100644 index 000000000..bc7fdb6e4 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnIncomplete.class/properties.json @@ -0,0 +1,11 @@ +{ + "commentStamp" : "", + "super" : "ZnCharacterEncodingError", + "category" : "Zinc-Character-Encoding-Core", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "ZnIncomplete", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnInvalidUTF8.class/README.md b/repository/Zinc-Character-Encoding-Core.package/ZnInvalidUTF8.class/README.md index a44017b96..56382e4f6 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnInvalidUTF8.class/README.md +++ b/repository/Zinc-Character-Encoding-Core.package/ZnInvalidUTF8.class/README.md @@ -4,4 +4,6 @@ I am an Error. I signal when something goes wrong while encoding or decoding UTF8. +I can be used to ignore wrongly encoded input by resuming me. By default a question mark will be inserted for each problem and decoding will continue. This is not recommended, as faulty input should not be accepted. + Part of Zinc HTTP Components \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnInvalidUTF8.class/instance/defaultResumeValue.st b/repository/Zinc-Character-Encoding-Core.package/ZnInvalidUTF8.class/instance/defaultResumeValue.st new file mode 100644 index 000000000..738ae0a46 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnInvalidUTF8.class/instance/defaultResumeValue.st @@ -0,0 +1,5 @@ +private +defaultResumeValue + "$? codePoint" + + ^ 63 \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnInvalidUTF8.class/instance/isResumable.st b/repository/Zinc-Character-Encoding-Core.package/ZnInvalidUTF8.class/instance/isResumable.st new file mode 100644 index 000000000..db1f6cd8c --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnInvalidUTF8.class/instance/isResumable.st @@ -0,0 +1,3 @@ +testing +isResumable + ^ true \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnInvalidUTF8.class/methodProperties.json b/repository/Zinc-Character-Encoding-Core.package/ZnInvalidUTF8.class/methodProperties.json deleted file mode 100644 index 0e4a66223..000000000 --- a/repository/Zinc-Character-Encoding-Core.package/ZnInvalidUTF8.class/methodProperties.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "class" : { - }, - "instance" : { - } } diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnInvalidUTF8.class/properties.json b/repository/Zinc-Character-Encoding-Core.package/ZnInvalidUTF8.class/properties.json index e61c6727e..90d2eb9f0 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnInvalidUTF8.class/properties.json +++ b/repository/Zinc-Character-Encoding-Core.package/ZnInvalidUTF8.class/properties.json @@ -1,14 +1,11 @@ { + "commentStamp" : "", + "super" : "ZnCharacterEncodingError", "category" : "Zinc-Character-Encoding-Core", - "classinstvars" : [ - ], - "classvars" : [ - ], - "commentStamp" : "", - "instvars" : [ - ], + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], "name" : "ZnInvalidUTF8", - "pools" : [ - ], - "super" : "ZnCharacterEncodingError", - "type" : "normal" } + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnLossyUTF8Encoder.class/README.md b/repository/Zinc-Character-Encoding-Core.package/ZnLossyUTF8Encoder.class/README.md new file mode 100644 index 000000000..31614298b --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnLossyUTF8Encoder.class/README.md @@ -0,0 +1,17 @@ +I am ZnLossyUTF8Decoder. +I am a ZnUTF8Decoder. + +I behave like my superclass but will not signal errors when I see illegal UTF-8 encoded input, +instead I will output a Unicode Replacement Character (U+FFFD) for each error. + +In contrast to my superclass I can read any random byte sequence, decoding both legal and illegal UTF-8 sequences. + + Due to my stream based design and usage as well as my stateless implementation, + I will output multiple replacement characters when multiple illegal sequences occur. + + My convenience method #decodeBytesSingleReplacement: shows how to decode bytes so that + only a single replacement character stands for any amount of illegal encoding between legal encodings. + + When I encounter an illegal code point while writing, I output the encoding for the replacement character. + +Part of Zinc HTTP Components. \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnLossyUTF8Encoder.class/class/handlesEncoding..st b/repository/Zinc-Character-Encoding-Core.package/ZnLossyUTF8Encoder.class/class/handlesEncoding..st new file mode 100644 index 000000000..df3741300 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnLossyUTF8Encoder.class/class/handlesEncoding..st @@ -0,0 +1,5 @@ +accessing +handlesEncoding: string + "Return true when my instances handle the encoding described by string" + + ^ (self canonicalEncodingIdentifier: string) = 'utf8lossy' \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnLossyUTF8Encoder.class/class/knownEncodingIdentifiers.st b/repository/Zinc-Character-Encoding-Core.package/ZnLossyUTF8Encoder.class/class/knownEncodingIdentifiers.st new file mode 100644 index 000000000..26056b496 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnLossyUTF8Encoder.class/class/knownEncodingIdentifiers.st @@ -0,0 +1,3 @@ +accessing +knownEncodingIdentifiers + ^ #( 'utf8lossy' ) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnLossyUTF8Encoder.class/instance/decodeBytesSingleReplacement..st b/repository/Zinc-Character-Encoding-Core.package/ZnLossyUTF8Encoder.class/instance/decodeBytesSingleReplacement..st new file mode 100644 index 000000000..eda00b537 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnLossyUTF8Encoder.class/instance/decodeBytesSingleReplacement..st @@ -0,0 +1,22 @@ +convenience +decodeBytesSingleReplacement: bytes + "Decode bytes and return the resulting string. + This variant of #decodeBytes: will only ever use + a single replacement character for each illegal UTF-8 sequence" + + | byteStream replaced replacement char | + byteStream := bytes readStream. + replaced := false. + replacement := self replacementCodePoint asCharacter. + ^ String streamContents: [ :stream | + [ byteStream atEnd ] whileFalse: [ + char := self nextFromStream: byteStream. + char = replacement + ifTrue: [ + replaced + ifFalse: [ + replaced := true. + stream nextPut: replacement ] ] + ifFalse: [ + replaced := false. + stream nextPut: char ] ] ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnLossyUTF8Encoder.class/instance/errorIllegalContinuationByte.from..st b/repository/Zinc-Character-Encoding-Core.package/ZnLossyUTF8Encoder.class/instance/errorIllegalContinuationByte.from..st new file mode 100644 index 000000000..d17c38269 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnLossyUTF8Encoder.class/instance/errorIllegalContinuationByte.from..st @@ -0,0 +1,3 @@ +error handling +errorIllegalContinuationByte: byte from: stream + ^ self replacementCodePoint \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnLossyUTF8Encoder.class/instance/errorIllegalLeadingByte.from..st b/repository/Zinc-Character-Encoding-Core.package/ZnLossyUTF8Encoder.class/instance/errorIllegalLeadingByte.from..st new file mode 100644 index 000000000..fafae5b8d --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnLossyUTF8Encoder.class/instance/errorIllegalLeadingByte.from..st @@ -0,0 +1,3 @@ +error handling +errorIllegalLeadingByte: byte from: stream + ^ self replacementCodePoint \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnLossyUTF8Encoder.class/instance/errorIncompleteFrom..st b/repository/Zinc-Character-Encoding-Core.package/ZnLossyUTF8Encoder.class/instance/errorIncompleteFrom..st new file mode 100644 index 000000000..1ad8fad4d --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnLossyUTF8Encoder.class/instance/errorIncompleteFrom..st @@ -0,0 +1,3 @@ +error handling +errorIncompleteFrom: stream + ^ self replacementCodePoint \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnLossyUTF8Encoder.class/instance/errorOutsideRange.from..st b/repository/Zinc-Character-Encoding-Core.package/ZnLossyUTF8Encoder.class/instance/errorOutsideRange.from..st new file mode 100644 index 000000000..2d1f12448 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnLossyUTF8Encoder.class/instance/errorOutsideRange.from..st @@ -0,0 +1,3 @@ +error handling +errorOutsideRange: codePoint from: stream + ^ self replacementCodePoint \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnLossyUTF8Encoder.class/instance/errorOutsideRange.to..st b/repository/Zinc-Character-Encoding-Core.package/ZnLossyUTF8Encoder.class/instance/errorOutsideRange.to..st new file mode 100644 index 000000000..fbaa9d651 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnLossyUTF8Encoder.class/instance/errorOutsideRange.to..st @@ -0,0 +1,3 @@ +error handling +errorOutsideRange: codePoint to: stream + stream nextPutAll: self replacementCodePointEncoded \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnLossyUTF8Encoder.class/instance/errorOutsideRangeByteCount..st b/repository/Zinc-Character-Encoding-Core.package/ZnLossyUTF8Encoder.class/instance/errorOutsideRangeByteCount..st new file mode 100644 index 000000000..997855d68 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnLossyUTF8Encoder.class/instance/errorOutsideRangeByteCount..st @@ -0,0 +1,3 @@ +error handling +errorOutsideRangeByteCount: codePoint + ^ 0 \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnLossyUTF8Encoder.class/instance/errorOverlong.from..st b/repository/Zinc-Character-Encoding-Core.package/ZnLossyUTF8Encoder.class/instance/errorOverlong.from..st new file mode 100644 index 000000000..398b7ac13 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnLossyUTF8Encoder.class/instance/errorOverlong.from..st @@ -0,0 +1,3 @@ +error handling +errorOverlong: codePoint from: stream + ^ self replacementCodePoint \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnLossyUTF8Encoder.class/instance/identifier.st b/repository/Zinc-Character-Encoding-Core.package/ZnLossyUTF8Encoder.class/instance/identifier.st new file mode 100644 index 000000000..d0d045a7b --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnLossyUTF8Encoder.class/instance/identifier.st @@ -0,0 +1,3 @@ +accessing +identifier + ^ 'utf8lossy' \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnLossyUTF8Encoder.class/instance/replacementCodePoint.st b/repository/Zinc-Character-Encoding-Core.package/ZnLossyUTF8Encoder.class/instance/replacementCodePoint.st new file mode 100644 index 000000000..df425a657 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnLossyUTF8Encoder.class/instance/replacementCodePoint.st @@ -0,0 +1,5 @@ +accessing +replacementCodePoint + "Return the code point for the Unicode Replacement Character U+FFFD" + + ^ 16rFFFD \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnLossyUTF8Encoder.class/instance/replacementCodePointEncoded.st b/repository/Zinc-Character-Encoding-Core.package/ZnLossyUTF8Encoder.class/instance/replacementCodePointEncoded.st new file mode 100644 index 000000000..57c3ddd0c --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnLossyUTF8Encoder.class/instance/replacementCodePointEncoded.st @@ -0,0 +1,7 @@ +accessing +replacementCodePointEncoded + "Return the encoded utf-8 byte sequence for the Unicode Replacement Character U+FFFD" + + "self replacementCodePoint asCharacter utf8Encoded" + + ^ #[239 191 189] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnLossyUTF8Encoder.class/properties.json b/repository/Zinc-Character-Encoding-Core.package/ZnLossyUTF8Encoder.class/properties.json new file mode 100644 index 000000000..f16b43e86 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnLossyUTF8Encoder.class/properties.json @@ -0,0 +1,11 @@ +{ + "commentStamp" : "", + "super" : "ZnUTF8Encoder", + "category" : "Zinc-Character-Encoding-Core", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "ZnLossyUTF8Encoder", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnNewLineWriterStream.class/README.md b/repository/Zinc-Character-Encoding-Core.package/ZnNewLineWriterStream.class/README.md new file mode 100644 index 000000000..214f0af34 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnNewLineWriterStream.class/README.md @@ -0,0 +1,13 @@ +I am a write stream wrapping a second stream. Whenever they ask me to write a cr, a lf, or a crlf I'll instead print a new line depending on a configured convention. By default I use the current platform convention. + +stream := '' writeStream. +converter := ZnNewLineWriterStream on: stream. +converter cr; cr; lf; nextPut: $a. +stream contents + +A ZnNewLineWriterStream can be configured with the desired line ending convention using the methods + +converter forCr. +converter forLf. +converter forCrLf. +converter forPlatformLineEnding. \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnNewLineWriterStream.class/class/on..st b/repository/Zinc-Character-Encoding-Core.package/ZnNewLineWriterStream.class/class/on..st new file mode 100644 index 000000000..3db360862 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnNewLineWriterStream.class/class/on..st @@ -0,0 +1,7 @@ +instance creation +on: aStream + + ^ self basicNew + initialize; + stream: aStream; + yourself \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnNewLineWriterStream.class/instance/close.st b/repository/Zinc-Character-Encoding-Core.package/ZnNewLineWriterStream.class/instance/close.st new file mode 100644 index 000000000..265a317a4 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnNewLineWriterStream.class/instance/close.st @@ -0,0 +1,3 @@ +open/close +close + stream close \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnNewLineWriterStream.class/instance/flush.st b/repository/Zinc-Character-Encoding-Core.package/ZnNewLineWriterStream.class/instance/flush.st new file mode 100644 index 000000000..524c26421 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnNewLineWriterStream.class/instance/flush.st @@ -0,0 +1,3 @@ +flushing +flush + ^ stream flush \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnNewLineWriterStream.class/instance/forCr.st b/repository/Zinc-Character-Encoding-Core.package/ZnNewLineWriterStream.class/instance/forCr.st new file mode 100644 index 000000000..8c4e7521b --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnNewLineWriterStream.class/instance/forCr.st @@ -0,0 +1,4 @@ +accessing +forCr + + lineEnding := String cr \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnNewLineWriterStream.class/instance/forCrLf.st b/repository/Zinc-Character-Encoding-Core.package/ZnNewLineWriterStream.class/instance/forCrLf.st new file mode 100644 index 000000000..7c2fc3cd6 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnNewLineWriterStream.class/instance/forCrLf.st @@ -0,0 +1,4 @@ +accessing +forCrLf + + lineEnding := String crlf \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnNewLineWriterStream.class/instance/forLf.st b/repository/Zinc-Character-Encoding-Core.package/ZnNewLineWriterStream.class/instance/forLf.st new file mode 100644 index 000000000..843ab23ad --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnNewLineWriterStream.class/instance/forLf.st @@ -0,0 +1,4 @@ +accessing +forLf + + lineEnding := String lf \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnNewLineWriterStream.class/instance/forPlatformLineEnding.st b/repository/Zinc-Character-Encoding-Core.package/ZnNewLineWriterStream.class/instance/forPlatformLineEnding.st new file mode 100644 index 000000000..185330719 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnNewLineWriterStream.class/instance/forPlatformLineEnding.st @@ -0,0 +1,4 @@ +accessing +forPlatformLineEnding + + lineEnding := OSPlatform current lineEnding \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnNewLineWriterStream.class/instance/initialize.st b/repository/Zinc-Character-Encoding-Core.package/ZnNewLineWriterStream.class/instance/initialize.st new file mode 100644 index 000000000..db3efe4f5 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnNewLineWriterStream.class/instance/initialize.st @@ -0,0 +1,7 @@ +initialization +initialize + + super initialize. + cr := Character cr. + lf := Character lf. + self forPlatformLineEnding \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnNewLineWriterStream.class/instance/newLine.st b/repository/Zinc-Character-Encoding-Core.package/ZnNewLineWriterStream.class/instance/newLine.st new file mode 100644 index 000000000..d9c35b328 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnNewLineWriterStream.class/instance/newLine.st @@ -0,0 +1,4 @@ +accessing +newLine + previous := nil. + stream nextPutAll: lineEnding \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnNewLineWriterStream.class/instance/nextPut..st b/repository/Zinc-Character-Encoding-Core.package/ZnNewLineWriterStream.class/instance/nextPut..st new file mode 100644 index 000000000..f1845c7d3 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnNewLineWriterStream.class/instance/nextPut..st @@ -0,0 +1,11 @@ +accessing +nextPut: aCharacter + "Write aCharacter to the receivers stream. + Convert all line end combinations, i.e cr, lf, crlf, to the platform convention" + + (previous == cr and: [ aCharacter == lf ]) ifFalse: [ + (aCharacter == cr or: [ aCharacter == lf ]) ifTrue: + [ self newLine ] + ifFalse: + [ stream nextPut: aCharacter ] ]. + previous := aCharacter \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnNewLineWriterStream.class/instance/rawStream.st b/repository/Zinc-Character-Encoding-Core.package/ZnNewLineWriterStream.class/instance/rawStream.st new file mode 100644 index 000000000..3f9aee222 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnNewLineWriterStream.class/instance/rawStream.st @@ -0,0 +1,7 @@ +accessing +rawStream + "Answer the innermost stream wrapped by the receiver, e.g. a raw binary file stream, + socket stream, or regular Read/WriteStream. + Defer to the wrappedStream." + + ^ self wrappedStream rawStream \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnNewLineWriterStream.class/instance/stream..st b/repository/Zinc-Character-Encoding-Core.package/ZnNewLineWriterStream.class/instance/stream..st new file mode 100644 index 000000000..2208df8c9 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnNewLineWriterStream.class/instance/stream..st @@ -0,0 +1,3 @@ +accessing +stream: aWriteStream + stream := aWriteStream \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnNewLineWriterStream.class/instance/wrappedStream.st b/repository/Zinc-Character-Encoding-Core.package/ZnNewLineWriterStream.class/instance/wrappedStream.st new file mode 100644 index 000000000..dd6b0f223 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnNewLineWriterStream.class/instance/wrappedStream.st @@ -0,0 +1,4 @@ +accessing +wrappedStream + + ^ stream \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnNewLineWriterStream.class/properties.json b/repository/Zinc-Character-Encoding-Core.package/ZnNewLineWriterStream.class/properties.json new file mode 100644 index 000000000..64e62d135 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnNewLineWriterStream.class/properties.json @@ -0,0 +1,17 @@ +{ + "commentStamp" : "", + "super" : "WriteStream", + "category" : "Zinc-Character-Encoding-Core", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ + "stream", + "cr", + "lf", + "previous", + "lineEnding" + ], + "name" : "ZnNewLineWriterStream", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnNullEncoder.class/README.md b/repository/Zinc-Character-Encoding-Core.package/ZnNullEncoder.class/README.md index 858f2a5ab..e883c27ae 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnNullEncoder.class/README.md +++ b/repository/Zinc-Character-Encoding-Core.package/ZnNullEncoder.class/README.md @@ -1,7 +1,6 @@ I am ZnNullEncoder, a concrete subclass of ZnCharacterEncoder. I perform no encoding or decoding at all for all characters with a code value below 256. -I can only be used for ASCII. -Note that in principle I could handle Latin1 (ISO-8859-1), although that is not completely correct. To get maximum efficiency, it remains an option. +Note that in principle I could handle Latin1 (ISO-8859-1) or ASCII, although that is not completely correct. To get maximum efficiency, it remains an option. Part of Zinc HTTP Components. \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnNullEncoder.class/class/handlesEncoding..st b/repository/Zinc-Character-Encoding-Core.package/ZnNullEncoder.class/class/handlesEncoding..st index 106566921..0f3db634d 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnNullEncoder.class/class/handlesEncoding..st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnNullEncoder.class/class/handlesEncoding..st @@ -1,7 +1,8 @@ accessing handlesEncoding: string "Return true when my instances handle the encoding described by string. - Note that in principle I could handle latin1 (iso-8859-1), although that is not - completely correct. To get maximum efficiency, it remains an option." - - ^ #( 'ascii' ) includes: string \ No newline at end of file + Note that in principle I could handle latin1 (iso-8859-1) and ASCII, + although that is not completely correct. + To get maximum efficiency, it remains an option." + + ^ (self canonicalEncodingIdentifier: string) = 'null' \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnNullEncoder.class/class/knownEncodingIdentifiers.st b/repository/Zinc-Character-Encoding-Core.package/ZnNullEncoder.class/class/knownEncodingIdentifiers.st new file mode 100644 index 000000000..a6efbb926 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnNullEncoder.class/class/knownEncodingIdentifiers.st @@ -0,0 +1,3 @@ +accessing +knownEncodingIdentifiers + ^ #( 'null' ) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnNullEncoder.class/class/newForEncoding..st b/repository/Zinc-Character-Encoding-Core.package/ZnNullEncoder.class/class/newForEncoding..st index 87651bf31..3316b5d2e 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnNullEncoder.class/class/newForEncoding..st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnNullEncoder.class/class/newForEncoding..st @@ -1,5 +1,5 @@ instance creation newForEncoding: string "No further parametrization needed" - + ^ self new \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnNullEncoder.class/instance/backOnStream..st b/repository/Zinc-Character-Encoding-Core.package/ZnNullEncoder.class/instance/backOnStream..st new file mode 100644 index 000000000..3b76a3b0a --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnNullEncoder.class/instance/backOnStream..st @@ -0,0 +1,5 @@ +encoding - decoding +backOnStream: stream + "Move back one character on stream" + + stream back \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnNullEncoder.class/instance/decodeBytes..st b/repository/Zinc-Character-Encoding-Core.package/ZnNullEncoder.class/instance/decodeBytes..st index b6823b947..ebbdef603 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnNullEncoder.class/instance/decodeBytes..st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnNullEncoder.class/instance/decodeBytes..st @@ -1,3 +1,6 @@ convenience decodeBytes: bytes + "Decode bytes and return the resulting string" + "Overwritten for performance reasons" + ^ bytes asString \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnNullEncoder.class/instance/encodeString..st b/repository/Zinc-Character-Encoding-Core.package/ZnNullEncoder.class/instance/encodeString..st index 85c24dce1..7b99eeecf 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnNullEncoder.class/instance/encodeString..st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnNullEncoder.class/instance/encodeString..st @@ -1,3 +1,6 @@ convenience encodeString: string + "Encode string and return the resulting byte array" + "Overwritten for performance reasons" + ^ string asByteArray \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnNullEncoder.class/instance/encodedByteCountFor..st b/repository/Zinc-Character-Encoding-Core.package/ZnNullEncoder.class/instance/encodedByteCountFor..st index 142610d47..a209b803e 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnNullEncoder.class/instance/encodedByteCountFor..st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnNullEncoder.class/instance/encodedByteCountFor..st @@ -1,3 +1,6 @@ -converting +encoding - decoding encodedByteCountFor: character + "Return how many bytes are needed to encode character" + "Overwritten for performance reasons" + ^ 1 \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnNullEncoder.class/instance/encodedByteCountForCodePoint..st b/repository/Zinc-Character-Encoding-Core.package/ZnNullEncoder.class/instance/encodedByteCountForCodePoint..st new file mode 100644 index 000000000..0d355599d --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnNullEncoder.class/instance/encodedByteCountForCodePoint..st @@ -0,0 +1,5 @@ +encoding - decoding +encodedByteCountForCodePoint: codePoint + "Return how many bytes are needed to encode integer code point" + + ^ 1 \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnNullEncoder.class/instance/encodedByteCountForCodePoints..st b/repository/Zinc-Character-Encoding-Core.package/ZnNullEncoder.class/instance/encodedByteCountForCodePoints..st new file mode 100644 index 000000000..ddbab107c --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnNullEncoder.class/instance/encodedByteCountForCodePoints..st @@ -0,0 +1,6 @@ +convenience +encodedByteCountForCodePoints: codePoints + "Return the exact number of bytes it would take to encode codePoints as a byte array" + "Overwritten for performance reasons" + + ^ codePoints size \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnNullEncoder.class/instance/encodedByteCountForString..st b/repository/Zinc-Character-Encoding-Core.package/ZnNullEncoder.class/instance/encodedByteCountForString..st index c54910426..6126b3e05 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnNullEncoder.class/instance/encodedByteCountForString..st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnNullEncoder.class/instance/encodedByteCountForString..st @@ -1,3 +1,6 @@ convenience encodedByteCountForString: string + "Return the exact number of bytes it would take to encode string as a byte array" + "Overwritten for performance reasons" + ^ string size \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnNullEncoder.class/instance/ensureAtBeginOfCodePointOnStream..st b/repository/Zinc-Character-Encoding-Core.package/ZnNullEncoder.class/instance/ensureAtBeginOfCodePointOnStream..st new file mode 100644 index 000000000..c83c96e14 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnNullEncoder.class/instance/ensureAtBeginOfCodePointOnStream..st @@ -0,0 +1,7 @@ +encoding - decoding +ensureAtBeginOfCodePointOnStream: stream + "Ensure that the current position of stream is a the beginning of an encoded code point, + if not move further backwards. This is necessary when a position in the binary stream is set, + not knowing if that position is on a proper encoded character boundary." + + "Nothing to be done, I am a byte encoding: each code point is encoded in a single byte" \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnNullEncoder.class/instance/identifier.st b/repository/Zinc-Character-Encoding-Core.package/ZnNullEncoder.class/instance/identifier.st new file mode 100644 index 000000000..797925019 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnNullEncoder.class/instance/identifier.st @@ -0,0 +1,3 @@ +accessing +identifier + ^ 'null' \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnNullEncoder.class/instance/next.putAll.startingAt.toStream..st b/repository/Zinc-Character-Encoding-Core.package/ZnNullEncoder.class/instance/next.putAll.startingAt.toStream..st deleted file mode 100644 index e123ab3c7..000000000 --- a/repository/Zinc-Character-Encoding-Core.package/ZnNullEncoder.class/instance/next.putAll.startingAt.toStream..st +++ /dev/null @@ -1,8 +0,0 @@ -convenience -next: count putAll: string startingAt: offset toStream: stream - "Write count bytes from string starting at offset to stream." - - | bytes | - bytes := ByteArray new: count. - bytes replaceFrom: 1 to: count with: string asByteArray startingAt: offset. - stream nextPutAll: bytes \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnNullEncoder.class/instance/nextCodePointFromStream..st b/repository/Zinc-Character-Encoding-Core.package/ZnNullEncoder.class/instance/nextCodePointFromStream..st new file mode 100644 index 000000000..ddb7d45be --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnNullEncoder.class/instance/nextCodePointFromStream..st @@ -0,0 +1,5 @@ +encoding - decoding +nextCodePointFromStream: stream + "Read and return the next integer code point from stream" + + ^ stream next \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnNullEncoder.class/instance/nextFromStream..st b/repository/Zinc-Character-Encoding-Core.package/ZnNullEncoder.class/instance/nextFromStream..st deleted file mode 100644 index 08fb299c3..000000000 --- a/repository/Zinc-Character-Encoding-Core.package/ZnNullEncoder.class/instance/nextFromStream..st +++ /dev/null @@ -1,3 +0,0 @@ -converting -nextFromStream: stream - ^ Character codePoint: stream next \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnNullEncoder.class/instance/nextPut.toStream..st b/repository/Zinc-Character-Encoding-Core.package/ZnNullEncoder.class/instance/nextPut.toStream..st deleted file mode 100644 index 4c782429b..000000000 --- a/repository/Zinc-Character-Encoding-Core.package/ZnNullEncoder.class/instance/nextPut.toStream..st +++ /dev/null @@ -1,6 +0,0 @@ -converting -nextPut: character toStream: stream - | code | - (code := character charCode) < 256 - ifTrue: [ stream nextPut: code ] - ifFalse: [ self error: 'Character code outside encoder range' ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnNullEncoder.class/instance/nextPutCodePoint.toStream..st b/repository/Zinc-Character-Encoding-Core.package/ZnNullEncoder.class/instance/nextPutCodePoint.toStream..st new file mode 100644 index 000000000..214cd1f40 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnNullEncoder.class/instance/nextPutCodePoint.toStream..st @@ -0,0 +1,7 @@ +encoding - decoding +nextPutCodePoint: codePoint toStream: stream + "Write the encoding for Integer code point to stream" + + codePoint < 256 + ifTrue: [ stream nextPut: codePoint ] + ifFalse: [ ^ self errorOutsideRange: codePoint to: stream ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnNullEncoder.class/instance/readInto.startingAt.count.fromStream..st b/repository/Zinc-Character-Encoding-Core.package/ZnNullEncoder.class/instance/readInto.startingAt.count.fromStream..st deleted file mode 100644 index 780fdfdd0..000000000 --- a/repository/Zinc-Character-Encoding-Core.package/ZnNullEncoder.class/instance/readInto.startingAt.count.fromStream..st +++ /dev/null @@ -1,10 +0,0 @@ -convenience -readInto: string startingAt: offset count: requestedCount fromStream: stream - "Read requestedCount characters into string starting at offset, - returning the number read, there could be less available when stream is atEnd" - - | byteBuffer readCount | - byteBuffer := ByteArray new: requestedCount. - readCount := stream readInto: byteBuffer startingAt: 1 count: requestedCount. - string replaceFrom: offset to: offset + readCount - 1 with: byteBuffer asString startingAt: 1. - ^ readCount \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnNullEncoder.class/instance/skipToBeginOfCodePointOnStream..st b/repository/Zinc-Character-Encoding-Core.package/ZnNullEncoder.class/instance/skipToBeginOfCodePointOnStream..st new file mode 100644 index 000000000..9d429f00c --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnNullEncoder.class/instance/skipToBeginOfCodePointOnStream..st @@ -0,0 +1,7 @@ +encoding - decoding +skipToBeginOfCodePointOnStream: stream + "Ensure that the current position of stream is a the beginning of an encoded code point, + if not move further forward. This is necessary when a position in the binary stream is set, + not knowing if that position is on a proper encoded character boundary." + + "Nothing to be done, I am a byte encoding: each code point is encoded in a single byte" \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnNullEncoder.class/methodProperties.json b/repository/Zinc-Character-Encoding-Core.package/ZnNullEncoder.class/methodProperties.json deleted file mode 100644 index c952ed7f3..000000000 --- a/repository/Zinc-Character-Encoding-Core.package/ZnNullEncoder.class/methodProperties.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "class" : { - "handlesEncoding:" : "SvenVanCaekenberghe 12/17/2012 13:24", - "newForEncoding:" : "SvenVanCaekenberghe 1/25/2011 11:19" }, - "instance" : { - "decodeBytes:" : "SvenVanCaekenberghe 5/3/2012 11:32", - "encodeString:" : "SvenVanCaekenberghe 5/3/2012 11:32", - "encodedByteCountFor:" : "SvenVanCaekenberghe 11/29/2010 21:17", - "encodedByteCountForString:" : "SvenVanCaekenberghe 5/3/2012 11:32", - "next:putAll:startingAt:toStream:" : "JohanBrichau 05/02/2014 23:07", - "nextFromStream:" : "SvenVanCaekenberghe 1/4/2011 20:52", - "nextPut:toStream:" : "SvenVanCaekenberghe 1/25/2011 12:36", - "readInto:startingAt:count:fromStream:" : "JohanBrichau 05/02/2014 23:35" } } diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnNullEncoder.class/properties.json b/repository/Zinc-Character-Encoding-Core.package/ZnNullEncoder.class/properties.json index 27316181d..bbce3a32e 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnNullEncoder.class/properties.json +++ b/repository/Zinc-Character-Encoding-Core.package/ZnNullEncoder.class/properties.json @@ -1,14 +1,11 @@ { + "commentStamp" : "", + "super" : "ZnCharacterEncoder", "category" : "Zinc-Character-Encoding-Core", - "classinstvars" : [ - ], - "classvars" : [ - ], - "commentStamp" : "", - "instvars" : [ - ], + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], "name" : "ZnNullEncoder", - "pools" : [ - ], - "super" : "ZnCharacterEncoder", - "type" : "normal" } + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnPercentEncoder.class/README.md b/repository/Zinc-Character-Encoding-Core.package/ZnPercentEncoder.class/README.md index b467cd6e7..61e83a432 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnPercentEncoder.class/README.md +++ b/repository/Zinc-Character-Encoding-Core.package/ZnPercentEncoder.class/README.md @@ -5,7 +5,7 @@ All characters that are not part of a safe set are encoded using a percent (%) f My #encode: and #decode: messages work from String to String. -My decoder additionally will accept + as an encoding for a space. +My decoder will accept + as an encoding for a space by default. See also http://en.wikipedia.org/wiki/Percent-encoding diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnPercentEncoder.class/class/rfc3986UnreservedCharacters.st b/repository/Zinc-Character-Encoding-Core.package/ZnPercentEncoder.class/class/rfc3986UnreservedCharacters.st new file mode 100644 index 000000000..c04cc2cac --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnPercentEncoder.class/class/rfc3986UnreservedCharacters.st @@ -0,0 +1,6 @@ +accessing +rfc3986UnreservedCharacters + "Return the unreserved characters according to RFC 3986 section 2.3. + This is the most narrow safe set to be used in a better safe than sorry approach." + + ^ 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.~' \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnPercentEncoder.class/instance/characterEncoder..st b/repository/Zinc-Character-Encoding-Core.package/ZnPercentEncoder.class/instance/characterEncoder..st index f609eda09..385d08c2c 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnPercentEncoder.class/instance/characterEncoder..st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnPercentEncoder.class/instance/characterEncoder..st @@ -1,5 +1,5 @@ initialize-release characterEncoder: object "Set the character encoding to use to object." - + characterEncoder := object \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnPercentEncoder.class/instance/characterEncoder.st b/repository/Zinc-Character-Encoding-Core.package/ZnPercentEncoder.class/instance/characterEncoder.st index fa6b92f76..2d57ed144 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnPercentEncoder.class/instance/characterEncoder.st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnPercentEncoder.class/instance/characterEncoder.st @@ -2,5 +2,5 @@ accessing characterEncoder "Return the character encoder that I currently use. If not set, I will default to using UTF-8." - - ^ characterEncoder ifNil: [ characterEncoder := ZnUTF8Encoder new ] \ No newline at end of file + + ^ characterEncoder ifNil: [ characterEncoder := ZnDefaultCharacterEncoder value ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnPercentEncoder.class/instance/decode..st b/repository/Zinc-Character-Encoding-Core.package/ZnPercentEncoder.class/instance/decode..st index 4594cf638..adc02ef71 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnPercentEncoder.class/instance/decode..st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnPercentEncoder.class/instance/decode..st @@ -5,5 +5,6 @@ decode: string | bytes stringStream | stringStream := string readStream. - bytes := ByteArray streamContents: [ :byteStream | self decode: stringStream to: byteStream ]. + bytes := ByteArray streamContents: [ :byteStream | + self decode: stringStream to: byteStream ]. ^ self characterEncoder decodeBytes: bytes \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnPercentEncoder.class/instance/decode.to..st b/repository/Zinc-Character-Encoding-Core.package/ZnPercentEncoder.class/instance/decode.to..st index 979e6f1d7..4199ab2a8 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnPercentEncoder.class/instance/decode.to..st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnPercentEncoder.class/instance/decode.to..st @@ -1,14 +1,12 @@ converting decode: stringStream to: byteStream | char | + self decodePlusAsSpace. [ stringStream atEnd ] - whileFalse: [ - (char := stringStream next) == $+ + whileFalse: [ + ((char := stringStream next) == $+ and: [ decodePlusAsSpace ]) ifTrue: [ byteStream nextPut: 32 ] - ifFalse: [ + ifFalse: [ char == $% ifTrue: [ byteStream nextPut: (self readHexFrom: stringStream) ] - ifFalse: [ - char charCode < 128 - ifTrue: [ byteStream nextPut: char charCode ] - ifFalse: [ ZnCharacterEncodingError signal: 'ASCII character expected' ] ] ] ] \ No newline at end of file + ifFalse: [ self decodeChar: char toByteStream: byteStream ] ] ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnPercentEncoder.class/instance/decodeChar.toByteStream..st b/repository/Zinc-Character-Encoding-Core.package/ZnPercentEncoder.class/instance/decodeChar.toByteStream..st new file mode 100644 index 000000000..411b2f8c7 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnPercentEncoder.class/instance/decodeChar.toByteStream..st @@ -0,0 +1,9 @@ +private +decodeChar: char toByteStream: byteStream + char charCode < 128 + ifTrue: [ + byteStream nextPut: char charCode ] + ifFalse: [ + self urlAsIri + ifTrue: [ self characterEncoder nextPut: char toStream: byteStream ] + ifFalse: [ self errorAsciiCharacterExpected ] ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnPercentEncoder.class/instance/decodePlusAsSpace..st b/repository/Zinc-Character-Encoding-Core.package/ZnPercentEncoder.class/instance/decodePlusAsSpace..st new file mode 100644 index 000000000..77850b0f8 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnPercentEncoder.class/instance/decodePlusAsSpace..st @@ -0,0 +1,8 @@ +initialize-release +decodePlusAsSpace: boolean + "When boolean is true, $+ on input will be decoded as Character space. + Else $+ is treated as a normal character, filtered by the safe set. + This is normally only done application/x-www-form-urlencoded data, + but is is on by default anyway." + + decodePlusAsSpace := boolean \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnPercentEncoder.class/instance/decodePlusAsSpace.st b/repository/Zinc-Character-Encoding-Core.package/ZnPercentEncoder.class/instance/decodePlusAsSpace.st new file mode 100644 index 000000000..35bb62748 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnPercentEncoder.class/instance/decodePlusAsSpace.st @@ -0,0 +1,7 @@ +accessing +decodePlusAsSpace + "Return if $+ on input should be decoded as Character space. + This is normally only done application/x-www-form-urlencoded data, + but is is on by default anyway." + + ^ decodePlusAsSpace ifNil: [ decodePlusAsSpace := true ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnPercentEncoder.class/instance/encode..st b/repository/Zinc-Character-Encoding-Core.package/ZnPercentEncoder.class/instance/encode..st index 2b041bbfe..8aa6d7d8c 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnPercentEncoder.class/instance/encode..st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnPercentEncoder.class/instance/encode..st @@ -4,4 +4,5 @@ encode: string I will use my character encoder to convert string to bytes and then percent encode all byte values that are not in my safe set." - ^ String streamContents: [ :stream | self encode: string readStream to: stream ] \ No newline at end of file + ^ String streamContents: [ :stream | + self encode: string readStream to: stream ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnPercentEncoder.class/instance/encode.to..st b/repository/Zinc-Character-Encoding-Core.package/ZnPercentEncoder.class/instance/encode.to..st index 6502a012a..6ff09c4e9 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnPercentEncoder.class/instance/encode.to..st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnPercentEncoder.class/instance/encode.to..st @@ -1,15 +1,5 @@ converting encode: readStream to: writeStream - | bytes buffer byte | - buffer := (bytes := ByteArray new: 4) writeStream. - self safeSet; characterEncoder. - [ readStream atEnd ] - whileFalse: [ - buffer reset. - characterEncoder nextPut: readStream next toStream: buffer. - 1 to: buffer position do: [ :index | - (safeSet includes: (byte := bytes at: index)) - ifTrue: [ writeStream nextPut: byte asCharacter ] - ifFalse: [ - writeStream nextPut: $%. - byte printOn: writeStream base: 16 length: 2 padded: true ] ] ] \ No newline at end of file + self urlAsIri + ifTrue: [ self encodeAsIri: readStream to: writeStream ] + ifFalse: [ self encodeAsUrl: readStream to: writeStream ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnPercentEncoder.class/instance/encodeAsIri.to..st b/repository/Zinc-Character-Encoding-Core.package/ZnPercentEncoder.class/instance/encodeAsIri.to..st new file mode 100644 index 000000000..fb09558ef --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnPercentEncoder.class/instance/encodeAsIri.to..st @@ -0,0 +1,13 @@ +converting +encodeAsIri: readStream to: writeStream + | character codePoint | + [ readStream atEnd ] + whileFalse: [ + character := readStream next. + codePoint := character codePoint. + ((self safeSet includes: codePoint) or: [ codePoint > 16rA0 ]) + ifTrue: [ + writeStream nextPut: character ] + ifFalse: [ + writeStream nextPut: $%. + self writeHex: codePoint to: writeStream ] ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnPercentEncoder.class/instance/encodeAsUrl.to..st b/repository/Zinc-Character-Encoding-Core.package/ZnPercentEncoder.class/instance/encodeAsUrl.to..st new file mode 100644 index 000000000..722845142 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnPercentEncoder.class/instance/encodeAsUrl.to..st @@ -0,0 +1,15 @@ +converting +encodeAsUrl: readStream to: writeStream + | bytes buffer byte | + buffer := (bytes := ByteArray new: 4) writeStream. + self safeSet; characterEncoder. + [ readStream atEnd ] + whileFalse: [ + buffer reset. + characterEncoder nextPut: readStream next toStream: buffer. + 1 to: buffer position do: [ :index | + (safeSet includes: (byte := bytes at: index)) + ifTrue: [ writeStream nextPut: byte asCharacter ] + ifFalse: [ + writeStream nextPut: $%. + self writeHex: byte to: writeStream ] ] ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnPercentEncoder.class/instance/errorAsciiCharacterExpected.st b/repository/Zinc-Character-Encoding-Core.package/ZnPercentEncoder.class/instance/errorAsciiCharacterExpected.st new file mode 100644 index 000000000..8c41177f5 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnPercentEncoder.class/instance/errorAsciiCharacterExpected.st @@ -0,0 +1,3 @@ +error handling +errorAsciiCharacterExpected + ZnCharacterEncodingError signal: 'ASCII character expected' \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnPercentEncoder.class/instance/errorHexDigitExpected.st b/repository/Zinc-Character-Encoding-Core.package/ZnPercentEncoder.class/instance/errorHexDigitExpected.st new file mode 100644 index 000000000..9ca7df84a --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnPercentEncoder.class/instance/errorHexDigitExpected.st @@ -0,0 +1,3 @@ +error handling +errorHexDigitExpected + ZnCharacterEncodingError signal: 'hex digit expected' \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnPercentEncoder.class/instance/readHexFrom..st b/repository/Zinc-Character-Encoding-Core.package/ZnPercentEncoder.class/instance/readHexFrom..st index 1f3524a8a..0f9a64082 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnPercentEncoder.class/instance/readHexFrom..st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnPercentEncoder.class/instance/readHexFrom..st @@ -1,8 +1,8 @@ private readHexFrom: stream | first second | - (stream atEnd not and: [(first := stream next digitValue) between: 0 and: 15]) - ifFalse: [ ZnCharacterEncodingError signal: 'hex digit expected' ]. + (stream atEnd not and: [ (first := stream next digitValue) between: 0 and: 15 ]) + ifFalse: [ self errorHexDigitExpected ]. (stream atEnd not and: [ (second := stream next digitValue) between: 0 and: 15 ]) - ifFalse: [ ZnCharacterEncodingError signal: 'hex digit expected' ]. + ifFalse: [ self errorHexDigitExpected ]. ^ (first << 4) + second \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnPercentEncoder.class/instance/safeSet..st b/repository/Zinc-Character-Encoding-Core.package/ZnPercentEncoder.class/instance/safeSet..st index 69df79bc9..6805bd784 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnPercentEncoder.class/instance/safeSet..st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnPercentEncoder.class/instance/safeSet..st @@ -1,5 +1,5 @@ initialize-release safeSet: string "Set my safe set to be the characters in string, which I will convert to bytes" - + safeSet := string asByteArray \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnPercentEncoder.class/instance/safeSet.st b/repository/Zinc-Character-Encoding-Core.package/ZnPercentEncoder.class/instance/safeSet.st index 487601371..131d4dc12 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnPercentEncoder.class/instance/safeSet.st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnPercentEncoder.class/instance/safeSet.st @@ -2,5 +2,5 @@ accessing safeSet "Return the safe set of characters that I will not encode, as a byte array. If not set, I will default to the most commonly used safe set" - - ^ safeSet ifNil: [ safeSet := 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.~' asByteArray ] \ No newline at end of file + + ^ safeSet ifNil: [ safeSet := self class rfc3986UnreservedCharacters asByteArray ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnPercentEncoder.class/instance/urlAsIri.st b/repository/Zinc-Character-Encoding-Core.package/ZnPercentEncoder.class/instance/urlAsIri.st new file mode 100644 index 000000000..826eac9ef --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnPercentEncoder.class/instance/urlAsIri.st @@ -0,0 +1,3 @@ +private +urlAsIri + ^ ZnCurrentOptions at: #urlAsIri \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnPercentEncoder.class/instance/writeHex.to..st b/repository/Zinc-Character-Encoding-Core.package/ZnPercentEncoder.class/instance/writeHex.to..st new file mode 100644 index 000000000..35b46a10d --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnPercentEncoder.class/instance/writeHex.to..st @@ -0,0 +1,3 @@ +private +writeHex: integer to: stream + integer printOn: stream base: 16 length: 2 padded: true \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnPercentEncoder.class/methodProperties.json b/repository/Zinc-Character-Encoding-Core.package/ZnPercentEncoder.class/methodProperties.json deleted file mode 100644 index 964cccec3..000000000 --- a/repository/Zinc-Character-Encoding-Core.package/ZnPercentEncoder.class/methodProperties.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "class" : { - }, - "instance" : { - "characterEncoder" : "SvenVanCaekenberghe 12/15/2012 13:53", - "characterEncoder:" : "SvenVanCaekenberghe 12/15/2012 13:53", - "decode:" : "SvenVanCaekenberghe 12/15/2012 13:56", - "decode:to:" : "SvenVanCaekenberghe 12/16/2012 16:41", - "encode:" : "SvenVanCaekenberghe 12/15/2012 13:56", - "encode:to:" : "SvenVanCaekenberghe 3/1/2013 21:25", - "readHexFrom:" : "SvenVanCaekenberghe 12/16/2012 15:12", - "safeSet" : "SvenVanCaekenberghe 12/15/2012 14:02", - "safeSet:" : "SvenVanCaekenberghe 12/15/2012 13:58" } } diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnPercentEncoder.class/properties.json b/repository/Zinc-Character-Encoding-Core.package/ZnPercentEncoder.class/properties.json index f45fae22d..95cdd52a3 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnPercentEncoder.class/properties.json +++ b/repository/Zinc-Character-Encoding-Core.package/ZnPercentEncoder.class/properties.json @@ -1,15 +1,15 @@ { + "commentStamp" : "", + "super" : "Object", "category" : "Zinc-Character-Encoding-Core", - "classinstvars" : [ - ], - "classvars" : [ - ], - "commentStamp" : "", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], "instvars" : [ "characterEncoder", - "safeSet" ], + "safeSet", + "decodePlusAsSpace" + ], "name" : "ZnPercentEncoder", - "pools" : [ - ], - "super" : "Object", - "type" : "normal" } + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/README.md b/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/README.md new file mode 100644 index 000000000..a3417c357 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/README.md @@ -0,0 +1,26 @@ +I am ZnPositionableReadStream. +I am polymorphic with (the most used/important methods of) ReadStream and PositionableStream. + +I wrap another read stream and store the elements that I read in a sliding circular buffer so that I am able to go back to any position inside that buffer. + +Essentially, I implement #position and #position: to be used to back out of reading ahead. + +Note that the size of my buffer limits how far I can go backwards. A SubscriptOutOfBounds exception will be signalled when an attempt is made to go too far backwards. + +The index returned by #position should be considered abstract, without concrete meaning, but it is currently implemented as the count of elements read by #next on the wrapped stream. On a simple stream over an in memory collection, that will be equivalent to an integer index into that collection. But on network streams or streams that were already further along, this will no longer be the case. + +The most elementary example of my capabilities can be seen in my implementation of #peek. See also the unit tests #testPlainExcursion and #testSearch + +Of course, backing out of an excursion is only possible within the window of the buffer size. + +Implementation + +- stream the read stream that I wrap and add positioning to +- buffer sliding, circular buffer +- index zero based index into buffer, where next will be stored +- count number of next operations done on wrapped stream +- delta number of positions that I was moved backwards + +The real core methods are #next, #atEnd, #position and #position: and are used to implement the rest. + +Part of Zinc HTTP Components \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/class/on..st b/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/class/on..st new file mode 100644 index 000000000..e8efe91dc --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/class/on..st @@ -0,0 +1,7 @@ +instance creation +on: readStream + "Create an instance of ZnPositionableReadStream that wraps readStream to add limited positioning capabilities to it." + + ^ self new + on: readStream; + yourself \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/class/on.do..st b/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/class/on.do..st new file mode 100644 index 000000000..58131d41c --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/class/on.do..st @@ -0,0 +1,6 @@ +convenience +on: readStream do: block + "Execute block with as argument a ZnPositionableReadStream on readStream. + Return the value of block." + + ^ block value: (self on: readStream) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/instance/atEnd.st b/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/instance/atEnd.st new file mode 100644 index 000000000..404ada572 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/instance/atEnd.st @@ -0,0 +1,5 @@ +testing +atEnd + "Answer whether I can access any more objects." + + ^ delta = 0 and: [ stream atEnd ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/instance/back.st b/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/instance/back.st new file mode 100644 index 000000000..a260d53b7 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/instance/back.st @@ -0,0 +1,6 @@ +positioning +back + "Go back one element and return it." + + self skip: -1. + ^ self peek \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/instance/bufferSize.st b/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/instance/bufferSize.st new file mode 100644 index 000000000..6649a4fcc --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/instance/bufferSize.st @@ -0,0 +1,5 @@ +accessing +bufferSize + "Return the size of my buffer, which limits how far I can be positioned backwards. See #sizeBuffer: to set another buffer size." + + ^ buffer size \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/instance/close.st b/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/instance/close.st new file mode 100644 index 000000000..62eb3546a --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/instance/close.st @@ -0,0 +1,5 @@ +initialize-release +close + "Close me after which I can no longer be accessed. I delegate this to the stream that I wrap." + + stream close \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/instance/collectionSpecies.st b/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/instance/collectionSpecies.st new file mode 100644 index 000000000..cabc4589c --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/instance/collectionSpecies.st @@ -0,0 +1,9 @@ +accessing +collectionSpecies + "Return the collection class able to hold my elements" + + ^ (stream respondsTo: #collectionSpecies) + ifTrue: [ stream collectionSpecies ] + ifFalse: [ stream isBinary + ifTrue: [ ByteArray ] + ifFalse: [ String ] ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/instance/defaultBufferSize.st b/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/instance/defaultBufferSize.st new file mode 100644 index 000000000..4ef8f4aac --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/instance/defaultBufferSize.st @@ -0,0 +1,5 @@ +accessing +defaultBufferSize + "Return the default size of my buffer, which limits how far I can be positioned backwards. See #sizeBuffer: to set another buffer size." + + ^ 2 raisedToInteger: 8 \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/instance/initialize.st b/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/instance/initialize.st new file mode 100644 index 000000000..51c43fa8a --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/instance/initialize.st @@ -0,0 +1,4 @@ +initialization +initialize + super initialize. + count := index := delta := 0 \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/instance/isBinary.st b/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/instance/isBinary.st new file mode 100644 index 000000000..164862a7c --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/instance/isBinary.st @@ -0,0 +1,5 @@ +testing +isBinary + "Return whether I am binary, whether my elements are byte values (8 bit integers between 0 and 255)" + + ^ stream isBinary \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/instance/next..st b/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/instance/next..st new file mode 100644 index 000000000..760fcbbf9 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/instance/next..st @@ -0,0 +1,8 @@ +accessing +next: requestedCount + "Read requestedCount elements and return them as a collection. + If less are available, a smaller collection will be returned." + + ^ self + next: requestedCount + into: (self collectionSpecies new: requestedCount) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/instance/next.into..st b/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/instance/next.into..st new file mode 100644 index 000000000..f7138006e --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/instance/next.into..st @@ -0,0 +1,9 @@ +accessing +next: requestedCount into: collection + "Read requestedCount elements into collection, + returning a copy if less elements are available" + + ^ self + next: requestedCount + into: collection + startingAt: 1 \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/instance/next.into.startingAt..st b/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/instance/next.into.startingAt..st new file mode 100644 index 000000000..1766eb600 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/instance/next.into.startingAt..st @@ -0,0 +1,13 @@ +accessing +next: requestedCount into: collection startingAt: offset + "Read requestedCount elements into collection starting at offset, + returning a copy if less elements are available" + + | read | + read := self + readInto: collection + startingAt: offset + count: requestedCount. + ^ read = requestedCount + ifTrue: [ collection ] + ifFalse: [ collection copyFrom: 1 to: offset + read - 1 ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/instance/next.st b/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/instance/next.st new file mode 100644 index 000000000..7c799aa72 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/instance/next.st @@ -0,0 +1,15 @@ +accessing +next + "Return the next element and move over it" + + | next | + delta = 0 + ifTrue: [ + (next := stream next) ifNotNil: [ + count := count + 1. + buffer at: index + 1 put: next. + index := (index + 1) \\ buffer size ] ] + ifFalse: [ + next := buffer at: ((index - delta) \\ buffer size) + 1. + delta := delta - 1 ]. + ^ next \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/instance/nextInto..st b/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/instance/nextInto..st new file mode 100644 index 000000000..a1d1dd5d5 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/instance/nextInto..st @@ -0,0 +1,8 @@ +accessing +nextInto: collection + "Read the next elements of the receiver into collection, + returning a copy if less elements are available" + + ^ self + next: collection size + into: collection \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/instance/on..st b/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/instance/on..st new file mode 100644 index 000000000..05140ac19 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/instance/on..st @@ -0,0 +1,6 @@ +instance creation +on: readStream + "Initialize me on readStream" + + stream := readStream. + self sizeBuffer: self defaultBufferSize \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/instance/peek.st b/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/instance/peek.st new file mode 100644 index 000000000..ec535e82c --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/instance/peek.st @@ -0,0 +1,5 @@ +accessing +peek + "Return the next element but do not move over it" + + ^ self savingPositionDo: [ self next ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/instance/peekFor..st b/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/instance/peekFor..st new file mode 100644 index 000000000..03e71cc73 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/instance/peekFor..st @@ -0,0 +1,10 @@ +accessing +peekFor: object + "Answer false and do not move over the next element if it is not equal to object, or if the receiver is at the end. + Answer true and move over the next element when it is equal to object." + + ^ self peek = object + ifTrue: [ + self next. + true ] + ifFalse: [ false ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/instance/position..st b/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/instance/position..st new file mode 100644 index 000000000..3be975c64 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/instance/position..st @@ -0,0 +1,13 @@ +positioning +position: newPosition + "Move my current position to newPosition, an object obtained by previously calling #position. My buffer size limits how far I can be positioned backwards. A SubscriptOutOfBounds exception will be signalled in case this operation cannot be completed. It is also no possible to go backwards unless data has been read previously." + + | newDelta | + newDelta := count - newPosition. + (newDelta between: 0 and: (buffer size min: count)) + ifFalse: [ + ^ SubscriptOutOfBounds + signalFor: self + lowerBound: self position + upperBound: self position - (buffer size min: count) ]. + ^ delta := newDelta \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/instance/position.st b/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/instance/position.st new file mode 100644 index 000000000..d1c0dc1c0 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/instance/position.st @@ -0,0 +1,5 @@ +positioning +position + "Return my current position. This is an object that can be used as argument to #position: to move back to that position. Although opaque, it is currently an integer count of the number of #next operations done on the stream that I wrap." + + ^ count - delta \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/instance/rawStream.st b/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/instance/rawStream.st new file mode 100644 index 000000000..3f9aee222 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/instance/rawStream.st @@ -0,0 +1,7 @@ +accessing +rawStream + "Answer the innermost stream wrapped by the receiver, e.g. a raw binary file stream, + socket stream, or regular Read/WriteStream. + Defer to the wrappedStream." + + ^ self wrappedStream rawStream \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/instance/readInto.startingAt.count..st b/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/instance/readInto.startingAt.count..st new file mode 100644 index 000000000..39023385a --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/instance/readInto.startingAt.count..st @@ -0,0 +1,9 @@ +accessing +readInto: collection startingAt: offset count: requestedCount + "Read requestedCount elements into collection starting at offset, + returning the number of elements read, there could be less elements available." + + 0 to: requestedCount - 1 do: [ :aCount | | object | + (object := self next) ifNil: [ ^ aCount ]. + collection at: offset + aCount put: object ]. + ^ requestedCount \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/instance/readStream.st b/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/instance/readStream.st new file mode 100644 index 000000000..6f19a3b33 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/instance/readStream.st @@ -0,0 +1,3 @@ +accessing +readStream + ^ self \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/instance/savingPositionDo..st b/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/instance/savingPositionDo..st new file mode 100644 index 000000000..09d391726 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/instance/savingPositionDo..st @@ -0,0 +1,7 @@ +positioning +savingPositionDo: block + "Execute block so that any reading from me in it has no effect afterwards. I remember the current #position and move back to it using #position: after evaluating block. My buffer size limits how long the excursion can be. A SubscriptOutOfBounds exception will be signalled in case this operation cannot be completed." + + | savedPosition | + savedPosition := self position. + ^ block ensure: [ self position: savedPosition ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/instance/sizeBuffer..st b/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/instance/sizeBuffer..st new file mode 100644 index 000000000..62db9c190 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/instance/sizeBuffer..st @@ -0,0 +1,5 @@ +initialize-release +sizeBuffer: size + "Change the buffer size. This should be done when I am still in my initial state." + + buffer := self collectionSpecies new: size \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/instance/skip..st b/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/instance/skip..st new file mode 100644 index 000000000..aad7225cd --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/instance/skip..st @@ -0,0 +1,7 @@ +accessing +skip: integer + "Skip over integer count elements." + + integer > 0 + ifTrue: [ integer timesRepeat: [ self next ] ] + ifFalse: [ self position: (self position + integer) ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/instance/upTo..st b/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/instance/upTo..st new file mode 100644 index 000000000..d07e07b59 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/instance/upTo..st @@ -0,0 +1,9 @@ +accessing +upTo: value + "Read upto but not including value and return them as a collection. + If value is not found, return the entire contents of the stream." + + ^ self collectionSpecies + streamContents: [ :writeStream | | element | + [ self atEnd or: [ (element := self next) = value ] ] whileFalse: [ + writeStream nextPut: element ] ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/instance/upToEnd.st b/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/instance/upToEnd.st new file mode 100644 index 000000000..85985c0da --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/instance/upToEnd.st @@ -0,0 +1,7 @@ +accessing +upToEnd + "Read elements until the stream is atEnd and return them as a collection." + + ^ self collectionSpecies + streamContents: [ :collectionStream | + [ self atEnd ] whileFalse: [ collectionStream nextPut: self next ] ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/instance/wrappedStream.st b/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/instance/wrappedStream.st new file mode 100644 index 000000000..1924e6af5 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/instance/wrappedStream.st @@ -0,0 +1,5 @@ +accessing +wrappedStream + "Return the read stream that I wrap." + + ^ stream \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/properties.json b/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/properties.json new file mode 100644 index 000000000..3390a9166 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/properties.json @@ -0,0 +1,17 @@ +{ + "commentStamp" : "", + "super" : "Object", + "category" : "Zinc-Character-Encoding-Core", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ + "stream", + "buffer", + "count", + "index", + "delta" + ], + "name" : "ZnPositionableReadStream", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/README.md b/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/README.md new file mode 100644 index 000000000..184404ea9 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/README.md @@ -0,0 +1,4 @@ +I am ZnSimplifiedByteEncoder, a concrete subclass of ZnCharacterEncoder. +I handle single byte encodings where byte values 0 to 127 map to ASCII and 128 to 255 are a permutation to Unicode characters. + +I am like ZnByteEncoder, a subclass of me, but I implement just two mappings, latin1 or iso-8859-1 and ASCII, to conserve memory. \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/class/asciiMapping.st b/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/class/asciiMapping.st new file mode 100644 index 000000000..48c438d5c --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/class/asciiMapping.st @@ -0,0 +1,21 @@ +mappings +asciiMapping + "ASCII is only defined for the first 127 codes (7-bit)" + + ^ #( + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil ) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/class/byteTextConverters.st b/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/class/byteTextConverters.st new file mode 100644 index 000000000..e51bda375 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/class/byteTextConverters.st @@ -0,0 +1,3 @@ +private +byteTextConverters + ^ byteTextConverters ifNil: [ self initializeByteTextConverters ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/class/handlesEncoding..st b/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/class/handlesEncoding..st new file mode 100644 index 000000000..a912c76d3 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/class/handlesEncoding..st @@ -0,0 +1,5 @@ +accessing +handlesEncoding: string + "Return true when my instances handle the encoding described by string" + + ^ self byteTextConverters includesKey: (self canonicalEncodingIdentifier: string) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/class/initialize.st b/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/class/initialize.st new file mode 100644 index 000000000..d985bbda5 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/class/initialize.st @@ -0,0 +1,8 @@ +class initialization +initialize + "Initialize and cache the converters that I know of. + This includes all of their aliases. + This method must be changed to make sure it runs + when loading in images where it is already present." + + self initializeByteTextConverters \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/class/initializeByteTextConverters.st b/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/class/initializeByteTextConverters.st new file mode 100644 index 000000000..02a5eacd3 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/class/initializeByteTextConverters.st @@ -0,0 +1,11 @@ +private +initializeByteTextConverters + "Initialize and cache convertors based on specifications in methods that were autogenerated." + + byteTextConverters := Dictionary new. + self mappingToIdentifiers + keysAndValuesDo: [ :mapping :identifiers | + | tables | + tables := self tablesFromSpec: (self perform: mapping). + identifiers do: [ :each | byteTextConverters at: each put: tables ] ]. + ^ byteTextConverters \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/class/iso88591Mapping.st b/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/class/iso88591Mapping.st new file mode 100644 index 000000000..04d214fef --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/class/iso88591Mapping.st @@ -0,0 +1,22 @@ +mappings +iso88591Mapping + "Specification generated by my optional subclass, ZnByteEncoder." + "ZnByteEncoder generateByteToUnicodeSpec: 'http://unicode.org/Public/MAPPINGS/ISO8859/8859-1.TXT'" + + ^ #( + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + 16r00A0 16r00A1 16r00A2 16r00A3 16r00A4 16r00A5 16r00A6 16r00A7 + 16r00A8 16r00A9 16r00AA 16r00AB 16r00AC 16r00AD 16r00AE 16r00AF + 16r00B0 16r00B1 16r00B2 16r00B3 16r00B4 16r00B5 16r00B6 16r00B7 + 16r00B8 16r00B9 16r00BA 16r00BB 16r00BC 16r00BD 16r00BE 16r00BF + 16r00C0 16r00C1 16r00C2 16r00C3 16r00C4 16r00C5 16r00C6 16r00C7 + 16r00C8 16r00C9 16r00CA 16r00CB 16r00CC 16r00CD 16r00CE 16r00CF + 16r00D0 16r00D1 16r00D2 16r00D3 16r00D4 16r00D5 16r00D6 16r00D7 + 16r00D8 16r00D9 16r00DA 16r00DB 16r00DC 16r00DD 16r00DE 16r00DF + 16r00E0 16r00E1 16r00E2 16r00E3 16r00E4 16r00E5 16r00E6 16r00E7 + 16r00E8 16r00E9 16r00EA 16r00EB 16r00EC 16r00ED 16r00EE 16r00EF + 16r00F0 16r00F1 16r00F2 16r00F3 16r00F4 16r00F5 16r00F6 16r00F7 + 16r00F8 16r00F9 16r00FA 16r00FB 16r00FC 16r00FD 16r00FE 16r00FF ) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/class/knownEncodingIdentifiers.st b/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/class/knownEncodingIdentifiers.st new file mode 100644 index 000000000..9020e9776 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/class/knownEncodingIdentifiers.st @@ -0,0 +1,3 @@ +accessing +knownEncodingIdentifiers + ^ self byteTextConverters keys \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/class/mappingToIdentifiers.st b/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/class/mappingToIdentifiers.st new file mode 100644 index 000000000..997469ef2 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/class/mappingToIdentifiers.st @@ -0,0 +1,7 @@ +mappings +mappingToIdentifiers + "Return a dictionay mapping from encoding specifications to a list of encoding names." + + ^ Dictionary newFromPairs: #( + #iso88591Mapping #('iso88591' 'latin1') + #asciiMapping #('ascii') ) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/class/newForEncoding..st b/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/class/newForEncoding..st new file mode 100644 index 000000000..e70571d16 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/class/newForEncoding..st @@ -0,0 +1,13 @@ +instance creation +newForEncoding: string + "Return a new character encoder object for an encoding described by string. + We use our precomputed ByteTextConverters tables." + + | tables canonicalName | + canonicalName := self canonicalEncodingIdentifier: string. + tables := self byteTextConverters at: canonicalName. + ^ self new + identifier: canonicalName; + byteToUnicode: tables first; + unicodeToByte: tables second; + yourself \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/class/tablesFromSpec..st b/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/class/tablesFromSpec..st new file mode 100644 index 000000000..b72e302c1 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/class/tablesFromSpec..st @@ -0,0 +1,15 @@ +private +tablesFromSpec: mapping + "Initialize the mappings to and from Unicode based on the 128 element array mapping" + + | byteToUnicode unicodeToByte | + byteToUnicode := Array new: 128. + unicodeToByte := Dictionary new. + "Mind the offset because first 128 characters are not stored into byteToUnicodeSpec" + "Note that some entries are nil" + mapping + keysAndValuesDo: [ :index :unicode | + unicode ifNotNil: [ + byteToUnicode at: index put: (Character value: unicode). + unicodeToByte at: unicode put: 127 + index ] ]. + ^ Array with: byteToUnicode with: unicodeToByte \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/instance/^equals.st b/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/instance/^equals.st new file mode 100644 index 000000000..fd8967c9c --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/instance/^equals.st @@ -0,0 +1,3 @@ +comparing += anObject + ^ super = anObject and: [ self identifier = anObject identifier ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/instance/backOnStream..st b/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/instance/backOnStream..st new file mode 100644 index 000000000..86226f200 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/instance/backOnStream..st @@ -0,0 +1,3 @@ +encoding - decoding +backOnStream: stream + stream back \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/instance/beLenient.st b/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/instance/beLenient.st new file mode 100644 index 000000000..596b3ed67 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/instance/beLenient.st @@ -0,0 +1,6 @@ +initialization +beLenient + "Don't be strict, which is the default. + This means that holes in the mapping are let to pass through." + + strict := false \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/instance/byteDomain.st b/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/instance/byteDomain.st new file mode 100644 index 000000000..3700120b9 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/instance/byteDomain.st @@ -0,0 +1,5 @@ +accessing +byteDomain + "Return an array with the byte values that are in my domain, that I can decode" + + ^ (0 to: 127) asArray , ((byteToUnicode withIndexCollect: [ :each :index | each ifNotNil: [ index + 127 ] ]) reject: [ :each | each isNil ]) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/instance/byteToUnicode..st b/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/instance/byteToUnicode..st new file mode 100644 index 000000000..629904b9e --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/instance/byteToUnicode..st @@ -0,0 +1,3 @@ +initialization +byteToUnicode: map + byteToUnicode := map \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/instance/characterDomain.st b/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/instance/characterDomain.st new file mode 100644 index 000000000..59f4fe34e --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/instance/characterDomain.st @@ -0,0 +1,5 @@ +accessing +characterDomain + "Return a set with the characters that are in my domain, that I can encode" + + ^ ((0 to: 127) asSet, unicodeToByte keys) collect: [ :each | Character value: each ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/instance/encodedByteCountFor..st b/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/instance/encodedByteCountFor..st new file mode 100644 index 000000000..793e3d1d6 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/instance/encodedByteCountFor..st @@ -0,0 +1,5 @@ +encoding - decoding +encodedByteCountFor: character + "Overwritten for performance reasons" + + ^ 1 \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/instance/encodedByteCountForCodePoint..st b/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/instance/encodedByteCountForCodePoint..st new file mode 100644 index 000000000..9df2c0ced --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/instance/encodedByteCountForCodePoint..st @@ -0,0 +1,3 @@ +encoding - decoding +encodedByteCountForCodePoint: character + ^ 1 \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/instance/ensureAtBeginOfCodePointOnStream..st b/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/instance/ensureAtBeginOfCodePointOnStream..st new file mode 100644 index 000000000..c83c96e14 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/instance/ensureAtBeginOfCodePointOnStream..st @@ -0,0 +1,7 @@ +encoding - decoding +ensureAtBeginOfCodePointOnStream: stream + "Ensure that the current position of stream is a the beginning of an encoded code point, + if not move further backwards. This is necessary when a position in the binary stream is set, + not knowing if that position is on a proper encoded character boundary." + + "Nothing to be done, I am a byte encoding: each code point is encoded in a single byte" \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/instance/hash.st b/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/instance/hash.st new file mode 100644 index 000000000..f5af769e9 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/instance/hash.st @@ -0,0 +1,3 @@ +comparing +hash + ^ self identifier hash \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/instance/identifier..st b/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/instance/identifier..st new file mode 100644 index 000000000..ceeb07240 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/instance/identifier..st @@ -0,0 +1,3 @@ +initialization +identifier: object + identifier := object \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/instance/identifier.st b/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/instance/identifier.st new file mode 100644 index 000000000..c7b817464 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/instance/identifier.st @@ -0,0 +1,3 @@ +accessing +identifier + ^ identifier \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/instance/initialize.st b/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/instance/initialize.st new file mode 100644 index 000000000..4348f2972 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/instance/initialize.st @@ -0,0 +1,4 @@ +initialization +initialize + super initialize. + strict := true \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/instance/isLenient.st b/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/instance/isLenient.st new file mode 100644 index 000000000..9cede96ea --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/instance/isLenient.st @@ -0,0 +1,3 @@ +testing +isLenient + ^ strict not \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/instance/isStrict.st b/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/instance/isStrict.st new file mode 100644 index 000000000..300ebdbf1 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/instance/isStrict.st @@ -0,0 +1,3 @@ +testing +isStrict + ^ strict \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/instance/nextCodePointFromStream..st b/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/instance/nextCodePointFromStream..st new file mode 100644 index 000000000..f8c3d4394 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/instance/nextCodePointFromStream..st @@ -0,0 +1,14 @@ +encoding - decoding +nextCodePointFromStream: stream + "In non-strict mode, we let byte values for holes in our mapping pass through" + + | byteValue | + ^ (byteValue := stream next) < 128 + ifTrue: [ byteValue ] + ifFalse: [ + (byteToUnicode at: byteValue - 127 ifAbsent: [ nil ]) + ifNotNil: [ :unicode | unicode asInteger ] + ifNil: [ + strict + ifTrue: [ ^ self errorOutsideRange: byteValue from:stream ] + ifFalse: [ byteValue ] ] ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/instance/nextFromStream..st b/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/instance/nextFromStream..st new file mode 100644 index 000000000..31e8ff6d8 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/instance/nextFromStream..st @@ -0,0 +1,15 @@ +encoding - decoding +nextFromStream: stream + "In non-strict mode, we let byte values for holes in our mapping pass through. + Overwritten for performance reasons" + + | byteValue | + ^ (byteValue := stream next ifNil: [ ^ self errorIncompleteFrom: stream ]) < 128 + ifTrue: [ Character value: byteValue ] + ifFalse: [ + (byteToUnicode at: byteValue - 127 ifAbsent: [ nil ]) + ifNotNil: [ :unicode | unicode ] + ifNil: [ + strict + ifTrue: [ ^ Character value: (self errorOutsideRange: byteValue from:stream) ] + ifFalse: [ Character value: byteValue ] ] ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/instance/nextPutCodePoint.toStream..st b/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/instance/nextPutCodePoint.toStream..st new file mode 100644 index 000000000..2755a5b80 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/instance/nextPutCodePoint.toStream..st @@ -0,0 +1,12 @@ +encoding - decoding +nextPutCodePoint: codePoint toStream: stream + "In non-strict mode, we let code points for holes in our mapping table pass through" + + codePoint < 128 + ifTrue: [ stream nextPut: codePoint ] + ifFalse: [ + | byte | + byte := unicodeToByte at: codePoint ifAbsent: [ nil ]. + (byte isNil and: [ strict or: [ codePoint > 255 ] ]) + ifTrue: [ ^ self errorOutsideRange: codePoint to: stream ]. + stream nextPut: (byte ifNil: [ codePoint ]) ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/instance/printOn..st b/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/instance/printOn..st similarity index 100% rename from repository/Zinc-Character-Encoding-Core.package/ZnByteEncoder.class/instance/printOn..st rename to repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/instance/printOn..st diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/instance/skipToBeginOfCodePointOnStream..st b/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/instance/skipToBeginOfCodePointOnStream..st new file mode 100644 index 000000000..9d429f00c --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/instance/skipToBeginOfCodePointOnStream..st @@ -0,0 +1,7 @@ +encoding - decoding +skipToBeginOfCodePointOnStream: stream + "Ensure that the current position of stream is a the beginning of an encoded code point, + if not move further forward. This is necessary when a position in the binary stream is set, + not knowing if that position is on a proper encoded character boundary." + + "Nothing to be done, I am a byte encoding: each code point is encoded in a single byte" \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/instance/unicodeToByte..st b/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/instance/unicodeToByte..st new file mode 100644 index 000000000..d7ceab106 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/instance/unicodeToByte..st @@ -0,0 +1,3 @@ +initialization +unicodeToByte: map + unicodeToByte := map \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/properties.json b/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/properties.json new file mode 100644 index 000000000..26d3881f5 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnSimplifiedByteEncoder.class/properties.json @@ -0,0 +1,18 @@ +{ + "commentStamp" : "", + "super" : "ZnCharacterEncoder", + "category" : "Zinc-Character-Encoding-Core", + "classinstvars" : [ + "byteTextConverters" + ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ + "identifier", + "byteToUnicode", + "unicodeToByte", + "strict" + ], + "name" : "ZnSimplifiedByteEncoder", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnUTF16Encoder.class/README.md b/repository/Zinc-Character-Encoding-Core.package/ZnUTF16Encoder.class/README.md new file mode 100644 index 000000000..1aae06dcc --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnUTF16Encoder.class/README.md @@ -0,0 +1,6 @@ +I am ZnUTF16Encoder, a concrete subclass of ZnCharacterEncoder. +I implement the variable length UTF-16 encoding and decoding of Unicode according to RFC 2781. + +Wikipedia reference http://en.wikipedia.org/wiki/UTF-16 + +Part of Zinc HTTP Components. diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnUTF16Encoder.class/class/handlesEncoding..st b/repository/Zinc-Character-Encoding-Core.package/ZnUTF16Encoder.class/class/handlesEncoding..st new file mode 100644 index 000000000..b036e7826 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnUTF16Encoder.class/class/handlesEncoding..st @@ -0,0 +1,5 @@ +accessing +handlesEncoding: string + "Return true when my instances handle the encoding described by string" + + ^ self knownEncodingIdentifiers includes: (self canonicalEncodingIdentifier: string) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnUTF16Encoder.class/class/knownEncodingIdentifiers.st b/repository/Zinc-Character-Encoding-Core.package/ZnUTF16Encoder.class/class/knownEncodingIdentifiers.st new file mode 100644 index 000000000..8eb266fcb --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnUTF16Encoder.class/class/knownEncodingIdentifiers.st @@ -0,0 +1,3 @@ +accessing +knownEncodingIdentifiers + ^ #( 'utf16' 'utf16be' 'utf16le' ) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnUTF16Encoder.class/instance/back16BitWordOnStream..st b/repository/Zinc-Character-Encoding-Core.package/ZnUTF16Encoder.class/instance/back16BitWordOnStream..st new file mode 100644 index 000000000..988bdbfba --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnUTF16Encoder.class/instance/back16BitWordOnStream..st @@ -0,0 +1,8 @@ +private +back16BitWordOnStream: stream + | firstByte secondByte | + firstByte := stream back. + secondByte := stream back. + ^ self isBigEndian + ifTrue: [ secondByte + (firstByte << 8) ] + ifFalse: [ firstByte + (secondByte << 8) ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnUTF16Encoder.class/instance/backOnStream..st b/repository/Zinc-Character-Encoding-Core.package/ZnUTF16Encoder.class/instance/backOnStream..st new file mode 100644 index 000000000..bf81af73b --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnUTF16Encoder.class/instance/backOnStream..st @@ -0,0 +1,9 @@ +encoding - decoding +backOnStream: stream + "Move back one character on stream" + + | word | + word := self back16BitWordOnStream: stream. + (self isSurrogateCodePoint: word) + ifTrue: [ + self back16BitWordOnStream: stream ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnUTF16Encoder.class/instance/byteOrderMarkLE.st b/repository/Zinc-Character-Encoding-Core.package/ZnUTF16Encoder.class/instance/byteOrderMarkLE.st new file mode 100644 index 000000000..d6678b90a --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnUTF16Encoder.class/instance/byteOrderMarkLE.st @@ -0,0 +1,5 @@ +accessing +byteOrderMarkLE + "My little endian sequence of the Unicode BOM. See #byteOrderMark" + + ^ 16rFFFE \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnUTF16Encoder.class/instance/encodedByteCountForCodePoint..st b/repository/Zinc-Character-Encoding-Core.package/ZnUTF16Encoder.class/instance/encodedByteCountForCodePoint..st new file mode 100644 index 000000000..bb0273e12 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnUTF16Encoder.class/instance/encodedByteCountForCodePoint..st @@ -0,0 +1,7 @@ +encoding - decoding +encodedByteCountForCodePoint: codePoint + "Return how many bytes are needed to encode integer code point" + + codePoint <= 65535 ifTrue: [ ^ 2 ]. + codePoint <= self maximumUTFCode ifTrue: [ ^ 4 ]. + ^ self errorOutsideRangeByteCount: codePoint \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnUTF16Encoder.class/instance/ensureAtBeginOfCodePointOnStream..st b/repository/Zinc-Character-Encoding-Core.package/ZnUTF16Encoder.class/instance/ensureAtBeginOfCodePointOnStream..st new file mode 100644 index 000000000..fb9abb9ad --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnUTF16Encoder.class/instance/ensureAtBeginOfCodePointOnStream..st @@ -0,0 +1,16 @@ +encoding - decoding +ensureAtBeginOfCodePointOnStream: stream + "Ensure that the current position of stream is a the beginning of an encoded code point, + if not move further backwards. This is necessary when a position in the binary stream is set, + not knowing if that position is on a proper encoded character boundary." + + | word | + "Each code point is encoded using words of 2 bytes, move backwards until our position is divisible by 2" + [ stream position \\ 2 = 0 ] whileFalse: [ stream back ]. + "Now read the next word and back up" + word := self read16BitWordFromStream: stream. + self back16BitWordOnStream: stream. + "If it is a low or trailing surrogate, move another word backwards until the high or leading surrogate" + (word between: 16rDC00 and: 16rDFFF) + ifTrue: [ + self back16BitWordOnStream: stream ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnUTF16Encoder.class/instance/isFixedLength.st b/repository/Zinc-Character-Encoding-Core.package/ZnUTF16Encoder.class/instance/isFixedLength.st new file mode 100644 index 000000000..4dd53ade4 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnUTF16Encoder.class/instance/isFixedLength.st @@ -0,0 +1,5 @@ +testing +isFixedLength + "Return true when I am a fixed length encoding" + + ^ false \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnUTF16Encoder.class/instance/nextCodePointFromStream..st b/repository/Zinc-Character-Encoding-Core.package/ZnUTF16Encoder.class/instance/nextCodePointFromStream..st new file mode 100644 index 000000000..ed4e7b966 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnUTF16Encoder.class/instance/nextCodePointFromStream..st @@ -0,0 +1,16 @@ +encoding - decoding +nextCodePointFromStream: stream + "Read and return the next integer code point from stream" + + | word leadSurrogate trailSurrogate code | + word := self read16BitWordFromStream: stream. + ((self processByteOrderMark: word) and: [ self ignoreByteOrderMark ]) + ifTrue: [ word := self read16BitWordFromStream: stream ]. + ^ (word < 16rD800 or: [ word > 16rDBFF ]) + ifTrue: [ + word ] + ifFalse: [ + leadSurrogate := word. + trailSurrogate := self read16BitWordFromStream: stream. + code := (leadSurrogate - 16rD800) * 16r400 + (trailSurrogate - 16rDC00). + 16r10000 + code ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnUTF16Encoder.class/instance/nextPutCodePoint.toStream..st b/repository/Zinc-Character-Encoding-Core.package/ZnUTF16Encoder.class/instance/nextPutCodePoint.toStream..st new file mode 100644 index 000000000..a6fc15b1c --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnUTF16Encoder.class/instance/nextPutCodePoint.toStream..st @@ -0,0 +1,19 @@ +encoding - decoding +nextPutCodePoint: codePoint toStream: stream + "Write the encoding for integer code point to stream" + + | leadSurrogate trailSurrogate shifted | + (self isSurrogateCodePoint: codePoint) + ifTrue: [ ^ self errorOutsideRange: codePoint to: stream ]. + codePoint <= 65535 + ifTrue: [ + ^ self write16BitWord: codePoint toStream: stream ]. + codePoint <= self maximumUTFCode + ifTrue: [ + shifted := codePoint - 16r10000. + leadSurrogate := 16rD800 + (shifted // 16r400). + trailSurrogate := 16rDC00 + (shifted \\ 16r400). + self write16BitWord: leadSurrogate toStream: stream. + self write16BitWord: trailSurrogate toStream: stream ] + ifFalse: [ + ^ self errorOutsideRange: codePoint to: stream ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnUTF16Encoder.class/instance/processByteOrderMark..st b/repository/Zinc-Character-Encoding-Core.package/ZnUTF16Encoder.class/instance/processByteOrderMark..st new file mode 100644 index 000000000..26d216621 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnUTF16Encoder.class/instance/processByteOrderMark..st @@ -0,0 +1,8 @@ +private +processByteOrderMark: word + ^ (word = self byteOrderMark or: [ word = self byteOrderMarkLE ]) + ifTrue: [ + word = self byteOrderMarkLE + ifTrue: [ self swapEndianness ]. + true ] + ifFalse: [ false ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnUTF16Encoder.class/instance/read16BitWordFromStream..st b/repository/Zinc-Character-Encoding-Core.package/ZnUTF16Encoder.class/instance/read16BitWordFromStream..st new file mode 100644 index 000000000..1d8bebe2e --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnUTF16Encoder.class/instance/read16BitWordFromStream..st @@ -0,0 +1,10 @@ +private +read16BitWordFromStream: stream + | firstByte secondByte | + firstByte := stream next. + secondByte := stream next. + (firstByte isNil or: [ secondByte isNil ]) + ifTrue: [ ^ self errorIncompleteFrom: stream ]. + ^ self isBigEndian + ifTrue: [ secondByte + (firstByte << 8) ] + ifFalse: [ firstByte + (secondByte << 8) ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnUTF16Encoder.class/instance/skipToBeginOfCodePointOnStream..st b/repository/Zinc-Character-Encoding-Core.package/ZnUTF16Encoder.class/instance/skipToBeginOfCodePointOnStream..st new file mode 100644 index 000000000..ee017d6f7 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnUTF16Encoder.class/instance/skipToBeginOfCodePointOnStream..st @@ -0,0 +1,16 @@ +encoding - decoding +skipToBeginOfCodePointOnStream: stream + "Ensure that the current position of stream is a the beginning of an encoded code point, + if not move further forward. This is necessary when a position in the binary stream is set, + not knowing if that position is on a proper encoded character boundary." + + | word | + "Each code point is encoded using words of 2 bytes, move forward until our position is divisible by 2" + [ stream position \\ 2 = 0 ] whileFalse: [ stream next ]. + "Now read the next word and back up" + word := self read16BitWordFromStream: stream. + self back16BitWordOnStream: stream. + "If it is a low or trailing surrogate, move another word forward until the high or leading surrogate" + (word between: 16rDC00 and: 16rDFFF) + ifTrue: [ + self read16BitWordFromStream: stream ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnUTF16Encoder.class/instance/write16BitWord.toStream..st b/repository/Zinc-Character-Encoding-Core.package/ZnUTF16Encoder.class/instance/write16BitWord.toStream..st new file mode 100644 index 000000000..406f92369 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnUTF16Encoder.class/instance/write16BitWord.toStream..st @@ -0,0 +1,11 @@ +private +write16BitWord: word toStream: stream + self isBigEndian + ifTrue: [ + stream + nextPut: (word byteAt: 2); + nextPut: (word byteAt: 1) ] + ifFalse: [ + stream + nextPut: (word byteAt: 1); + nextPut: (word byteAt: 2) ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnUTF16Encoder.class/properties.json b/repository/Zinc-Character-Encoding-Core.package/ZnUTF16Encoder.class/properties.json new file mode 100644 index 000000000..c64fc23a7 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnUTF16Encoder.class/properties.json @@ -0,0 +1,11 @@ +{ + "commentStamp" : "", + "super" : "ZnEndianSensitiveUTFEncoder", + "category" : "Zinc-Character-Encoding-Core", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "ZnUTF16Encoder", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnUTF32Encoder.class/README.md b/repository/Zinc-Character-Encoding-Core.package/ZnUTF32Encoder.class/README.md new file mode 100644 index 000000000..946a2c4c7 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnUTF32Encoder.class/README.md @@ -0,0 +1,8 @@ +I am ZnUTF32Encoder, a concrete subclass of ZnCharacterEncoder. +I implement the fixed length UTF-32 encoding and decoding of Unicode according to http://www.unicode.org/versions/Unicode8.0.0/ch03.pdf definitions D90, D99, D100 and D101. + +Wikipedia reference http://en.wikipedia.org/wiki/UTF-32 + +UCS-4 is another name for the same encoding. + +Part of Zinc HTTP Components. diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnUTF32Encoder.class/class/handlesEncoding..st b/repository/Zinc-Character-Encoding-Core.package/ZnUTF32Encoder.class/class/handlesEncoding..st new file mode 100644 index 000000000..b036e7826 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnUTF32Encoder.class/class/handlesEncoding..st @@ -0,0 +1,5 @@ +accessing +handlesEncoding: string + "Return true when my instances handle the encoding described by string" + + ^ self knownEncodingIdentifiers includes: (self canonicalEncodingIdentifier: string) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnUTF32Encoder.class/class/knownEncodingIdentifiers.st b/repository/Zinc-Character-Encoding-Core.package/ZnUTF32Encoder.class/class/knownEncodingIdentifiers.st new file mode 100644 index 000000000..090198c99 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnUTF32Encoder.class/class/knownEncodingIdentifiers.st @@ -0,0 +1,3 @@ +accessing +knownEncodingIdentifiers + ^ #( 'utf32' 'utf32be' 'utf32le' 'ucs4' 'ucs4be' 'ucs4le') \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnUTF32Encoder.class/instance/backOnStream..st b/repository/Zinc-Character-Encoding-Core.package/ZnUTF32Encoder.class/instance/backOnStream..st new file mode 100644 index 000000000..892207788 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnUTF32Encoder.class/instance/backOnStream..st @@ -0,0 +1,5 @@ +encoding - decoding +backOnStream: stream + "Move back one character on stream" + + 4 timesRepeat: [ stream back ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnUTF32Encoder.class/instance/byteOrderMarkLE.st b/repository/Zinc-Character-Encoding-Core.package/ZnUTF32Encoder.class/instance/byteOrderMarkLE.st new file mode 100644 index 000000000..4b4a53cf9 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnUTF32Encoder.class/instance/byteOrderMarkLE.st @@ -0,0 +1,5 @@ +private +byteOrderMarkLE + "My little endian sequence of the Unicode BOM. See #byteOrderMark" + + ^ 16rFFFE0000 \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnUTF32Encoder.class/instance/encodedByteCountForCodePoint..st b/repository/Zinc-Character-Encoding-Core.package/ZnUTF32Encoder.class/instance/encodedByteCountForCodePoint..st new file mode 100644 index 000000000..36104cbd4 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnUTF32Encoder.class/instance/encodedByteCountForCodePoint..st @@ -0,0 +1,7 @@ +encoding - decoding +encodedByteCountForCodePoint: codePoint + "Return how many bytes are needed to encode integer codePoint" + + codePoint > self maximumUTFCode + ifTrue: [ ^ self errorOutsideRangeByteCount: codePoint ]. + ^ 4 \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnUTF32Encoder.class/instance/ensureAtBeginOfCodePointOnStream..st b/repository/Zinc-Character-Encoding-Core.package/ZnUTF32Encoder.class/instance/ensureAtBeginOfCodePointOnStream..st new file mode 100644 index 000000000..536e74349 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnUTF32Encoder.class/instance/ensureAtBeginOfCodePointOnStream..st @@ -0,0 +1,9 @@ +encoding - decoding +ensureAtBeginOfCodePointOnStream: stream + "Ensure that the current position of stream is a the beginning of an encoded code point, + if not move further backwards. This is necessary when a position in the binary stream is set, + not knowing if that position is on a proper encoded character boundary." + + "Each code point is encoded using exaxtly 4 bytes, move backwards until our position is divisible by 4" + + [ stream position \\ 4 = 0 ] whileFalse: [ stream back ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnUTF32Encoder.class/instance/nextCodePointFromStream..st b/repository/Zinc-Character-Encoding-Core.package/ZnUTF32Encoder.class/instance/nextCodePointFromStream..st new file mode 100644 index 000000000..64db5e849 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnUTF32Encoder.class/instance/nextCodePointFromStream..st @@ -0,0 +1,11 @@ +encoding - decoding +nextCodePointFromStream: stream + "Read and return the next integer code point from stream" + + | codePoint | + codePoint := self readCodePointFrom: stream. + ((self processByteOrderMark: codePoint) and: [ self ignoreByteOrderMark ]) + ifTrue: [ codePoint := self readCodePointFrom: stream ]. + ((self isSurrogateCodePoint: codePoint) or: [ codePoint > self maximumUTFCode ]) + ifTrue: [ ^ self errorOutsideRange: codePoint from: stream ]. + ^ codePoint \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnUTF32Encoder.class/instance/nextPutCodePoint.toStream..st b/repository/Zinc-Character-Encoding-Core.package/ZnUTF32Encoder.class/instance/nextPutCodePoint.toStream..st new file mode 100644 index 000000000..3839e92a3 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnUTF32Encoder.class/instance/nextPutCodePoint.toStream..st @@ -0,0 +1,11 @@ +encoding - decoding +nextPutCodePoint: codePoint toStream: stream + "Write the encoding for integer code point to stream" + + (self isSurrogateCodePoint: codePoint) + ifTrue: [ ^ self errorOutsideRange: codePoint to: stream ]. + codePoint <= self maximumUTFCode + ifTrue: [ + self writeCodePoint: codePoint to: stream ] + ifFalse: [ + ^ self errorOutsideRange: codePoint to: stream ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnUTF32Encoder.class/instance/processByteOrderMark..st b/repository/Zinc-Character-Encoding-Core.package/ZnUTF32Encoder.class/instance/processByteOrderMark..st new file mode 100644 index 000000000..e45c718b3 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnUTF32Encoder.class/instance/processByteOrderMark..st @@ -0,0 +1,8 @@ +private +processByteOrderMark: codePoint + ^ (codePoint = self byteOrderMark or: [ codePoint = self byteOrderMarkLE ]) + ifTrue: [ + codePoint = self byteOrderMarkLE + ifTrue: [ self swapEndianness ]. + true ] + ifFalse: [ false ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnUTF32Encoder.class/instance/readCodePointFrom..st b/repository/Zinc-Character-Encoding-Core.package/ZnUTF32Encoder.class/instance/readCodePointFrom..st new file mode 100644 index 000000000..451e8ae93 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnUTF32Encoder.class/instance/readCodePointFrom..st @@ -0,0 +1,14 @@ +private +readCodePointFrom: stream + | byte1 byte2 byte3 byte4 | + byte1 := stream next. + byte2 := stream next. + byte3 := stream next. + byte4 := stream next. + (byte1 isNil or: [ byte2 isNil or: [ byte3 isNil or: [ byte4 isNil ] ] ]) + ifTrue: [ ^ self errorIncompleteFrom: stream ]. + ^ self isBigEndian + ifTrue: [ + (byte1 bitShift: 24) + (byte2 bitShift: 16) + (byte3 bitShift: 8) + byte4 ] + ifFalse: [ + (byte4 bitShift: 24) + (byte3 bitShift: 16) + (byte2 bitShift: 8) + byte1 ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnUTF32Encoder.class/instance/skipToBeginOfCodePointOnStream..st b/repository/Zinc-Character-Encoding-Core.package/ZnUTF32Encoder.class/instance/skipToBeginOfCodePointOnStream..st new file mode 100644 index 000000000..ebbad58cc --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnUTF32Encoder.class/instance/skipToBeginOfCodePointOnStream..st @@ -0,0 +1,9 @@ +encoding - decoding +skipToBeginOfCodePointOnStream: stream + "Ensure that the current position of stream is a the beginning of an encoded code point, + if not move further forward. This is necessary when a position in the binary stream is set, + not knowing if that position is on a proper encoded character boundary." + + "Each code point is encoded using exaxtly 4 bytes, move forward until our position is divisible by 4" + + [ stream position \\ 4 = 0 ] whileFalse: [ stream next ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnUTF32Encoder.class/instance/writeCodePoint.to..st b/repository/Zinc-Character-Encoding-Core.package/ZnUTF32Encoder.class/instance/writeCodePoint.to..st new file mode 100644 index 000000000..d89973218 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnUTF32Encoder.class/instance/writeCodePoint.to..st @@ -0,0 +1,15 @@ +private +writeCodePoint: codePoint to: stream + self isBigEndian + ifTrue: [ + stream + nextPut: (codePoint byteAt: 4); + nextPut: (codePoint byteAt: 3); + nextPut: (codePoint byteAt: 2); + nextPut: (codePoint byteAt: 1) ] + ifFalse: [ + stream + nextPut: (codePoint byteAt: 1); + nextPut: (codePoint byteAt: 2); + nextPut: (codePoint byteAt: 3); + nextPut: (codePoint byteAt: 4) ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnUTF32Encoder.class/properties.json b/repository/Zinc-Character-Encoding-Core.package/ZnUTF32Encoder.class/properties.json new file mode 100644 index 000000000..84b9aca01 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnUTF32Encoder.class/properties.json @@ -0,0 +1,11 @@ +{ + "commentStamp" : "", + "super" : "ZnEndianSensitiveUTFEncoder", + "category" : "Zinc-Character-Encoding-Core", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "ZnUTF32Encoder", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/README.md b/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/README.md index 35b3ecc2c..7956dfe07 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/README.md +++ b/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/README.md @@ -1,4 +1,6 @@ I am ZnUTF8Encoder, a concrete subclass of ZnCharacterEncoder. I implement the variable length UTF-8 encoding and decoding of Unicode according to RFC 3629. +Wikipedia reference http://en.wikipedia.org/wiki/UTF-8 + Part of Zinc HTTP Components. \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/class/default.st b/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/class/default.st new file mode 100644 index 000000000..7df1ad94b --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/class/default.st @@ -0,0 +1,6 @@ +accessing +default + "Return a cached instance of the most commonly used encoder, + which is faster than going via #newForEncoding: that does a subclass search" + + ^ Default ifNil: [ Default := self new ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/class/handlesEncoding..st b/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/class/handlesEncoding..st index e03e57be9..139d32f59 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/class/handlesEncoding..st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/class/handlesEncoding..st @@ -1,5 +1,5 @@ accessing handlesEncoding: string "Return true when my instances handle the encoding described by string" - - ^ #( 'utf-8' 'utf8' ) includes: string \ No newline at end of file + + ^ (self canonicalEncodingIdentifier: string) = 'utf8' \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/class/initialize.st b/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/class/initialize.st index ce6d7d970..61d9fab14 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/class/initialize.st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/class/initialize.st @@ -13,6 +13,6 @@ initialize (bytes size = 1 and: [ bytes first = each ]) ifTrue: [ ByteASCIISet at: each + 1 put: 0 ] - ifFalse: [ + ifFalse: [ ByteASCIISet at: each + 1 put: 1. ByteUTF8Encoding at: each + 1 put: bytes ] ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/class/knownEncodingIdentifiers.st b/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/class/knownEncodingIdentifiers.st new file mode 100644 index 000000000..795a27e22 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/class/knownEncodingIdentifiers.st @@ -0,0 +1,3 @@ +accessing +knownEncodingIdentifiers + ^ #( utf8 ) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/class/newForEncoding..st b/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/class/newForEncoding..st index 87651bf31..3316b5d2e 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/class/newForEncoding..st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/class/newForEncoding..st @@ -1,5 +1,5 @@ instance creation newForEncoding: string "No further parametrization needed" - + ^ self new \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/instance/decodeBytes..st b/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/instance/decodeBytes..st deleted file mode 100644 index 2d14d0217..000000000 --- a/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/instance/decodeBytes..st +++ /dev/null @@ -1,3 +0,0 @@ -convenience -decodeBytes: bytes - ^ bytes asByteArray decodeFromUTF8 \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/instance/encodedByteCountForCodePoint..st b/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/instance/encodedByteCountForCodePoint..st new file mode 100644 index 000000000..43a782cf8 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/instance/encodedByteCountForCodePoint..st @@ -0,0 +1,9 @@ +encoding - decoding +encodedByteCountForCodePoint: codePoint + "Return how many bytes are needed to encode integer code point" + + codePoint < 128 ifTrue: [ ^ 1 ]. + codePoint < 2048 ifTrue: [ ^ 2 ]. + codePoint < 65535 ifTrue: [ ^ 3 ]. + codePoint <= self maximumUTFCode ifTrue: [ ^ 4 ]. + ^ self errorOutsideRangeByteCount: codePoint \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/instance/ensureAtBeginOfCodePointOnStream..st b/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/instance/ensureAtBeginOfCodePointOnStream..st new file mode 100644 index 000000000..3f5685fa2 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/instance/ensureAtBeginOfCodePointOnStream..st @@ -0,0 +1,11 @@ +encoding - decoding +ensureAtBeginOfCodePointOnStream: stream + "Ensure that the current position of stream is a the beginning of an encoded code point, + if not move further backwards. This is necessary when a position in the binary stream is set, + not knowing if that position is on a proper encoded character boundary." + + "If we are at end-of-stream, we can't be in the middle of an encoded codepoint + (unless that codepoint is incomplete and thus invalid, which we won't worry about)" + stream atEnd ifTrue: [ ^ self ]. + "Back up until we are not longer on a continuation byte but on a leading byte" + [ (stream peek bitAnd: 2r11000000) == 2r10000000 ] whileTrue: [ stream back ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/instance/error..st b/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/instance/error..st index 989d6f335..7bd423949 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/instance/error..st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/instance/error..st @@ -1,3 +1,3 @@ error handling error: message - ZnInvalidUTF8 signal: message \ No newline at end of file + ^ ZnInvalidUTF8 signal: message \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/instance/error.st b/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/instance/error.st deleted file mode 100644 index c332f159a..000000000 --- a/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/instance/error.st +++ /dev/null @@ -1,3 +0,0 @@ -error handling -error - ZnInvalidUTF8 signal \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/instance/errorIllegalContinuationByte.from..st b/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/instance/errorIllegalContinuationByte.from..st new file mode 100644 index 000000000..16c4b2b2c --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/instance/errorIllegalContinuationByte.from..st @@ -0,0 +1,3 @@ +error handling +errorIllegalContinuationByte: byte from: stream + ^ self error: 'Illegal continuation byte for utf-8 encoding' \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/instance/errorIllegalLeadingByte.from..st b/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/instance/errorIllegalLeadingByte.from..st new file mode 100644 index 000000000..9393d2346 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/instance/errorIllegalLeadingByte.from..st @@ -0,0 +1,3 @@ +error handling +errorIllegalLeadingByte: byte from: stream + ^ self error: 'Illegal leading byte for utf-8 encoding' \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/instance/errorIncomplete.st b/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/instance/errorIncomplete.st deleted file mode 100644 index b30a62df8..000000000 --- a/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/instance/errorIncomplete.st +++ /dev/null @@ -1,3 +0,0 @@ -error handling -errorIncomplete - self error: 'Incomplete utf-8 encoding' \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/instance/errorOverlong.from..st b/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/instance/errorOverlong.from..st new file mode 100644 index 000000000..dd58b93f6 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/instance/errorOverlong.from..st @@ -0,0 +1,3 @@ +error handling +errorOverlong: codePoint from: stream + ^ self error: 'Overlong utf-8 encoding (non-shortest form)' \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/instance/identifier.st b/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/instance/identifier.st new file mode 100644 index 000000000..ac7da7b23 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/instance/identifier.st @@ -0,0 +1,3 @@ +accessing +identifier + ^ 'utf8' \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/instance/isFixedLength.st b/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/instance/isFixedLength.st new file mode 100644 index 000000000..4dd53ade4 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/instance/isFixedLength.st @@ -0,0 +1,5 @@ +testing +isFixedLength + "Return true when I am a fixed length encoding" + + ^ false \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/instance/next.putAllASCII.startingAt.toStream..st b/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/instance/next.putAllASCII.startingAt.toStream..st new file mode 100644 index 000000000..2c032cb67 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/instance/next.putAllASCII.startingAt.toStream..st @@ -0,0 +1,7 @@ +private +next: count putAllASCII: string startingAt: offset toStream: stream + "Write count bytes from string starting at offset to stream, + assuming all characters are in the ASCII set and need no translation" + + offset to: offset + count - 1 do: [ :index | + stream nextPut: (string byteAt: index) ] diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/instance/next.putAllByteString.startingAt.toStream..st b/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/instance/next.putAllByteString.startingAt.toStream..st new file mode 100644 index 000000000..fe8df3013 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/instance/next.putAllByteString.startingAt.toStream..st @@ -0,0 +1,20 @@ +private +next: count putAllByteString: string startingAt: offset toStream: stream + "A faster version when string is a ByteString" + + | lastIndex nextIndex | + lastIndex := offset. + nextIndex := self findFirstNonASCIIIn: string startingAt: lastIndex. + (nextIndex = 0 or: [ offset + count <= nextIndex ]) + ifTrue: [ + ^ self next: count putAllASCII: string startingAt: offset toStream: stream ]. + [ nextIndex > lastIndex + ifTrue: [ + self next: nextIndex - lastIndex putAllASCII: string startingAt: lastIndex toStream: stream ]. + stream nextPutAll: (ByteUTF8Encoding at: (string byteAt: nextIndex) + 1). + lastIndex := nextIndex + 1. + nextIndex := self findFirstNonASCIIIn: string startingAt: lastIndex. + nextIndex = 0 or: [ offset + count <= nextIndex ] ] whileFalse. + offset + count <= lastIndex + ifFalse: [ + self next: offset + count - lastIndex putAllASCII: string startingAt: lastIndex toStream: stream ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/instance/nextCodePointFromStream..st b/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/instance/nextCodePointFromStream..st new file mode 100644 index 000000000..22071bf8e --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/instance/nextCodePointFromStream..st @@ -0,0 +1,39 @@ +encoding - decoding +nextCodePointFromStream: stream + "Read and return the next integer code point from stream" + + | code byte next | + (byte := stream next ifNil: [ ^ self errorIncompleteFrom: stream ]) < 128 + ifTrue: [ ^ byte ]. + (byte bitAnd: 2r11100000) == 2r11000000 + ifTrue: [ + code := byte bitAnd: 2r00011111. + ((next := stream next ifNil: [ ^ self errorIncompleteFrom: stream ]) bitAnd: 2r11000000) == 2r10000000 + ifTrue: [ code := (code bitShift: 6) + (next bitAnd: 2r00111111) ] + ifFalse: [ ^ self errorIllegalContinuationByte: next from: stream ]. + code < 128 ifTrue: [ ^ self errorOverlong: code from: stream ]. + ^ code ]. + (byte bitAnd: 2r11110000) == 2r11100000 + ifTrue: [ + code := byte bitAnd: 2r00001111. + 2 timesRepeat: [ + ((next := stream next ifNil: [ ^ self errorIncompleteFrom: stream ]) bitAnd: 2r11000000) == 2r10000000 + ifTrue: [ code := (code bitShift: 6) + (next bitAnd: 2r00111111) ] + ifFalse: [ ^ self errorIllegalContinuationByte: next from: stream ] ]. + code < 2048 ifTrue: [ ^ self errorOverlong: code from: stream ]. + (self isSurrogateCodePoint: code) ifTrue: [ ^ self errorOutsideRange: code from: stream ]. + (code = self byteOrderMark and: [ self ignoreByteOrderMark ]) ifTrue: [ + stream atEnd ifTrue: [ ^ self errorIncompleteFrom: stream ]. + ^ self nextCodePointFromStream: stream ]. + ^ code ]. + (byte bitAnd: 2r11111000) == 2r11110000 + ifTrue: [ + code := byte bitAnd: 2r00000111. + 3 timesRepeat: [ + ((next := stream next ifNil: [ ^ self errorIncompleteFrom: stream ]) bitAnd: 2r11000000) == 2r10000000 + ifTrue: [ code := (code bitShift: 6) + (next bitAnd: 2r00111111) ] + ifFalse: [ ^ self errorIllegalContinuationByte: next from: stream ] ]. + code < 65535 ifTrue: [ ^ self errorOverlong: code from: stream ]. + code > self maximumUTFCode ifTrue: [ ^ self errorOutsideRange: code from: stream ]. + ^ code ]. + ^ self errorIllegalLeadingByte: byte from: stream \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/instance/nextFromStream..st b/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/instance/nextFromStream..st deleted file mode 100644 index 64c520122..000000000 --- a/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/instance/nextFromStream..st +++ /dev/null @@ -1,35 +0,0 @@ -converting -nextFromStream: stream - | code byte next | - (byte := stream next) < 128 - ifTrue: [ ^ Character codePoint: byte ]. - (byte bitAnd: 2r11100000) == 2r11000000 - ifTrue: [ - code := byte bitAnd: 2r00011111. - ((next := stream next ifNil: [ self errorIncomplete ]) bitAnd: 2r11000000) == 2r10000000 - ifTrue: [ code := (code bitShift: 6) + (next bitAnd: 2r00111111) ] - ifFalse: [ ^ self error ]. - code < 128 ifTrue: [ self errorOverlong ]. - ^ Character codePoint: code ]. - (byte bitAnd: 2r11110000) == 2r11100000 - ifTrue: [ - code := byte bitAnd: 2r00001111. - 2 timesRepeat: [ - ((next := stream next ifNil: [ self errorIncomplete ]) bitAnd: 2r11000000) == 2r10000000 - ifTrue: [ code := (code bitShift: 6) + (next bitAnd: 2r00111111) ] - ifFalse: [ ^ self error ] ]. - code < 2048 ifTrue: [ self errorOverlong ]. - code = 65279 "Unicode Byte Order Mark" ifTrue: [ - stream atEnd ifTrue: [ self errorIncomplete ]. - ^ self nextFromStream: stream ]. - ^ Character codePoint: code ]. - (byte bitAnd: 2r11111000) == 2r11110000 - ifTrue: [ - code := byte bitAnd: 2r00000111. - 3 timesRepeat: [ - ((next := stream next ifNil: [ self errorIncomplete ]) bitAnd: 2r11000000) == 2r10000000 - ifTrue: [ code := (code bitShift: 6) + (next bitAnd: 2r00111111) ] - ifFalse: [ ^ self error ] ]. - code < 65535 ifTrue: [ self errorOverlong ]. - ^ Character codePoint: code ]. - self error \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/instance/nextPut.toStream..st b/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/instance/nextPut.toStream..st deleted file mode 100644 index 4375cf040..000000000 --- a/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/instance/nextPut.toStream..st +++ /dev/null @@ -1,22 +0,0 @@ -converting -nextPut: character toStream: stream - | code | - code := character codePoint. - code < 128 ifTrue: [ - ^ stream nextPut: code ]. - code < 2048 ifTrue: [ - ^ stream - nextPut: (2r11000000 + (code bitShift: -6)); - nextPut: (2r10000000 + (code bitAnd: 2r111111)) ]. - code < 65535 ifTrue: [ - ^ stream - nextPut: (2r11100000 + (code bitShift: -12)); - nextPut: (2r10000000 + ((code bitShift: -6) bitAnd: 2r111111)); - nextPut: (2r10000000 + (code bitAnd: 2r111111)) ]. - code <= self maximumUTF8Code ifTrue: [ - ^ stream - nextPut: (2r11110000 + (code bitShift: -18)); - nextPut: (2r10000000 + ((code bitShift: -12) bitAnd: 2r111111)); - nextPut: (2r10000000 + ((code bitShift: -6) bitAnd: 2r111111)); - nextPut: (2r10000000 + (code bitAnd: 2r111111)) ]. - self errorOutsideRange diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/instance/nextPutCodePoint.toStream..st b/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/instance/nextPutCodePoint.toStream..st new file mode 100644 index 000000000..2bc54bb6f --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/instance/nextPutCodePoint.toStream..st @@ -0,0 +1,23 @@ +encoding - decoding +nextPutCodePoint: codePoint toStream: stream + "Write the encoding for Integer code point to stream" + + codePoint < 128 ifTrue: [ + ^ stream nextPut: codePoint ]. + codePoint < 2048 ifTrue: [ + ^ stream + nextPut: (2r11000000 + (codePoint bitShift: -6)); + nextPut: (2r10000000 + (codePoint bitAnd: 2r111111)) ]. + (self isSurrogateCodePoint: codePoint) ifTrue: [ ^ self errorOutsideRange: codePoint to: stream ]. + codePoint < 65536 ifTrue: [ + ^ stream + nextPut: (2r11100000 + (codePoint bitShift: -12)); + nextPut: (2r10000000 + ((codePoint bitShift: -6) bitAnd: 2r111111)); + nextPut: (2r10000000 + (codePoint bitAnd: 2r111111)) ]. + codePoint <= self maximumUTFCode ifTrue: [ + ^ stream + nextPut: (2r11110000 + (codePoint bitShift: -18)); + nextPut: (2r10000000 + ((codePoint bitShift: -12) bitAnd: 2r111111)); + nextPut: (2r10000000 + ((codePoint bitShift: -6) bitAnd: 2r111111)); + nextPut: (2r10000000 + (codePoint bitAnd: 2r111111)) ]. + ^ self errorOutsideRange: codePoint to: stream \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/instance/readInto.startingAt.count.fromStream..st b/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/instance/readInto.startingAt.count.fromStream..st new file mode 100644 index 000000000..2590f195e --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/instance/readInto.startingAt.count.fromStream..st @@ -0,0 +1,16 @@ +*zinc-pharo-character-encoding-core +readInto: string startingAt: offset count: requestedCount fromStream: stream + "Protocol: convenience" + "Read requestedCount characters into string starting at offset, + returning the number read, there could be less available when stream is atEnd. + I signal a ZnByteStringBecameWideString notification if necessary" + + | stringBuffer | + stringBuffer := string. + offset to: offset + requestedCount - 1 do: [ :index | | codePoint | + stream atEnd ifTrue: [ ^ index - offset ]. + codePoint := self nextCodePointFromStream: stream. + (codePoint > 255 and: [ stringBuffer isWideString not ]) + ifTrue: [ stringBuffer := ZnByteStringBecameWideString convert: stringBuffer ]. + stringBuffer at: index put: (Character value: codePoint) ]. + ^ requestedCount diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/instance/skipToBeginOfCodePointOnStream..st b/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/instance/skipToBeginOfCodePointOnStream..st new file mode 100644 index 000000000..cf9876604 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/instance/skipToBeginOfCodePointOnStream..st @@ -0,0 +1,9 @@ +encoding - decoding +skipToBeginOfCodePointOnStream: stream + "Ensure that the current position of stream is a the beginning of an encoded code point, + if not move further forward. This is necessary when a position in the binary stream is set, + not knowing if that position is on a proper encoded character boundary." + + "Read bytes up until we are not longer on a continuation byte but on a leading byte" + + [ (stream peek bitAnd: 2r11000000) == 2r10000000 ] whileTrue: [ stream next ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/methodProperties.json b/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/methodProperties.json deleted file mode 100644 index 9840edf02..000000000 --- a/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/methodProperties.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "class" : { - "handlesEncoding:" : "SvenVanCaekenberghe 1/25/2011 11:11", - "initialize" : "SvenVanCaekenberghe 5/25/2013 13:58", - "newForEncoding:" : "SvenVanCaekenberghe 1/25/2011 11:19" }, - "instance" : { - "decodeBytes:" : "dkh 06/25/2014 21:46", - "decodeBytesIntoWideString:" : "dkh 06/25/2014 21:38", - "encodedByteCountFor:" : "SvenVanCaekenberghe 6/3/2013 19:57", - "error" : "SvenVanCaekenberghe 6/3/2013 19:55", - "error:" : "SvenVanCaekenberghe 6/3/2013 19:52", - "errorIncomplete" : "SvenVanCaekenberghe 6/3/2013 19:59", - "errorOutsideRange" : "SvenVanCaekenberghe 6/3/2013 19:58", - "errorOverlong" : "SvenVanCaekenberghe 6/4/2013 16:58", - "maximumUTF8Code" : "SvenVanCaekenberghe 11/29/2010 21:19", - "nextFromStream:" : "SvenVanCaekenberghe 6/4/2013 17:21", - "nextPut:toStream:" : "DataCurator 11/18/2013 20:23" } } diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/properties.json b/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/properties.json index 428809413..81ab7351c 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/properties.json +++ b/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/properties.json @@ -1,15 +1,15 @@ { + "commentStamp" : "", + "super" : "ZnUTFEncoder", "category" : "Zinc-Character-Encoding-Core", - "classinstvars" : [ - ], + "classinstvars" : [ ], + "pools" : [ ], "classvars" : [ "ByteASCIISet", - "ByteUTF8Encoding" ], - "commentStamp" : "SvenVanCaekenberghe 12/6/2010 12:55", - "instvars" : [ - ], + "ByteUTF8Encoding", + "Default" + ], + "instvars" : [ ], "name" : "ZnUTF8Encoder", - "pools" : [ - ], - "super" : "ZnCharacterEncoder", - "type" : "normal" } + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnUTFEncoder.class/README.md b/repository/Zinc-Character-Encoding-Core.package/ZnUTFEncoder.class/README.md new file mode 100644 index 000000000..aeac856b9 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnUTFEncoder.class/README.md @@ -0,0 +1 @@ +I am ZnUTFEncoder. I am a ZnCharacterEncoder. My subclasses deal with the full range of Unicode character code points. \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnUTFEncoder.class/class/handlesEncoding..st b/repository/Zinc-Character-Encoding-Core.package/ZnUTFEncoder.class/class/handlesEncoding..st new file mode 100644 index 000000000..4cb9521a7 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnUTFEncoder.class/class/handlesEncoding..st @@ -0,0 +1,5 @@ +accessing +handlesEncoding: string + "Return true when my instances handle the encoding described by string" + + ^ false \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnUTFEncoder.class/class/isAbstract.st b/repository/Zinc-Character-Encoding-Core.package/ZnUTFEncoder.class/class/isAbstract.st new file mode 100644 index 000000000..b86b3420c --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnUTFEncoder.class/class/isAbstract.st @@ -0,0 +1,3 @@ +testing +isAbstract + ^ self = ZnUTFEncoder \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnUTFEncoder.class/instance/byteOrderMark.st b/repository/Zinc-Character-Encoding-Core.package/ZnUTFEncoder.class/instance/byteOrderMark.st new file mode 100644 index 000000000..21b31b1a4 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnUTFEncoder.class/instance/byteOrderMark.st @@ -0,0 +1,7 @@ +accessing +byteOrderMark + "The code point of the Unicode Byte-Order-Mark or BOM character. + This is the big endian sequence. + See https://en.wikipedia.org/wiki/Byte_order_mark" + + ^ 16rFEFF \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnUTFEncoder.class/instance/encodeStringWithByteOrderMark..st b/repository/Zinc-Character-Encoding-Core.package/ZnUTFEncoder.class/instance/encodeStringWithByteOrderMark..st new file mode 100644 index 000000000..1b85fdaad --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnUTFEncoder.class/instance/encodeStringWithByteOrderMark..st @@ -0,0 +1,8 @@ +convenience +encodeStringWithByteOrderMark: string + "Encode string and return the resulting byte array. + Always add a Unicode byte order mark (BOM) in front." + + ^ ByteArray streamContents: [ :stream | + self nextPutByteOrderMarkToStream: stream. + self next: string size putAll: string startingAt: 1 toStream: stream ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnUTFEncoder.class/instance/ignoreByteOrderMark..st b/repository/Zinc-Character-Encoding-Core.package/ZnUTFEncoder.class/instance/ignoreByteOrderMark..st new file mode 100644 index 000000000..54a1ba104 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnUTFEncoder.class/instance/ignoreByteOrderMark..st @@ -0,0 +1,5 @@ +accessing +ignoreByteOrderMark: boolean + "When boolean is true I ignore Unicode byte-order mark (BOM) occurences that I read (the default)." + + ignoreByteOrderMark := boolean \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnUTFEncoder.class/instance/ignoreByteOrderMark.st b/repository/Zinc-Character-Encoding-Core.package/ZnUTFEncoder.class/instance/ignoreByteOrderMark.st new file mode 100644 index 000000000..a77db6ea8 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnUTFEncoder.class/instance/ignoreByteOrderMark.st @@ -0,0 +1,5 @@ +accessing +ignoreByteOrderMark + "Return true when I ignore Unicode byte-order mark (BOM) occurences that I read (the default)." + + ^ ignoreByteOrderMark ifNil: [ ignoreByteOrderMark := true ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnUTFEncoder.class/instance/isSurrogateCodePoint..st b/repository/Zinc-Character-Encoding-Core.package/ZnUTFEncoder.class/instance/isSurrogateCodePoint..st new file mode 100644 index 000000000..10a7d3a68 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnUTFEncoder.class/instance/isSurrogateCodePoint..st @@ -0,0 +1,5 @@ +testing +isSurrogateCodePoint: codePoint + "Surrogate Code Points should not be encoded or decoded because they are not Unicode scalar values" + + ^ codePoint between: 16rD800 and: 16rDFFF \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnUTFEncoder.class/instance/maximumUTFCode.st b/repository/Zinc-Character-Encoding-Core.package/ZnUTFEncoder.class/instance/maximumUTFCode.st new file mode 100644 index 000000000..9f4830b9c --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnUTFEncoder.class/instance/maximumUTFCode.st @@ -0,0 +1,3 @@ +accessing +maximumUTFCode + ^ 16r10FFFF \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnUTFEncoder.class/instance/nextPutByteOrderMarkToStream..st b/repository/Zinc-Character-Encoding-Core.package/ZnUTFEncoder.class/instance/nextPutByteOrderMarkToStream..st new file mode 100644 index 000000000..2474676d3 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnUTFEncoder.class/instance/nextPutByteOrderMarkToStream..st @@ -0,0 +1,5 @@ +convenience +nextPutByteOrderMarkToStream: stream + "Write the encoded byte-order-mark (BOM) to stream" + + self nextPutCodePoint: self byteOrderMark toStream: stream \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnUTFEncoder.class/properties.json b/repository/Zinc-Character-Encoding-Core.package/ZnUTFEncoder.class/properties.json new file mode 100644 index 000000000..4d634d66c --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnUTFEncoder.class/properties.json @@ -0,0 +1,13 @@ +{ + "commentStamp" : "", + "super" : "ZnCharacterEncoder", + "category" : "Zinc-Character-Encoding-Core", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ + "ignoreByteOrderMark" + ], + "name" : "ZnUTFEncoder", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/monticello.meta/categories.st b/repository/Zinc-Character-Encoding-Core.package/monticello.meta/categories.st index 2cb3537b5..f2721d0c8 100644 --- a/repository/Zinc-Character-Encoding-Core.package/monticello.meta/categories.st +++ b/repository/Zinc-Character-Encoding-Core.package/monticello.meta/categories.st @@ -1 +1 @@ -SystemOrganization addCategory: #'Zinc-Character-Encoding-Core'! +self packageOrganizer ensurePackage: #'Zinc-Character-Encoding-Core' withTags: #()! diff --git a/repository/Zinc-Character-Encoding-Core.package/monticello.meta/version b/repository/Zinc-Character-Encoding-Core.package/monticello.meta/version deleted file mode 100644 index 3c1f55c96..000000000 --- a/repository/Zinc-Character-Encoding-Core.package/monticello.meta/version +++ /dev/null @@ -1 +0,0 @@ -(name 'Zinc-Character-Encoding-Core-dkh.46' message 'ZnUTF8Encoder>>next:putAll:startingAt:toStream: is also version dependent ...' id '0e725fb3-55ef-4bf9-b3c9-6df068c8f363' date '06/30/2014' time '07:23:19' author 'dkh' ancestors ((name 'Zinc-Character-Encoding-Core-dkh.45' message 'ZnUTF8Encoder>>encodeString: is version specific' id '3e2570ec-2aa2-4935-8378-333d737b417f' date '06/30/2014' time '00:04:22' author 'dkh' ancestors ((name 'Zinc-Character-Encoding-Core-dkh.44' message 'checkpoint for 3.1.0.5: 282 run, 280 passes, 1 expected defects, 1 failures, 0 errors, 0 unexpected passes' id '8ba436de-6334-45af-b6e6-a61a5e160fb5' date '06/29/2014' time '17:34:35' author 'dkh' ancestors ((name 'Zinc-Character-Encoding-Core-dkh.43' message 'checkpoint: 282 run, 273 passes, 0 expected defects, 7 failures, 2 errors, 0 unexpected passes - down to mainly chunked stream and gzip failures' id '11dd2a99-494d-4e49-8d10-ea3391a89dc1' date '06/27/2014' time '18:12:38' author 'dkh' ancestors ((name 'Zinc-Character-Encoding-Core-dkh.42' message 'fix Issue #51, signal ConnectionClosed when zero bytes returned in SocketStreamSocket>>receiveDataSignallingTimeout:into:startingAt: - 282 run, 267 passes, 0 expected defects, 11 failures, 4 errors, 0 unexpected passes' id 'f0a80c6a-c7ee-4109-b7b4-e926a756a5c0' date '06/27/2014' time '12:49:37' author 'dkh' ancestors ((name 'Zinc-Character-Encoding-Core-dkh.41' message 'checkpoint: 282 run, 267 passes, 0 expected defects, 11 failures, 4 errors, 0 unexpected passes ' id 'c7bd9eee-eed4-490d-a835-fd7390e1d981' date '06/26/2014' time '22:01:02' author 'dkh' ancestors ((name 'Zinc-Character-Encoding-Core-dkh.40' message 'checkpoint: 282 run, 263 passes, 0 expected defects, 13 failures, 6 errors, 0 unexpected passes' id 'b00757a9-4633-40d7-a907-4680c639290c' date '06/25/2014' time '22:19:23' author 'dkh' ancestors ((name 'Zinc-Character-Encoding-Core-dkh.39' message 'Checkpoint: 282 run, 258 passes, 0 expected defects, 10 failures, 14 errors, 0 unexpected passes ' id '124a5208-94ff-4ebb-af0b-1905e5b55849' date '06/25/2014' time '21:52:52' author 'dkh' ancestors ((name 'Zinc-Character-Encoding-Core-dkh.38' message 'Not surprisingly, ZnUTF8Encoder>>brokenReadInto:startingAt:count:fromStream: is the culprit' id 'ed6f2be1-a3da-48e9-829c-06ab7b05607d' date '06/24/2014' time '21:12:50' author 'dkh' ancestors ((name 'Zinc-Character-Encoding-Core-dkh.37' message 'looks like ZnByteStringBecameWideString is needed ... add defaultAction and cross fingers' id '684180f2-cf80-4407-9786-de5962315f18' date '05/25/2014' time '20:17:52' author 'dkh' ancestors ((name 'Zinc-Character-Encoding-Core-dkh.36' message 'ZnUTF8Encoder>>originalReadInto:startingAt:count:fromStream: is no better ... direct conversion of String to QueadByteString instead of ZnByteStringBecameWideString ... no defaultAction and no handler??? ' id '4acde385-6954-46de-9b0f-3a26b034b304' date '05/25/2014' time '14:48:14' author 'dkh' ancestors ((name 'Zinc-Character-Encoding-Core-dkh.35' message 'ZnByteStringBecameWideString not handled correctly ... I surrender for the moment ... swap out ZnUTF8Encoder>>brokenReadInto:startingAt:count:fromStream: for ZnUTF8Encoder>>originalReadInto:startingAt:count:fromStream: and cut down on the combinatorials...' id '2f16b108-be6b-4a45-8bdf-d41b8bb58f1a' date '05/25/2014' time '14:17:24' author 'dkh' ancestors ((name 'Zinc-Character-Encoding-Core-dkh.34' message 'another layer peeled ... ' id 'cf01b01d-4323-4bfd-b032-905b60446f74' date '05/25/2014' time '14:04:39' author 'dkh' ancestors ((name 'Zinc-Character-Encoding-Core-dkh.33' message 'finally, narrowing things down ... dare we hop that we are out of the woods?' id '0b1e304d-0519-4711-8553-b0b3b57d73e0' date '05/25/2014' time '13:53:39' author 'dkh' ancestors ((name 'Zinc-Character-Encoding-Core-dkh.32' message 'slog again, slog again ...' id '8b441bad-62b5-4160-86da-ae5478303eee' date '05/25/2014' time '13:43:23' author 'dkh' ancestors ((name 'Zinc-Character-Encoding-Core-dkh.31' message 'slogging away eliminating MNU during travis test... - oddly enough I don''t get the same errors running locally - wierd mixture of binary and strings ... I think that the pharo vm is forgiving in mixing characters and byte arrays in ways that gemstone is not - get things working and then we''ll look at what I''ve had to change to see if better sense can be made' id '0ea4a683-f957-4485-9a37-8dd34f006f82' date '05/25/2014' time '11:51:10' author 'dkh' ancestors ((name 'Zinc-Character-Encoding-Core-dkh.30' message 'implement CharacterCollection class>>findFirstByteInString:inSet:startingAt: for ZnUTF8Encoder>>findFirstNonASCIIIn:startingAt:' id '580863cb-53f5-45f6-8cd3-6c37d56a43d5' date '05/25/2014' time '11:35:48' author 'dkh' ancestors ((name 'Zinc-Character-Encoding-Core-dkh.29' message '' id '198f5a70-d630-4213-b79d-3df11c735918' date '05/24/2014' time '19:02:36' author 'dkh' ancestors ((name 'Zinc-Character-Encoding-Core-dkh.28' message '' id '6c3bd167-457d-46bd-9fc4-31052b41a309' date '05/24/2014' time '18:51:58' author 'dkh' ancestors ((name 'Zinc-Character-Encoding-Core-dkh.27' message '' id 'e15b4f86-79bf-418a-aaa9-b016000b131d' date '05/24/2014' time '18:06:09' author 'dkh' ancestors ((name 'Zinc-Character-Encoding-Core-dkh.26' message '' id 'cf85a2ae-1e78-4899-9441-1ba1dca325df' date '05/24/2014' time '17:55:56' author 'dkh' ancestors ((name 'Zinc-Character-Encoding-Core-dkh.25' message '' id '8f92edb3-2f07-42f0-83d7-ae02ba709caa' date '05/24/2014' time '17:35:05' author 'dkh' ancestors ((name 'Zinc-Character-Encoding-Core-JohanBrichau.24' message 'fix a test' id 'e7b92eb1-ccea-49f9-a76a-7da7381c165d' date '05/17/2014' time '20:01:31' author 'JohanBrichau' ancestors ((name 'Zinc-Character-Encoding-Core-JohanBrichau.23' message 'fixing some tests' id '12936963-cbd7-455d-99a5-2bbf16060112' date '05/02/2014' time '23:51:38' author 'JohanBrichau' ancestors ((name 'Zinc-Character-Encoding-Core-JohanBrichau.22' message 'porting code' id '66c3e067-13ac-49f3-a81b-f1859d0d931b' date '01/05/2014' time '15:26:36' author 'JohanBrichau' ancestors ((name 'Zinc-Character-Encoding-Core-SvenVanCaekenberghe.21' message 'Added an optimalization to ZnUTF8Encoder>>#readInto:startingAt:count:fromStream: to avoid the price of #becomeForward: when a ByteString to WideString conversion happens' id '29f57ebd-e428-46d7-aa36-233e4bc40938' date '06/11/2013' time '04:31:30' author 'SvenVanCaekenberghe' ancestors ((name 'Zinc-Character-Encoding-Core-SvenVanCaekenberghe.20' message 'merge' id '23dc613d-4596-483b-945a-95e8497e06e9' date '06/11/2013' time '09:21:39' author 'SvenVanCaekenberghe' ancestors ((name 'Zinc-Character-Encoding-Core-SvenVanCaekenberghe.19' message 'Added an optimized ZnUTF8Encoder>>#decodeBytes: and an even faster #decodeBytesIntoWideString: (thx johnny/JanStruz)' id '2fd6df01-681f-4453-abc0-9422a8103e65' date '06/10/2013' time '11:19:58' author 'SvenVanCaekenberghe' ancestors () stepChildren ())(name 'Zinc-Character-Encoding-Core-SvenVanCaekenberghe.18' message 'Added support to ZnUTF8Encoder to detect overlong (non-shortest form) encodings as well as to skip the Unicode Byte Order Mark (BOM) character' id 'd07b55a8-4a53-40d8-85eb-63af21c7fb12' date '06/04/2013' time '05:28:27' author 'SvenVanCaekenberghe' ancestors ((name 'Zinc-Character-Encoding-Core-SvenVanCaekenberghe.17' message 'Introduction of an explicit ZnInvalidUTF8 exception.' id 'aae299b0-a550-47c6-a444-847d01206d94' date '06/03/2013' time '08:13:30' author 'SvenVanCaekenberghe' ancestors ((name 'Zinc-Character-Encoding-Core-SvenVanCaekenberghe.16' message 'Fix to an edge case in ZnUTF8Encoder>>#optimizedReadInto:startingAt:count:fromStream:' id 'd6bdd5aa-3f6d-4786-a3b8-5dcaeba2a5aa' date '05/27/2013' time '04:19:29' author 'SvenVanCaekenberghe' ancestors ((name 'Zinc-Character-Encoding-Core-SvenVanCaekenberghe.15' message 'Bugfix to ZnUTF8Encoder class>>#initialize (circular dependency)' id '2c097f3b-3eaa-4626-ae1f-620df08ef898' date '05/25/2013' time '02:00:52' author 'SvenVanCaekenberghe' ancestors ((name 'Zinc-Character-Encoding-Core-SvenVanCaekenberghe.14' message 'ZnUTF8Encoder: - enabled #next:putAll:startingAt:toStream: for real - added & enabled #optimizedReadInto:startingAt:count:fromStream: - #nextFromStream now signals specific errors on eof - some refactoring/cleanup' id 'a4e03928-dd20-4e7c-b686-28e10a8130c3' date '05/25/2013' time '10:29:45' author 'SvenVanCaekenberghe' ancestors ((name 'Zinc-Character-Encoding-Core-SvenVanCaekenberghe.13' message 'Added ZnCharacterEncoder>>#readInto:startingAt:count:fromStream with an optimized implementation for ZnNullEncoder' id 'fbc0480f-5050-4930-ab24-0fb8464d82a1' date '05/23/2013' time '12:25:16' author 'SvenVanCaekenberghe' ancestors ((name 'Zinc-Character-Encoding-Core-SvenVanCaekenberghe.12' message 'Introduction of ZnCharacterEncoder>>#next:putAll:startingAt:toStream with optimized implementations in ZnNullEncoder and ZnUTF8Encoder for ByteString instances' id '7505c957-45dc-4689-a9e3-25a0a00be1f6' date '05/22/2013' time '04:15:39' author 'SvenVanCaekenberghe' ancestors ((name 'Zinc-Character-Encoding-Core-SvenVanCaekenberghe.11' message 'Added ZnBufferedWriteStream>>#finish as alias for #flushBuffer' id '14216331-a683-4994-9aa2-cdf56d325fb7' date '05/19/2013' time '11:45:46' author 'SvenVanCaekenberghe' ancestors ((name 'Zinc-Character-Encoding-Core-SvenVanCaekenberghe.10' message 'Bugfix to ZnUTF8Encoder>>#nextPut:toStream (codepoints > 65535 were wrongly encoded)' id '9548942a-1b84-48a0-8976-dac39be9f314' date '05/16/2013' time '11:11:26' author 'SvenVanCaekenberghe' ancestors ((name 'Zinc-Character-Encoding-Core-SvenVanCaekenberghe.9' message 'fixed a typo in a class comment' id '304b757c-8af9-4723-a7c0-fed57c353db2' date '05/14/2013' time '01:37:37' author 'SvenVanCaekenberghe' ancestors ((name 'Zinc-Character-Encoding-Core-SvenVanCaekenberghe.8' message 'Typo/bug in ZnCharacterWriteStream>>#encoding: (thx Stephane Ducasse)' id '2642837d-126e-44c1-a980-e147d940e9d2' date '04/19/2013' time '01:03:26' author 'SvenVanCaekenberghe' ancestors ((name 'Zinc-Character-Encoding-Core-SvenVanCaekenberghe.7' message 'Added String>>#urlEncoded & #urlDecoded - Thx Camillo Bruni' id '6715de50-a8b8-4240-a1ef-1282e1e343c7' date '04/16/2013' time '09:19:02' author 'SvenVanCaekenberghe' ancestors ((name 'Zinc-Character-Encoding-Core-SvenVanCaekenberghe.6' message 'Bugfix to ZnPercentEncoder: always use 2 hex digits (Thanks Benjamin Van Ryseghem)' id 'af573099-bafb-4e38-9192-4440765e8883' date '03/01/2013' time '09:35:27' author 'SvenVanCaekenberghe' ancestors ((name 'Zinc-Character-Encoding-Core-SvenVanCaekenberghe.5' message 'merging in some Gemstone portability changes by Ken Treis' id 'aa29124f-b47d-438c-b086-8cb23a17d2cd' date '01/21/2013' time '01:13:52' author 'SvenVanCaekenberghe' ancestors ((name 'Zinc-Character-Encoding-Core-KenTreis.4.1' message 'Minor changes for GemStone compatibility: * Removed a stray period after a method comment * When printing in base 16, used #printOn:base:showRadix:' id 'bc01d2d5-7bf2-4bb3-be36-8f9faff96af3' date '01/19/2013' time '11:22:49' author 'KenTreis' ancestors ((name 'Zinc-Character-Encoding-Core-SvenVanCaekenberghe.4' message 'add a comment to ZnByteEncoder class>>#initialize to make sure it get executed when loaded in an image where it is already present (Thx Lukas Renggli for suggesting the idea)' id '2070bf5a-a914-4d68-9469-58eb6c85aeb8' date '01/15/2013' time '05:09:22' author 'SvenVanCaekenberghe' ancestors ((name 'Zinc-Character-Encoding-Core-SvenVanCaekenberghe.3' message 'use ''asZnUrl retrieveContents'' for simple. one off, non critical HTTP client usage in ZnByteEncoder class>>#parseUnicodeOrgSpec' id '1804c2bb-41a6-48ab-9404-64ea1e486ed5' date '01/15/2013' time '02:58:21' author 'SvenVanCaekenberghe' ancestors ((name 'Zinc-Character-Encoding-Core-SvenVanCaekenberghe.2' message 'stop using ZnNullEncoder for latin1; added #beLenient option to make a ZnByteEncoder non-strict (the old behavior)' id '07e720c3-e179-40b0-94de-073e11a8bd45' date '12/17/2012' time '04:08:17' author 'SvenVanCaekenberghe' ancestors ((name 'Zinc-Character-Encoding-Core-SvenVanCaekenberghe.1' message 'creation of Zinc-Character-Encoding-[Core|Tests] by moving various classes out of Zinc-HTTP' id '4e1d9613-d6ec-4e2c-8587-f69086cb2208' date '12/16/2012' time '05:01:29' author 'SvenVanCaekenberghe' ancestors () stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ()) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/properties.json b/repository/Zinc-Character-Encoding-Core.package/properties.json index f037444a7..6f31cf5a2 100644 --- a/repository/Zinc-Character-Encoding-Core.package/properties.json +++ b/repository/Zinc-Character-Encoding-Core.package/properties.json @@ -1,2 +1 @@ -{ - } +{ } \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ByteArray.extension/class/newFrom..st b/repository/Zinc-Character-Encoding-Core.v37.package/ByteArray.extension/class/newFrom..st new file mode 100644 index 000000000..1c3b00ccd --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ByteArray.extension/class/newFrom..st @@ -0,0 +1,15 @@ +*Zinc-Character-Encoding-Core +newFrom: aCollection + "Protocol: instance creation" + "Answer an instance of me containing the same elements as aCollection." + | newArray | + newArray _ self new: aCollection size. + 1 to: aCollection size do: [:i | newArray at: i put: (aCollection at: i)]. + ^ newArray + +" Array newFrom: {1. 2. 3} + {1. 2. 3} as: Array + {1. 2. 3} as: ByteArray + {$c. $h. $r} as: String + {$c. $h. $r} as: Text +" diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ByteArray.extension/instance/decodeWith..st b/repository/Zinc-Character-Encoding-Core.v37.package/ByteArray.extension/instance/decodeWith..st new file mode 100644 index 000000000..852bc63f9 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ByteArray.extension/instance/decodeWith..st @@ -0,0 +1,8 @@ +*Zinc-Character-Encoding-Core +decodeWith: encoding + "Produce a String that decodes the receiver, using a specified encoding. + Encoding is either a ZnCharacterEncoderGS instance or an identifier for one." + + "#[76 101 115 32 195 169 108 195 168 118 101 115 32 102 114 97 110 195 167 97 105 115] decodeWith: #utf8" + + ^ encoding asZnCharacterEncoder decodeBytes: self diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ByteArray.extension/instance/utf8Decoded.st b/repository/Zinc-Character-Encoding-Core.v37.package/ByteArray.extension/instance/utf8Decoded.st new file mode 100644 index 000000000..4ed08844c --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ByteArray.extension/instance/utf8Decoded.st @@ -0,0 +1,8 @@ +*Zinc-Character-Encoding-Core +utf8Decoded + "Produce a String decoding the receiver using UTF-8, + the recommended encoding for Strings, unless you know what you are doing." + + "#[76 101 115 32 195 169 108 195 168 118 101 115 32 102 114 97 110 195 167 97 105 115] utf8Decoded" + + ^ self decodeWith: ZnCharacterEncoderGS utf8 diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ByteArray.extension/properties.json b/repository/Zinc-Character-Encoding-Core.v37.package/ByteArray.extension/properties.json new file mode 100644 index 000000000..f81bcb8d3 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ByteArray.extension/properties.json @@ -0,0 +1,3 @@ +{ + "name" : "ByteArray" +} \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/Character.extension/methodProperties.json b/repository/Zinc-Character-Encoding-Core.v37.package/Character.extension/methodProperties.json deleted file mode 100644 index 208a88c47..000000000 --- a/repository/Zinc-Character-Encoding-Core.v37.package/Character.extension/methodProperties.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "class" : { - }, - "instance" : { - "isOctetCharacter" : "JohanBrichau 11/18/2013 20:26" } } diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/CharacterCollection.extension/class/new.streamContents..st b/repository/Zinc-Character-Encoding-Core.v37.package/CharacterCollection.extension/class/new.streamContents..st new file mode 100644 index 000000000..55e5f7d12 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/CharacterCollection.extension/class/new.streamContents..st @@ -0,0 +1,10 @@ +*Zinc-Character-Encoding-Core +new: newSize streamContents: blockWithArg + "Protocol: instance creation" + + | stream | + stream := WriteStreamPortable on: (self new: newSize). + blockWithArg value: stream. + stream position = newSize + ifTrue: [ ^stream originalContents ] + ifFalse: [ ^stream contents ] diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/CharacterCollection.extension/instance/asZnCharacterEncoder.st b/repository/Zinc-Character-Encoding-Core.v37.package/CharacterCollection.extension/instance/asZnCharacterEncoder.st index 035ed9329..46b328abb 100644 --- a/repository/Zinc-Character-Encoding-Core.v37.package/CharacterCollection.extension/instance/asZnCharacterEncoder.st +++ b/repository/Zinc-Character-Encoding-Core.v37.package/CharacterCollection.extension/instance/asZnCharacterEncoder.st @@ -1,12 +1,12 @@ *zinc-character-encoding-core asZnCharacterEncoder - "Return a ZnCharacterEncoder instance using the receiver as identifier" + "Return a ZnCharacterEncoderGS instance using the receiver as identifier" " 'UTF-8' asZnCharacterEncoder " (self select: [ :each | each isAlphaNumeric ]) asLowercase = 'utf8' - ifTrue: [ ^ ZnUTF8Encoder new ] + ifTrue: [ ^ ZnUTF8EncoderGS new ] ifFalse: [ (self select: [ :each | each isAlphaNumeric ]) asLowercase = '8bit' ifFalse: [ ZnNullEncoder new ] ]. - ^ Zn8BITEncoder new \ No newline at end of file + ^ Zn8BITEncoder new diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/CharacterCollection.extension/instance/encodeWith..st b/repository/Zinc-Character-Encoding-Core.v37.package/CharacterCollection.extension/instance/encodeWith..st new file mode 100644 index 000000000..a8e419633 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/CharacterCollection.extension/instance/encodeWith..st @@ -0,0 +1,8 @@ +*zinc-character-encoding-core +encodeWith: encoding + "Produce a ByteArray that encodes the receiver, using a specified encoding. + Encoding is either a ZnCharacterEncoderGS instance or an identifier for one." + + " 'Les élèves français' encodeWith: #utf8 " + + ^ encoding asZnCharacterEncoder encodeString: self diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/CharacterCollection.extension/instance/isQuadByteString.st b/repository/Zinc-Character-Encoding-Core.v37.package/CharacterCollection.extension/instance/isQuadByteString.st new file mode 100644 index 000000000..676be4514 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/CharacterCollection.extension/instance/isQuadByteString.st @@ -0,0 +1,4 @@ +*zinc-character-encoding-core +isQuadByteString + + ^ false \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/CharacterCollection.extension/instance/urlDecoded.st b/repository/Zinc-Character-Encoding-Core.v37.package/CharacterCollection.extension/instance/urlDecoded.st new file mode 100644 index 000000000..5d278cb25 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/CharacterCollection.extension/instance/urlDecoded.st @@ -0,0 +1,3 @@ +*zinc-character-encoding-core +urlDecoded + ^ ZnPercentEncoder new decode: self \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/CharacterCollection.extension/instance/urlEncoded.st b/repository/Zinc-Character-Encoding-Core.v37.package/CharacterCollection.extension/instance/urlEncoded.st new file mode 100644 index 000000000..518bc59f5 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/CharacterCollection.extension/instance/urlEncoded.st @@ -0,0 +1,3 @@ +*zinc-character-encoding-core +urlEncoded + ^ ZnPercentEncoder new encode: self \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/CharacterCollection.extension/instance/utf8Encoded.st b/repository/Zinc-Character-Encoding-Core.v37.package/CharacterCollection.extension/instance/utf8Encoded.st new file mode 100644 index 000000000..3bd575aeb --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/CharacterCollection.extension/instance/utf8Encoded.st @@ -0,0 +1,8 @@ +*zinc-character-encoding-core +utf8Encoded + "Produce a ByteArray encoding the receiver using UTF-8, + the recommended encoding for Strings, unless you know what you are doing." + + " 'Les élèves français' utf8Encoded " + + ^ self encodeWith: ZnCharacterEncoderGS utf8 diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/CharacterCollection.extension/methodProperties.json b/repository/Zinc-Character-Encoding-Core.v37.package/CharacterCollection.extension/methodProperties.json deleted file mode 100644 index 347ab9b7c..000000000 --- a/repository/Zinc-Character-Encoding-Core.v37.package/CharacterCollection.extension/methodProperties.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "class" : { - "findFirstByteInString:inSet:startingAt:" : "dkh 05/25/2014 10:07" }, - "instance" : { - "asZnCharacterEncoder" : "dkh 04/18/2023 18:41" } } diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/Collection.extension/instance/collect.as..st b/repository/Zinc-Character-Encoding-Core.v37.package/Collection.extension/instance/collect.as..st new file mode 100644 index 000000000..ad23abcd2 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/Collection.extension/instance/collect.as..st @@ -0,0 +1,7 @@ +*zinc-character-encoding-core +collect: aBlock as: aClass + "Protocol: enumerating" + "Evaluate aBlock with each of the receiver's elements as the argument. + Collect the resulting values into an instance of aClass. Answer the resulting collection." + + ^(aClass new: self size) fillFrom: self with: aBlock \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/Collection.extension/instance/fillFrom.with..st b/repository/Zinc-Character-Encoding-Core.v37.package/Collection.extension/instance/fillFrom.with..st new file mode 100644 index 000000000..1feff3d48 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/Collection.extension/instance/fillFrom.with..st @@ -0,0 +1,8 @@ +*zinc-character-encoding-core +fillFrom: aCollection with: aBlock + "Protocol: private" + "Evaluate aBlock with each of aCollections's elements as the argument. + Collect the resulting values into self. Answer self." + + aCollection do: [ :each | + self add: (aBlock value: each) ] \ No newline at end of file diff --git a/repository/Zinc-HTTP.package/Collection.extension/properties.json b/repository/Zinc-Character-Encoding-Core.v37.package/Collection.extension/properties.json similarity index 100% rename from repository/Zinc-HTTP.package/Collection.extension/properties.json rename to repository/Zinc-Character-Encoding-Core.v37.package/Collection.extension/properties.json diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/Dictionary.extension/instance/keys.st b/repository/Zinc-Character-Encoding-Core.v37.package/Dictionary.extension/instance/keys.st new file mode 100644 index 000000000..1e69c828e --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/Dictionary.extension/instance/keys.st @@ -0,0 +1,5 @@ +*zinc-character-encoding-core +keys + "Answer an Array containing the receiver's keys." + + ^Array new: self size streamContents: [:s| self keysDo: [:key| s nextPut: key]] \ No newline at end of file diff --git a/repository/Zinc-HTTP.package/Dictionary.extension/properties.json b/repository/Zinc-Character-Encoding-Core.v37.package/Dictionary.extension/properties.json similarity index 100% rename from repository/Zinc-HTTP.package/Dictionary.extension/properties.json rename to repository/Zinc-Character-Encoding-Core.v37.package/Dictionary.extension/properties.json diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/FileReference.extension/instance/binaryReadStream.st b/repository/Zinc-Character-Encoding-Core.v37.package/FileReference.extension/instance/binaryReadStream.st new file mode 100644 index 000000000..b3e2328fe --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/FileReference.extension/instance/binaryReadStream.st @@ -0,0 +1,6 @@ +*zinc-character-encoding-core +binaryReadStream + "Protocol: streams" + "Answer a buffered binary read stream on the receiver" + + ^ ZnBufferedReadStream on: (filesystem binaryReadStreamOn: self path) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/FileReference.extension/instance/binaryWriteStream.st b/repository/Zinc-Character-Encoding-Core.v37.package/FileReference.extension/instance/binaryWriteStream.st new file mode 100644 index 000000000..e09d074cc --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/FileReference.extension/instance/binaryWriteStream.st @@ -0,0 +1,6 @@ +*zinc-character-encoding-core +binaryWriteStream + "Protocol: streams" + "Answer a buffered binary write stream on the receiver" + + ^ ZnBufferedWriteStream on: (filesystem binaryWriteStreamOn: self path) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/FileReference.extension/properties.json b/repository/Zinc-Character-Encoding-Core.v37.package/FileReference.extension/properties.json new file mode 100644 index 000000000..8ca1fc1f2 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/FileReference.extension/properties.json @@ -0,0 +1,2 @@ +{ + "name" : "FileReference" } diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/FileSystem.extension/instance/binaryReadStreamOn..st b/repository/Zinc-Character-Encoding-Core.v37.package/FileSystem.extension/instance/binaryReadStreamOn..st new file mode 100644 index 000000000..c8958872b --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/FileSystem.extension/instance/binaryReadStreamOn..st @@ -0,0 +1,7 @@ +*zinc-character-encoding-core +binaryReadStreamOn: aResolvable + "Protocol: public" + "Resolve the argument into an absolute path and open a file handle on the file + at that path. Ask the handle to give us a binary read stream for reading the file." + + ^ (self open: aResolvable options: self defaultOptionsForRead) binaryReadStream \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/FileSystem.extension/instance/binaryWriteStreamOn..st b/repository/Zinc-Character-Encoding-Core.v37.package/FileSystem.extension/instance/binaryWriteStreamOn..st new file mode 100644 index 000000000..ffd66785d --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/FileSystem.extension/instance/binaryWriteStreamOn..st @@ -0,0 +1,7 @@ +*zinc-character-encoding-core +binaryWriteStreamOn: aResolvable + "Protocol: public" + "Resolve the argument into an absolute path and open a file handle on the file + at that path. Ask the handle to give us a binary write stream for writing into the file." + + ^ (self open: aResolvable options: self defaultOptionsForWrite) binaryWriteStream \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/FileSystem.extension/instance/defaultOptionsForRead.st b/repository/Zinc-Character-Encoding-Core.v37.package/FileSystem.extension/instance/defaultOptionsForRead.st new file mode 100644 index 000000000..5b07ad75b --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/FileSystem.extension/instance/defaultOptionsForRead.st @@ -0,0 +1,6 @@ +*zinc-character-encoding-core +defaultOptionsForRead + "Protocol: private-accessing" + "Return the default options used when reading a file." + + ^ self fileOpeningOptionsClass readOnly diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/FileSystem.extension/instance/defaultOptionsForWrite.st b/repository/Zinc-Character-Encoding-Core.v37.package/FileSystem.extension/instance/defaultOptionsForWrite.st new file mode 100644 index 000000000..3d8666595 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/FileSystem.extension/instance/defaultOptionsForWrite.st @@ -0,0 +1,8 @@ +*zinc-character-encoding-core +defaultOptionsForWrite + "Protocol: private-accessing" + "Return the default options used when writing a file." + + ^self fileOpeningOptionsClass writeOnly + create; + yourself diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/FileSystem.extension/properties.json b/repository/Zinc-Character-Encoding-Core.v37.package/FileSystem.extension/properties.json new file mode 100644 index 000000000..e0b9eb45a --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/FileSystem.extension/properties.json @@ -0,0 +1,2 @@ +{ + "name" : "FileSystem" } diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/FsBinaryFileStream.extension/instance/reset.st b/repository/Zinc-Character-Encoding-Core.v37.package/FsBinaryFileStream.extension/instance/reset.st new file mode 100644 index 000000000..c09e67c8a --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/FsBinaryFileStream.extension/instance/reset.st @@ -0,0 +1,4 @@ +*zinc-character-encoding-core +reset + "Protocol: positioning" + self position: 0 diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/FsBinaryFileStream.extension/properties.json b/repository/Zinc-Character-Encoding-Core.v37.package/FsBinaryFileStream.extension/properties.json new file mode 100644 index 000000000..d5a20d207 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/FsBinaryFileStream.extension/properties.json @@ -0,0 +1,2 @@ +{ + "name" : "FsBinaryFileStream" } diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/Integer.extension/instance/byteAt..st b/repository/Zinc-Character-Encoding-Core.v37.package/Integer.extension/instance/byteAt..st new file mode 100644 index 000000000..e6f910fbc --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/Integer.extension/instance/byteAt..st @@ -0,0 +1,4 @@ +*zinc-character-encoding-core +byteAt: n + + ^ self digitAt: n \ No newline at end of file diff --git a/repository/Zinc-HTTP.package/Integer.extension/properties.json b/repository/Zinc-Character-Encoding-Core.v37.package/Integer.extension/properties.json similarity index 100% rename from repository/Zinc-HTTP.package/Integer.extension/properties.json rename to repository/Zinc-Character-Encoding-Core.v37.package/Integer.extension/properties.json diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/Number.extension/instance/**..st b/repository/Zinc-Character-Encoding-Core.v37.package/Number.extension/instance/**..st new file mode 100644 index 000000000..26a288d0e --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/Number.extension/instance/**..st @@ -0,0 +1,6 @@ +*zinc-character-encoding-core +** exponent + "Protocol: Arithmetic" + " A shortcut method for raisedTo: " + + ^ self raisedTo: exponent diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/Number.extension/properties.json b/repository/Zinc-Character-Encoding-Core.v37.package/Number.extension/properties.json new file mode 100644 index 000000000..1d2c94d4a --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/Number.extension/properties.json @@ -0,0 +1,2 @@ +{ + "name" : "Number" } diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/PositionableStream.extension/instance/collectionSpecies.st b/repository/Zinc-Character-Encoding-Core.v37.package/PositionableStream.extension/instance/collectionSpecies.st new file mode 100644 index 000000000..307c8f964 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/PositionableStream.extension/instance/collectionSpecies.st @@ -0,0 +1,5 @@ +*zinc-character-encoding-core +collectionSpecies + "Answer the species of collection into which the receiver can stream" + + ^ self collection species \ No newline at end of file diff --git a/repository/Zinc-HTTP.package/PositionableStream.extension/properties.json b/repository/Zinc-Character-Encoding-Core.v37.package/PositionableStream.extension/properties.json similarity index 100% rename from repository/Zinc-HTTP.package/PositionableStream.extension/properties.json rename to repository/Zinc-Character-Encoding-Core.v37.package/PositionableStream.extension/properties.json diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/PositionableStreamPortable.extension/instance/back.st b/repository/Zinc-Character-Encoding-Core.v37.package/PositionableStreamPortable.extension/instance/back.st new file mode 100644 index 000000000..7d62e5a77 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/PositionableStreamPortable.extension/instance/back.st @@ -0,0 +1,7 @@ +*zinc-character-encoding-core +back + "Go back one element and return it." + + self position = 0 ifTrue: [self positionError: 0]. + self skip: -1. + ^ self peek \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/PositionableStreamPortable.extension/instance/next.putAll..st b/repository/Zinc-Character-Encoding-Core.v37.package/PositionableStreamPortable.extension/instance/next.putAll..st new file mode 100644 index 000000000..4534488f1 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/PositionableStreamPortable.extension/instance/next.putAll..st @@ -0,0 +1,5 @@ +*zinc-character-encoding-core +next: anInteger putAll: aCollection + "Store the next anInteger elements from the given collection." + + ^self next: anInteger putAll: aCollection startingAt: 1 diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/PositionableStreamPortable.extension/instance/setFrom.to..st b/repository/Zinc-Character-Encoding-Core.v37.package/PositionableStreamPortable.extension/instance/setFrom.to..st new file mode 100644 index 000000000..9b50d3115 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/PositionableStreamPortable.extension/instance/setFrom.to..st @@ -0,0 +1,5 @@ +*zinc-character-encoding-core +setFrom: newStart to: newStop + + position := newStart - 1. + readLimit := newStop \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/PositionableStreamPortable.extension/properties.json b/repository/Zinc-Character-Encoding-Core.v37.package/PositionableStreamPortable.extension/properties.json new file mode 100644 index 000000000..88052dc9e --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/PositionableStreamPortable.extension/properties.json @@ -0,0 +1,2 @@ +{ + "name" : "PositionableStreamPortable" } diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/QuadByteString.extension/instance/isQuadByteString.st b/repository/Zinc-Character-Encoding-Core.v37.package/QuadByteString.extension/instance/isQuadByteString.st new file mode 100644 index 000000000..64f687769 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/QuadByteString.extension/instance/isQuadByteString.st @@ -0,0 +1,4 @@ +*zinc-character-encoding-core +isQuadByteString + + ^ true \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/QuadByteString.extension/properties.json b/repository/Zinc-Character-Encoding-Core.v37.package/QuadByteString.extension/properties.json new file mode 100644 index 000000000..ec3ad0691 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/QuadByteString.extension/properties.json @@ -0,0 +1,2 @@ +{ + "name" : "QuadByteString" } diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/SequenceableCollection.extension/instance/fillFrom.with..st b/repository/Zinc-Character-Encoding-Core.v37.package/SequenceableCollection.extension/instance/fillFrom.with..st new file mode 100644 index 000000000..1f57160ac --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/SequenceableCollection.extension/instance/fillFrom.with..st @@ -0,0 +1,8 @@ +*zinc-character-encoding-core +fillFrom: aCollection with: aBlock + "Evaluate aBlock with each of aCollections's elements as the argument. + Collect the resulting values into self. Answer self." + | index | + index := 0. + aCollection do: [ :each | + self at: (index := index + 1) put: (aBlock value: each) ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/SequenceableCollection.extension/properties.json b/repository/Zinc-Character-Encoding-Core.v37.package/SequenceableCollection.extension/properties.json new file mode 100644 index 000000000..a68b7db6d --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/SequenceableCollection.extension/properties.json @@ -0,0 +1,3 @@ +{ + "name" : "SequenceableCollection" +} \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/Stream.extension/instance/rawStream.st b/repository/Zinc-Character-Encoding-Core.v37.package/Stream.extension/instance/rawStream.st new file mode 100644 index 000000000..a527c7086 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/Stream.extension/instance/rawStream.st @@ -0,0 +1,7 @@ +*Zinc-Character-Encoding-Core +rawStream + "Answer the innermost stream wrapped by the receiver, e.g. a raw binary file stream, + socket stream, or regular Read/WriteStream. + Since this the base stream, answer ourself." + + ^ self \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/Stream.extension/instance/wrappedStream.st b/repository/Zinc-Character-Encoding-Core.v37.package/Stream.extension/instance/wrappedStream.st new file mode 100644 index 000000000..1b11b96a2 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/Stream.extension/instance/wrappedStream.st @@ -0,0 +1,6 @@ +*Zinc-Character-Encoding-Core +wrappedStream + "Answer the stream that the receiver wraps. + Since this the base stream, answer nil" + + ^ nil \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/Stream.extension/properties.json b/repository/Zinc-Character-Encoding-Core.v37.package/Stream.extension/properties.json new file mode 100644 index 000000000..80152a31f --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/Stream.extension/properties.json @@ -0,0 +1,3 @@ +{ + "name" : "Stream" +} \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/String.extension/instance/asZnCharacterEncoder.st b/repository/Zinc-Character-Encoding-Core.v37.package/String.extension/instance/asZnCharacterEncoder.st new file mode 100644 index 000000000..30a677518 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/String.extension/instance/asZnCharacterEncoder.st @@ -0,0 +1,7 @@ +*zinc-character-encoding-core +asZnCharacterEncoder + "Return a ZnCharacterEncoderGS instance using the receiver as identifier" + + " 'UTF-8' asZnCharacterEncoder " + + ^ ZnCharacterEncoderGS newForEncoding: self diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/String.extension/instance/urlDecoded.st b/repository/Zinc-Character-Encoding-Core.v37.package/String.extension/instance/urlDecoded.st deleted file mode 100644 index 6403973f2..000000000 --- a/repository/Zinc-Character-Encoding-Core.v37.package/String.extension/instance/urlDecoded.st +++ /dev/null @@ -1,3 +0,0 @@ -*Zinc-Character-Encoding-Core -urlDecoded - ^ ZnPercentEncoder new decode: self \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/String.extension/instance/urlEncoded.st b/repository/Zinc-Character-Encoding-Core.v37.package/String.extension/instance/urlEncoded.st deleted file mode 100644 index 324fb9b2e..000000000 --- a/repository/Zinc-Character-Encoding-Core.v37.package/String.extension/instance/urlEncoded.st +++ /dev/null @@ -1,3 +0,0 @@ -*Zinc-Character-Encoding-Core -urlEncoded - ^ ZnPercentEncoder new encode: self \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/String.extension/methodProperties.json b/repository/Zinc-Character-Encoding-Core.v37.package/String.extension/methodProperties.json deleted file mode 100644 index d4c22652d..000000000 --- a/repository/Zinc-Character-Encoding-Core.v37.package/String.extension/methodProperties.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "class" : { - }, - "instance" : { - "urlDecoded" : "CamilloBruni 3/26/2013 23:18", - "urlEncoded" : "CamilloBruni 3/26/2013 23:18" } } diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/SubscriptOutOfBounds.class/README.md b/repository/Zinc-Character-Encoding-Core.v37.package/SubscriptOutOfBounds.class/README.md new file mode 100644 index 000000000..0fbeced3a --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/SubscriptOutOfBounds.class/README.md @@ -0,0 +1,9 @@ +I am SubscriptOutOfBounds, an exception indicating that some operation attempted to use a subscript outside allowed bounds. + +Normally, I hold the offending subscript and/or the allowed lowerBound and upperBound (inclusive). + +SubscriptOutOfBounds + signalFor: 10 + lowerBound: 1 + upperBound: 5 + in: (Array new: 5) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/SubscriptOutOfBounds.class/class/signalFor..st b/repository/Zinc-Character-Encoding-Core.v37.package/SubscriptOutOfBounds.class/class/signalFor..st new file mode 100644 index 000000000..476cf9930 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/SubscriptOutOfBounds.class/class/signalFor..st @@ -0,0 +1,6 @@ +signaling +signalFor: subscript +^ self + signalFor: subscript + lowerBound: nil + upperBound: nil \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/SubscriptOutOfBounds.class/class/signalFor.lowerBound.upperBound..st b/repository/Zinc-Character-Encoding-Core.v37.package/SubscriptOutOfBounds.class/class/signalFor.lowerBound.upperBound..st new file mode 100644 index 000000000..b94f6bedb --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/SubscriptOutOfBounds.class/class/signalFor.lowerBound.upperBound..st @@ -0,0 +1,7 @@ +signaling +signalFor: subscript lowerBound: lowerBound upperBound: upperBound + ^ self + signalFor: subscript + lowerBound: lowerBound + upperBound: upperBound + in: nil \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/SubscriptOutOfBounds.class/class/signalFor.lowerBound.upperBound.in..st b/repository/Zinc-Character-Encoding-Core.v37.package/SubscriptOutOfBounds.class/class/signalFor.lowerBound.upperBound.in..st new file mode 100644 index 000000000..582bfc240 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/SubscriptOutOfBounds.class/class/signalFor.lowerBound.upperBound.in..st @@ -0,0 +1,9 @@ +signaling +signalFor: subscript lowerBound: lowerBound upperBound: upperBound in: anObject + ^ self new + "Not used in Zinc + signaler: anObject;" + subscript: subscript; + lowerBound: lowerBound; + upperBound: upperBound; + signal \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/SubscriptOutOfBounds.class/instance/lowerBound..st b/repository/Zinc-Character-Encoding-Core.v37.package/SubscriptOutOfBounds.class/instance/lowerBound..st new file mode 100644 index 000000000..8c231e654 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/SubscriptOutOfBounds.class/instance/lowerBound..st @@ -0,0 +1,3 @@ +accessing +lowerBound: anObject + lowerBound := anObject \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/SubscriptOutOfBounds.class/instance/lowerBound.st b/repository/Zinc-Character-Encoding-Core.v37.package/SubscriptOutOfBounds.class/instance/lowerBound.st new file mode 100644 index 000000000..61aa72513 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/SubscriptOutOfBounds.class/instance/lowerBound.st @@ -0,0 +1,3 @@ +accessing +lowerBound + ^ lowerBound \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/SubscriptOutOfBounds.class/instance/messageText.st b/repository/Zinc-Character-Encoding-Core.v37.package/SubscriptOutOfBounds.class/instance/messageText.st new file mode 100644 index 000000000..75d2fa80d --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/SubscriptOutOfBounds.class/instance/messageText.st @@ -0,0 +1,4 @@ +accessing +messageText + "Overwritten to initialiaze the message text to a standard text if it has not yet been set" + ^ messageText ifNil: [ messageText := self standardMessageText ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/SubscriptOutOfBounds.class/instance/standardMessageText.st b/repository/Zinc-Character-Encoding-Core.v37.package/SubscriptOutOfBounds.class/instance/standardMessageText.st new file mode 100644 index 000000000..2099dc802 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/SubscriptOutOfBounds.class/instance/standardMessageText.st @@ -0,0 +1,17 @@ +printing +standardMessageText + "Generate a standard textual description" + ^ String streamContents: [ :stream | + self subscript + ifNil: [ stream << 'subscript' ] + ifNotNil: [ stream print: self subscript ]. + (self lowerBound isNotNil and: [ self upperBound isNotNil ]) ifTrue: [ + stream + << ' is not between '; + print: self lowerBound; + << ' and '; + print: self upperBound ]. + self signaler ifNotNil: [ + stream + nextPutAll: ' in '; + print: self signaler ] ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/SubscriptOutOfBounds.class/instance/subscript..st b/repository/Zinc-Character-Encoding-Core.v37.package/SubscriptOutOfBounds.class/instance/subscript..st new file mode 100644 index 000000000..28d19fa60 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/SubscriptOutOfBounds.class/instance/subscript..st @@ -0,0 +1,3 @@ +accessing +subscript: anObject + subscript := anObject \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/SubscriptOutOfBounds.class/instance/subscript.st b/repository/Zinc-Character-Encoding-Core.v37.package/SubscriptOutOfBounds.class/instance/subscript.st new file mode 100644 index 000000000..1ab9248f8 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/SubscriptOutOfBounds.class/instance/subscript.st @@ -0,0 +1,3 @@ +accessing +subscript + ^ subscript \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/SubscriptOutOfBounds.class/instance/upperBound..st b/repository/Zinc-Character-Encoding-Core.v37.package/SubscriptOutOfBounds.class/instance/upperBound..st new file mode 100644 index 000000000..59f6bca5d --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/SubscriptOutOfBounds.class/instance/upperBound..st @@ -0,0 +1,3 @@ +accessing +upperBound: anObject + upperBound := anObject \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/SubscriptOutOfBounds.class/instance/upperBound.st b/repository/Zinc-Character-Encoding-Core.v37.package/SubscriptOutOfBounds.class/instance/upperBound.st new file mode 100644 index 000000000..dbd462b10 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/SubscriptOutOfBounds.class/instance/upperBound.st @@ -0,0 +1,3 @@ +accessing +upperBound + ^ upperBound \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/SubscriptOutOfBounds.class/properties.json b/repository/Zinc-Character-Encoding-Core.v37.package/SubscriptOutOfBounds.class/properties.json new file mode 100644 index 000000000..bbcdd2f85 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/SubscriptOutOfBounds.class/properties.json @@ -0,0 +1,15 @@ +{ + "commentStamp" : "", + "super" : "Error", + "category" : "Zinc-Character-Encoding-Core-Exceptions", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ + "subscript", + "lowerBound", + "upperbound" + ], + "name" : "SubscriptOutOfBounds", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/README.md b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/README.md index 967dc1b49..758e344f6 100644 --- a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/README.md +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/README.md @@ -4,7 +4,12 @@ Base64 encoding is a technique to encode binary data as a string of characters t The most commonly used alphabet is 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'. One or two equal signs (= or ==) are used for padding. -The encoded data can optionally be broken into lines. Characters not part of the alphabet are considered as white space and are ignored. + ZnBase64Encoder new encode: #[0 1 2 3 4 5]. + ZnBase64Encoder new encode: #[10 20] + ZnBase64Encoder new decode: 'BQQDAgEA'. + ZnBase64Encoder new decode: 'FAo='. + +The encoded data can optionally be broken into lines. Characters not part of the alphabet are considered as white space and are ignored when inbetween groups of 4 characters. My #encode: method works from ByteArray to String, while my #decode: method works from String to ByteArray. @@ -12,4 +17,13 @@ Note that to encode a String as Base64, you first have to encode the characters See also http://en.wikipedia.org/wiki/Base64 +I can be configured with + +- a custom alphabet (#alphabet: #standardAlphabetWith:and:) +- optional line breaking (#breakLines #breakLinesAt:) +- the line end convention to use when breaking lines (#lineEndConvention:) +- custom padding character or no padding (#padding: #noPadding) +- optional enforcing of padding on input (#beStrict #beLenient) +- what kind of whitespace I accept (#whitespace:) + Part of Zinc HTTP Components. \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/class/initialize.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/class/initialize.st index 010b0ae8d..6cb9c7e13 100644 --- a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/class/initialize.st +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/class/initialize.st @@ -2,7 +2,7 @@ class initialization initialize DefaultAlphabet := String withAll: ($A to: $Z) , ($a to: $z) , ($0 to: $9) , #($+ $/). DefaultInverse := Array new: 128. - 0 to: 127 do: [ :each | + 0 to: 127 do: [ :each | | offset | offset := DefaultAlphabet indexOf: each asCharacter ifAbsent: [ nil ]. DefaultInverse at: each + 1 put: (offset ifNotNil: [ offset - 1 ]) ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/instance/alphabet..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/instance/alphabet..st index 18ad7828c..21d92cc3b 100644 --- a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/instance/alphabet..st +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/instance/alphabet..st @@ -1,12 +1,12 @@ -initialize-release +initialization alphabet: string "Set the alphabet to use to string, containing 64 characters to represent 64 byte values. I automatically compute the inverse used for fast decoding." - + self assert: string size = 64 description: '64 characters are needed for a Base64 alphabet'. alphabet := string. inverse := Array new: 128. - 0 to: 127 do: [ :each | + 0 to: 127 do: [ :each | | offset | offset := alphabet indexOf: each asCharacter ifAbsent: [ nil ]. inverse at: each + 1 put: (offset ifNotNil: [ offset - 1 ]) ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/instance/alphabet.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/instance/alphabet.st new file mode 100644 index 000000000..de2d4f3d5 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/instance/alphabet.st @@ -0,0 +1,5 @@ +accessing +alphabet + "Return the alphabet that I am using to encode byte values" + + ^ alphabet \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/instance/beForURLEncoding.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/instance/beForURLEncoding.st new file mode 100644 index 000000000..a655fc248 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/instance/beForURLEncoding.st @@ -0,0 +1,12 @@ +initialization +beForURLEncoding + "Configure me for 'base64url' encoding, used for filenames and URLs. + In particular I am using $- instead of $+ and $_ instead of $/ + with no padding, line breaking or whitespace allowed. + See https://tools.ietf.org/html/rfc4648#section-5. + See https://en.wikipedia.org/wiki/Base64#URL_applications" + + self standardAlphabetWith: $- and: $_. + self noPadding. + self beLenient. + self whitespace: nil \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/instance/beLenient.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/instance/beLenient.st new file mode 100644 index 000000000..a9bc60c6b --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/instance/beLenient.st @@ -0,0 +1,5 @@ +initialization +beLenient + "Configure me to allow optional padding when decoding" + + strict := false \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/instance/beStrict.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/instance/beStrict.st new file mode 100644 index 000000000..15bc1ea44 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/instance/beStrict.st @@ -0,0 +1,5 @@ +initialization +beStrict + "Configure me to enforce padding when decoding" + + strict := true \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/instance/breakLines.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/instance/breakLines.st index c19f61193..005e15fa4 100644 --- a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/instance/breakLines.st +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/instance/breakLines.st @@ -1,4 +1,4 @@ -initialize-release +initialization breakLines "Configure me to break lines and insert newlines every 76 characters while encoding" diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/instance/breakLinesAt..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/instance/breakLinesAt..st index 9f92c548c..d98515590 100644 --- a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/instance/breakLinesAt..st +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/instance/breakLinesAt..st @@ -1,4 +1,4 @@ -initialize-release +initialization breakLinesAt: length "Configure me to break lines at lenth, a multiple of 4, and insert newlines" diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/instance/byteCountFor..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/instance/byteCountFor..st new file mode 100644 index 000000000..98dfcbf9b --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/instance/byteCountFor..st @@ -0,0 +1,12 @@ +private +byteCountFor: string + | stringSize byteCount | + "This assumes there are no line breaks in string and that padding is used" + stringSize := string size. + byteCount := stringSize // 4 * 3. + ^ (stringSize > 1 and: [ (string at: stringSize) = $= ]) + ifTrue: [ + (stringSize > 2 and: [ (string at: stringSize - 1) = $= ]) + ifTrue: [ byteCount - 2 ] + ifFalse: [ byteCount - 1 ] ] + ifFalse: [ byteCount ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/instance/characterCountFor..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/instance/characterCountFor..st new file mode 100644 index 000000000..2d72e74b6 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/instance/characterCountFor..st @@ -0,0 +1,9 @@ +private +characterCountFor: bytes + | byteSize characterCount | + "This assumes that padding is used" + byteSize := bytes size. + characterCount := (byteSize // 3 + (byteSize \\ 3) sign) * 4. + ^ lineLength + ifNil: [ characterCount ] + ifNotNil: [ characterCount + (characterCount // lineLength * lineEnd size) ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/instance/characterForValue..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/instance/characterForValue..st new file mode 100644 index 000000000..fc22cea23 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/instance/characterForValue..st @@ -0,0 +1,3 @@ +private +characterForValue: value + ^ alphabet at: value + 1 \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/instance/decode..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/instance/decode..st index 02fa972eb..ce36e8d94 100644 --- a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/instance/decode..st +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/instance/decode..st @@ -1,7 +1,8 @@ converting decode: string "Decode a Base64 encoded string and return the resulting byte array" - + ^ ByteArray - new: string size - streamContents: [ :byteStream | self decode: string readStream to: byteStream ] \ No newline at end of file + new: (self byteCountFor: string) + streamContents: [ :byteStream | + self decode: string readStream to: byteStream ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/instance/decode.and.and.and.to..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/instance/decode.and.and.and.to..st index e839c6d43..23daba19a 100644 --- a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/instance/decode.and.and.and.to..st +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/instance/decode.and.and.and.to..st @@ -3,11 +3,10 @@ decode: char1 and: char2 and: char3 and: char4 to: stream | v1 v2 v3 v4 | v1 := self valueForCharacter: char1. v2 := self valueForCharacter: char2. + stream nextPut: (v1 << 2 bitXor: (v2 ifNil: [ 0 ]) >> 4). + (char3 isNil or: [ char3 = padding ]) ifTrue: [ ^ self ]. v3 := self valueForCharacter: char3. + stream nextPut: ((v2 bitAnd: 2r1111) << 4 bitXor: (v3 ifNil: [ 0 ]) >> 2). + (char4 isNil or: [ char4 = padding ]) ifTrue: [ ^ self ]. v4 := self valueForCharacter: char4. - stream nextPut: (v1 << 2 bitXor: (v2 ifNil: [ 0 ]) >> 4). - char3 ~= $= - ifTrue: [ - stream nextPut: ((v2 bitAnd: 2r1111) << 4 bitXor: (v3 ifNil: [ 0 ]) >> 2). - char4 ~= $= - ifTrue: [ stream nextPut: ((v3 bitAnd: 2r11) << 6 bitXor: v4) ] ] \ No newline at end of file + stream nextPut: ((v3 bitAnd: 2r11) << 6 bitXor: v4) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/instance/decode.to..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/instance/decode.to..st index 8c29864c5..ce0c94601 100644 --- a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/instance/decode.to..st +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/instance/decode.to..st @@ -3,12 +3,13 @@ decode: stringStream to: byteStream [ stringStream atEnd ] whileFalse: [ | char1 char2 char3 char4 | - self skipWhiteSpace: stringStream. + self skipWhitespace: stringStream. + stringStream atEnd ifTrue: [ ^ self ]. char1 := stringStream next. char2 := stringStream next. char3 := stringStream next. char4 := stringStream next. - char1 isNil | char2 isNil | char3 isNil | char4 isNil + ((char1 isNil | char2 isNil) or: [ strict and: [ char3 isNil | char4 isNil ] ]) ifTrue: [ ZnCharacterEncodingError signal: 'Illegal Base64 input' ]. self decode: char1 diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/instance/encode..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/instance/encode..st index e3fc9823e..08cf6917a 100644 --- a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/instance/encode..st +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/instance/encode..st @@ -1,7 +1,8 @@ converting encode: byteArray "Encode byteArray using Base64 encoding and return the resulting string" - + ^ String - new: byteArray size - streamContents: [ :stringStream | self encode: byteArray readStream to: stringStream ] \ No newline at end of file + new: (self characterCountFor: byteArray) + streamContents: [ :stringStream | + self encode: byteArray readStream to: stringStream ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/instance/encode.and.and.to..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/instance/encode.and.and.to..st index 10b31d253..edd6616b1 100644 --- a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/instance/encode.and.and.to..st +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/instance/encode.and.and.to..st @@ -1,12 +1,10 @@ private encode: byte1 and: byte2 and: byte3 to: stream - stream - nextPut: (alphabet at: (byte1 >> 2) + 1); - nextPut: (alphabet at: ((byte1 bitAnd: 2r11) << 4 bitXor: (byte2 ifNil: [ 0 ]) >> 4) + 1). + stream nextPut: (self characterForValue: (byte1 >> 2)); + nextPut: (self characterForValue: ((byte1 bitAnd: 2r11) << 4 bitXor: (byte2 ifNil: [ 0 ]) >> 4)). byte2 - ifNil: [ stream nextPutAll: '==' ] - ifNotNil: [ - stream nextPut: (alphabet at: ((byte2 bitAnd: 2r1111) << 2 bitXor: (byte3 ifNil: [ 0 ]) >> 6) + 1). + ifNil: [ padding ifNotNil: [ stream nextPut: padding; nextPut: padding ] ] + ifNotNil: [ stream nextPut: (self characterForValue: ((byte2 bitAnd: 2r1111) << 2 bitXor: (byte3 ifNil: [ 0 ]) >> 6)). byte3 - ifNil: [ stream nextPut: $= ] - ifNotNil: [ stream nextPut: (alphabet at: (byte3 bitAnd: 2r111111) + 1) ] ] \ No newline at end of file + ifNil: [ padding ifNotNil: [ stream nextPut: $= ] ] + ifNotNil: [ stream nextPut: (self characterForValue: (byte3 bitAnd: 2r111111)) ] ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/instance/initialize.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/instance/initialize.st index b90d1ebf4..702ec2d5e 100644 --- a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/instance/initialize.st +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/instance/initialize.st @@ -1,5 +1,8 @@ -initialize-release +initialization initialize super initialize. alphabet := DefaultAlphabet. - inverse := DefaultInverse \ No newline at end of file + inverse := DefaultInverse. + self padding: $=. + self whitespace: #any. + self beStrict \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/instance/isWhitespaceCharacter..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/instance/isWhitespaceCharacter..st new file mode 100644 index 000000000..67990fd2a --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/instance/isWhitespaceCharacter..st @@ -0,0 +1,14 @@ +private +isWhitespaceCharacter: character + "Return true when character should be considered whitespace" + + whitespace + ifNil: [ "No whitespace allowed" + ^ false ]. + whitespace = #separator + ifTrue: [ "Only separators are considered whitespace" + ^ character isSeparator ]. + whitespace = #any + ifTrue: [ "All non-legal (non-alphabet) characters are considered whitespace" + ^ (self isLegalCharacter: character) not ]. + ^ false \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/instance/lineEndConvention..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/instance/lineEndConvention..st index d99b17dac..dac898a50 100644 --- a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/instance/lineEndConvention..st +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/instance/lineEndConvention..st @@ -1,7 +1,7 @@ -initialize-release +initialization lineEndConvention: symbol "Set the end of line convention to be used. Either #cr, #lf or #crlf (the default)." - + self assert: (#(cr lf crlf) includes: symbol). lineEnd := String perform: symbol \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/instance/noPadding.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/instance/noPadding.st new file mode 100644 index 000000000..cf9f88823 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/instance/noPadding.st @@ -0,0 +1,5 @@ +initialization +noPadding + "Configure me to output no padding" + + self padding: nil \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/instance/padding..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/instance/padding..st new file mode 100644 index 000000000..aa4a6c874 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/instance/padding..st @@ -0,0 +1,7 @@ +initialization +padding: character + "Configure me to use character as padding. + One or two padding character might be needed to complete each quad. + Use nil to disable padding." + + padding := character \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/instance/skipWhiteSpace..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/instance/skipWhiteSpace..st deleted file mode 100644 index 3be83c72c..000000000 --- a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/instance/skipWhiteSpace..st +++ /dev/null @@ -1,4 +0,0 @@ -private -skipWhiteSpace: stream - [ stream atEnd not and: [ (self valueForCharacter: stream peek) isNil ] ] - whileTrue: [ stream next ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/instance/skipWhitespace..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/instance/skipWhitespace..st new file mode 100644 index 000000000..a21e3820f --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/instance/skipWhitespace..st @@ -0,0 +1,4 @@ +private +skipWhitespace: stream + [ stream atEnd not and: [ (self isWhitespaceCharacter: stream peek) ] ] + whileTrue: [ stream next ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/instance/standardAlphabetWith.and..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/instance/standardAlphabetWith.and..st new file mode 100644 index 000000000..3e2f3344e --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/instance/standardAlphabetWith.and..st @@ -0,0 +1,10 @@ +initialization +standardAlphabetWith: beforeLastCharacter and: lastCharacter + "Typically more alphabets use the same first 62 characters, A-Z, a-z, 0-9, + and only differ in the last two characters used. + Configure me to use the first 62 standard characters with + beforeLastCharacter and lastCharacter as final two." + + | characters | + characters := ($A to: $Z) , ($a to: $z) , ($0 to: $9), { beforeLastCharacter. lastCharacter }. + ^ self alphabet: (String withAll: characters) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/instance/valueForCharacter..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/instance/valueForCharacter..st deleted file mode 100644 index 32f945222..000000000 --- a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/instance/valueForCharacter..st +++ /dev/null @@ -1,7 +0,0 @@ -private -valueForCharacter: char - | code | - code := char charCode. - ^ (code between: 0 and: 127) - ifTrue: [ inverse at: code + 1 ] - ifFalse: [ nil ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/instance/whitespace..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/instance/whitespace..st new file mode 100644 index 000000000..0c4a43096 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/instance/whitespace..st @@ -0,0 +1,9 @@ +initialization +whitespace: mode + "Set the whitespace mode: + nil is no whitespace allowed, + #separator is CR, LF, FF, SPACE, TAB allowed, + #any is all non-alphabet characters allowed (the default)" + + self assert: (#(nil separator any) includes: mode). + whitespace := mode \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/methodProperties.json b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/methodProperties.json deleted file mode 100644 index f93b453b8..000000000 --- a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/methodProperties.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "class" : { - "initialize" : "SvenVanCaekenberghe 12/16/2012 12:54" }, - "instance" : { - "alphabet:" : "SvenVanCaekenberghe 12/16/2012 15:15", - "breakLines" : "SvenVanCaekenberghe 12/15/2012 14:06", - "breakLinesAt:" : "SvenVanCaekenberghe 12/16/2012 15:13", - "decode:" : "SvenVanCaekenberghe 12/15/2012 14:07", - "decode:and:and:and:to:" : "SvenVanCaekenberghe 12/15/2012 00:41", - "decode:to:" : "SvenVanCaekenberghe 12/16/2012 15:13", - "encode:" : "SvenVanCaekenberghe 12/15/2012 14:08", - "encode:and:and:to:" : "SvenVanCaekenberghe 12/15/2012 00:42", - "encode:to:" : "SvenVanCaekenberghe 12/15/2012 00:54", - "initialize" : "SvenVanCaekenberghe 12/15/2012 13:48", - "lineEndConvention:" : "SvenVanCaekenberghe 12/15/2012 00:50", - "skipWhiteSpace:" : "SvenVanCaekenberghe 12/16/2012 16:42", - "valueForCharacter:" : "SvenVanCaekenberghe 12/15/2012 00:31" } } diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/properties.json b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/properties.json index dc030cb35..8a636b615 100644 --- a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/properties.json +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBase64Encoder.class/properties.json @@ -1,18 +1,22 @@ { + "commentStamp" : "", + "super" : "Object", "category" : "Zinc-Character-Encoding-Core", - "classinstvars" : [ - ], + "classinstvars" : [ ], + "pools" : [ ], "classvars" : [ "DefaultAlphabet", - "DefaultInverse" ], - "commentStamp" : "", + "DefaultInverse" + ], "instvars" : [ "alphabet", "inverse", "lineLength", - "lineEnd" ], + "lineEnd", + "whitespace", + "padding", + "strict" + ], "name" : "ZnBase64Encoder", - "pools" : [ - ], - "super" : "Object", - "type" : "normal" } + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/class/on..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/class/on..st new file mode 100644 index 000000000..bf3a37ebd --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/class/on..st @@ -0,0 +1,6 @@ +*zinc-character-encoding-core +on: readStream + "Protocol: instance creation" + ^ self new + on: readStream; + yourself diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/class/on.do..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/class/on.do..st new file mode 100644 index 000000000..c58df985a --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/class/on.do..st @@ -0,0 +1,7 @@ +*zinc-character-encoding-core +on: readStream do: block + "Protocol: convenience" + "Execute block with as argument a ZnBufferedReadStream on readStream. + Return the value of block." + + ^ block value: (self on: readStream) diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/atEnd.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/atEnd.st new file mode 100644 index 000000000..f47e25e97 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/atEnd.st @@ -0,0 +1,4 @@ +*zinc-character-encoding-core +atEnd + "Protocol: testing" + ^ position > limit and: [ stream atEnd ] diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/back.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/back.st new file mode 100644 index 000000000..ec05be3c9 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/back.st @@ -0,0 +1,24 @@ +*zinc-character-encoding-core +back + "Protocol: accessing" + "Move backwards one element and return it" + + ^ position > limit + ifTrue: [ + stream back ] + ifFalse: [ | targetPosition bufferPosition char | + position = 1 ifTrue: + [ stream position = 0 ifTrue: + [ self error: 'Cannot move back from beginning' ] + ifFalse: + [ targetPosition := self position - 1. + "Assume that the caller may want to go back a few elements before reading forward again" + bufferPosition := targetPosition - 10 max: 0. + self position: bufferPosition. + self nextBuffer. + self position: targetPosition. + self peek ] ] + ifFalse: + [ char := buffer at: position. + position := position - 1. + char ] ] diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/close.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/close.st new file mode 100644 index 000000000..bbe91acf5 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/close.st @@ -0,0 +1,4 @@ +*zinc-character-encoding-core +close + "Protocol: initialize-release" + stream close diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/closed.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/closed.st new file mode 100644 index 000000000..3c045de46 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/closed.st @@ -0,0 +1,4 @@ +*zinc-character-encoding-core +closed + "Protocol: testing" + ^ stream closed diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/collectionSpecies.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/collectionSpecies.st new file mode 100644 index 000000000..64648994a --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/collectionSpecies.st @@ -0,0 +1,6 @@ +*zinc-character-encoding-core +collectionSpecies + "Protocol: accessing" + ^ stream isBinary + ifTrue: [ ByteArray ] + ifFalse: [ String ] diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/contents.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/contents.st new file mode 100644 index 000000000..4a100c50f --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/contents.st @@ -0,0 +1,5 @@ +*zinc-character-encoding-core +contents + "Protocol: accessing" + + ^ self upToEnd diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/defaultBufferSize.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/defaultBufferSize.st new file mode 100644 index 000000000..0d725efdd --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/defaultBufferSize.st @@ -0,0 +1,4 @@ +*zinc-character-encoding-core +defaultBufferSize + "Protocol: accessing" + ^ 2 raisedToInteger: 16 diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/discardBuffer.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/discardBuffer.st new file mode 100644 index 000000000..bef70dc81 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/discardBuffer.st @@ -0,0 +1,5 @@ +*zinc-character-encoding-core +discardBuffer + "Protocol: private" + limit := 0. + position := 1 diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/initialize.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/initialize.st new file mode 100644 index 000000000..16b1e7ced --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/initialize.st @@ -0,0 +1,6 @@ +*zinc-character-encoding-core +initialize + "Protocol: initialization" + super initialize. + position := 1. + limit := 0 diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/int16.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/int16.st new file mode 100644 index 000000000..ab8a8a65b --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/int16.st @@ -0,0 +1,4 @@ +*zinc-character-encoding-core +int16 + "Protocol: accessing - bytes" + ^ self nextIntegerOfSize: 2 signed: true bigEndian: true diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/int32.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/int32.st new file mode 100644 index 000000000..317512594 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/int32.st @@ -0,0 +1,4 @@ +*zinc-character-encoding-core +int32 + "Protocol: accessing - bytes" + ^ self nextIntegerOfSize: 4 signed: true bigEndian: true diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/int8.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/int8.st new file mode 100644 index 000000000..6e1028216 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/int8.st @@ -0,0 +1,4 @@ +*zinc-character-encoding-core +int8 + "Protocol: accessing - bytes" + ^ self nextIntegerOfSize: 1 signed: true bigEndian: true diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/isBinary.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/isBinary.st new file mode 100644 index 000000000..8499adcb5 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/isBinary.st @@ -0,0 +1,4 @@ +*zinc-character-encoding-core +isBinary + "Protocol: accessing" + ^ stream isBinary diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/isStream.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/isStream.st new file mode 100644 index 000000000..efcb751cd --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/isStream.st @@ -0,0 +1,4 @@ +*zinc-character-encoding-core +isStream + "Protocol: testing" + ^ true diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/next..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/next..st new file mode 100644 index 000000000..1c3f487d7 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/next..st @@ -0,0 +1,9 @@ +*zinc-character-encoding-core +next: requestedCount + "Protocol: accessing" + "Read requestedCount elements and return them as a collection. + If less are available, a smaller collection will be returned." + + ^ self + next: requestedCount + into: (self collectionSpecies new: requestedCount) diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/next.into..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/next.into..st new file mode 100644 index 000000000..664e9e1d3 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/next.into..st @@ -0,0 +1,10 @@ +*zinc-character-encoding-core +next: requestedCount into: collection + "Protocol: accessing" + "Read requestedCount elements into collection, + returning a copy if less elements are available" + + ^ self + next: requestedCount + into: collection + startingAt: 1 diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/next.into.startingAt..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/next.into.startingAt..st new file mode 100644 index 000000000..dbda9ee44 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/next.into.startingAt..st @@ -0,0 +1,14 @@ +*zinc-character-encoding-core +next: requestedCount into: collection startingAt: offset + "Protocol: accessing" + "Read requestedCount elements into collection starting at offset, + returning a copy if less elements are available" + + | read | + read := self + readInto: collection + startingAt: offset + count: requestedCount. + ^ read = requestedCount + ifTrue: [ collection ] + ifFalse: [ collection copyFrom: 1 to: offset + read - 1 ] diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/next.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/next.st new file mode 100644 index 000000000..af20e7e09 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/next.st @@ -0,0 +1,14 @@ +*zinc-character-encoding-core +next + "Protocol: accessing" + "Return the next element and move over it" + + position > limit + ifTrue: [ self nextBuffer ]. + ^ position <= limit + ifTrue: [ + | char | + char := buffer at: position. + position := position + 1. + char ] + ifFalse: [ nil ] diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/nextBuffer.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/nextBuffer.st new file mode 100644 index 000000000..4b5452180 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/nextBuffer.st @@ -0,0 +1,5 @@ +*zinc-character-encoding-core +nextBuffer + "Protocol: private" + limit := stream readInto: buffer startingAt: 1 count: buffer size. + position := 1 diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/nextInt32.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/nextInt32.st new file mode 100644 index 000000000..98cb610ff --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/nextInt32.st @@ -0,0 +1,4 @@ +*zinc-character-encoding-core +nextInt32 + "Protocol: accessing - bytes" + ^ self nextIntegerOfSize: 4 signed: true bigEndian: true diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/nextIntegerOfSize.signed.bigEndian..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/nextIntegerOfSize.signed.bigEndian..st new file mode 100644 index 000000000..91116c8d7 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/nextIntegerOfSize.signed.bigEndian..st @@ -0,0 +1,21 @@ +*zinc-character-encoding-core +nextIntegerOfSize: numberOfBytes signed: signed bigEndian: bigEndian + "Protocol: accessing - bytes" + "Assuming the receiver is a stream of bytes, read the next integer of size numberOfBytes. + If bigEndian is true, use network byte order, most significant byte first, + else use little endian order, least significant byte first. + If signed is true, interpret as a two-complement signed value, + else interpret as a plain unsigned value." + + | value | + value := 0. + bigEndian + ifTrue: [ + (numberOfBytes - 1) * 8 to: 0 by: -8 do: [ :shift | + value := value + (self next bitShift: shift) ] ] + ifFalse: [ + 0 to: (numberOfBytes - 1) * 8 by: 8 do: [ :shift | + value := value + (self next bitShift: shift) ] ]. + ^ (signed and: [ (value bitAt: numberOfBytes * 8) = 1 ]) + ifTrue: [ value - (1 << (numberOfBytes * 8)) ] + ifFalse: [ value ] diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/nextInto..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/nextInto..st new file mode 100644 index 000000000..5785c846c --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/nextInto..st @@ -0,0 +1,9 @@ +*zinc-character-encoding-core +nextInto: collection + "Protocol: accessing" + "Read the next elements of the receiver into collection, + returning a copy if less elements are available" + + ^ self + next: collection size + into: collection diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/nextLittleEndianNumber..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/nextLittleEndianNumber..st new file mode 100644 index 000000000..d0526b86d --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/nextLittleEndianNumber..st @@ -0,0 +1,4 @@ +*zinc-character-encoding-core +nextLittleEndianNumber: numberOfBytes + "Protocol: accessing - bytes" + ^ self nextIntegerOfSize: numberOfBytes signed: false bigEndian: false diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/nextNumber..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/nextNumber..st new file mode 100644 index 000000000..c8dcbcc0d --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/nextNumber..st @@ -0,0 +1,4 @@ +*zinc-character-encoding-core +nextNumber: numberOfBytes + "Protocol: accessing - bytes" + ^ self nextIntegerOfSize: numberOfBytes signed: false bigEndian: true diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/nextWord.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/nextWord.st new file mode 100644 index 000000000..b2d73dd7a --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/nextWord.st @@ -0,0 +1,4 @@ +*zinc-character-encoding-core +nextWord + "Protocol: accessing - bytes" + ^ self nextIntegerOfSize: 2 signed: false bigEndian: true diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/on..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/on..st new file mode 100644 index 000000000..a353c3990 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/on..st @@ -0,0 +1,5 @@ +*zinc-character-encoding-core +on: readStream + "Protocol: initialize-release" + stream := readStream. + self sizeBuffer: self defaultBufferSize diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/peek.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/peek.st new file mode 100644 index 000000000..b84ed757d --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/peek.st @@ -0,0 +1,10 @@ +*zinc-character-encoding-core +peek + "Protocol: accessing" + "Return the next element but do not move over it" + + position > limit + ifTrue: [ self nextBuffer ]. + ^ position <= limit + ifTrue: [ buffer at: position ] + ifFalse: [ nil ] diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/peekFor..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/peekFor..st new file mode 100644 index 000000000..c33fb3a59 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/peekFor..st @@ -0,0 +1,11 @@ +*zinc-character-encoding-core +peekFor: object + "Protocol: accessing" + "Answer false and do not move over the next element if it is not equal to object, or if the receiver is at the end. + Answer true and move over the next element when it is equal to object." + + ^ self peek = object + ifTrue: [ + self next. + true ] + ifFalse: [ false ] diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/position..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/position..st new file mode 100644 index 000000000..4b5ccd6aa --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/position..st @@ -0,0 +1,12 @@ +*zinc-character-encoding-core +position: anInteger + "Protocol: accessing" + | bufferEnd bufferStart | + bufferEnd := stream position. + bufferStart := bufferEnd - limit. + (anInteger between: bufferStart and: bufferEnd) + ifTrue: [ position := anInteger - bufferStart + 1 ] + ifFalse: [ + "We reset the buffer and update the position in the underlying stream" + self discardBuffer. + stream position: anInteger ] diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/position.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/position.st new file mode 100644 index 000000000..ec59320a6 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/position.st @@ -0,0 +1,7 @@ +*zinc-character-encoding-core +position + "Protocol: accessing" + "If the buffer advanced, we need to check the original stream position, minus what we have read. + The -1 is because the buffer is base 1" + + ^ stream position - limit + position - 1 diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/rawStream.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/rawStream.st new file mode 100644 index 000000000..3892476ff --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/rawStream.st @@ -0,0 +1,8 @@ +*zinc-character-encoding-core +rawStream + "Protocol: accessing" + "Answer the innermost stream wrapped by the receiver, e.g. a raw binary file stream, + socket stream, or regular Read/WriteStream. + Defer to the wrappedStream." + + ^ self wrappedStream rawStream diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/readFromBufferInto.startingAt.count..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/readFromBufferInto.startingAt.count..st new file mode 100644 index 000000000..18da9170e --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/readFromBufferInto.startingAt.count..st @@ -0,0 +1,18 @@ +*zinc-character-encoding-core +readFromBufferInto: collection startingAt: offset count: requestedCount + "Protocol: private" + "Read up to requestedCount elements into collection starting at offset, + from my buffer, answering the number of elements read. + There could be fewer elements buffered." + + | read | + read := 0. + position <= limit + ifTrue: [ read := limit - position + 1 min: requestedCount. + collection + replaceFrom: offset + to: offset + read - 1 + with: buffer + startingAt: position. + position := position + read ]. + ^ read diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/readInto.startingAt.count..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/readInto.startingAt.count..st new file mode 100644 index 000000000..f9518588d --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/readInto.startingAt.count..st @@ -0,0 +1,23 @@ +*zinc-character-encoding-core +readInto: collection startingAt: offset count: requestedCount + "Protocol: accessing" + "Read requestedCount elements into collection starting at offset, + answering the number of elements read, there could be fewer elements available." + + | countRead countYetToRead | + "First, read from elements already in my buffer." + countRead := self readFromBufferInto: collection startingAt: offset count: requestedCount. + countYetToRead := requestedCount - countRead. + countYetToRead > 0 + ifTrue: [ "See if there are more elements to be read from the underlying stream" + | newOffset | + newOffset := offset + countRead. + (self shouldBufferReadOfCount: countYetToRead) + ifTrue: [ + self nextBuffer. + limit > 0 + ifTrue: [ countRead := countRead + (self readInto: collection startingAt: newOffset count: countYetToRead) ] ] + ifFalse: [ + self discardBuffer. + countRead := countRead + (stream readInto: collection startingAt: newOffset count: countYetToRead) ] ]. + ^ countRead diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/readStream.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/readStream.st new file mode 100644 index 000000000..1d0682576 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/readStream.st @@ -0,0 +1,4 @@ +*zinc-character-encoding-core +readStream + "Protocol: accessing" + ^ self diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/setToEnd.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/setToEnd.st new file mode 100644 index 000000000..37dc0dead --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/setToEnd.st @@ -0,0 +1,5 @@ +*zinc-character-encoding-core +setToEnd + "Protocol: accessing" + + self position: stream size diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/shouldBufferReadOfCount..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/shouldBufferReadOfCount..st new file mode 100644 index 000000000..8f4fb0ef5 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/shouldBufferReadOfCount..st @@ -0,0 +1,6 @@ +*zinc-character-encoding-core +shouldBufferReadOfCount: elementCount + "Protocol: private" + "For larger read requests, buffering fails to give an advantage." + + ^ elementCount < (buffer size / 2) diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/size.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/size.st new file mode 100644 index 000000000..bbe1372cf --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/size.st @@ -0,0 +1,5 @@ +*zinc-character-encoding-core +size + "Protocol: accessing" + + ^ stream size diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/sizeBuffer..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/sizeBuffer..st new file mode 100644 index 000000000..ea8d55035 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/sizeBuffer..st @@ -0,0 +1,4 @@ +*zinc-character-encoding-core +sizeBuffer: size + "Protocol: initialize-release" + buffer := self collectionSpecies new: size diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/skip..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/skip..st new file mode 100644 index 000000000..664e2249a --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/skip..st @@ -0,0 +1,8 @@ +*zinc-character-encoding-core +skip: count + "Protocol: accessing" + "Skip over count elements. + This could be further optimzed." + + count < 0 ifTrue: [ self error: 'cannot skip backwards' ]. + count timesRepeat: [ self next ] diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/uint16.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/uint16.st new file mode 100644 index 000000000..fd048329a --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/uint16.st @@ -0,0 +1,4 @@ +*zinc-character-encoding-core +uint16 + "Protocol: accessing - bytes" + ^ self nextIntegerOfSize: 2 signed: false bigEndian: true diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/uint32.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/uint32.st new file mode 100644 index 000000000..1ffaa6702 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/uint32.st @@ -0,0 +1,4 @@ +*zinc-character-encoding-core +uint32 + "Protocol: accessing - bytes" + ^ self nextIntegerOfSize: 4 signed: false bigEndian: true diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/uint8.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/uint8.st new file mode 100644 index 000000000..abb520c9d --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/uint8.st @@ -0,0 +1,4 @@ +*zinc-character-encoding-core +uint8 + "Protocol: accessing - bytes" + ^ self nextIntegerOfSize: 1 signed: false bigEndian: true diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/upTo..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/upTo..st new file mode 100644 index 000000000..09d4ac656 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/upTo..st @@ -0,0 +1,11 @@ +*zinc-character-encoding-core +upTo: value + "Protocol: accessing" + "Read upto but not including value and return them as a collection. + If value is not found, return the entire contents of the stream. + This could be further optimzed." + + ^ self collectionSpecies + streamContents: [ :writeStream | | element | + [ self atEnd or: [ (element := self next) = value ] ] whileFalse: [ + writeStream nextPut: element ] ] diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/upToEnd.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/upToEnd.st new file mode 100644 index 000000000..703227736 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/upToEnd.st @@ -0,0 +1,23 @@ +*zinc-character-encoding-core +upToEnd + "Protocol: accessing" + "Read elements until the stream is atEnd and return them as a collection." + + | streamSize result remaining | + "If the stream knows its size we can reduce overhead by allocating a buffer of the correct size. + If the size is an over-estimate, #next: will copy the results in to a buffer of the correct size." + streamSize := [ self size ] on: Error do: [ 0 ]. + result := streamSize > 0 + ifTrue: [ self next: (streamSize - self position) ] + ifFalse: [ self collectionSpecies new ]. + "If the size is an under-estimate we're not at the end, get the rest and append to the result" + ^ self atEnd + ifTrue: [ result ] + ifFalse: [ + remaining := self collectionSpecies streamContents: [ :out | + [ self atEnd ] whileFalse: [ + position > limit + ifTrue: [ self nextBuffer ]. + out next: limit - position + 1 putAll: buffer startingAt: position. + position := limit + 1 ] ]. + result := result , remaining ] diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/wrappedStream.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/wrappedStream.st new file mode 100644 index 000000000..7ea898bb6 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/instance/wrappedStream.st @@ -0,0 +1,4 @@ +*zinc-character-encoding-core +wrappedStream + "Protocol: accessing" + ^ stream diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/properties.json b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/properties.json new file mode 100644 index 000000000..617e2de49 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadStream.extension/properties.json @@ -0,0 +1,2 @@ +{ + "name" : "ZnBufferedReadStream" } diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/class/on..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/class/on..st new file mode 100644 index 000000000..9127ea77d --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/class/on..st @@ -0,0 +1,6 @@ +*zinc-character-encoding-core +on: writeStream + "Protocol: instance creation" + ^ self basicNew + on: writeStream; + yourself diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/class/on.do..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/class/on.do..st new file mode 100644 index 000000000..c58df985a --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/class/on.do..st @@ -0,0 +1,7 @@ +*zinc-character-encoding-core +on: readStream do: block + "Protocol: convenience" + "Execute block with as argument a ZnBufferedReadStream on readStream. + Return the value of block." + + ^ block value: (self on: readStream) diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/atEnd.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/atEnd.st new file mode 100644 index 000000000..9087cd404 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/atEnd.st @@ -0,0 +1,5 @@ +*zinc-character-encoding-core +atEnd + "Protocol: testing" + + ^ self readingActionDo: [ readStream atEnd ] diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/close.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/close.st new file mode 100644 index 000000000..435e342a7 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/close.st @@ -0,0 +1,6 @@ +*zinc-character-encoding-core +close + "Protocol: accessing" + + writeStream flush. + writeStream close diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/closed.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/closed.st new file mode 100644 index 000000000..46543fc7f --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/closed.st @@ -0,0 +1,4 @@ +*zinc-character-encoding-core +closed + "Protocol: testing" + ^ readStream closed diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/flush.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/flush.st new file mode 100644 index 000000000..2e120382b --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/flush.st @@ -0,0 +1,5 @@ +*zinc-character-encoding-core +flush + "Protocol: accessing" + + self writingActionDo: [ writeStream flush ] diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/isBinary.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/isBinary.st new file mode 100644 index 000000000..46f5b33d4 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/isBinary.st @@ -0,0 +1,5 @@ +*zinc-character-encoding-core +isBinary + "Protocol: testing" + + ^ readStream isBinary diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/isReadOnly.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/isReadOnly.st new file mode 100644 index 000000000..a0deea7e3 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/isReadOnly.st @@ -0,0 +1,5 @@ +*zinc-character-encoding-core +isReadOnly + "Protocol: testing" + + ^ false diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/isStream.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/isStream.st new file mode 100644 index 000000000..3be9aefe1 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/isStream.st @@ -0,0 +1,5 @@ +*zinc-character-encoding-core +isStream + "Protocol: testing" + + ^ true diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/next..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/next..st new file mode 100644 index 000000000..fa09e2848 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/next..st @@ -0,0 +1,6 @@ +*zinc-character-encoding-core +next: anInteger + "Protocol: accessing" + + ^ self readingActionDo: [ + readStream next: anInteger ] diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/next.putAll..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/next.putAll..st new file mode 100644 index 000000000..30d7b7747 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/next.putAll..st @@ -0,0 +1,6 @@ +*zinc-character-encoding-core +next: count putAll: collection + "Protocol: accessing" + + self writingActionDo: [ + writeStream next: count putAll: collection ] diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/next.putAll.startingAt..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/next.putAll.startingAt..st new file mode 100644 index 000000000..51a41be02 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/next.putAll.startingAt..st @@ -0,0 +1,6 @@ +*zinc-character-encoding-core +next: count putAll: collection startingAt: offset + "Protocol: accessing" + + self writingActionDo: [ + writeStream next: count putAll: collection startingAt: offset ] diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/next.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/next.st new file mode 100644 index 000000000..2c9829ffc --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/next.st @@ -0,0 +1,6 @@ +*zinc-character-encoding-core +next + "Protocol: accessing" + + ^ self readingActionDo: [ + readStream next ] diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/nextPut..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/nextPut..st new file mode 100644 index 000000000..27d641ab1 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/nextPut..st @@ -0,0 +1,5 @@ +*zinc-character-encoding-core +nextPut: aCharacter + "Protocol: accessing" + + self writingActionDo: [ writeStream nextPut: aCharacter ] diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/nextPutAll..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/nextPutAll..st new file mode 100644 index 000000000..a8c2d85ff --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/nextPutAll..st @@ -0,0 +1,5 @@ +*zinc-character-encoding-core +nextPutAll: aString + "Protocol: accessing" + + ^ self writingActionDo: [ writeStream nextPutAll: aString ] diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/on..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/on..st new file mode 100644 index 000000000..3c8335d6c --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/on..st @@ -0,0 +1,7 @@ +*zinc-character-encoding-core +on: aStream + "Protocol: instance creation" + + lastRead := true. + readStream := ZnBufferedReadStream on: aStream. + writeStream := ZnBufferedWriteStream on: aStream diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/peek.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/peek.st new file mode 100644 index 000000000..7af0279a9 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/peek.st @@ -0,0 +1,6 @@ +*zinc-character-encoding-core +peek + "Protocol: accessing" + + ^ self readingActionDo: [ + readStream peek ] diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/position..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/position..st new file mode 100644 index 000000000..4af6170d8 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/position..st @@ -0,0 +1,6 @@ +*zinc-character-encoding-core +position: anInteger + "Protocol: accessing" + + self writingActionDo: [ + writeStream position: anInteger ] diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/position.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/position.st new file mode 100644 index 000000000..ddea82995 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/position.st @@ -0,0 +1,7 @@ +*zinc-character-encoding-core +position + "Protocol: accessing" + + ^ lastRead + ifTrue: [ readStream position ] + ifFalse: [ writeStream position ] diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/rawStream.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/rawStream.st new file mode 100644 index 000000000..3892476ff --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/rawStream.st @@ -0,0 +1,8 @@ +*zinc-character-encoding-core +rawStream + "Protocol: accessing" + "Answer the innermost stream wrapped by the receiver, e.g. a raw binary file stream, + socket stream, or regular Read/WriteStream. + Defer to the wrappedStream." + + ^ self wrappedStream rawStream diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/readInto.startingAt.count..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/readInto.startingAt.count..st new file mode 100644 index 000000000..7fbc42f2b --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/readInto.startingAt.count..st @@ -0,0 +1,6 @@ +*zinc-character-encoding-core +readInto: collection startingAt: offset count: requestedCount + "Protocol: accessing" + + ^ self readingActionDo: [ + readStream readInto: collection startingAt: offset count: requestedCount ] diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/readingActionDo..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/readingActionDo..st new file mode 100644 index 000000000..b36bf0baa --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/readingActionDo..st @@ -0,0 +1,14 @@ +*zinc-character-encoding-core +readingActionDo: aBlock + "Protocol: private" + + "Reading from the read stream. + We should + - flush the write stream + - discard the read buffer (which may contain incorrect data). + - and then perform the read." + + lastRead ifFalse: [ + writeStream flush. + readStream discardBuffer ]. + ^ aBlock ensure: [ lastRead := true ] diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/setToEnd.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/setToEnd.st new file mode 100644 index 000000000..a96ecc98c --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/setToEnd.st @@ -0,0 +1,6 @@ +*zinc-character-encoding-core +setToEnd + "Protocol: accessing" + + ^ self writingActionDo: [ + writeStream setToEnd ] diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/size.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/size.st new file mode 100644 index 000000000..4bccf3987 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/size.st @@ -0,0 +1,4 @@ +*zinc-character-encoding-core +size + "Protocol: accessing" + ^ readStream size diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/sizeBuffer..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/sizeBuffer..st new file mode 100644 index 000000000..b3913ccf6 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/sizeBuffer..st @@ -0,0 +1,6 @@ +*zinc-character-encoding-core +sizeBuffer: anInteger + "Protocol: initialize-release" + + readStream sizeBuffer: anInteger. + writeStream sizeBuffer: anInteger diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/skip..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/skip..st new file mode 100644 index 000000000..0e60fdbaf --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/skip..st @@ -0,0 +1,6 @@ +*zinc-character-encoding-core +skip: anInteger + "Protocol: accessing" + anInteger < 0 ifTrue: [ self error: 'cannot skip backwards' ]. + self readingActionDo: [ + readStream skip: anInteger ] diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/truncate..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/truncate..st new file mode 100644 index 000000000..cdf503798 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/truncate..st @@ -0,0 +1,5 @@ +*zinc-character-encoding-core +truncate: anInteger + "Protocol: accessing" + + self writingActionDo: [ writeStream truncate: anInteger ] diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/truncate.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/truncate.st new file mode 100644 index 000000000..0345f1d0e --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/truncate.st @@ -0,0 +1,5 @@ +*zinc-character-encoding-core +truncate + "Protocol: accessing" + + self writingActionDo: [ writeStream truncate ] diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/upTo..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/upTo..st new file mode 100644 index 000000000..950bb1247 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/upTo..st @@ -0,0 +1,5 @@ +*zinc-character-encoding-core +upTo: aCharacter + "Protocol: accessing" + + ^ self readingActionDo: [ readStream upTo: aCharacter ] diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/upToEnd.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/upToEnd.st new file mode 100644 index 000000000..c2c036e99 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/upToEnd.st @@ -0,0 +1,5 @@ +*zinc-character-encoding-core +upToEnd + "Protocol: accessing" + + ^ self readingActionDo: [ readStream upToEnd ] diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/wrappedStream.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/wrappedStream.st new file mode 100644 index 000000000..7a3f4c2f6 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/wrappedStream.st @@ -0,0 +1,5 @@ +*zinc-character-encoding-core +wrappedStream + "Protocol: accessing" + + ^ readStream wrappedStream diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/writingActionDo..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/writingActionDo..st new file mode 100644 index 000000000..5dfbf2c21 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/instance/writingActionDo..st @@ -0,0 +1,12 @@ +*zinc-character-encoding-core +writingActionDo: aBlock + "Protocol: accessing" + + "Writing to the write stream. + We should + - write the write stream + - discard the read buffer (which may contain incorrect data)" + lastRead ifTrue: [ + writeStream discardBuffer ]. + readStream discardBuffer. + ^ aBlock ensure: [ lastRead := false ] diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/properties.json b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/properties.json new file mode 100644 index 000000000..05f6c49b6 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedReadWriteStream.extesion/properties.json @@ -0,0 +1,2 @@ +{ + "name" : "ZnBufferedReadWriteStream" } diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/class/on..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/class/on..st new file mode 100644 index 000000000..9127ea77d --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/class/on..st @@ -0,0 +1,6 @@ +*zinc-character-encoding-core +on: writeStream + "Protocol: instance creation" + ^ self basicNew + on: writeStream; + yourself diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/class/on.do..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/class/on.do..st new file mode 100644 index 000000000..ec7173486 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/class/on.do..st @@ -0,0 +1,11 @@ +*zinc-character-encoding-core +on: writeStream do: block + "Protocol: convenience" + "Execute block with as argument a ZnBufferedWriteStream on writeStream, + making sure #flush is called at the end. Return the value of block." + + | bufferedWriteStream result | + bufferedWriteStream := self on: writeStream. + result := block value: bufferedWriteStream. + bufferedWriteStream flush. + ^ result diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/buffer.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/buffer.st new file mode 100644 index 000000000..3604aa954 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/buffer.st @@ -0,0 +1,6 @@ +*zinc-character-encoding-core +buffer + "Protocol: private" + + buffer ifNil: [ self sizeBuffer: self defaultBufferSize ]. + ^ buffer diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/bufferFreeSize.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/bufferFreeSize.st new file mode 100644 index 000000000..3749f3a86 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/bufferFreeSize.st @@ -0,0 +1,4 @@ +*zinc-character-encoding-core +bufferFreeSize + "Protocol: accessing" + ^ self bufferSize - position diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/bufferSize.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/bufferSize.st new file mode 100644 index 000000000..a87df7741 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/bufferSize.st @@ -0,0 +1,5 @@ +*zinc-character-encoding-core +bufferSize + "Protocol: accessing" + + ^ buffer ifNil: [ self defaultBufferSize ] ifNotNil: [ buffer size ] diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/close.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/close.st new file mode 100644 index 000000000..ead466f99 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/close.st @@ -0,0 +1,5 @@ +*zinc-character-encoding-core +close + "Protocol: initialize-release" + self flushBuffer. + stream close diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/closed.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/closed.st new file mode 100644 index 000000000..3c045de46 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/closed.st @@ -0,0 +1,4 @@ +*zinc-character-encoding-core +closed + "Protocol: testing" + ^ stream closed diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/cr.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/cr.st new file mode 100644 index 000000000..bf0eef4bb --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/cr.st @@ -0,0 +1,4 @@ +*zinc-character-encoding-core +cr + "Protocol: accessing" + self nextPut: Character cr diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/crlf.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/crlf.st new file mode 100644 index 000000000..0fb0740f0 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/crlf.st @@ -0,0 +1,4 @@ +*zinc-character-encoding-core +crlf + "Protocol: accessing" + self cr; lf diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/defaultBufferSize.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/defaultBufferSize.st new file mode 100644 index 000000000..0d725efdd --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/defaultBufferSize.st @@ -0,0 +1,4 @@ +*zinc-character-encoding-core +defaultBufferSize + "Protocol: accessing" + ^ 2 raisedToInteger: 16 diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/discardBuffer.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/discardBuffer.st new file mode 100644 index 000000000..d892a7a24 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/discardBuffer.st @@ -0,0 +1,5 @@ +*zinc-character-encoding-core +discardBuffer + "Protocol: private" + + position := 0 diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/finish.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/finish.st index 99f238f9f..fedb03caf 100644 --- a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/finish.st +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/finish.st @@ -1,3 +1,4 @@ *zinc-character-encoding-core finish - self flushBuffer \ No newline at end of file + "Protocol: initialize-release" + self flushBuffer diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/flush.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/flush.st new file mode 100644 index 000000000..d21f764fb --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/flush.st @@ -0,0 +1,5 @@ +*zinc-character-encoding-core +flush + "Protocol: accessing" + self flushBuffer. + stream flush diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/flushBuffer.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/flushBuffer.st new file mode 100644 index 000000000..34ec1c7cb --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/flushBuffer.st @@ -0,0 +1,12 @@ +*zinc-character-encoding-core +flushBuffer + "Protocol: private" + position = 0 ifTrue: [ ^ self ]. + position = self bufferSize + ifTrue: [ + stream nextPutAll: buffer ] + ifFalse: [ + (stream respondsTo: #next:putAll:startingAt:) + ifTrue: [ stream next: position putAll: buffer startingAt: 1 ] + ifFalse: [ stream nextPutAll: (buffer copyFrom: 1 to: position) ] ]. + position := 0 diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/flushBufferIfFull.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/flushBufferIfFull.st new file mode 100644 index 000000000..ab5919e18 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/flushBufferIfFull.st @@ -0,0 +1,5 @@ +*zinc-character-encoding-core +flushBufferIfFull + "Protocol: private" + position = self bufferSize + ifTrue: [ self flushBuffer ] diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/int16..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/int16..st new file mode 100644 index 000000000..d71ac4203 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/int16..st @@ -0,0 +1,4 @@ +*zinc-character-encoding-core +int16: integer + "Protocol: accessing - bytes" + ^ self nextIntegerOfSize: 2 signed: true bigEndian: true put: integer diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/int32..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/int32..st new file mode 100644 index 000000000..846d17499 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/int32..st @@ -0,0 +1,4 @@ +*zinc-character-encoding-core +int32: integer + "Protocol: accessing - bytes" + ^ self nextIntegerOfSize: 4 signed: true bigEndian: true put: integer diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/int8..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/int8..st new file mode 100644 index 000000000..45ecfde36 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/int8..st @@ -0,0 +1,4 @@ +*zinc-character-encoding-core +int8: integer + "Protocol: accessing - bytes" + ^ self nextIntegerOfSize: 1 signed: true bigEndian: true put: integer diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/isBinary.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/isBinary.st new file mode 100644 index 000000000..46c50d473 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/isBinary.st @@ -0,0 +1,5 @@ +*zinc-character-encoding-core +isBinary + "Protocol: testing" + + ^ stream isBinary diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/isStream.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/isStream.st new file mode 100644 index 000000000..3be9aefe1 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/isStream.st @@ -0,0 +1,5 @@ +*zinc-character-encoding-core +isStream + "Protocol: testing" + + ^ true diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/lf.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/lf.st new file mode 100644 index 000000000..dc2491ea2 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/lf.st @@ -0,0 +1,4 @@ +*zinc-character-encoding-core +lf + "Protocol: accessing" + self nextPut: Character lf diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/next.putAll..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/next.putAll..st new file mode 100644 index 000000000..aa824b6ea --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/next.putAll..st @@ -0,0 +1,9 @@ +*zinc-character-encoding-core +next: count putAll: collection + "Protocol: accessing" + "Write count elements from collection" + + self + next: count + putAll: collection + startingAt: 1 diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/next.putAll.startingAt..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/next.putAll.startingAt..st new file mode 100644 index 000000000..968c96246 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/next.putAll.startingAt..st @@ -0,0 +1,15 @@ +*zinc-character-encoding-core +next: count putAll: collection startingAt: offset + "Protocol: accessing" + "Write count elements from collection starting at offset." + + self flushBufferIfFull. + count <= self bufferFreeSize + ifTrue: [ + self buffer replaceFrom: position + 1 to: position + count with: collection startingAt: offset. + position := position + count ] + ifFalse: [ + self flushBuffer. + count > (self bufferSize / 2) + ifTrue: [ stream next: count putAll: collection startingAt: offset ] + ifFalse: [ self next: count putAll: collection startingAt: offset ] ] diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/nextInt32Put..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/nextInt32Put..st new file mode 100644 index 000000000..85f7b7444 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/nextInt32Put..st @@ -0,0 +1,4 @@ +*zinc-character-encoding-core +nextInt32Put: integer + "Protocol: accessing - bytes" + ^ self nextIntegerOfSize: 4 signed: true bigEndian: true put: integer diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/nextIntegerOfSize.signed.bigEndian.put..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/nextIntegerOfSize.signed.bigEndian.put..st new file mode 100644 index 000000000..2e9f2c107 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/nextIntegerOfSize.signed.bigEndian.put..st @@ -0,0 +1,23 @@ +*zinc-character-encoding-core +nextIntegerOfSize: numberOfBytes signed: signed bigEndian: bigEndian put: value + "Protocol: accessing - bytes" + "Assuming the receiver is a stream of bytes, write value as the next integer of size numberOfBytes. + If bigEndian is true, use network byte order, most significant byte first, + else use little endian order, least significant byte first. + If signed is true, encode as a two-complement signed value, + else encode as a plain unsigned value." + + | unsignedValue | + unsignedValue := (signed and: [ value negative ]) + ifTrue: [ (1 << (numberOfBytes * 8)) + value ] + ifFalse: [ value ]. + (unsignedValue between: 0 and: (2 ** (numberOfBytes * 8)) - 1) + ifFalse: [ DomainError signalFrom: 0 to: (2 ** (numberOfBytes * 8)) - 1 ]. + bigEndian + ifTrue: [ + numberOfBytes to: 1 by: -1 do: [ :index | + self nextPut: (unsignedValue byteAt: index) ] ] + ifFalse: [ + 1 to: numberOfBytes do: [ :index | + self nextPut: (unsignedValue byteAt: index) ] ]. + ^ value diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/nextLittleEndianNumber.put..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/nextLittleEndianNumber.put..st new file mode 100644 index 000000000..eb6789748 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/nextLittleEndianNumber.put..st @@ -0,0 +1,4 @@ +*zinc-character-encoding-core +nextLittleEndianNumber: numberOfBytes put: integer + "Protocol: accessing - bytes" + ^ self nextIntegerOfSize: numberOfBytes signed: false bigEndian: false put: integer diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/nextNumber.put..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/nextNumber.put..st new file mode 100644 index 000000000..1e74aa0ba --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/nextNumber.put..st @@ -0,0 +1,4 @@ +*zinc-character-encoding-core +nextNumber: numberOfBytes put: integer + "Protocol: accessing - bytes" + ^ self nextIntegerOfSize: numberOfBytes signed: false bigEndian: true put: integer diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/nextPut..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/nextPut..st new file mode 100644 index 000000000..880ad7217 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/nextPut..st @@ -0,0 +1,6 @@ +*zinc-character-encoding-core +nextPut: object + "Protocol: accessing" + self flushBufferIfFull. + position := position + 1. + self buffer at: position put: object diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/nextPutAll..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/nextPutAll..st new file mode 100644 index 000000000..d9f62ff5d --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/nextPutAll..st @@ -0,0 +1,9 @@ +*zinc-character-encoding-core +nextPutAll: collection + "Protocol: accessing" + "Write a collection" + + self + next: collection size + putAll: collection + startingAt: 1 diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/nextWordPut..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/nextWordPut..st new file mode 100644 index 000000000..f1d5f7f51 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/nextWordPut..st @@ -0,0 +1,4 @@ +*zinc-character-encoding-core +nextWordPut: integer + "Protocol: accessing - bytes" + ^ self nextIntegerOfSize: 2 signed: false bigEndian: true put: integer diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/on..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/on..st new file mode 100644 index 000000000..f7b2a066d --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/on..st @@ -0,0 +1,5 @@ +*zinc-character-encoding-core +on: writeStream + "Protocol: initialize-release" + stream := writeStream. + position := 0 diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/position..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/position..st new file mode 100644 index 000000000..98a6f35cf --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/position..st @@ -0,0 +1,5 @@ +*zinc-character-encoding-core +position: anInteger + "Protocol: accessing" + self flush. + stream position: anInteger diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/position.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/position.st new file mode 100644 index 000000000..4006a97df --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/position.st @@ -0,0 +1,5 @@ +*zinc-character-encoding-core +position + "Protocol: accessing" + + ^ stream position + position diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/print..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/print..st new file mode 100644 index 000000000..009d0a5ec --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/print..st @@ -0,0 +1,4 @@ +*zinc-character-encoding-core +print: object + "Protocol: accessing" + object printOn: self diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/printOn..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/printOn..st new file mode 100644 index 000000000..af8be469b --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/printOn..st @@ -0,0 +1,6 @@ +*zinc-character-encoding-core +printOn: aStream + "Protocol: printing" + aStream + nextPutAll: 'a '; + nextPutAll: self class name diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/rawStream.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/rawStream.st new file mode 100644 index 000000000..cdb2f7d78 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/rawStream.st @@ -0,0 +1,8 @@ +*zinc-character-encoding-core +rawStream + "Protocol: initialize-release" + "Answer the innermost stream wrapped by the receiver, e.g. a raw binary file stream, + socket stream, or regular Read/WriteStream. + Defer to the wrappedStream." + + ^ self wrappedStream rawStream diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/reset.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/reset.st new file mode 100644 index 000000000..76bd1040b --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/reset.st @@ -0,0 +1,5 @@ +*zinc-character-encoding-core +reset + "Protocol: accessing" + self flushBuffer. + stream reset diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/setToEnd.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/setToEnd.st new file mode 100644 index 000000000..f08ccaf2a --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/setToEnd.st @@ -0,0 +1,6 @@ +*zinc-character-encoding-core +setToEnd + "Protocol: accessing" + + self flush. + stream setToEnd diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/sizeBuffer..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/sizeBuffer..st new file mode 100644 index 000000000..c22d220a1 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/sizeBuffer..st @@ -0,0 +1,4 @@ +*zinc-character-encoding-core +sizeBuffer: size + "Protocol: accessing" + buffer := (stream isBinary ifTrue: [ ByteArray ] ifFalse: [ String ]) new: size diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/space.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/space.st new file mode 100644 index 000000000..5153f096a --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/space.st @@ -0,0 +1,4 @@ +*zinc-character-encoding-core +space + "Protocol: accessing" + self nextPut: Character space diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/tab.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/tab.st new file mode 100644 index 000000000..89e3c0287 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/tab.st @@ -0,0 +1,4 @@ +*zinc-character-encoding-core +tab + "Protocol: accessing" + self nextPut: Character tab diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/truncate..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/truncate..st new file mode 100644 index 000000000..c56ec1547 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/truncate..st @@ -0,0 +1,6 @@ +*zinc-character-encoding-core +truncate: anInteger + "Protocol: accessing" + + self flushBuffer. + stream truncate: anInteger diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/truncate.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/truncate.st new file mode 100644 index 000000000..b52afda3b --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/truncate.st @@ -0,0 +1,6 @@ +*zinc-character-encoding-core +truncate + "Protocol: accessing" + + self flushBuffer. + stream truncate diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/uint16..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/uint16..st new file mode 100644 index 000000000..0dba31d00 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/uint16..st @@ -0,0 +1,4 @@ +*zinc-character-encoding-core +uint16: integer + "Protocol: accessing - bytes" + ^ self nextIntegerOfSize: 2 signed: false bigEndian: true put: integer diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/uint32..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/uint32..st new file mode 100644 index 000000000..7dfb20ba8 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/uint32..st @@ -0,0 +1,4 @@ +*zinc-character-encoding-core +uint32: integer + "Protocol: accessing - bytes" + ^ self nextIntegerOfSize: 4 signed: false bigEndian: true put: integer diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/uint8..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/uint8..st new file mode 100644 index 000000000..0761ea972 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/uint8..st @@ -0,0 +1,4 @@ +*zinc-character-encoding-core +uint8: integer + "Protocol: accessing - bytes" + ^ self nextIntegerOfSize: 1 signed: false bigEndian: true put: integer diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/wrappedStream.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/wrappedStream.st new file mode 100644 index 000000000..b69f51cf3 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/instance/wrappedStream.st @@ -0,0 +1,5 @@ +*zinc-character-encoding-core +wrappedStream + "Protocol: initialize-release" + + ^ stream diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/methodProperties.json b/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/methodProperties.json deleted file mode 100644 index 18ae9b674..000000000 --- a/repository/Zinc-Character-Encoding-Core.v37.package/ZnBufferedWriteStream.extension/methodProperties.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "class" : { - }, - "instance" : { - "finish" : "dkh 04/18/2023 18:46" } } diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/README.md b/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/README.md index 1f6e61d19..858aaa86d 100644 --- a/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/README.md +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/README.md @@ -1,7 +1,12 @@ -I am ZnByteEncoder, a concrete subclass of ZnCharacterEncoder. -I handle single byte encodings where byte values 0 to 127 map to ASCII -and 128 to 255 are a permutation to Unicode characters. +I am ZnByteEncoder, a concrete subclass of ZnCharacterEncoderGS. +I handle single byte encodings where byte values 0 to 127 map to ASCII and 128 to 255 are a permutation to Unicode characters. I derive my mappings by parsing official unicode.org specifications. -Part of Zinc HTTP Components. \ No newline at end of file +The list of encodings and their names/aliases was taken from http://encoding.spec.whatwg.org/#legacy-single-byte-encodings + +I basically support ISO/IEC 8859 1, 2, 3, 4, 5, 6, 7, 8, 10, 13, 14, 15 and 16, Windows Codepages 866, 874, 1250, 1251, 1252, 1253, 1253, 1254, 1255, 1256, 1257, 1258, KOI8 R & U as well as Mac Roman & Cyrillic - each of these with a number of aliases like latin1, latin2, latin3, latin4, latin5, latin6, cyrillic, arabic, greek and hebrew. See #mappingToIdentifiers + +Note that most/all of these encodings should be considered legacy, with UTF-8 being the preferred encoding going forward. + +Part of Zinc HTTP Components. diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/cp1250Mapping.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/cp1250Mapping.st index 2c1a042c4..883857537 100644 --- a/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/cp1250Mapping.st +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/cp1250Mapping.st @@ -3,19 +3,19 @@ cp1250Mapping "self generateByteToUnicodeSpec: 'http://unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1250.TXT'" ^ #( - 16r20AC nil 16r201A nil 16r201E 16r2026 16r2020 16r2021 - nil 16r2030 16r0160 16r2039 16r015A 16r0164 16r017D 16r0179 - nil 16r2018 16r2019 16r201C 16r201D 16r2022 16r2013 16r2014 - nil 16r2122 16r0161 16r203A 16r015B 16r0165 16r017E 16r017A - 16r00A0 16r02C7 16r02D8 16r0141 16r00A4 16r0104 16r00A6 16r00A7 - 16r00A8 16r00A9 16r015E 16r00AB 16r00AC 16r00AD 16r00AE 16r017B - 16r00B0 16r00B1 16r02DB 16r0142 16r00B4 16r00B5 16r00B6 16r00B7 - 16r00B8 16r0105 16r015F 16r00BB 16r013D 16r02DD 16r013E 16r017C - 16r0154 16r00C1 16r00C2 16r0102 16r00C4 16r0139 16r0106 16r00C7 - 16r010C 16r00C9 16r0118 16r00CB 16r011A 16r00CD 16r00CE 16r010E - 16r0110 16r0143 16r0147 16r00D3 16r00D4 16r0150 16r00D6 16r00D7 - 16r0158 16r016E 16r00DA 16r0170 16r00DC 16r00DD 16r0162 16r00DF - 16r0155 16r00E1 16r00E2 16r0103 16r00E4 16r013A 16r0107 16r00E7 - 16r010D 16r00E9 16r0119 16r00EB 16r011B 16r00ED 16r00EE 16r010F - 16r0111 16r0144 16r0148 16r00F3 16r00F4 16r0151 16r00F6 16r00F7 + 16r20AC nil 16r201A nil 16r201E 16r2026 16r2020 16r2021 + nil 16r2030 16r0160 16r2039 16r015A 16r0164 16r017D 16r0179 + nil 16r2018 16r2019 16r201C 16r201D 16r2022 16r2013 16r2014 + nil 16r2122 16r0161 16r203A 16r015B 16r0165 16r017E 16r017A + 16r00A0 16r02C7 16r02D8 16r0141 16r00A4 16r0104 16r00A6 16r00A7 + 16r00A8 16r00A9 16r015E 16r00AB 16r00AC 16r00AD 16r00AE 16r017B + 16r00B0 16r00B1 16r02DB 16r0142 16r00B4 16r00B5 16r00B6 16r00B7 + 16r00B8 16r0105 16r015F 16r00BB 16r013D 16r02DD 16r013E 16r017C + 16r0154 16r00C1 16r00C2 16r0102 16r00C4 16r0139 16r0106 16r00C7 + 16r010C 16r00C9 16r0118 16r00CB 16r011A 16r00CD 16r00CE 16r010E + 16r0110 16r0143 16r0147 16r00D3 16r00D4 16r0150 16r00D6 16r00D7 + 16r0158 16r016E 16r00DA 16r0170 16r00DC 16r00DD 16r0162 16r00DF + 16r0155 16r00E1 16r00E2 16r0103 16r00E4 16r013A 16r0107 16r00E7 + 16r010D 16r00E9 16r0119 16r00EB 16r011B 16r00ED 16r00EE 16r010F + 16r0111 16r0144 16r0148 16r00F3 16r00F4 16r0151 16r00F6 16r00F7 16r0159 16r016F 16r00FA 16r0171 16r00FC 16r00FD 16r0163 16r02D9 ) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/cp1251Mapping.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/cp1251Mapping.st new file mode 100644 index 000000000..645f7dc8a --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/cp1251Mapping.st @@ -0,0 +1,21 @@ +mappings +cp1251Mapping + "self generateByteToUnicodeSpec: 'http://unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1251.TXT'" + + ^ #( + 16r0402 16r0403 16r201A 16r0453 16r201E 16r2026 16r2020 16r2021 + 16r20AC 16r2030 16r0409 16r2039 16r040A 16r040C 16r040B 16r040F + 16r0452 16r2018 16r2019 16r201C 16r201D 16r2022 16r2013 16r2014 + nil 16r2122 16r0459 16r203A 16r045A 16r045C 16r045B 16r045F + 16r00A0 16r040E 16r045E 16r0408 16r00A4 16r0490 16r00A6 16r00A7 + 16r0401 16r00A9 16r0404 16r00AB 16r00AC 16r00AD 16r00AE 16r0407 + 16r00B0 16r00B1 16r0406 16r0456 16r0491 16r00B5 16r00B6 16r00B7 + 16r0451 16r2116 16r0454 16r00BB 16r0458 16r0405 16r0455 16r0457 + 16r0410 16r0411 16r0412 16r0413 16r0414 16r0415 16r0416 16r0417 + 16r0418 16r0419 16r041A 16r041B 16r041C 16r041D 16r041E 16r041F + 16r0420 16r0421 16r0422 16r0423 16r0424 16r0425 16r0426 16r0427 + 16r0428 16r0429 16r042A 16r042B 16r042C 16r042D 16r042E 16r042F + 16r0430 16r0431 16r0432 16r0433 16r0434 16r0435 16r0436 16r0437 + 16r0438 16r0439 16r043A 16r043B 16r043C 16r043D 16r043E 16r043F + 16r0440 16r0441 16r0442 16r0443 16r0444 16r0445 16r0446 16r0447 + 16r0448 16r0449 16r044A 16r044B 16r044C 16r044D 16r044E 16r044F ) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/cp1252Mapping.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/cp1252Mapping.st index bb9254b64..dcae85b4b 100644 --- a/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/cp1252Mapping.st +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/cp1252Mapping.st @@ -3,19 +3,19 @@ cp1252Mapping "self generateByteToUnicodeSpec: 'http://unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1252.TXT'" ^ #( - 16r20AC nil 16r201A 16r0192 16r201E 16r2026 16r2020 16r2021 - 16r02C6 16r2030 16r0160 16r2039 16r0152 nil 16r017D nil - nil 16r2018 16r2019 16r201C 16r201D 16r2022 16r2013 16r2014 - 16r02DC 16r2122 16r0161 16r203A 16r0153 nil 16r017E 16r0178 - 16r00A0 16r00A1 16r00A2 16r00A3 16r00A4 16r00A5 16r00A6 16r00A7 - 16r00A8 16r00A9 16r00AA 16r00AB 16r00AC 16r00AD 16r00AE 16r00AF - 16r00B0 16r00B1 16r00B2 16r00B3 16r00B4 16r00B5 16r00B6 16r00B7 - 16r00B8 16r00B9 16r00BA 16r00BB 16r00BC 16r00BD 16r00BE 16r00BF - 16r00C0 16r00C1 16r00C2 16r00C3 16r00C4 16r00C5 16r00C6 16r00C7 - 16r00C8 16r00C9 16r00CA 16r00CB 16r00CC 16r00CD 16r00CE 16r00CF - 16r00D0 16r00D1 16r00D2 16r00D3 16r00D4 16r00D5 16r00D6 16r00D7 - 16r00D8 16r00D9 16r00DA 16r00DB 16r00DC 16r00DD 16r00DE 16r00DF - 16r00E0 16r00E1 16r00E2 16r00E3 16r00E4 16r00E5 16r00E6 16r00E7 - 16r00E8 16r00E9 16r00EA 16r00EB 16r00EC 16r00ED 16r00EE 16r00EF - 16r00F0 16r00F1 16r00F2 16r00F3 16r00F4 16r00F5 16r00F6 16r00F7 + 16r20AC nil 16r201A 16r0192 16r201E 16r2026 16r2020 16r2021 + 16r02C6 16r2030 16r0160 16r2039 16r0152 nil 16r017D nil + nil 16r2018 16r2019 16r201C 16r201D 16r2022 16r2013 16r2014 + 16r02DC 16r2122 16r0161 16r203A 16r0153 nil 16r017E 16r0178 + 16r00A0 16r00A1 16r00A2 16r00A3 16r00A4 16r00A5 16r00A6 16r00A7 + 16r00A8 16r00A9 16r00AA 16r00AB 16r00AC 16r00AD 16r00AE 16r00AF + 16r00B0 16r00B1 16r00B2 16r00B3 16r00B4 16r00B5 16r00B6 16r00B7 + 16r00B8 16r00B9 16r00BA 16r00BB 16r00BC 16r00BD 16r00BE 16r00BF + 16r00C0 16r00C1 16r00C2 16r00C3 16r00C4 16r00C5 16r00C6 16r00C7 + 16r00C8 16r00C9 16r00CA 16r00CB 16r00CC 16r00CD 16r00CE 16r00CF + 16r00D0 16r00D1 16r00D2 16r00D3 16r00D4 16r00D5 16r00D6 16r00D7 + 16r00D8 16r00D9 16r00DA 16r00DB 16r00DC 16r00DD 16r00DE 16r00DF + 16r00E0 16r00E1 16r00E2 16r00E3 16r00E4 16r00E5 16r00E6 16r00E7 + 16r00E8 16r00E9 16r00EA 16r00EB 16r00EC 16r00ED 16r00EE 16r00EF + 16r00F0 16r00F1 16r00F2 16r00F3 16r00F4 16r00F5 16r00F6 16r00F7 16r00F8 16r00F9 16r00FA 16r00FB 16r00FC 16r00FD 16r00FE 16r00FF ) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/cp1253Mapping.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/cp1253Mapping.st index a5b5d92a0..2b06e948f 100644 --- a/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/cp1253Mapping.st +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/cp1253Mapping.st @@ -3,19 +3,19 @@ cp1253Mapping "self generateByteToUnicodeSpec: 'http://unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1253.TXT'" ^ #( - 16r20AC nil 16r201A 16r0192 16r201E 16r2026 16r2020 16r2021 - nil 16r2030 nil 16r2039 nil nil nil nil - nil 16r2018 16r2019 16r201C 16r201D 16r2022 16r2013 16r2014 - nil 16r2122 nil 16r203A nil nil nil nil - 16r00A0 16r0385 16r0386 16r00A3 16r00A4 16r00A5 16r00A6 16r00A7 - 16r00A8 16r00A9 nil 16r00AB 16r00AC 16r00AD 16r00AE 16r2015 - 16r00B0 16r00B1 16r00B2 16r00B3 16r0384 16r00B5 16r00B6 16r00B7 - 16r0388 16r0389 16r038A 16r00BB 16r038C 16r00BD 16r038E 16r038F - 16r0390 16r0391 16r0392 16r0393 16r0394 16r0395 16r0396 16r0397 - 16r0398 16r0399 16r039A 16r039B 16r039C 16r039D 16r039E 16r039F - 16r03A0 16r03A1 nil 16r03A3 16r03A4 16r03A5 16r03A6 16r03A7 - 16r03A8 16r03A9 16r03AA 16r03AB 16r03AC 16r03AD 16r03AE 16r03AF - 16r03B0 16r03B1 16r03B2 16r03B3 16r03B4 16r03B5 16r03B6 16r03B7 - 16r03B8 16r03B9 16r03BA 16r03BB 16r03BC 16r03BD 16r03BE 16r03BF - 16r03C0 16r03C1 16r03C2 16r03C3 16r03C4 16r03C5 16r03C6 16r03C7 + 16r20AC nil 16r201A 16r0192 16r201E 16r2026 16r2020 16r2021 + nil 16r2030 nil 16r2039 nil nil nil nil + nil 16r2018 16r2019 16r201C 16r201D 16r2022 16r2013 16r2014 + nil 16r2122 nil 16r203A nil nil nil nil + 16r00A0 16r0385 16r0386 16r00A3 16r00A4 16r00A5 16r00A6 16r00A7 + 16r00A8 16r00A9 nil 16r00AB 16r00AC 16r00AD 16r00AE 16r2015 + 16r00B0 16r00B1 16r00B2 16r00B3 16r0384 16r00B5 16r00B6 16r00B7 + 16r0388 16r0389 16r038A 16r00BB 16r038C 16r00BD 16r038E 16r038F + 16r0390 16r0391 16r0392 16r0393 16r0394 16r0395 16r0396 16r0397 + 16r0398 16r0399 16r039A 16r039B 16r039C 16r039D 16r039E 16r039F + 16r03A0 16r03A1 nil 16r03A3 16r03A4 16r03A5 16r03A6 16r03A7 + 16r03A8 16r03A9 16r03AA 16r03AB 16r03AC 16r03AD 16r03AE 16r03AF + 16r03B0 16r03B1 16r03B2 16r03B3 16r03B4 16r03B5 16r03B6 16r03B7 + 16r03B8 16r03B9 16r03BA 16r03BB 16r03BC 16r03BD 16r03BE 16r03BF + 16r03C0 16r03C1 16r03C2 16r03C3 16r03C4 16r03C5 16r03C6 16r03C7 16r03C8 16r03C9 16r03CA 16r03CB 16r03CC 16r03CD 16r03CE nil ) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/cp1254Mapping.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/cp1254Mapping.st new file mode 100644 index 000000000..8e4e58a49 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/cp1254Mapping.st @@ -0,0 +1,21 @@ +mappings +cp1254Mapping + "self generateByteToUnicodeSpec: 'http://unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1254.TXT'" + + ^ #( + 16r20AC nil 16r201A 16r0192 16r201E 16r2026 16r2020 16r2021 + 16r02C6 16r2030 16r0160 16r2039 16r0152 nil nil nil + nil 16r2018 16r2019 16r201C 16r201D 16r2022 16r2013 16r2014 + 16r02DC 16r2122 16r0161 16r203A 16r0153 nil nil 16r0178 + 16r00A0 16r00A1 16r00A2 16r00A3 16r00A4 16r00A5 16r00A6 16r00A7 + 16r00A8 16r00A9 16r00AA 16r00AB 16r00AC 16r00AD 16r00AE 16r00AF + 16r00B0 16r00B1 16r00B2 16r00B3 16r00B4 16r00B5 16r00B6 16r00B7 + 16r00B8 16r00B9 16r00BA 16r00BB 16r00BC 16r00BD 16r00BE 16r00BF + 16r00C0 16r00C1 16r00C2 16r00C3 16r00C4 16r00C5 16r00C6 16r00C7 + 16r00C8 16r00C9 16r00CA 16r00CB 16r00CC 16r00CD 16r00CE 16r00CF + 16r011E 16r00D1 16r00D2 16r00D3 16r00D4 16r00D5 16r00D6 16r00D7 + 16r00D8 16r00D9 16r00DA 16r00DB 16r00DC 16r0130 16r015E 16r00DF + 16r00E0 16r00E1 16r00E2 16r00E3 16r00E4 16r00E5 16r00E6 16r00E7 + 16r00E8 16r00E9 16r00EA 16r00EB 16r00EC 16r00ED 16r00EE 16r00EF + 16r011F 16r00F1 16r00F2 16r00F3 16r00F4 16r00F5 16r00F6 16r00F7 + 16r00F8 16r00F9 16r00FA 16r00FB 16r00FC 16r0131 16r015F 16r00FF ) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/cp1255Mapping.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/cp1255Mapping.st new file mode 100644 index 000000000..717fadb39 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/cp1255Mapping.st @@ -0,0 +1,21 @@ +mappings +cp1255Mapping + "self generateByteToUnicodeSpec: 'http://unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1255.TXT'" + + ^ #( + 16r20AC nil 16r201A 16r0192 16r201E 16r2026 16r2020 16r2021 + 16r02C6 16r2030 nil 16r2039 nil nil nil nil + nil 16r2018 16r2019 16r201C 16r201D 16r2022 16r2013 16r2014 + 16r02DC 16r2122 nil 16r203A nil nil nil nil + 16r00A0 16r00A1 16r00A2 16r00A3 16r20AA 16r00A5 16r00A6 16r00A7 + 16r00A8 16r00A9 16r00D7 16r00AB 16r00AC 16r00AD 16r00AE 16r00AF + 16r00B0 16r00B1 16r00B2 16r00B3 16r00B4 16r00B5 16r00B6 16r00B7 + 16r00B8 16r00B9 16r00F7 16r00BB 16r00BC 16r00BD 16r00BE 16r00BF + 16r05B0 16r05B1 16r05B2 16r05B3 16r05B4 16r05B5 16r05B6 16r05B7 + 16r05B8 16r05B9 nil 16r05BB 16r05BC 16r05BD 16r05BE 16r05BF + 16r05C0 16r05C1 16r05C2 16r05C3 16r05F0 16r05F1 16r05F2 16r05F3 + 16r05F4 nil nil nil nil nil nil nil + 16r05D0 16r05D1 16r05D2 16r05D3 16r05D4 16r05D5 16r05D6 16r05D7 + 16r05D8 16r05D9 16r05DA 16r05DB 16r05DC 16r05DD 16r05DE 16r05DF + 16r05E0 16r05E1 16r05E2 16r05E3 16r05E4 16r05E5 16r05E6 16r05E7 + 16r05E8 16r05E9 16r05EA nil nil 16r200E 16r200F nil ) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/cp1256Mapping.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/cp1256Mapping.st new file mode 100644 index 000000000..af469af26 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/cp1256Mapping.st @@ -0,0 +1,21 @@ +mappings +cp1256Mapping + "self generateByteToUnicodeSpec: 'http://unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1256.TXT'" + + ^ #( + 16r20AC 16r067E 16r201A 16r0192 16r201E 16r2026 16r2020 16r2021 + 16r02C6 16r2030 16r0679 16r2039 16r0152 16r0686 16r0698 16r0688 + 16r06AF 16r2018 16r2019 16r201C 16r201D 16r2022 16r2013 16r2014 + 16r06A9 16r2122 16r0691 16r203A 16r0153 16r200C 16r200D 16r06BA + 16r00A0 16r060C 16r00A2 16r00A3 16r00A4 16r00A5 16r00A6 16r00A7 + 16r00A8 16r00A9 16r06BE 16r00AB 16r00AC 16r00AD 16r00AE 16r00AF + 16r00B0 16r00B1 16r00B2 16r00B3 16r00B4 16r00B5 16r00B6 16r00B7 + 16r00B8 16r00B9 16r061B 16r00BB 16r00BC 16r00BD 16r00BE 16r061F + 16r06C1 16r0621 16r0622 16r0623 16r0624 16r0625 16r0626 16r0627 + 16r0628 16r0629 16r062A 16r062B 16r062C 16r062D 16r062E 16r062F + 16r0630 16r0631 16r0632 16r0633 16r0634 16r0635 16r0636 16r00D7 + 16r0637 16r0638 16r0639 16r063A 16r0640 16r0641 16r0642 16r0643 + 16r00E0 16r0644 16r00E2 16r0645 16r0646 16r0647 16r0648 16r00E7 + 16r00E8 16r00E9 16r00EA 16r00EB 16r0649 16r064A 16r00EE 16r00EF + 16r064B 16r064C 16r064D 16r064E 16r00F4 16r064F 16r0650 16r00F7 + 16r0651 16r00F9 16r0652 16r00FB 16r00FC 16r200E 16r200F 16r06D2 ) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/cp1257Mapping.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/cp1257Mapping.st new file mode 100644 index 000000000..d161dd670 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/cp1257Mapping.st @@ -0,0 +1,21 @@ +mappings +cp1257Mapping + "self generateByteToUnicodeSpec: 'http://unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1257.TXT'" + + ^ #( + 16r20AC nil 16r201A nil 16r201E 16r2026 16r2020 16r2021 + nil 16r2030 nil 16r2039 nil 16r00A8 16r02C7 16r00B8 + nil 16r2018 16r2019 16r201C 16r201D 16r2022 16r2013 16r2014 + nil 16r2122 nil 16r203A nil 16r00AF 16r02DB nil + 16r00A0 nil 16r00A2 16r00A3 16r00A4 nil 16r00A6 16r00A7 + 16r00D8 16r00A9 16r0156 16r00AB 16r00AC 16r00AD 16r00AE 16r00C6 + 16r00B0 16r00B1 16r00B2 16r00B3 16r00B4 16r00B5 16r00B6 16r00B7 + 16r00F8 16r00B9 16r0157 16r00BB 16r00BC 16r00BD 16r00BE 16r00E6 + 16r0104 16r012E 16r0100 16r0106 16r00C4 16r00C5 16r0118 16r0112 + 16r010C 16r00C9 16r0179 16r0116 16r0122 16r0136 16r012A 16r013B + 16r0160 16r0143 16r0145 16r00D3 16r014C 16r00D5 16r00D6 16r00D7 + 16r0172 16r0141 16r015A 16r016A 16r00DC 16r017B 16r017D 16r00DF + 16r0105 16r012F 16r0101 16r0107 16r00E4 16r00E5 16r0119 16r0113 + 16r010D 16r00E9 16r017A 16r0117 16r0123 16r0137 16r012B 16r013C + 16r0161 16r0144 16r0146 16r00F3 16r014D 16r00F5 16r00F6 16r00F7 + 16r0173 16r0142 16r015B 16r016B 16r00FC 16r017C 16r017E 16r02D9 ) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/cp1258Mapping.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/cp1258Mapping.st new file mode 100644 index 000000000..db5ebede9 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/cp1258Mapping.st @@ -0,0 +1,21 @@ +mappings +cp1258Mapping + "self generateByteToUnicodeSpec: 'http://unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1258.TXT'" + + ^ #( + 16r20AC nil 16r201A 16r0192 16r201E 16r2026 16r2020 16r2021 + 16r02C6 16r2030 nil 16r2039 16r0152 nil nil nil + nil 16r2018 16r2019 16r201C 16r201D 16r2022 16r2013 16r2014 + 16r02DC 16r2122 nil 16r203A 16r0153 nil nil 16r0178 + 16r00A0 16r00A1 16r00A2 16r00A3 16r00A4 16r00A5 16r00A6 16r00A7 + 16r00A8 16r00A9 16r00AA 16r00AB 16r00AC 16r00AD 16r00AE 16r00AF + 16r00B0 16r00B1 16r00B2 16r00B3 16r00B4 16r00B5 16r00B6 16r00B7 + 16r00B8 16r00B9 16r00BA 16r00BB 16r00BC 16r00BD 16r00BE 16r00BF + 16r00C0 16r00C1 16r00C2 16r0102 16r00C4 16r00C5 16r00C6 16r00C7 + 16r00C8 16r00C9 16r00CA 16r00CB 16r0300 16r00CD 16r00CE 16r00CF + 16r0110 16r00D1 16r0309 16r00D3 16r00D4 16r01A0 16r00D6 16r00D7 + 16r00D8 16r00D9 16r00DA 16r00DB 16r00DC 16r01AF 16r0303 16r00DF + 16r00E0 16r00E1 16r00E2 16r0103 16r00E4 16r00E5 16r00E6 16r00E7 + 16r00E8 16r00E9 16r00EA 16r00EB 16r0301 16r00ED 16r00EE 16r00EF + 16r0111 16r00F1 16r0323 16r00F3 16r00F4 16r01A1 16r00F6 16r00F7 + 16r00F8 16r00F9 16r00FA 16r00FB 16r00FC 16r01B0 16r20AB 16r00FF ) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/cp850Mapping.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/cp850Mapping.st new file mode 100644 index 000000000..f62921c6b --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/cp850Mapping.st @@ -0,0 +1,27 @@ +mappings +cp850Mapping + "This is not included in the MS mappings on the Unicode site, + but still in modern use as the default codepage in + the Windows Command Shell for multilingual locales" + "Technically, due to structure of ByteEncoder, it is incomplete, + as the lower range corresponds not to ASCII, but to cp437, + where character 0 - 31 and 127 have different meanings." + "See also http://en.wikipedia.org/wiki/Code_page_850" + + ^ #( + 16r00C7 16r00FC 16r00E9 16r00E2 16r00E4 16r00E0 16r00E5 16r00E7 + 16r00EA 16r00EB 16r00E8 16r00EF 16r00EE 16r00EC 16r00C4 16r00C5 + 16r00C9 16r00E6 16r00C6 16r00F4 16r00F6 16r00F2 16r00FB 16r00F9 + 16r00FF 16r00D6 16r00DC 16r00F8 16r00A3 16r00D8 16r00D7 16r0192 + 16r00E1 16r00ED 16r00F3 16r00FA 16r00F1 16r00D1 16r00AA 16r00BA + 16r00BF 16r00AE 16r00AC 16r00BD 16r00BC 16r00A1 16r00AB 16r00BB + 16r2591 16r2592 16r2593 16r2502 16r2524 16r00C1 16r00C2 16r00C0 + 16r00A9 16r2563 16r2551 16r2557 16r255D 16r00A2 16r00A5 16r2510 + 16r2514 16r2534 16r252C 16r251C 16r2500 16r253C 16r00E3 16r00C3 + 16r255A 16r2554 16r2569 16r2566 16r2560 16r2550 16r256C 16r00A4 + 16r00F0 16r00D0 16r00CA 16r00CB 16r00C8 16r0131 16r00CD 16r00CE + 16r00CF 16r2518 16r250C 16r2588 16r2584 16r00A6 16r00CC 16r2580 + 16r00D3 16r00DF 16r00D4 16r00D2 16r00F5 16r00D5 16r00B5 16r00FE + 16r00DE 16r00DA 16r00DB 16r00D9 16r00FD 16r00DD 16r00AF 16r00B4 + 16r00AD 16r00B1 16r2017 16r00BE 16r00B6 16r00A7 16r00F7 16r00B8 + 16r00B0 16r00A8 16r00B7 16r00B9 16r00B3 16r00B2 16r25A0 16r00A0 ) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/cp866Mapping.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/cp866Mapping.st new file mode 100644 index 000000000..682f8d6d8 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/cp866Mapping.st @@ -0,0 +1,21 @@ +mappings +cp866Mapping + "self generateByteToUnicodeSpec: 'http://unicode.org/Public/MAPPINGS/VENDORS/MICSFT/PC/CP866.TXT'" + + ^ #( + 16r0410 16r0411 16r0412 16r0413 16r0414 16r0415 16r0416 16r0417 + 16r0418 16r0419 16r041A 16r041B 16r041C 16r041D 16r041E 16r041F + 16r0420 16r0421 16r0422 16r0423 16r0424 16r0425 16r0426 16r0427 + 16r0428 16r0429 16r042A 16r042B 16r042C 16r042D 16r042E 16r042F + 16r0430 16r0431 16r0432 16r0433 16r0434 16r0435 16r0436 16r0437 + 16r0438 16r0439 16r043A 16r043B 16r043C 16r043D 16r043E 16r043F + 16r2591 16r2592 16r2593 16r2502 16r2524 16r2561 16r2562 16r2556 + 16r2555 16r2563 16r2551 16r2557 16r255D 16r255C 16r255B 16r2510 + 16r2514 16r2534 16r252C 16r251C 16r2500 16r253C 16r255E 16r255F + 16r255A 16r2554 16r2569 16r2566 16r2560 16r2550 16r256C 16r2567 + 16r2568 16r2564 16r2565 16r2559 16r2558 16r2552 16r2553 16r256B + 16r256A 16r2518 16r250C 16r2588 16r2584 16r258C 16r2590 16r2580 + 16r0440 16r0441 16r0442 16r0443 16r0444 16r0445 16r0446 16r0447 + 16r0448 16r0449 16r044A 16r044B 16r044C 16r044D 16r044E 16r044F + 16r0401 16r0451 16r0404 16r0454 16r0407 16r0457 16r040E 16r045E + 16r00B0 16r2219 16r00B7 16r221A 16r2116 16r00A4 16r25A0 16r00A0 ) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/cp874Mapping.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/cp874Mapping.st new file mode 100644 index 000000000..3aa1e09ab --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/cp874Mapping.st @@ -0,0 +1,21 @@ +mappings +cp874Mapping + "self generateByteToUnicodeSpec: 'http://unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP874.TXT'" + + ^ #( + 16r20AC nil nil nil nil 16r2026 nil nil + nil nil nil nil nil nil nil nil + nil 16r2018 16r2019 16r201C 16r201D 16r2022 16r2013 16r2014 + nil nil nil nil nil nil nil nil + 16r00A0 16r0E01 16r0E02 16r0E03 16r0E04 16r0E05 16r0E06 16r0E07 + 16r0E08 16r0E09 16r0E0A 16r0E0B 16r0E0C 16r0E0D 16r0E0E 16r0E0F + 16r0E10 16r0E11 16r0E12 16r0E13 16r0E14 16r0E15 16r0E16 16r0E17 + 16r0E18 16r0E19 16r0E1A 16r0E1B 16r0E1C 16r0E1D 16r0E1E 16r0E1F + 16r0E20 16r0E21 16r0E22 16r0E23 16r0E24 16r0E25 16r0E26 16r0E27 + 16r0E28 16r0E29 16r0E2A 16r0E2B 16r0E2C 16r0E2D 16r0E2E 16r0E2F + 16r0E30 16r0E31 16r0E32 16r0E33 16r0E34 16r0E35 16r0E36 16r0E37 + 16r0E38 16r0E39 16r0E3A nil nil nil nil 16r0E3F + 16r0E40 16r0E41 16r0E42 16r0E43 16r0E44 16r0E45 16r0E46 16r0E47 + 16r0E48 16r0E49 16r0E4A 16r0E4B 16r0E4C 16r0E4D 16r0E4E 16r0E4F + 16r0E50 16r0E51 16r0E52 16r0E53 16r0E54 16r0E55 16r0E56 16r0E57 + 16r0E58 16r0E59 16r0E5A 16r0E5B nil nil nil nil ) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/generateByteToUnicodeSpec..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/generateByteToUnicodeSpec..st index 3dccf8efe..5fe9cc9c8 100644 --- a/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/generateByteToUnicodeSpec..st +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/generateByteToUnicodeSpec..st @@ -1,16 +1,17 @@ -accessing +utilties generateByteToUnicodeSpec: url - "Return the formatted source code for an array mapping + "Return the formatted source code for an array mapping the top 128 byte to unicode values from a Unicode.org url" "self generateByteToUnicodeSpec: 'http://unicode.org/Public/MAPPINGS/ISO8859/8859-2.TXT'." | mapping | - mapping := self parseUnicodeOrgSpec: url. + mapping := self parseUnicodeOrgSpec: url. ^ String streamContents: [ :stream | - stream tab; << '"'; << 'self generateByteToUnicodeSpec: '; print: url; << '"'; cr; cr; tab; << '^ #('. - 128 to: 255 do: [ :each | | unicode | - each \\ 8 = 0 ifTrue: [ stream cr; tab ]. - (unicode := mapping at: each ifAbsent: [ nil ]) isNil - ifTrue: [ stream print: nil; space ] - ifFalse: [ stream << '16r' << (unicode printPaddedWith: $0 to: 4 base: 16); space ] ]. - stream nextPut: $); cr ] \ No newline at end of file + stream tab; << '"'; << 'self generateByteToUnicodeSpec: '; print: url; << '"'; cr; cr; tab; << '^ #('. + (self top128FromUnicodeSpec: mapping) doWithIndex: [ :each :index | + index - 1 \\ 8 = 0 ifTrue: [ stream cr; tab ]. + each + ifNil: [ stream print: nil; space ] + ifNotNil: [ (stream << '16r') << (each printPaddedWith: $0 to: 4 base: 16); space ] + ]. + stream nextPut: $); cr ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/handlesEncoding..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/handlesEncoding..st deleted file mode 100644 index f3d10e915..000000000 --- a/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/handlesEncoding..st +++ /dev/null @@ -1,5 +0,0 @@ -accessing -handlesEncoding: string - "Return true when my instances handle the encoding described by string" - - ^ ByteTextConverters includesKey: string asLowercase \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/initialize.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/initialize.st deleted file mode 100644 index 8ae3917e2..000000000 --- a/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/initialize.st +++ /dev/null @@ -1,7 +0,0 @@ -class initialization -initialize - "Initialize and cache the converters that I know of. - This method must be changed to make sure it runs - when loading in images where it is already present." - - self initializeByteTextConverters \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/initializeByteTextConverters.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/initializeByteTextConverters.st deleted file mode 100644 index ada8c4ee0..000000000 --- a/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/initializeByteTextConverters.st +++ /dev/null @@ -1,10 +0,0 @@ -private -initializeByteTextConverters - "Initialize and cache convertors based on specifications in methods that were autogenerated." - - ByteTextConverters := Dictionary new. - self mappingToIdentifiers - keysAndValuesDo: [ :mapping :identifiers | - | tables | - tables := self tablesFromSpec: (self perform: mapping). - identifiers do: [ :each | ByteTextConverters at: each put: tables ] ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/iso885910Mapping.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/iso885910Mapping.st new file mode 100644 index 000000000..5c2c0d7f1 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/iso885910Mapping.st @@ -0,0 +1,21 @@ +mappings +iso885910Mapping + "self generateByteToUnicodeSpec: 'http://unicode.org/Public/MAPPINGS/ISO8859/8859-10.TXT'" + + ^ #( + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + 16r00A0 16r0104 16r0112 16r0122 16r012A 16r0128 16r0136 16r00A7 + 16r013B 16r0110 16r0160 16r0166 16r017D 16r00AD 16r016A 16r014A + 16r00B0 16r0105 16r0113 16r0123 16r012B 16r0129 16r0137 16r00B7 + 16r013C 16r0111 16r0161 16r0167 16r017E 16r2015 16r016B 16r014B + 16r0100 16r00C1 16r00C2 16r00C3 16r00C4 16r00C5 16r00C6 16r012E + 16r010C 16r00C9 16r0118 16r00CB 16r0116 16r00CD 16r00CE 16r00CF + 16r00D0 16r0145 16r014C 16r00D3 16r00D4 16r00D5 16r00D6 16r0168 + 16r00D8 16r0172 16r00DA 16r00DB 16r00DC 16r00DD 16r00DE 16r00DF + 16r0101 16r00E1 16r00E2 16r00E3 16r00E4 16r00E5 16r00E6 16r012F + 16r010D 16r00E9 16r0119 16r00EB 16r0117 16r00ED 16r00EE 16r00EF + 16r00F0 16r0146 16r014D 16r00F3 16r00F4 16r00F5 16r00F6 16r0169 + 16r00F8 16r0173 16r00FA 16r00FB 16r00FC 16r00FD 16r00FE 16r0138 ) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/iso885913Mapping.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/iso885913Mapping.st new file mode 100644 index 000000000..984860645 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/iso885913Mapping.st @@ -0,0 +1,21 @@ +mappings +iso885913Mapping + "self generateByteToUnicodeSpec: 'http://unicode.org/Public/MAPPINGS/ISO8859/8859-13.TXT'" + + ^ #( + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + 16r00A0 16r201D 16r00A2 16r00A3 16r00A4 16r201E 16r00A6 16r00A7 + 16r00D8 16r00A9 16r0156 16r00AB 16r00AC 16r00AD 16r00AE 16r00C6 + 16r00B0 16r00B1 16r00B2 16r00B3 16r201C 16r00B5 16r00B6 16r00B7 + 16r00F8 16r00B9 16r0157 16r00BB 16r00BC 16r00BD 16r00BE 16r00E6 + 16r0104 16r012E 16r0100 16r0106 16r00C4 16r00C5 16r0118 16r0112 + 16r010C 16r00C9 16r0179 16r0116 16r0122 16r0136 16r012A 16r013B + 16r0160 16r0143 16r0145 16r00D3 16r014C 16r00D5 16r00D6 16r00D7 + 16r0172 16r0141 16r015A 16r016A 16r00DC 16r017B 16r017D 16r00DF + 16r0105 16r012F 16r0101 16r0107 16r00E4 16r00E5 16r0119 16r0113 + 16r010D 16r00E9 16r017A 16r0117 16r0123 16r0137 16r012B 16r013C + 16r0161 16r0144 16r0146 16r00F3 16r014D 16r00F5 16r00F6 16r00F7 + 16r0173 16r0142 16r015B 16r016B 16r00FC 16r017C 16r017E 16r2019 ) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/iso885914Mapping.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/iso885914Mapping.st new file mode 100644 index 000000000..5291921ee --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/iso885914Mapping.st @@ -0,0 +1,21 @@ +mappings +iso885914Mapping + "self generateByteToUnicodeSpec: 'http://unicode.org/Public/MAPPINGS/ISO8859/8859-14.TXT'" + + ^ #( + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + 16r00A0 16r1E02 16r1E03 16r00A3 16r010A 16r010B 16r1E0A 16r00A7 + 16r1E80 16r00A9 16r1E82 16r1E0B 16r1EF2 16r00AD 16r00AE 16r0178 + 16r1E1E 16r1E1F 16r0120 16r0121 16r1E40 16r1E41 16r00B6 16r1E56 + 16r1E81 16r1E57 16r1E83 16r1E60 16r1EF3 16r1E84 16r1E85 16r1E61 + 16r00C0 16r00C1 16r00C2 16r00C3 16r00C4 16r00C5 16r00C6 16r00C7 + 16r00C8 16r00C9 16r00CA 16r00CB 16r00CC 16r00CD 16r00CE 16r00CF + 16r0174 16r00D1 16r00D2 16r00D3 16r00D4 16r00D5 16r00D6 16r1E6A + 16r00D8 16r00D9 16r00DA 16r00DB 16r00DC 16r00DD 16r0176 16r00DF + 16r00E0 16r00E1 16r00E2 16r00E3 16r00E4 16r00E5 16r00E6 16r00E7 + 16r00E8 16r00E9 16r00EA 16r00EB 16r00EC 16r00ED 16r00EE 16r00EF + 16r0175 16r00F1 16r00F2 16r00F3 16r00F4 16r00F5 16r00F6 16r1E6B + 16r00F8 16r00F9 16r00FA 16r00FB 16r00FC 16r00FD 16r0177 16r00FF ) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/iso885915Mapping.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/iso885915Mapping.st index 65f2a3d50..83664a98b 100644 --- a/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/iso885915Mapping.st +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/iso885915Mapping.st @@ -3,19 +3,19 @@ iso885915Mapping "self generateByteToUnicodeSpec: 'http://unicode.org/Public/MAPPINGS/ISO8859/8859-15.TXT'" ^ #( - nil nil nil nil nil nil nil nil - nil nil nil nil nil nil nil nil - nil nil nil nil nil nil nil nil - nil nil nil nil nil nil nil nil - 16r00A0 16r00A1 16r00A2 16r00A3 16r20AC 16r00A5 16r0160 16r00A7 - 16r0161 16r00A9 16r00AA 16r00AB 16r00AC 16r00AD 16r00AE 16r00AF - 16r00B0 16r00B1 16r00B2 16r00B3 16r017D 16r00B5 16r00B6 16r00B7 - 16r017E 16r00B9 16r00BA 16r00BB 16r0152 16r0153 16r0178 16r00BF - 16r00C0 16r00C1 16r00C2 16r00C3 16r00C4 16r00C5 16r00C6 16r00C7 - 16r00C8 16r00C9 16r00CA 16r00CB 16r00CC 16r00CD 16r00CE 16r00CF - 16r00D0 16r00D1 16r00D2 16r00D3 16r00D4 16r00D5 16r00D6 16r00D7 - 16r00D8 16r00D9 16r00DA 16r00DB 16r00DC 16r00DD 16r00DE 16r00DF - 16r00E0 16r00E1 16r00E2 16r00E3 16r00E4 16r00E5 16r00E6 16r00E7 - 16r00E8 16r00E9 16r00EA 16r00EB 16r00EC 16r00ED 16r00EE 16r00EF - 16r00F0 16r00F1 16r00F2 16r00F3 16r00F4 16r00F5 16r00F6 16r00F7 + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + 16r00A0 16r00A1 16r00A2 16r00A3 16r20AC 16r00A5 16r0160 16r00A7 + 16r0161 16r00A9 16r00AA 16r00AB 16r00AC 16r00AD 16r00AE 16r00AF + 16r00B0 16r00B1 16r00B2 16r00B3 16r017D 16r00B5 16r00B6 16r00B7 + 16r017E 16r00B9 16r00BA 16r00BB 16r0152 16r0153 16r0178 16r00BF + 16r00C0 16r00C1 16r00C2 16r00C3 16r00C4 16r00C5 16r00C6 16r00C7 + 16r00C8 16r00C9 16r00CA 16r00CB 16r00CC 16r00CD 16r00CE 16r00CF + 16r00D0 16r00D1 16r00D2 16r00D3 16r00D4 16r00D5 16r00D6 16r00D7 + 16r00D8 16r00D9 16r00DA 16r00DB 16r00DC 16r00DD 16r00DE 16r00DF + 16r00E0 16r00E1 16r00E2 16r00E3 16r00E4 16r00E5 16r00E6 16r00E7 + 16r00E8 16r00E9 16r00EA 16r00EB 16r00EC 16r00ED 16r00EE 16r00EF + 16r00F0 16r00F1 16r00F2 16r00F3 16r00F4 16r00F5 16r00F6 16r00F7 16r00F8 16r00F9 16r00FA 16r00FB 16r00FC 16r00FD 16r00FE 16r00FF ) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/iso885916Mapping.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/iso885916Mapping.st new file mode 100644 index 000000000..7214ef6af --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/iso885916Mapping.st @@ -0,0 +1,21 @@ +mappings +iso885916Mapping + "self generateByteToUnicodeSpec: 'http://unicode.org/Public/MAPPINGS/ISO8859/8859-16.TXT'" + + ^ #( + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + 16r00A0 16r0104 16r0105 16r0141 16r20AC 16r201E 16r0160 16r00A7 + 16r0161 16r00A9 16r0218 16r00AB 16r0179 16r00AD 16r017A 16r017B + 16r00B0 16r00B1 16r010C 16r0142 16r017D 16r201D 16r00B6 16r00B7 + 16r017E 16r010D 16r0219 16r00BB 16r0152 16r0153 16r0178 16r017C + 16r00C0 16r00C1 16r00C2 16r0102 16r00C4 16r0106 16r00C6 16r00C7 + 16r00C8 16r00C9 16r00CA 16r00CB 16r00CC 16r00CD 16r00CE 16r00CF + 16r0110 16r0143 16r00D2 16r00D3 16r00D4 16r0150 16r00D6 16r015A + 16r0170 16r00D9 16r00DA 16r00DB 16r00DC 16r0118 16r021A 16r00DF + 16r00E0 16r00E1 16r00E2 16r0103 16r00E4 16r0107 16r00E6 16r00E7 + 16r00E8 16r00E9 16r00EA 16r00EB 16r00EC 16r00ED 16r00EE 16r00EF + 16r0111 16r0144 16r00F2 16r00F3 16r00F4 16r0151 16r00F6 16r015B + 16r0171 16r00F9 16r00FA 16r00FB 16r00FC 16r0119 16r021B 16r00FF ) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/iso88591Mapping.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/iso88591Mapping.st deleted file mode 100644 index 702842600..000000000 --- a/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/iso88591Mapping.st +++ /dev/null @@ -1,21 +0,0 @@ -mappings -iso88591Mapping - "self generateByteToUnicodeSpec: 'http://unicode.org/Public/MAPPINGS/ISO8859/8859-1.TXT'" - - ^ #( - nil nil nil nil nil nil nil nil - nil nil nil nil nil nil nil nil - nil nil nil nil nil nil nil nil - nil nil nil nil nil nil nil nil - 16r00A0 16r00A1 16r00A2 16r00A3 16r00A4 16r00A5 16r00A6 16r00A7 - 16r00A8 16r00A9 16r00AA 16r00AB 16r00AC 16r00AD 16r00AE 16r00AF - 16r00B0 16r00B1 16r00B2 16r00B3 16r00B4 16r00B5 16r00B6 16r00B7 - 16r00B8 16r00B9 16r00BA 16r00BB 16r00BC 16r00BD 16r00BE 16r00BF - 16r00C0 16r00C1 16r00C2 16r00C3 16r00C4 16r00C5 16r00C6 16r00C7 - 16r00C8 16r00C9 16r00CA 16r00CB 16r00CC 16r00CD 16r00CE 16r00CF - 16r00D0 16r00D1 16r00D2 16r00D3 16r00D4 16r00D5 16r00D6 16r00D7 - 16r00D8 16r00D9 16r00DA 16r00DB 16r00DC 16r00DD 16r00DE 16r00DF - 16r00E0 16r00E1 16r00E2 16r00E3 16r00E4 16r00E5 16r00E6 16r00E7 - 16r00E8 16r00E9 16r00EA 16r00EB 16r00EC 16r00ED 16r00EE 16r00EF - 16r00F0 16r00F1 16r00F2 16r00F3 16r00F4 16r00F5 16r00F6 16r00F7 - 16r00F8 16r00F9 16r00FA 16r00FB 16r00FC 16r00FD 16r00FE 16r00FF ) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/iso88592Mapping.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/iso88592Mapping.st index 0f92e0f95..25edd743b 100644 --- a/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/iso88592Mapping.st +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/iso88592Mapping.st @@ -3,19 +3,19 @@ iso88592Mapping "self generateByteToUnicodeSpec: 'http://unicode.org/Public/MAPPINGS/ISO8859/8859-2.TXT'" ^ #( - nil nil nil nil nil nil nil nil - nil nil nil nil nil nil nil nil - nil nil nil nil nil nil nil nil - nil nil nil nil nil nil nil nil - 16r00A0 16r0104 16r02D8 16r0141 16r00A4 16r013D 16r015A 16r00A7 - 16r00A8 16r0160 16r015E 16r0164 16r0179 16r00AD 16r017D 16r017B - 16r00B0 16r0105 16r02DB 16r0142 16r00B4 16r013E 16r015B 16r02C7 - 16r00B8 16r0161 16r015F 16r0165 16r017A 16r02DD 16r017E 16r017C - 16r0154 16r00C1 16r00C2 16r0102 16r00C4 16r0139 16r0106 16r00C7 - 16r010C 16r00C9 16r0118 16r00CB 16r011A 16r00CD 16r00CE 16r010E - 16r0110 16r0143 16r0147 16r00D3 16r00D4 16r0150 16r00D6 16r00D7 - 16r0158 16r016E 16r00DA 16r0170 16r00DC 16r00DD 16r0162 16r00DF - 16r0155 16r00E1 16r00E2 16r0103 16r00E4 16r013A 16r0107 16r00E7 - 16r010D 16r00E9 16r0119 16r00EB 16r011B 16r00ED 16r00EE 16r010F - 16r0111 16r0144 16r0148 16r00F3 16r00F4 16r0151 16r00F6 16r00F7 + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + 16r00A0 16r0104 16r02D8 16r0141 16r00A4 16r013D 16r015A 16r00A7 + 16r00A8 16r0160 16r015E 16r0164 16r0179 16r00AD 16r017D 16r017B + 16r00B0 16r0105 16r02DB 16r0142 16r00B4 16r013E 16r015B 16r02C7 + 16r00B8 16r0161 16r015F 16r0165 16r017A 16r02DD 16r017E 16r017C + 16r0154 16r00C1 16r00C2 16r0102 16r00C4 16r0139 16r0106 16r00C7 + 16r010C 16r00C9 16r0118 16r00CB 16r011A 16r00CD 16r00CE 16r010E + 16r0110 16r0143 16r0147 16r00D3 16r00D4 16r0150 16r00D6 16r00D7 + 16r0158 16r016E 16r00DA 16r0170 16r00DC 16r00DD 16r0162 16r00DF + 16r0155 16r00E1 16r00E2 16r0103 16r00E4 16r013A 16r0107 16r00E7 + 16r010D 16r00E9 16r0119 16r00EB 16r011B 16r00ED 16r00EE 16r010F + 16r0111 16r0144 16r0148 16r00F3 16r00F4 16r0151 16r00F6 16r00F7 16r0159 16r016F 16r00FA 16r0171 16r00FC 16r00FD 16r0163 16r02D9 ) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/iso88593Mapping.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/iso88593Mapping.st new file mode 100644 index 000000000..074d3b189 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/iso88593Mapping.st @@ -0,0 +1,21 @@ +mappings +iso88593Mapping + "self generateByteToUnicodeSpec: 'http://unicode.org/Public/MAPPINGS/ISO8859/8859-3.TXT'" + + ^ #( + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + 16r00A0 16r0126 16r02D8 16r00A3 16r00A4 nil 16r0124 16r00A7 + 16r00A8 16r0130 16r015E 16r011E 16r0134 16r00AD nil 16r017B + 16r00B0 16r0127 16r00B2 16r00B3 16r00B4 16r00B5 16r0125 16r00B7 + 16r00B8 16r0131 16r015F 16r011F 16r0135 16r00BD nil 16r017C + 16r00C0 16r00C1 16r00C2 nil 16r00C4 16r010A 16r0108 16r00C7 + 16r00C8 16r00C9 16r00CA 16r00CB 16r00CC 16r00CD 16r00CE 16r00CF + nil 16r00D1 16r00D2 16r00D3 16r00D4 16r0120 16r00D6 16r00D7 + 16r011C 16r00D9 16r00DA 16r00DB 16r00DC 16r016C 16r015C 16r00DF + 16r00E0 16r00E1 16r00E2 nil 16r00E4 16r010B 16r0109 16r00E7 + 16r00E8 16r00E9 16r00EA 16r00EB 16r00EC 16r00ED 16r00EE 16r00EF + nil 16r00F1 16r00F2 16r00F3 16r00F4 16r0121 16r00F6 16r00F7 + 16r011D 16r00F9 16r00FA 16r00FB 16r00FC 16r016D 16r015D 16r02D9 ) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/iso88594Mapping.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/iso88594Mapping.st new file mode 100644 index 000000000..79773dd63 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/iso88594Mapping.st @@ -0,0 +1,21 @@ +mappings +iso88594Mapping + "self generateByteToUnicodeSpec: 'http://unicode.org/Public/MAPPINGS/ISO8859/8859-4.TXT'" + + ^ #( + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + 16r00A0 16r0104 16r0138 16r0156 16r00A4 16r0128 16r013B 16r00A7 + 16r00A8 16r0160 16r0112 16r0122 16r0166 16r00AD 16r017D 16r00AF + 16r00B0 16r0105 16r02DB 16r0157 16r00B4 16r0129 16r013C 16r02C7 + 16r00B8 16r0161 16r0113 16r0123 16r0167 16r014A 16r017E 16r014B + 16r0100 16r00C1 16r00C2 16r00C3 16r00C4 16r00C5 16r00C6 16r012E + 16r010C 16r00C9 16r0118 16r00CB 16r0116 16r00CD 16r00CE 16r012A + 16r0110 16r0145 16r014C 16r0136 16r00D4 16r00D5 16r00D6 16r00D7 + 16r00D8 16r0172 16r00DA 16r00DB 16r00DC 16r0168 16r016A 16r00DF + 16r0101 16r00E1 16r00E2 16r00E3 16r00E4 16r00E5 16r00E6 16r012F + 16r010D 16r00E9 16r0119 16r00EB 16r0117 16r00ED 16r00EE 16r012B + 16r0111 16r0146 16r014D 16r0137 16r00F4 16r00F5 16r00F6 16r00F7 + 16r00F8 16r0173 16r00FA 16r00FB 16r00FC 16r0169 16r016B 16r02D9 ) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/iso88595Mapping.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/iso88595Mapping.st new file mode 100644 index 000000000..14d98c15c --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/iso88595Mapping.st @@ -0,0 +1,21 @@ +mappings +iso88595Mapping + "self generateByteToUnicodeSpec: 'http://unicode.org/Public/MAPPINGS/ISO8859/8859-5.TXT'" + + ^ #( + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + 16r00A0 16r0401 16r0402 16r0403 16r0404 16r0405 16r0406 16r0407 + 16r0408 16r0409 16r040A 16r040B 16r040C 16r00AD 16r040E 16r040F + 16r0410 16r0411 16r0412 16r0413 16r0414 16r0415 16r0416 16r0417 + 16r0418 16r0419 16r041A 16r041B 16r041C 16r041D 16r041E 16r041F + 16r0420 16r0421 16r0422 16r0423 16r0424 16r0425 16r0426 16r0427 + 16r0428 16r0429 16r042A 16r042B 16r042C 16r042D 16r042E 16r042F + 16r0430 16r0431 16r0432 16r0433 16r0434 16r0435 16r0436 16r0437 + 16r0438 16r0439 16r043A 16r043B 16r043C 16r043D 16r043E 16r043F + 16r0440 16r0441 16r0442 16r0443 16r0444 16r0445 16r0446 16r0447 + 16r0448 16r0449 16r044A 16r044B 16r044C 16r044D 16r044E 16r044F + 16r2116 16r0451 16r0452 16r0453 16r0454 16r0455 16r0456 16r0457 + 16r0458 16r0459 16r045A 16r045B 16r045C 16r00A7 16r045E 16r045F ) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/iso88596Mapping.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/iso88596Mapping.st new file mode 100644 index 000000000..88f033ff5 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/iso88596Mapping.st @@ -0,0 +1,21 @@ +mappings +iso88596Mapping + "self generateByteToUnicodeSpec: 'http://unicode.org/Public/MAPPINGS/ISO8859/8859-6.TXT'" + + ^ #( + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + 16r00A0 nil nil nil 16r00A4 nil nil nil + nil nil nil nil 16r060C 16r00AD nil nil + nil nil nil nil nil nil nil nil + nil nil nil 16r061B nil nil nil 16r061F + nil 16r0621 16r0622 16r0623 16r0624 16r0625 16r0626 16r0627 + 16r0628 16r0629 16r062A 16r062B 16r062C 16r062D 16r062E 16r062F + 16r0630 16r0631 16r0632 16r0633 16r0634 16r0635 16r0636 16r0637 + 16r0638 16r0639 16r063A nil nil nil nil nil + 16r0640 16r0641 16r0642 16r0643 16r0644 16r0645 16r0646 16r0647 + 16r0648 16r0649 16r064A 16r064B 16r064C 16r064D 16r064E 16r064F + 16r0650 16r0651 16r0652 nil nil nil nil nil + nil nil nil nil nil nil nil nil ) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/iso88597Mapping.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/iso88597Mapping.st index 2d910cc2c..bfb028ace 100644 --- a/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/iso88597Mapping.st +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/iso88597Mapping.st @@ -3,19 +3,19 @@ iso88597Mapping "self generateByteToUnicodeSpec: 'http://unicode.org/Public/MAPPINGS/ISO8859/8859-7.TXT'" ^ #( - nil nil nil nil nil nil nil nil - nil nil nil nil nil nil nil nil - nil nil nil nil nil nil nil nil - nil nil nil nil nil nil nil nil - 16r00A0 16r2018 16r2019 16r00A3 16r20AC 16r20AF 16r00A6 16r00A7 - 16r00A8 16r00A9 16r037A 16r00AB 16r00AC 16r00AD nil 16r2015 - 16r00B0 16r00B1 16r00B2 16r00B3 16r0384 16r0385 16r0386 16r00B7 - 16r0388 16r0389 16r038A 16r00BB 16r038C 16r00BD 16r038E 16r038F - 16r0390 16r0391 16r0392 16r0393 16r0394 16r0395 16r0396 16r0397 - 16r0398 16r0399 16r039A 16r039B 16r039C 16r039D 16r039E 16r039F - 16r03A0 16r03A1 nil 16r03A3 16r03A4 16r03A5 16r03A6 16r03A7 - 16r03A8 16r03A9 16r03AA 16r03AB 16r03AC 16r03AD 16r03AE 16r03AF - 16r03B0 16r03B1 16r03B2 16r03B3 16r03B4 16r03B5 16r03B6 16r03B7 - 16r03B8 16r03B9 16r03BA 16r03BB 16r03BC 16r03BD 16r03BE 16r03BF - 16r03C0 16r03C1 16r03C2 16r03C3 16r03C4 16r03C5 16r03C6 16r03C7 + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + 16r00A0 16r2018 16r2019 16r00A3 16r20AC 16r20AF 16r00A6 16r00A7 + 16r00A8 16r00A9 16r037A 16r00AB 16r00AC 16r00AD nil 16r2015 + 16r00B0 16r00B1 16r00B2 16r00B3 16r0384 16r0385 16r0386 16r00B7 + 16r0388 16r0389 16r038A 16r00BB 16r038C 16r00BD 16r038E 16r038F + 16r0390 16r0391 16r0392 16r0393 16r0394 16r0395 16r0396 16r0397 + 16r0398 16r0399 16r039A 16r039B 16r039C 16r039D 16r039E 16r039F + 16r03A0 16r03A1 nil 16r03A3 16r03A4 16r03A5 16r03A6 16r03A7 + 16r03A8 16r03A9 16r03AA 16r03AB 16r03AC 16r03AD 16r03AE 16r03AF + 16r03B0 16r03B1 16r03B2 16r03B3 16r03B4 16r03B5 16r03B6 16r03B7 + 16r03B8 16r03B9 16r03BA 16r03BB 16r03BC 16r03BD 16r03BE 16r03BF + 16r03C0 16r03C1 16r03C2 16r03C3 16r03C4 16r03C5 16r03C6 16r03C7 16r03C8 16r03C9 16r03CA 16r03CB 16r03CC 16r03CD 16r03CE nil ) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/iso88598Mapping.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/iso88598Mapping.st new file mode 100644 index 000000000..8ff25afcf --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/iso88598Mapping.st @@ -0,0 +1,21 @@ +mappings +iso88598Mapping + "self generateByteToUnicodeSpec: 'http://unicode.org/Public/MAPPINGS/ISO8859/8859-8.TXT'" + + ^ #( + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + 16r00A0 nil 16r00A2 16r00A3 16r00A4 16r00A5 16r00A6 16r00A7 + 16r00A8 16r00A9 16r00D7 16r00AB 16r00AC 16r00AD 16r00AE 16r00AF + 16r00B0 16r00B1 16r00B2 16r00B3 16r00B4 16r00B5 16r00B6 16r00B7 + 16r00B8 16r00B9 16r00F7 16r00BB 16r00BC 16r00BD 16r00BE nil + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil 16r2017 + 16r05D0 16r05D1 16r05D2 16r05D3 16r05D4 16r05D5 16r05D6 16r05D7 + 16r05D8 16r05D9 16r05DA 16r05DB 16r05DC 16r05DD 16r05DE 16r05DF + 16r05E0 16r05E1 16r05E2 16r05E3 16r05E4 16r05E5 16r05E6 16r05E7 + 16r05E8 16r05E9 16r05EA nil nil 16r200E 16r200F nil ) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/koi8rMapping.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/koi8rMapping.st index b3ec828b6..731276915 100644 --- a/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/koi8rMapping.st +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/koi8rMapping.st @@ -3,19 +3,19 @@ koi8rMapping "self generateByteToUnicodeSpec: 'http://unicode.org/Public/MAPPINGS/VENDORS/MISC/KOI8-R.TXT'" ^ #( - 16r2500 16r2502 16r250C 16r2510 16r2514 16r2518 16r251C 16r2524 - 16r252C 16r2534 16r253C 16r2580 16r2584 16r2588 16r258C 16r2590 - 16r2591 16r2592 16r2593 16r2320 16r25A0 16r2219 16r221A 16r2248 - 16r2264 16r2265 16r00A0 16r2321 16r00B0 16r00B2 16r00B7 16r00F7 - 16r2550 16r2551 16r2552 16r0451 16r2553 16r2554 16r2555 16r2556 - 16r2557 16r2558 16r2559 16r255A 16r255B 16r255C 16r255D 16r255E - 16r255F 16r2560 16r2561 16r0401 16r2562 16r2563 16r2564 16r2565 - 16r2566 16r2567 16r2568 16r2569 16r256A 16r256B 16r256C 16r00A9 - 16r044E 16r0430 16r0431 16r0446 16r0434 16r0435 16r0444 16r0433 - 16r0445 16r0438 16r0439 16r043A 16r043B 16r043C 16r043D 16r043E - 16r043F 16r044F 16r0440 16r0441 16r0442 16r0443 16r0436 16r0432 - 16r044C 16r044B 16r0437 16r0448 16r044D 16r0449 16r0447 16r044A - 16r042E 16r0410 16r0411 16r0426 16r0414 16r0415 16r0424 16r0413 - 16r0425 16r0418 16r0419 16r041A 16r041B 16r041C 16r041D 16r041E - 16r041F 16r042F 16r0420 16r0421 16r0422 16r0423 16r0416 16r0412 + 16r2500 16r2502 16r250C 16r2510 16r2514 16r2518 16r251C 16r2524 + 16r252C 16r2534 16r253C 16r2580 16r2584 16r2588 16r258C 16r2590 + 16r2591 16r2592 16r2593 16r2320 16r25A0 16r2219 16r221A 16r2248 + 16r2264 16r2265 16r00A0 16r2321 16r00B0 16r00B2 16r00B7 16r00F7 + 16r2550 16r2551 16r2552 16r0451 16r2553 16r2554 16r2555 16r2556 + 16r2557 16r2558 16r2559 16r255A 16r255B 16r255C 16r255D 16r255E + 16r255F 16r2560 16r2561 16r0401 16r2562 16r2563 16r2564 16r2565 + 16r2566 16r2567 16r2568 16r2569 16r256A 16r256B 16r256C 16r00A9 + 16r044E 16r0430 16r0431 16r0446 16r0434 16r0435 16r0444 16r0433 + 16r0445 16r0438 16r0439 16r043A 16r043B 16r043C 16r043D 16r043E + 16r043F 16r044F 16r0440 16r0441 16r0442 16r0443 16r0436 16r0432 + 16r044C 16r044B 16r0437 16r0448 16r044D 16r0449 16r0447 16r044A + 16r042E 16r0410 16r0411 16r0426 16r0414 16r0415 16r0424 16r0413 + 16r0425 16r0418 16r0419 16r041A 16r041B 16r041C 16r041D 16r041E + 16r041F 16r042F 16r0420 16r0421 16r0422 16r0423 16r0416 16r0412 16r042C 16r042B 16r0417 16r0428 16r042D 16r0429 16r0427 16r042A ) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/koi8uMapping.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/koi8uMapping.st new file mode 100644 index 000000000..6010eb520 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/koi8uMapping.st @@ -0,0 +1,21 @@ +mappings +koi8uMapping + "self generateByteToUnicodeSpec: 'http://unicode.org/Public/MAPPINGS/VENDORS/MISC/KOI8-U.TXT'" + + ^ #( + 16r2500 16r2502 16r250C 16r2510 16r2514 16r2518 16r251C 16r2524 + 16r252C 16r2534 16r253C 16r2580 16r2584 16r2588 16r258C 16r2590 + 16r2591 16r2592 16r2593 16r2320 16r25A0 16r2219 16r221A 16r2248 + 16r2264 16r2265 16r00A0 16r2321 16r00B0 16r00B2 16r00B7 16r00F7 + 16r2550 16r2551 16r2552 16r0451 16r0454 16r2554 16r0456 16r0457 + 16r2557 16r2558 16r2559 16r255A 16r255B 16r0491 16r255D 16r255E + 16r255F 16r2560 16r2561 16r0401 16r0404 16r2563 16r0406 16r0407 + 16r2566 16r2567 16r2568 16r2569 16r256A 16r0490 16r256C 16r00A9 + 16r044E 16r0430 16r0431 16r0446 16r0434 16r0435 16r0444 16r0433 + 16r0445 16r0438 16r0439 16r043A 16r043B 16r043C 16r043D 16r043E + 16r043F 16r044F 16r0440 16r0441 16r0442 16r0443 16r0436 16r0432 + 16r044C 16r044B 16r0437 16r0448 16r044D 16r0449 16r0447 16r044A + 16r042E 16r0410 16r0411 16r0426 16r0414 16r0415 16r0424 16r0413 + 16r0425 16r0418 16r0419 16r041A 16r041B 16r041C 16r041D 16r041E + 16r041F 16r042F 16r0420 16r0421 16r0422 16r0423 16r0416 16r0412 + 16r042C 16r042B 16r0417 16r0428 16r042D 16r0429 16r0427 16r042A ) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/macCyrillicMapping.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/macCyrillicMapping.st new file mode 100644 index 000000000..8e304ed93 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/macCyrillicMapping.st @@ -0,0 +1,21 @@ +mappings +macCyrillicMapping + "self generateByteToUnicodeSpec: 'http://unicode.org/Public/MAPPINGS/VENDORS/APPLE/CYRILLIC.TXT'" + + ^ #( + 16r0410 16r0411 16r0412 16r0413 16r0414 16r0415 16r0416 16r0417 + 16r0418 16r0419 16r041A 16r041B 16r041C 16r041D 16r041E 16r041F + 16r0420 16r0421 16r0422 16r0423 16r0424 16r0425 16r0426 16r0427 + 16r0428 16r0429 16r042A 16r042B 16r042C 16r042D 16r042E 16r042F + 16r2020 16r00B0 16r0490 16r00A3 16r00A7 16r2022 16r00B6 16r0406 + 16r00AE 16r00A9 16r2122 16r0402 16r0452 16r2260 16r0403 16r0453 + 16r221E 16r00B1 16r2264 16r2265 16r0456 16r00B5 16r0491 16r0408 + 16r0404 16r0454 16r0407 16r0457 16r0409 16r0459 16r040A 16r045A + 16r0458 16r0405 16r00AC 16r221A 16r0192 16r2248 16r2206 16r00AB + 16r00BB 16r2026 16r00A0 16r040B 16r045B 16r040C 16r045C 16r0455 + 16r2013 16r2014 16r201C 16r201D 16r2018 16r2019 16r00F7 16r201E + 16r040E 16r045E 16r040F 16r045F 16r2116 16r0401 16r0451 16r044F + 16r0430 16r0431 16r0432 16r0433 16r0434 16r0435 16r0436 16r0437 + 16r0438 16r0439 16r043A 16r043B 16r043C 16r043D 16r043E 16r043F + 16r0440 16r0441 16r0442 16r0443 16r0444 16r0445 16r0446 16r0447 + 16r0448 16r0449 16r044A 16r044B 16r044C 16r044D 16r044E 16r20AC ) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/macRomanMapping.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/macRomanMapping.st index c09f69f77..83c8a8035 100644 --- a/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/macRomanMapping.st +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/macRomanMapping.st @@ -3,19 +3,19 @@ macRomanMapping "self generateByteToUnicodeSpec: 'http://unicode.org/Public/MAPPINGS/VENDORS/APPLE/ROMAN.TXT'" ^ #( - 16r00C4 16r00C5 16r00C7 16r00C9 16r00D1 16r00D6 16r00DC 16r00E1 - 16r00E0 16r00E2 16r00E4 16r00E3 16r00E5 16r00E7 16r00E9 16r00E8 - 16r00EA 16r00EB 16r00ED 16r00EC 16r00EE 16r00EF 16r00F1 16r00F3 - 16r00F2 16r00F4 16r00F6 16r00F5 16r00FA 16r00F9 16r00FB 16r00FC - 16r2020 16r00B0 16r00A2 16r00A3 16r00A7 16r2022 16r00B6 16r00DF - 16r00AE 16r00A9 16r2122 16r00B4 16r00A8 16r2260 16r00C6 16r00D8 - 16r221E 16r00B1 16r2264 16r2265 16r00A5 16r00B5 16r2202 16r2211 - 16r220F 16r03C0 16r222B 16r00AA 16r00BA 16r03A9 16r00E6 16r00F8 - 16r00BF 16r00A1 16r00AC 16r221A 16r0192 16r2248 16r2206 16r00AB - 16r00BB 16r2026 16r00A0 16r00C0 16r00C3 16r00D5 16r0152 16r0153 - 16r2013 16r2014 16r201C 16r201D 16r2018 16r2019 16r00F7 16r25CA - 16r00FF 16r0178 16r2044 16r20AC 16r2039 16r203A 16rFB01 16rFB02 - 16r2021 16r00B7 16r201A 16r201E 16r2030 16r00C2 16r00CA 16r00C1 - 16r00CB 16r00C8 16r00CD 16r00CE 16r00CF 16r00CC 16r00D3 16r00D4 - 16rF8FF 16r00D2 16r00DA 16r00DB 16r00D9 16r0131 16r02C6 16r02DC + 16r00C4 16r00C5 16r00C7 16r00C9 16r00D1 16r00D6 16r00DC 16r00E1 + 16r00E0 16r00E2 16r00E4 16r00E3 16r00E5 16r00E7 16r00E9 16r00E8 + 16r00EA 16r00EB 16r00ED 16r00EC 16r00EE 16r00EF 16r00F1 16r00F3 + 16r00F2 16r00F4 16r00F6 16r00F5 16r00FA 16r00F9 16r00FB 16r00FC + 16r2020 16r00B0 16r00A2 16r00A3 16r00A7 16r2022 16r00B6 16r00DF + 16r00AE 16r00A9 16r2122 16r00B4 16r00A8 16r2260 16r00C6 16r00D8 + 16r221E 16r00B1 16r2264 16r2265 16r00A5 16r00B5 16r2202 16r2211 + 16r220F 16r03C0 16r222B 16r00AA 16r00BA 16r03A9 16r00E6 16r00F8 + 16r00BF 16r00A1 16r00AC 16r221A 16r0192 16r2248 16r2206 16r00AB + 16r00BB 16r2026 16r00A0 16r00C0 16r00C3 16r00D5 16r0152 16r0153 + 16r2013 16r2014 16r201C 16r201D 16r2018 16r2019 16r00F7 16r25CA + 16r00FF 16r0178 16r2044 16r20AC 16r2039 16r203A 16rFB01 16rFB02 + 16r2021 16r00B7 16r201A 16r201E 16r2030 16r00C2 16r00CA 16r00C1 + 16r00CB 16r00C8 16r00CD 16r00CE 16r00CF 16r00CC 16r00D3 16r00D4 + 16rF8FF 16r00D2 16r00DA 16r00DB 16r00D9 16r0131 16r02C6 16r02DC 16r00AF 16r02D8 16r02D9 16r02DA 16r00B8 16r02DD 16r02DB 16r02C7 ) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/mappingToIdentifiers.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/mappingToIdentifiers.st index aa746795d..0d59582f8 100644 --- a/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/mappingToIdentifiers.st +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/mappingToIdentifiers.st @@ -1,14 +1,35 @@ mappings mappingToIdentifiers "Return a dictionay mapping from encoding specifications to a list of encoding names." - + ^ Dictionary newFromPairs: #( - #cp1250Mapping #('cp-1250') - #cp1252Mapping #('cp-1252') - #cp1253Mapping #('cp1253') - #iso885915Mapping #('iso-8859-15') - #iso88591Mapping #('iso-8859-1' 'latin1' 'latin-1') - #iso88592Mapping #('iso-8859-2' 'latin2' 'latin-2') - #iso88597Mapping #('iso-8859-7') - #koi8rMapping #('iso-8859-15') - #macRomanMapping #('mac-roman' 'macintosh') ) \ No newline at end of file + "#asciiMapping #('ascii')" + "#iso88591Mapping #('iso88591' 'latin1')" + #iso88592Mapping #('iso88592' 'latin2') + #iso88593Mapping #('iso88593' 'latin3') + #iso88594Mapping #('iso88594' 'latin4') + #iso88595Mapping #('iso88595' 'cyrillic') + #iso88596Mapping #('iso88596' 'arabic') + #iso88597Mapping #('iso88597' 'greek') + #iso88598Mapping #('iso88598' 'hebrew') + #iso885910Mapping #('iso885910' 'latin6') + #iso885913Mapping #('iso885913') + #iso885914Mapping #('iso885914') + #iso885915Mapping #('iso885915') + #iso885916Mapping #('iso885916') + #cp1250Mapping #('cp1250' 'windows1250' 'xcp1250') + #cp1251Mapping #('cp1251' 'windows1251' 'xcp1251') + #cp1252Mapping #('cp1252' 'windows1252' 'xcp1252' 'ibm819') + #cp1253Mapping #('cp1253' 'windows1253' 'xcp1253') + #cp1254Mapping #('cp1254' 'windows1254' 'xcp1254' 'iso88599' 'latin5') + #cp1255Mapping #('cp1255' 'windows1255' 'xcp1255') + #cp1256Mapping #('cp1256' 'windows1256' 'xcp1256') + #cp1257Mapping #('cp1257' 'windows1257' 'xcp1257') + #cp1258Mapping #('cp1258' 'windows1258' 'xcp1258') + #cp850Mapping #('cp850' 'ibm850' 'oem850' 'doslatin1') + #cp866Mapping #('cp866' 'ibm866') + #cp874Mapping #('cp874' 'iso885911' 'windows874' 'dos874') + #koi8rMapping #('koi8r' 'koi8') + #koi8uMapping #('koi8u') + #macRomanMapping #('macroman' 'xmacroman' 'mac' 'macintosh') + #macCyrillicMapping #('maccyrillic' 'xmaccyrillic') ) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/newForEncoding..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/newForEncoding..st deleted file mode 100644 index e2011125a..000000000 --- a/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/newForEncoding..st +++ /dev/null @@ -1,12 +0,0 @@ -instance creation -newForEncoding: string - "Return a new character encoder object for an encoding described by string. - We use our precomputed ByteTextConverters tables." - - | tables | - tables := ByteTextConverters at: string asLowercase. - ^ self new - identifier: string; - byteToUnicode: tables first; - unicodeToByte: tables second; - yourself \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/newForEncoding.stringClass..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/newForEncoding.stringClass..st deleted file mode 100644 index 7f5b3245d..000000000 --- a/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/newForEncoding.stringClass..st +++ /dev/null @@ -1,6 +0,0 @@ -*zinc-character-encoding-core -newForEncoding: string stringClass: ignored - "Return a new character encoder object for an encoding described by string. - We use our precomputed ByteTextConverters tables." - - ^ self newForEncoding: string \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/newFromUrl..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/newFromUrl..st new file mode 100644 index 000000000..de26cf274 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/newFromUrl..st @@ -0,0 +1,15 @@ +instance creation +newFromUrl: url + "Instanciate a new encoder directly from a Unicode.org url" + "self newFromUrl: 'http://unicode.org/Public/MAPPINGS/ISO8859/8859-2.TXT'" + "self newFromUrl: 'http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/PC/CP437.TXT'" + + | mapping spec tables | + mapping := self parseUnicodeOrgSpec: url. + spec := self top128FromUnicodeSpec: mapping. + tables := self tablesFromSpec: spec. + ^ self new + identifier: url; + byteToUnicode: tables first; + unicodeToByte: tables second; + yourself \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/parseUnicodeOrgSpec..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/parseUnicodeOrgSpec..st index 38ef4d976..e2826ef2d 100644 --- a/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/parseUnicodeOrgSpec..st +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/parseUnicodeOrgSpec..st @@ -1,16 +1,17 @@ -accessing +utilties parseUnicodeOrgSpec: url "Parse and return a mapping from byte to unicode values from url." + "Basic syntax: lines starting with # are comments, else first two fields are read as 0x hex values" "self parseUnicodeOrgSpec: 'http://unicode.org/Public/MAPPINGS/ISO8859/8859-2.TXT'." - + | mapping | mapping := Dictionary new: 256. url asZnUrl retrieveContents linesDo: [ :each | (each isEmpty or: [ each beginsWith: '#' ]) ifFalse: [ | tokens hexReader | hexReader := [ :string | Integer readFrom: (string readStream skip: 2; yourself) base: 16 ]. - tokens := each findTokens: String tab. - (tokens last = '' or: [ tokens last = '#UNDEFINED' ]) ifFalse: [ + tokens := each findTokens: String tab. + (tokens size < 3 or: [ tokens last = '' or: [ tokens last = '#UNDEFINED' ] ]) ifFalse: [ mapping at: (hexReader value: tokens first) put: (hexReader value: tokens second) ] ] ]. diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/tablesFromSpec..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/tablesFromSpec..st deleted file mode 100644 index 6576722d4..000000000 --- a/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/tablesFromSpec..st +++ /dev/null @@ -1,15 +0,0 @@ -private -tablesFromSpec: mapping - "Initialize the mappings to and from Unicode based on the 128 element array mapping" - - | byteToUnicode unicodeToByte | - byteToUnicode := Array new: 128. - unicodeToByte := Dictionary new. - "Mind the offset because first 128 characters are not stored into byteToUnicodeSpec" - "Note that some entries are nil" - mapping - keysAndValuesDo: [ :index :unicode | - unicode ifNotNil: [ - byteToUnicode at: index put: (Character value: unicode). - unicodeToByte at: unicode put: 127 + index ] ]. - ^ Array with: byteToUnicode with: unicodeToByte \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/top128FromUnicodeSpec..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/top128FromUnicodeSpec..st new file mode 100644 index 000000000..928ca08f1 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/class/top128FromUnicodeSpec..st @@ -0,0 +1,7 @@ +utilties +top128FromUnicodeSpec: mapping + "Return an array mapping the top 128 byte to unicode values from a Unicode.org specification map" + + ^ Array new: 128 streamContents: [ :stream | + 128 to: 255 do: [ :each | + stream nextPut: (mapping at: each ifAbsent: [ nil ]) ] ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/instance/decodeBytesIntoQuadByteString..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/instance/decodeBytesIntoQuadByteString..st new file mode 100644 index 000000000..5971ab71d --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/instance/decodeBytesIntoQuadByteString..st @@ -0,0 +1,10 @@ +convenience +decodeBytesIntoQuadByteString: bytes + "Variant of #decodeBytes: that is faster when you know upfront + that a QuadByteString is probably needed" + + | byteStream | + byteStream := bytes readStream. + ^ QuadByteString streamContents: [ :stream | + [ byteStream atEnd ] whileFalse: [ + stream nextPut: (self nextFromStream: byteStream) ] ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/instance/decodeBytesIntoWideString..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/instance/decodeBytesIntoWideString..st new file mode 100644 index 000000000..20a1e0fbe --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/instance/decodeBytesIntoWideString..st @@ -0,0 +1,4 @@ +convenience +decodeBytesIntoWideString: bytes + + ^ self decodeBytesIntoQuadByteString: bytes \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/methodProperties.json b/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/methodProperties.json deleted file mode 100644 index cd4de49ff..000000000 --- a/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/methodProperties.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "class" : { - "cp1250Mapping" : "SvenVanCaekenberghe 12/15/2012 19:34", - "cp1252Mapping" : "SvenVanCaekenberghe 12/15/2012 19:39", - "cp1253Mapping" : "SvenVanCaekenberghe 12/15/2012 19:35", - "generateByteToUnicodeSpec:" : "SvenVanCaekenberghe 12/15/2012 20:02", - "handlesEncoding:" : "dkh 02/27/2023 10:22", - "initialize" : "SvenVanCaekenberghe 1/15/2013 17:03", - "initializeByteTextConverters" : "SvenVanCaekenberghe 1/15/2013 17:01", - "iso885915Mapping" : "SvenVanCaekenberghe 12/15/2012 19:37", - "iso88591Mapping" : "SvenVanCaekenberghe 12/15/2012 19:36", - "iso88592Mapping" : "SvenVanCaekenberghe 12/15/2012 19:36", - "iso88597Mapping" : "SvenVanCaekenberghe 12/15/2012 19:39", - "koi8rMapping" : "SvenVanCaekenberghe 12/15/2012 19:38", - "macRomanMapping" : "SvenVanCaekenberghe 12/15/2012 19:38", - "mappingToIdentifiers" : "SvenVanCaekenberghe 12/15/2012 21:38", - "newForEncoding:" : "dkh 02/27/2023 11:11", - "newForEncoding:stringClass:" : "dkh 02/27/2023 16:00", - "parseUnicodeOrgSpec:" : "SvenVanCaekenberghe 1/15/2013 14:54", - "tablesFromSpec:" : "SvenVanCaekenberghe 12/15/2012 21:31" }, - "instance" : { - "beLenient" : "SvenVanCaekenberghe 12/17/2012 15:40", - "byteToUnicode:" : "SvenVanCaekenberghe 1/25/2011 12:31", - "encodedByteCountFor:" : "SvenVanCaekenberghe 1/25/2011 12:19", - "identifier:" : "SvenVanCaekenberghe 12/15/2012 21:51", - "initialize" : "SvenVanCaekenberghe 12/17/2012 14:46", - "nextFromStream:" : "SvenVanCaekenberghe 12/17/2012 15:38", - "nextPut:toStream:" : "SvenVanCaekenberghe 12/17/2012 15:39", - "printOn:" : "SvenVanCaekenberghe 1/15/2013 16:58", - "readInto:startingAt:count:fromStream:" : "dkh 02/27/2023 16:10", - "unicodeToByte:" : "SvenVanCaekenberghe 1/25/2011 12:31" } } diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/properties.json b/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/properties.json index c260d7d46..682735a64 100644 --- a/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/properties.json +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteEncoder.class/properties.json @@ -1,17 +1,11 @@ { + "commentStamp" : "", + "super" : "ZnSimplifiedByteEncoder", "category" : "Zinc-Character-Encoding-Core", - "classinstvars" : [ - ], - "classvars" : [ - "ByteTextConverters" ], - "commentStamp" : "", - "instvars" : [ - "identifier", - "byteToUnicode", - "unicodeToByte", - "strict" ], + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], "name" : "ZnByteEncoder", - "pools" : [ - ], - "super" : "ZnCharacterEncoder", - "type" : "normal" } + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteStringBecameWideString.class/README.md b/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteStringBecameWideString.class/README.md index 928ecab02..138a777f5 100644 --- a/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteStringBecameWideString.class/README.md +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteStringBecameWideString.class/README.md @@ -1,5 +1,5 @@ I am ZnByteStringBecameWideString, a Notification signalled to indicate that some byteString was changed to a wideString. -Used by ZnUTF8Encoder>>#readInto:startingAt:count:fromStream: to avoid a #becomeForward: when a ByteString automagically changes into a WideString. +Used by ZnUTF8EncoderGS>>#readInto:startingAt:count:fromStream: to avoid a #becomeForward: when a ByteString automagically changes into a WideString. Part of Zinc HTTP Components. \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteStringBecameWideString.class/instance/becomeForward.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteStringBecameWideString.class/instance/becomeForward.st new file mode 100644 index 000000000..8130128b3 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteStringBecameWideString.class/instance/becomeForward.st @@ -0,0 +1,5 @@ +convenience +becomeForward + "Switch the identities of byteString and wideString using #becomeForward:" + + byteString becomeForward: wideString \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteStringBecameWideString.class/instance/isResumable.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteStringBecameWideString.class/instance/isResumable.st new file mode 100644 index 000000000..da51855cc --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteStringBecameWideString.class/instance/isResumable.st @@ -0,0 +1,3 @@ +private - testing +isResumable + ^ true \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteStringBecameWideString.class/methodProperties.json b/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteStringBecameWideString.class/methodProperties.json deleted file mode 100644 index dcf57730f..000000000 --- a/repository/Zinc-Character-Encoding-Core.v37.package/ZnByteStringBecameWideString.class/methodProperties.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "class" : { - "convert:" : "JohanBrichau 11/23/2013 10:39" }, - "instance" : { - "byteString" : "SvenVanCaekenberghe 6/11/2013 14:44", - "byteString:" : "SvenVanCaekenberghe 6/11/2013 14:44", - "defaultAction" : "dkh 05/25/2014 20:16", - "wideString" : "SvenVanCaekenberghe 6/11/2013 14:44", - "wideString:" : "SvenVanCaekenberghe 6/11/2013 14:44" } } diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCRLFReadStream.class/README.md b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCRLFReadStream.class/README.md new file mode 100644 index 000000000..951d75e6c --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCRLFReadStream.class/README.md @@ -0,0 +1,20 @@ +ZnCRLFReadStream wraps a binary stream with any of the common line endings (CR, LF, CRLF) and converts them to CRLF. + +RFC 2045 (https://tools.ietf.org/html/rfc2045) states that MIME documents use CRLF as the line end marker, however email documents as stored on disk often use the local line enging, e.g. LF. + + +Public API and Key Messages + +- on: - supply the stream to be wrapped +- The public API is the standard Stream API + + One simple example is simply gorgeous. + +Internal Representation and Key Implementation Points. + + Instance Variables + next: + stream: + + + Implementation Points \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCRLFReadStream.class/class/initialize.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCRLFReadStream.class/class/initialize.st new file mode 100644 index 000000000..d220bc0d6 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCRLFReadStream.class/class/initialize.st @@ -0,0 +1,5 @@ +class initialization +initialize + + Cr := Character cr asInteger. + Lf := Character lf asInteger \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCRLFReadStream.class/class/on..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCRLFReadStream.class/class/on..st new file mode 100644 index 000000000..41a0aff5a --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCRLFReadStream.class/class/on..st @@ -0,0 +1,4 @@ +instance creation +on: aBinaryReadStream + + ^self new on: aBinaryReadStream \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCRLFReadStream.class/instance/atEnd.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCRLFReadStream.class/instance/atEnd.st new file mode 100644 index 000000000..05d66dc70 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCRLFReadStream.class/instance/atEnd.st @@ -0,0 +1,4 @@ +accessing +atEnd + + ^stream atEnd \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCRLFReadStream.class/instance/close.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCRLFReadStream.class/instance/close.st new file mode 100644 index 000000000..e8a698a40 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCRLFReadStream.class/instance/close.st @@ -0,0 +1,4 @@ +open/close +close + + stream close \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCRLFReadStream.class/instance/isBinary.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCRLFReadStream.class/instance/isBinary.st new file mode 100644 index 000000000..64bb61b94 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCRLFReadStream.class/instance/isBinary.st @@ -0,0 +1,4 @@ +accessing +isBinary + + ^true \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCRLFReadStream.class/instance/next.into..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCRLFReadStream.class/instance/next.into..st new file mode 100644 index 000000000..b0bfa7570 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCRLFReadStream.class/instance/next.into..st @@ -0,0 +1,6 @@ +accessing +next: n into: aCollection + "Read n objects into the given collection. + Return aCollection or a partial copy if less than + n elements have been read." + ^self next: n into: aCollection startingAt: 1 \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCRLFReadStream.class/instance/next.into.startingAt..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCRLFReadStream.class/instance/next.into.startingAt..st new file mode 100644 index 000000000..4abc0ceb5 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCRLFReadStream.class/instance/next.into.startingAt..st @@ -0,0 +1,10 @@ +accessing +next: requestedCount into: aCollection startingAt: startIndex + "Read requestedCount objects into the given collection. + Return aCollection or a partial copy if less elements have been read." + + | readCount | + readCount := self readInto: aCollection startingAt: startIndex count: requestedCount. + ^ readCount = requestedCount + ifTrue: [ aCollection ] + ifFalse: [ aCollection copyFrom: 1 to: startIndex + readCount - 1 ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCRLFReadStream.class/instance/next.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCRLFReadStream.class/instance/next.st new file mode 100644 index 000000000..351dc5747 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCRLFReadStream.class/instance/next.st @@ -0,0 +1,23 @@ +accessing +next + "Answer the next character from the stream, converting end-of-lines to CRLF" + + | byte | + + next ifNotNil: + [ byte := next. + next := nil. + ^byte ]. + stream atEnd ifTrue: [ ^nil ]. + (byte := stream next) ifNil: [ ^nil ]. + byte == Cr ifTrue: + "Consume the Cr and ensure that a Lf is answered next. + If the following character is Lf, consume it." + [ stream peek == Lf ifTrue: + [ stream next ]. + next := Lf ] + ifFalse: [ byte == Lf ifTrue: + [ "Answer a Cr instead, and then a Lf" + byte := Cr. + next := Lf ] ]. + ^byte \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCRLFReadStream.class/instance/on..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCRLFReadStream.class/instance/on..st new file mode 100644 index 000000000..d0edae62b --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCRLFReadStream.class/instance/on..st @@ -0,0 +1,5 @@ +accessing +on: aBinaryReadStream + + self assert: aBinaryReadStream isBinary. + stream := aBinaryReadStream \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCRLFReadStream.class/instance/peek.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCRLFReadStream.class/instance/peek.st new file mode 100644 index 000000000..c907e4271 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCRLFReadStream.class/instance/peek.st @@ -0,0 +1,11 @@ +accessing +peek + "Answer the next character from the stream, converting end-of-lines to CRLF" + + | byte | + + next ifNotNil: [ ^next ]. + stream atEnd ifTrue: [ ^nil ]. + (byte := stream peek) ifNil: [ ^nil ]. + byte == Lf ifTrue: [ ^Cr ]. + ^byte \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCRLFReadStream.class/instance/readInto.startingAt.count..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCRLFReadStream.class/instance/readInto.startingAt.count..st new file mode 100644 index 000000000..4aec2bc18 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCRLFReadStream.class/instance/readInto.startingAt.count..st @@ -0,0 +1,7 @@ +accessing +readInto: collection startingAt: offset count: requestedCount + + 0 to: requestedCount - 1 do: [ :count | | byte | + (byte := self next) ifNil: [ ^ count ]. + collection at: offset + count put: byte ]. + ^ requestedCount \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCRLFReadStream.class/instance/readStream.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCRLFReadStream.class/instance/readStream.st new file mode 100644 index 000000000..6f19a3b33 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCRLFReadStream.class/instance/readStream.st @@ -0,0 +1,3 @@ +accessing +readStream + ^ self \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCRLFReadStream.class/instance/upToEnd.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCRLFReadStream.class/instance/upToEnd.st new file mode 100644 index 000000000..99ba78ee1 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCRLFReadStream.class/instance/upToEnd.st @@ -0,0 +1,7 @@ +accessing +upToEnd + "Answer a ByteArray of the stream from the current position to the last" + + ^ByteArray streamContents: [ :newStream | | nextByte | + [ (nextByte := self next) isNil ] whileFalse: + [ newStream nextPut: nextByte ] ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCRLFReadStream.class/properties.json b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCRLFReadStream.class/properties.json new file mode 100644 index 000000000..5bb76717e --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCRLFReadStream.class/properties.json @@ -0,0 +1,17 @@ +{ + "commentStamp" : "", + "super" : "Object", + "category" : "Zinc-Character-Encoding-Core", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ + "Cr", + "Lf" + ], + "instvars" : [ + "stream", + "next" + ], + "name" : "ZnCRLFReadStream", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoder.extension/class/newForEncoding.stringClass..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoder.extension/class/newForEncoding.stringClass..st deleted file mode 100644 index 17cb3d8c9..000000000 --- a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoder.extension/class/newForEncoding.stringClass..st +++ /dev/null @@ -1,10 +0,0 @@ -*zinc-character-encoding-core -newForEncoding: string stringClass: stringClass - "Return a new character encoder object for an encoding described by string. - Search for a subclass that handles it and delegate (subclassResponsibility)." - - | concreteSubclass | - concreteSubclass := self allSubclasses - detect: [ :each | each handlesEncoding: string ] - ifNone: [ ^ ZnNullEncoder new ]. - ^ concreteSubclass newForEncoding: string stringClass: stringClass \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoder.extension/instance/beLenient.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoder.extension/instance/beLenient.st deleted file mode 100644 index e531424e9..000000000 --- a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoder.extension/instance/beLenient.st +++ /dev/null @@ -1,3 +0,0 @@ -*zinc-character-encoding-core -beLenient - "Don't be strict, which is the default" \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoder.extension/instance/encodeString..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoder.extension/instance/encodeString..st deleted file mode 100644 index 4d73fc27b..000000000 --- a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoder.extension/instance/encodeString..st +++ /dev/null @@ -1,11 +0,0 @@ -*zinc-character-encoding-core -encodeString: string - "Encode string and return the resulting byte array" - - ^ ByteArray - streamContents: [ :stream | - self - next: string size - putAll: string - startingAt: 1 - toStream: stream ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoder.extension/methodProperties.json b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoder.extension/methodProperties.json deleted file mode 100644 index 4ee3727f8..000000000 --- a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoder.extension/methodProperties.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "class" : { - "newForEncoding:stringClass:" : "dkh 04/19/2023 09:39" }, - "instance" : { - "beLenient" : "dkh 02/24/2023 16:22", - "encodeString:" : "dkh 02/27/2023 17:35" } } diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoder.extension/properties.json b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoder.extension/properties.json deleted file mode 100644 index 6729eef8d..000000000 --- a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoder.extension/properties.json +++ /dev/null @@ -1,2 +0,0 @@ -{ - "name" : "ZnCharacterEncoder" } diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/README.md b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/README.md new file mode 100644 index 000000000..9f2593841 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/README.md @@ -0,0 +1,34 @@ +I am ZnCharacterEncoderGS, I encode and decode Character objects to and from a binary stream. +I am an abstract class with following protocol: + +#nextFromStream: +#nextPut:toStream: +#encodedByteCountFor: +#backOnStream: + +The first two are compatible with TextConverter and subclasses. + +I add some convenience methods: + +#encodeString: +#decodeBytes: +#encodedByteCountForString: + +Contrary to older encoders, I work strictly from strings to bytes and vice versa and I will throw errors instead of silently ignoring them. + +I also implement optimized bulk operations: + +#next:putAll:startingAt:toStream: +#readInto:startingAt:count:fromStream: + +Additionally, I can encode Integer code points to a binary stream as well as read Integer code points from a binary stream. This is in a sense a more fundamental operation that avoids instanciating Character objects. + +#nextCodePointFromStream: +#nextPutCodePoint:toStream: +#encodedByteCountForCodePoint: + +#decodeAsCodePoints: +#encodeCodePoints: +#encodedByteCountForCodePoints: + +Part of Zinc HTTP Components. \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/class/ascii.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/class/ascii.st new file mode 100644 index 000000000..63b50a4e7 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/class/ascii.st @@ -0,0 +1,3 @@ +convenience +ascii + ^ self newForEncoding: 'ASCII' \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/class/canonicalEncodingIdentifier..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/class/canonicalEncodingIdentifier..st new file mode 100644 index 000000000..74f36b063 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/class/canonicalEncodingIdentifier..st @@ -0,0 +1,3 @@ +accessing +canonicalEncodingIdentifier: string + ^ (string select: [ :each | each isAlphaNumeric ]) asLowercase \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/class/default.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/class/default.st new file mode 100644 index 000000000..45608b67b --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/class/default.st @@ -0,0 +1,6 @@ +accessing +default + "Return the default ZnCharacterEncoderGS (in GemStone) to be used + when none is otherwise specified." + + ^ ZnDefaultCharacterEncoder value \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/class/detectEncoding..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/class/detectEncoding..st new file mode 100644 index 000000000..046307c8a --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/class/detectEncoding..st @@ -0,0 +1,17 @@ +instance creation +detectEncoding: bytes + "Return one of my instances capable of decoding bytes. + This is done by successively trying known encodings in a specific order. + If no one is found, signal ZnCharacterEncodingError. + This is a heuristic and unreliable [https://en.wikipedia.org/wiki/Charset_detection]." + + | candidates | + "Set up an ordered candidates list, 7-bit ascii and utf8 are reasonably reliable, iso88591 is a reasonable default" + candidates := #('ascii' 'utf8' 'iso88591'). + candidates := candidates , (ZnByteEncoder knownEncodingIdentifiers difference: candidates). + candidates := candidates , (self knownEncodingIdentifiers difference: candidates). + "Try each and return the first one that succeeeds." + candidates do: [ :identifier | | encoder | + encoder := self newForEncoding: identifier. + [ ^ encoder decodeBytes: bytes; yourself ] on: ZnCharacterEncodingError do: [ ] ]. + ZnCharacterEncodingError signal: 'No suitable encoder found' diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/class/handlesEncoding..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/class/handlesEncoding..st new file mode 100644 index 000000000..25fa56c5d --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/class/handlesEncoding..st @@ -0,0 +1,5 @@ +accessing +handlesEncoding: string + "Return true when my instances handle the encoding described by string" + + self subclassResponsibility \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/class/isAbstract.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/class/isAbstract.st new file mode 100644 index 000000000..e236eb9a3 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/class/isAbstract.st @@ -0,0 +1,4 @@ +testing +isAbstract + + ^ self == ZnCharacterEncoderGS diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/class/iso88591.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/class/iso88591.st new file mode 100644 index 000000000..804bcff70 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/class/iso88591.st @@ -0,0 +1,3 @@ +convenience +iso88591 + ^ self newForEncoding: 'iso-8859-1' \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/class/knownEncodingIdentifiers.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/class/knownEncodingIdentifiers.st new file mode 100644 index 000000000..65919feb2 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/class/knownEncodingIdentifiers.st @@ -0,0 +1,8 @@ +accessing +knownEncodingIdentifiers + "Return a collection of all known encoding identifiers in the system" + + self = ZnCharacterEncoderGS ifFalse: [ ^ #() ]. + ^ Array streamContents: [ :all | + self allSubclassesDo: [ :subClass | + all nextPutAll: subClass knownEncodingIdentifiers ] ] diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/class/latin1.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/class/latin1.st new file mode 100644 index 000000000..9e5562a1f --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/class/latin1.st @@ -0,0 +1,3 @@ +convenience +latin1 + ^ self newForEncoding: 'latin1' \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/class/newForEncoding..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/class/newForEncoding..st new file mode 100644 index 000000000..56d550967 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/class/newForEncoding..st @@ -0,0 +1,10 @@ +instance creation +newForEncoding: string + "Return a new character encoder object for an encoding described by string. + Search for a subclass that handles it and delegate (subclassResponsibility)." + + | concreteSubclass | + concreteSubclass := self allSubclasses + detect: [ :each | each handlesEncoding: string ] + ifNone: [ ^ self default ]. + ^ concreteSubclass newForEncoding: string \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/class/utf8.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/class/utf8.st new file mode 100644 index 000000000..d203985a8 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/class/utf8.st @@ -0,0 +1,3 @@ +convenience +utf8 + ^ ZnUTF8EncoderGS default \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/^equals.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/^equals.st new file mode 100644 index 000000000..efdfde65e --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/^equals.st @@ -0,0 +1,3 @@ +comparing += anObject + ^ self class == anObject class \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/asZnCharacterEncoder.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/asZnCharacterEncoder.st new file mode 100644 index 000000000..6aab13516 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/asZnCharacterEncoder.st @@ -0,0 +1,3 @@ +converting +asZnCharacterEncoder + ^ self \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/backOnStream..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/backOnStream..st new file mode 100644 index 000000000..34f3963f7 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/backOnStream..st @@ -0,0 +1,5 @@ +encoding - decoding +backOnStream: stream + "Move back one character on stream, assuming stream understands #back" + + self subclassResponsibility \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/beLenient.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/beLenient.st new file mode 100644 index 000000000..87e6fb6cc --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/beLenient.st @@ -0,0 +1,3 @@ +initialization +beLenient + "Don't be strict, which is the default" \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/decodeAsCodePoints..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/decodeAsCodePoints..st new file mode 100644 index 000000000..b56cf7e26 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/decodeAsCodePoints..st @@ -0,0 +1,9 @@ +convenience +decodeAsCodePoints: bytes + "Decode bytes and return the resulting code points" + + | byteStream | + byteStream := bytes readStream. + ^ Array streamContents: [ :stream | + [ byteStream atEnd ] whileFalse: [ + stream nextPut: (self nextCodePointFromStream: byteStream) ] ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/decodeBytes..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/decodeBytes..st new file mode 100644 index 000000000..9aeb76c46 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/decodeBytes..st @@ -0,0 +1,9 @@ +convenience +decodeBytes: bytes + "Decode bytes and return the resulting string" + + | byteStream | + byteStream := bytes readStream. + ^ String streamContents: [ :stream | + [ byteStream atEnd ] whileFalse: [ + stream nextPut: (self nextFromStream: byteStream) ] ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/encodeCodePoints..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/encodeCodePoints..st new file mode 100644 index 000000000..29298338c --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/encodeCodePoints..st @@ -0,0 +1,7 @@ +convenience +encodeCodePoints: codePoints + "Encode codePoints and return the resulting byte array" + + ^ ByteArray streamContents: [ :stream | + codePoints do: [ :each | + self nextPutCodePoint: each toStream: stream ] ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/encodeString..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/encodeString..st new file mode 100644 index 000000000..e60c6e201 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/encodeString..st @@ -0,0 +1,11 @@ +convenience +encodeString: string + "Encode string and return the resulting byte array" + + ^ ByteArray + streamContents: [ :stream | + self + next: string size + putAll: string + startingAt: 1 + toStream: stream ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/encodedByteCountFor..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/encodedByteCountFor..st new file mode 100644 index 000000000..fa9799c98 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/encodedByteCountFor..st @@ -0,0 +1,7 @@ +encoding - decoding +encodedByteCountFor: character + "Return how many bytes are needed to encode character" + + "We should use #codePoint but #asInteger is faster" + + ^ self encodedByteCountForCodePoint: character asInteger \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/encodedByteCountForCodePoint..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/encodedByteCountForCodePoint..st new file mode 100644 index 000000000..599c4532e --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/encodedByteCountForCodePoint..st @@ -0,0 +1,5 @@ +encoding - decoding +encodedByteCountForCodePoint: codePoint + "Return how many bytes are needed to encode integer code point" + + self subclassResponsibility \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/encodedByteCountForCodePoints..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/encodedByteCountForCodePoints..st new file mode 100644 index 000000000..6f36ba4b6 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/encodedByteCountForCodePoints..st @@ -0,0 +1,8 @@ +convenience +encodedByteCountForCodePoints: codePoints + "Return the exact number of bytes it would take to encode codePoints as a byte array" + + ^ codePoints + inject: 0 + into: [ :sum :each | + sum + (self encodedByteCountForCodePoint: each) ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/encodedByteCountForString..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/encodedByteCountForString..st new file mode 100644 index 000000000..3a9366efb --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/encodedByteCountForString..st @@ -0,0 +1,8 @@ +convenience +encodedByteCountForString: string + "Return the exact number of bytes it would take to encode string as a byte array" + + ^ string + inject: 0 + into: [ :sum :each | + sum + (self encodedByteCountFor: each) ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/endianness.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/endianness.st new file mode 100644 index 000000000..bb054472e --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/endianness.st @@ -0,0 +1,3 @@ +accessing +endianness + ^ #'N/A' \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/ensureAtBeginOfCodePointOnStream..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/ensureAtBeginOfCodePointOnStream..st new file mode 100644 index 000000000..6e9074e5b --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/ensureAtBeginOfCodePointOnStream..st @@ -0,0 +1,7 @@ +encoding - decoding +ensureAtBeginOfCodePointOnStream: stream + "Ensure that the current position of stream is a the beginning of an encoded code point, + if not move further backwards. This is necessary when a position in the binary stream is set, + not knowing if that position is on a proper encoded character boundary." + + self subclassResponsibility \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/error..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/error..st new file mode 100644 index 000000000..5895358f8 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/error..st @@ -0,0 +1,3 @@ +error handling +error: message + ^ ZnCharacterEncodingError signal: message \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/errorIncomplete.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/errorIncomplete.st new file mode 100644 index 000000000..7efbb94df --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/errorIncomplete.st @@ -0,0 +1,3 @@ +error handling +errorIncomplete + ^ ZnIncomplete signal: 'Incomplete input for character decoding' \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/errorIncompleteFrom..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/errorIncompleteFrom..st new file mode 100644 index 000000000..f0e7cd5ee --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/errorIncompleteFrom..st @@ -0,0 +1,3 @@ +error handling +errorIncompleteFrom: stream + ^ self errorIncomplete \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/errorOutsideRange.from..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/errorOutsideRange.from..st new file mode 100644 index 000000000..6df032a44 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/errorOutsideRange.from..st @@ -0,0 +1,4 @@ +error handling +errorOutsideRange: codePoint from: stream + self errorOutsideRange. + ^ 0 \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/errorOutsideRange.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/errorOutsideRange.st new file mode 100644 index 000000000..d5b8d9781 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/errorOutsideRange.st @@ -0,0 +1,3 @@ +error handling +errorOutsideRange + ^ self error: 'Character Unicode code point outside encoder range' \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/errorOutsideRange.to..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/errorOutsideRange.to..st new file mode 100644 index 000000000..bec8527fb --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/errorOutsideRange.to..st @@ -0,0 +1,3 @@ +error handling +errorOutsideRange: codePoint to: stream + ^ self errorOutsideRange \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/errorOutsideRangeByteCount..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/errorOutsideRangeByteCount..st new file mode 100644 index 000000000..12c1a3265 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/errorOutsideRangeByteCount..st @@ -0,0 +1,4 @@ +error handling +errorOutsideRangeByteCount: codePoint + self errorOutsideRange. + ^ 0 \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/hash.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/hash.st new file mode 100644 index 000000000..4482adb9a --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/hash.st @@ -0,0 +1,3 @@ +comparing +hash + ^ self class hash \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/identifier.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/identifier.st new file mode 100644 index 000000000..15c498ab0 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/identifier.st @@ -0,0 +1,3 @@ +accessing +identifier + ^ self subclassResponsibility \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/isFixedLength.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/isFixedLength.st new file mode 100644 index 000000000..646c7f20e --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/isFixedLength.st @@ -0,0 +1,5 @@ +testing +isFixedLength + "Return true when I am a fixed length encoding" + + ^ true \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/isStrict.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/isStrict.st new file mode 100644 index 000000000..830d40acd --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/isStrict.st @@ -0,0 +1,3 @@ +testing +isStrict + ^ false \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/isVariableLength.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/isVariableLength.st new file mode 100644 index 000000000..c6386e78c --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/isVariableLength.st @@ -0,0 +1,5 @@ +testing +isVariableLength + "Return true when I am a variable length encoding" + + ^ self isFixedLength not \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/next.putAll.startingAt.toStream..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/next.putAll.startingAt.toStream..st new file mode 100644 index 000000000..0bb412d78 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/next.putAll.startingAt.toStream..st @@ -0,0 +1,6 @@ +convenience +next: count putAll: string startingAt: offset toStream: stream + "Write count characters from string starting at offset to stream." + + offset to: offset + count - 1 do: [ :index | + self nextPut: (string at: index) toStream: stream ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/nextCodePointFromStream..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/nextCodePointFromStream..st new file mode 100644 index 000000000..323345e00 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/nextCodePointFromStream..st @@ -0,0 +1,5 @@ +encoding - decoding +nextCodePointFromStream: stream + "Read and return the next integer code point from stream" + + self subclassResponsibility \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/nextFromStream..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/nextFromStream..st new file mode 100644 index 000000000..b422f274d --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/nextFromStream..st @@ -0,0 +1,7 @@ +encoding - decoding +nextFromStream: stream + "Read and return the next character from stream" + + "We should use #codePoint: but #value: is faster" + + ^ Character value: (self nextCodePointFromStream: stream) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/nextPut.toStream..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/nextPut.toStream..st new file mode 100644 index 000000000..a5c0d70e2 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/nextPut.toStream..st @@ -0,0 +1,7 @@ +encoding - decoding +nextPut: character toStream: stream + "Write the encoding for character to stream" + + "We should use #codePoint but #asInteger is faster" + + self nextPutCodePoint: character asInteger toStream: stream \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/nextPutCodePoint.toStream..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/nextPutCodePoint.toStream..st new file mode 100644 index 000000000..b1a0324f9 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/nextPutCodePoint.toStream..st @@ -0,0 +1,5 @@ +encoding - decoding +nextPutCodePoint: codePoint toStream: stream + "Write the encoding for Integer code point to stream" + + self subclassResponsibility \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/readInto.startingAt.count.fromStream..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/readInto.startingAt.count.fromStream..st new file mode 100644 index 000000000..6e5a68cac --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/readInto.startingAt.count.fromStream..st @@ -0,0 +1,9 @@ +convenience +readInto: string startingAt: offset count: requestedCount fromStream: stream + "Read requestedCount characters into string starting at offset, + returning the number read, there could be less available when stream is atEnd" + + offset to: offset + requestedCount - 1 do: [ :index | + stream atEnd ifTrue: [ ^ index - offset ]. + string at: index put: (self nextFromStream: stream) ]. + ^ requestedCount \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/skipToBeginOfCodePointOnStream..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/skipToBeginOfCodePointOnStream..st new file mode 100644 index 000000000..a729219e6 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/instance/skipToBeginOfCodePointOnStream..st @@ -0,0 +1,7 @@ +encoding - decoding +skipToBeginOfCodePointOnStream: stream + "Ensure that the current position of stream is a the beginning of an encoded code point, + if not move further forward. This is necessary when a position in the binary stream is set, + not knowing if that position is on a proper encoded character boundary." + + self subclassResponsibility \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/properties.json b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/properties.json new file mode 100644 index 000000000..80f3fdbe7 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterEncoderGS.class/properties.json @@ -0,0 +1,11 @@ +{ + "commentStamp" : "", + "super" : "Object", + "category" : "Zinc-Character-Encoding-Core", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "ZnCharacterEncoderGS", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadStream.extension/instance/collectionSpecies.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadStream.extension/instance/collectionSpecies.st new file mode 100644 index 000000000..151bfe5cf --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadStream.extension/instance/collectionSpecies.st @@ -0,0 +1,4 @@ +*zinc-character-encoding-core +collectionSpecies + "Protocol: accessing" + ^ String diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadStream.extension/instance/encoder.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadStream.extension/instance/encoder.st new file mode 100644 index 000000000..9759adaa8 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadStream.extension/instance/encoder.st @@ -0,0 +1,3 @@ +*zinc-character-encoding-core +encoder + ^ super encoder diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadStream.extension/instance/match..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadStream.extension/instance/match..st new file mode 100644 index 000000000..8d58863ed --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadStream.extension/instance/match..st @@ -0,0 +1,17 @@ +*zinc-character-encoding-core +match: subCollection + "Protocol: accessing" + "Set the access position of the receiver to be past the next occurrence of the subCollection. Answer whether subCollection is found. No wildcards, and case does matter." + | pattern startMatch | + pattern := subCollection readStream. + startMatch := nil. + [ pattern atEnd ] whileFalse: + [ self atEnd ifTrue: [ ^ false ]. + self next = pattern next + ifTrue: [ pattern position = 1 ifTrue: [ startMatch := self position ] ] + ifFalse: + [ pattern position: 0. + startMatch ifNotNil: + [ self position: startMatch. + startMatch := nil ] ] ]. + ^ true diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadStream.extension/instance/nextElement.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadStream.extension/instance/nextElement.st new file mode 100644 index 000000000..ea4b8eb01 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadStream.extension/instance/nextElement.st @@ -0,0 +1,4 @@ +*zinc-character-encoding-core +nextElement + "Protocol: private" + ^ self encoder nextFromStream: stream diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadStream.extension/instance/nextLine.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadStream.extension/instance/nextLine.st new file mode 100644 index 000000000..f68fe4e9a --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadStream.extension/instance/nextLine.st @@ -0,0 +1,16 @@ +*zinc-character-encoding-core +nextLine + "Protocol: accessing" + "Read a CR, LF or CRLF terminated line, returning the contents of the line without the EOL. Return nil when the receiver is #atEnd." + + self atEnd ifTrue: [ ^ nil ]. + ^ self collectionSpecies streamContents: [ :out | | eol char | + eol := false. + [ eol ] whileFalse: [ + char := self next. + (char isNil or: [ char = Character lf ]) + ifTrue: [ eol := true ] + ifFalse: [ + char = Character cr + ifTrue: [ eol := true. self peekFor: Character lf ] + ifFalse: [ out nextPut: char ] ] ] ] diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadStream.extension/instance/readInto.startingAt.count..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadStream.extension/instance/readInto.startingAt.count..st new file mode 100644 index 000000000..3936a9fdd --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadStream.extension/instance/readInto.startingAt.count..st @@ -0,0 +1,24 @@ +*zinc-character-encoding-core +readInto: collection startingAt: offset count: requestedCount + "Protocol: accessing" + "Read count elements and place them in collection starting at offset. + Return the number of elements actually read." + + ^ peeked + ifNil: [ | readCount | + [ readCount := self encoder + readInto: collection + startingAt: offset + count: requestedCount + fromStream: stream ] + on: ZnByteStringBecameWideString + do: [ :byteStringBecameWideString | + byteStringBecameWideString becomeForward; resume ]. + readCount ] + ifNotNil: [ + collection at: offset put: peeked. + peeked := nil. + (self + readInto: collection + startingAt: offset + 1 + count: requestedCount - 1) + 1 ] diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadStream.extension/instance/upToAll..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadStream.extension/instance/upToAll..st new file mode 100644 index 000000000..b0892bcba --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadStream.extension/instance/upToAll..st @@ -0,0 +1,18 @@ +*zinc-character-encoding-core +upToAll: aCollection + "Protocol: accessing" + "Answer a subcollection from the current access position to the occurrence (if any, but not inclusive) of aCollection. If aCollection is not in the stream, answer the entire rest of the stream." + + ^ self collectionSpecies streamContents: [ :out | | pattern | + pattern := aCollection readStream. + ([ self atEnd or: [ pattern atEnd ] ]) whileFalse: [ + self peek = pattern peek + ifTrue: [ + self next. pattern next ] + ifFalse: [ + pattern position = 0 + ifTrue: [ out nextPut: self next ] + ifFalse: [ out next: pattern position putAll: aCollection ]. + pattern reset ] ]. + pattern atEnd + ifFalse: [ out next: pattern position putAll: aCollection ] ] diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadStream.extension/properties.json b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadStream.extension/properties.json new file mode 100644 index 000000000..212af3019 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadStream.extension/properties.json @@ -0,0 +1,2 @@ +{ + "name" : "ZnCharacterReadStream" } diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadWriteStream.class/README.md b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadWriteStream.class/README.md new file mode 100644 index 000000000..fe1e7e7ae --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadWriteStream.class/README.md @@ -0,0 +1 @@ +I am a read-write character stream. I am mainly used to open the Pharo source and changes files. \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadWriteStream.class/class/on.encoding..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadWriteStream.class/class/on.encoding..st new file mode 100644 index 000000000..f579e026e --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadWriteStream.class/class/on.encoding..st @@ -0,0 +1,7 @@ +*zinc-character-encoding-core +on: wrappedStream encoding: encoding + "Protocol: instance creation" + + ^ self new + on: wrappedStream encoding: encoding; + yourself diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadWriteStream.class/instance/atEnd.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadWriteStream.class/instance/atEnd.st new file mode 100644 index 000000000..13b170fb7 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadWriteStream.class/instance/atEnd.st @@ -0,0 +1,5 @@ +*zinc-character-encoding-core +atEnd + "Protocol: accessing" + + ^ readStream atEnd diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadWriteStream.class/instance/close.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadWriteStream.class/instance/close.st new file mode 100644 index 000000000..b5096bbf6 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadWriteStream.class/instance/close.st @@ -0,0 +1,5 @@ +*zinc-character-encoding-core +close + "Protocol: accessing" + + writeStream close diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadWriteStream.class/instance/closed.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadWriteStream.class/instance/closed.st new file mode 100644 index 000000000..efc57f1d9 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadWriteStream.class/instance/closed.st @@ -0,0 +1,4 @@ +*zinc-character-encoding-core +closed + "Protocol: testing" + ^ writeStream closed diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadWriteStream.class/instance/collectionSpecies.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadWriteStream.class/instance/collectionSpecies.st new file mode 100644 index 000000000..151bfe5cf --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadWriteStream.class/instance/collectionSpecies.st @@ -0,0 +1,4 @@ +*zinc-character-encoding-core +collectionSpecies + "Protocol: accessing" + ^ String diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadWriteStream.class/instance/cr.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadWriteStream.class/instance/cr.st new file mode 100644 index 000000000..606521b8d --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadWriteStream.class/instance/cr.st @@ -0,0 +1,5 @@ +*zinc-character-encoding-core +cr + "Protocol: accessing" + + writeStream cr diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadWriteStream.class/instance/flush.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadWriteStream.class/instance/flush.st new file mode 100644 index 000000000..763c6314d --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadWriteStream.class/instance/flush.st @@ -0,0 +1,5 @@ +*zinc-character-encoding-core +flush + "Protocol: accessing" + + writeStream flush diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadWriteStream.class/instance/isReadOnly.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadWriteStream.class/instance/isReadOnly.st new file mode 100644 index 000000000..a0deea7e3 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadWriteStream.class/instance/isReadOnly.st @@ -0,0 +1,5 @@ +*zinc-character-encoding-core +isReadOnly + "Protocol: testing" + + ^ false diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadWriteStream.class/instance/next..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadWriteStream.class/instance/next..st new file mode 100644 index 000000000..053f4d683 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadWriteStream.class/instance/next..st @@ -0,0 +1,5 @@ +*zinc-character-encoding-core +next: anInteger + "Protocol: accessing" + + ^ readStream next: anInteger diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadWriteStream.class/instance/next.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadWriteStream.class/instance/next.st new file mode 100644 index 000000000..0556af5e5 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadWriteStream.class/instance/next.st @@ -0,0 +1,5 @@ +*zinc-character-encoding-core +next + "Protocol: accessing" + + ^ readStream next diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadWriteStream.class/instance/nextPut..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadWriteStream.class/instance/nextPut..st new file mode 100644 index 000000000..d00ddc2a3 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadWriteStream.class/instance/nextPut..st @@ -0,0 +1,5 @@ +*zinc-character-encoding-core +nextPut: aCharacter + "Protocol: accessing" + + ^ writeStream nextPut: aCharacter diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadWriteStream.class/instance/nextPutAll..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadWriteStream.class/instance/nextPutAll..st new file mode 100644 index 000000000..527db8db3 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadWriteStream.class/instance/nextPutAll..st @@ -0,0 +1,5 @@ +*zinc-character-encoding-core +nextPutAll: aString + "Protocol: accessing" + + ^ writeStream nextPutAll: aString diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadWriteStream.class/instance/on.encoding..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadWriteStream.class/instance/on.encoding..st new file mode 100644 index 000000000..9ed457cb2 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadWriteStream.class/instance/on.encoding..st @@ -0,0 +1,7 @@ +*zinc-character-encoding-core +on: aStream encoding: encoding + "Protocol: instance creation" + | encoder | + encoder := encoding asZnCharacterEncoder. + readStream := ZnCharacterReadStream on: aStream encoding: encoder. + writeStream := ZnCharacterWriteStream on: aStream encoding: encoder diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadWriteStream.class/instance/peek.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadWriteStream.class/instance/peek.st new file mode 100644 index 000000000..c72252822 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadWriteStream.class/instance/peek.st @@ -0,0 +1,5 @@ +*zinc-character-encoding-core +peek + "Protocol: accessing" + + ^ readStream peek diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadWriteStream.class/instance/position..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadWriteStream.class/instance/position..st new file mode 100644 index 000000000..be0d8b978 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadWriteStream.class/instance/position..st @@ -0,0 +1,5 @@ +*zinc-character-encoding-core +position: anInteger + "Protocol: accessing" + + readStream position: anInteger diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadWriteStream.class/instance/position.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadWriteStream.class/instance/position.st new file mode 100644 index 000000000..02cb0277b --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadWriteStream.class/instance/position.st @@ -0,0 +1,5 @@ +*zinc-character-encoding-core +position + "Protocol: accessing" + + ^ readStream position diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadWriteStream.class/instance/print..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadWriteStream.class/instance/print..st new file mode 100644 index 000000000..fc201fee7 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadWriteStream.class/instance/print..st @@ -0,0 +1,5 @@ +*zinc-character-encoding-core +print: object + "Protocol: accessing" + + writeStream print: object diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadWriteStream.class/instance/readOnlyCopy.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadWriteStream.class/instance/readOnlyCopy.st new file mode 100644 index 000000000..6281c426b --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadWriteStream.class/instance/readOnlyCopy.st @@ -0,0 +1,5 @@ +*zinc-character-encoding-core +readOnlyCopy + "Protocol: accessing" + + ^ readStream diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadWriteStream.class/instance/setToEnd.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadWriteStream.class/instance/setToEnd.st new file mode 100644 index 000000000..c42d4d584 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadWriteStream.class/instance/setToEnd.st @@ -0,0 +1,5 @@ +*zinc-character-encoding-core +setToEnd + "Protocol: accessing" + + writeStream setToEnd diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadWriteStream.class/instance/size.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadWriteStream.class/instance/size.st new file mode 100644 index 000000000..483bc6ae0 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadWriteStream.class/instance/size.st @@ -0,0 +1,5 @@ +*zinc-character-encoding-core +size + "Protocol: accessing" + + ^ readStream size diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadWriteStream.class/instance/skip..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadWriteStream.class/instance/skip..st new file mode 100644 index 000000000..fcbce98cc --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadWriteStream.class/instance/skip..st @@ -0,0 +1,5 @@ +*zinc-character-encoding-core +skip: anInteger + "Protocol: accessing" + anInteger < 0 ifTrue: [ self error: 'cannot skip backwards' ]. + readStream skip: anInteger diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadWriteStream.class/instance/space.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadWriteStream.class/instance/space.st new file mode 100644 index 000000000..a757ff8a7 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadWriteStream.class/instance/space.st @@ -0,0 +1,5 @@ +*zinc-character-encoding-core +space + "Protocol: accessing" + + writeStream space diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadWriteStream.class/instance/tab.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadWriteStream.class/instance/tab.st new file mode 100644 index 000000000..258f800d5 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadWriteStream.class/instance/tab.st @@ -0,0 +1,5 @@ +*zinc-character-encoding-core +tab + "Protocol: accessing" + + writeStream tab diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadWriteStream.class/instance/upToAll..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadWriteStream.class/instance/upToAll..st new file mode 100644 index 000000000..b0892bcba --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadWriteStream.class/instance/upToAll..st @@ -0,0 +1,18 @@ +*zinc-character-encoding-core +upToAll: aCollection + "Protocol: accessing" + "Answer a subcollection from the current access position to the occurrence (if any, but not inclusive) of aCollection. If aCollection is not in the stream, answer the entire rest of the stream." + + ^ self collectionSpecies streamContents: [ :out | | pattern | + pattern := aCollection readStream. + ([ self atEnd or: [ pattern atEnd ] ]) whileFalse: [ + self peek = pattern peek + ifTrue: [ + self next. pattern next ] + ifFalse: [ + pattern position = 0 + ifTrue: [ out nextPut: self next ] + ifFalse: [ out next: pattern position putAll: aCollection ]. + pattern reset ] ]. + pattern atEnd + ifFalse: [ out next: pattern position putAll: aCollection ] ] diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadWriteStream.class/instance/upToEnd.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadWriteStream.class/instance/upToEnd.st new file mode 100644 index 000000000..20dc9f933 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadWriteStream.class/instance/upToEnd.st @@ -0,0 +1,5 @@ +*zinc-character-encoding-core +upToEnd + "Protocol: accessing" + + ^ readStream upToEnd diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadWriteStream.class/properties.json b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadWriteStream.class/properties.json new file mode 100644 index 000000000..f98536578 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterReadWriteStream.class/properties.json @@ -0,0 +1,14 @@ +{ + "commentStamp" : "", + "super" : "Object", + "category" : "Zinc-Character-Encoding-Core", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ + "readStream", + "writeStream" + ], + "name" : "ZnCharacterReadWriteStream", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterWriteStream.extension/instance/cr.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterWriteStream.extension/instance/cr.st new file mode 100644 index 000000000..bf0eef4bb --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterWriteStream.extension/instance/cr.st @@ -0,0 +1,4 @@ +*zinc-character-encoding-core +cr + "Protocol: accessing" + self nextPut: Character cr diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterWriteStream.extension/instance/crlf.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterWriteStream.extension/instance/crlf.st new file mode 100644 index 000000000..0fb0740f0 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterWriteStream.extension/instance/crlf.st @@ -0,0 +1,4 @@ +*zinc-character-encoding-core +crlf + "Protocol: accessing" + self cr; lf diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterWriteStream.extension/instance/lf.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterWriteStream.extension/instance/lf.st new file mode 100644 index 000000000..dc2491ea2 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterWriteStream.extension/instance/lf.st @@ -0,0 +1,4 @@ +*zinc-character-encoding-core +lf + "Protocol: accessing" + self nextPut: Character lf diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterWriteStream.extension/instance/next.putAll.startingAt..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterWriteStream.extension/instance/next.putAll.startingAt..st new file mode 100644 index 000000000..d139d32da --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterWriteStream.extension/instance/next.putAll.startingAt..st @@ -0,0 +1,10 @@ +*zinc-character-encoding-core +next: count putAll: collection startingAt: offset + "Protocol: accessing" + "Write count characters from collection starting at offset." + + self encoder + next: count + putAll: collection + startingAt: offset + toStream: stream diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterWriteStream.extension/instance/nextPut..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterWriteStream.extension/instance/nextPut..st new file mode 100644 index 000000000..9a0c90f71 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterWriteStream.extension/instance/nextPut..st @@ -0,0 +1,7 @@ +*zinc-character-encoding-core +nextPut: object + "Protocol: accessing" + self encoder + nextPut: object + toStream: stream. + ^ object diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterWriteStream.extension/instance/print..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterWriteStream.extension/instance/print..st new file mode 100644 index 000000000..009d0a5ec --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterWriteStream.extension/instance/print..st @@ -0,0 +1,4 @@ +*zinc-character-encoding-core +print: object + "Protocol: accessing" + object printOn: self diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterWriteStream.extension/instance/space.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterWriteStream.extension/instance/space.st new file mode 100644 index 000000000..5153f096a --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterWriteStream.extension/instance/space.st @@ -0,0 +1,4 @@ +*zinc-character-encoding-core +space + "Protocol: accessing" + self nextPut: Character space diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterWriteStream.extension/instance/tab.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterWriteStream.extension/instance/tab.st new file mode 100644 index 000000000..89e3c0287 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterWriteStream.extension/instance/tab.st @@ -0,0 +1,4 @@ +*zinc-character-encoding-core +tab + "Protocol: accessing" + self nextPut: Character tab diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterWriteStream.extension/properties.json b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterWriteStream.extension/properties.json new file mode 100644 index 000000000..46316b71a --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCharacterWriteStream.extension/properties.json @@ -0,0 +1,2 @@ +{ + "name" : "ZnCharacterWriteStream" } diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCodePointReadStream.class/README.md b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCodePointReadStream.class/README.md new file mode 100644 index 000000000..a98e5045c --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCodePointReadStream.class/README.md @@ -0,0 +1,6 @@ +I am ZnCodePointReadStream. +I wrap another binary ReadStream and use a ZnCharacerEncoder to allow Integer code points to be read. + +I am not positionable, but I do allow a one code point peek using a one code point internal buffer. + +Part of Zinc HTTP Components. diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCodePointReadStream.class/instance/collectionSpecies.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCodePointReadStream.class/instance/collectionSpecies.st new file mode 100644 index 000000000..350f88f9d --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCodePointReadStream.class/instance/collectionSpecies.st @@ -0,0 +1,3 @@ +accessing +collectionSpecies + ^ Array \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCodePointReadStream.class/instance/nextElement.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCodePointReadStream.class/instance/nextElement.st new file mode 100644 index 000000000..7bddede2b --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCodePointReadStream.class/instance/nextElement.st @@ -0,0 +1,3 @@ +private +nextElement + ^ self encoder nextCodePointFromStream: stream \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCodePointReadStream.class/properties.json b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCodePointReadStream.class/properties.json new file mode 100644 index 000000000..b0c421077 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCodePointReadStream.class/properties.json @@ -0,0 +1,11 @@ +{ + "commentStamp" : "", + "super" : "ZnEncodedReadStream", + "category" : "Zinc-Character-Encoding-Core", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "ZnCodePointReadStream", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCodePointWriteStream.class/README.md b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCodePointWriteStream.class/README.md new file mode 100644 index 000000000..0e99b640c --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCodePointWriteStream.class/README.md @@ -0,0 +1,4 @@ +I am ZnCodePointWriteStream. +I wrap another binary WriteStream and use a ZnCharacerEncoder to allow Integer code points to be written. + +Part of Zinc HTTP Components. \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCodePointWriteStream.class/instance/nextPut..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCodePointWriteStream.class/instance/nextPut..st new file mode 100644 index 000000000..472e7d108 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCodePointWriteStream.class/instance/nextPut..st @@ -0,0 +1,6 @@ +accessing +nextPut: object + self encoder + nextPutCodePoint: object + toStream: stream. + ^ object \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCodePointWriteStream.class/properties.json b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCodePointWriteStream.class/properties.json new file mode 100644 index 000000000..37100145f --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCodePointWriteStream.class/properties.json @@ -0,0 +1,11 @@ +{ + "commentStamp" : "", + "super" : "ZnEncodedWriteStream", + "category" : "Zinc-Character-Encoding-Core", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "ZnCodePointWriteStream", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCrPortableWriteStream.class/README.md b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCrPortableWriteStream.class/README.md new file mode 100644 index 000000000..f9f9e30d9 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCrPortableWriteStream.class/README.md @@ -0,0 +1 @@ +This class has been replaced by ZnNewLineWriterStream \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCrPortableWriteStream.class/class/on..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCrPortableWriteStream.class/class/on..st new file mode 100644 index 000000000..3db360862 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCrPortableWriteStream.class/class/on..st @@ -0,0 +1,7 @@ +instance creation +on: aStream + + ^ self basicNew + initialize; + stream: aStream; + yourself \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCrPortableWriteStream.class/instance/initialize.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCrPortableWriteStream.class/instance/initialize.st new file mode 100644 index 000000000..8d79181fd --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCrPortableWriteStream.class/instance/initialize.st @@ -0,0 +1,6 @@ +initialization +initialize + + super initialize. + cr := Character cr. + lf := Character lf \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCrPortableWriteStream.class/instance/newLine.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCrPortableWriteStream.class/instance/newLine.st new file mode 100644 index 000000000..a0e080194 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCrPortableWriteStream.class/instance/newLine.st @@ -0,0 +1,4 @@ +accessing +newLine + previous := nil. + stream nextPutAll: OSPlatform current lineEnding \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCrPortableWriteStream.class/instance/nextPut..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCrPortableWriteStream.class/instance/nextPut..st new file mode 100644 index 000000000..f1845c7d3 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCrPortableWriteStream.class/instance/nextPut..st @@ -0,0 +1,11 @@ +accessing +nextPut: aCharacter + "Write aCharacter to the receivers stream. + Convert all line end combinations, i.e cr, lf, crlf, to the platform convention" + + (previous == cr and: [ aCharacter == lf ]) ifFalse: [ + (aCharacter == cr or: [ aCharacter == lf ]) ifTrue: + [ self newLine ] + ifFalse: + [ stream nextPut: aCharacter ] ]. + previous := aCharacter \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCrPortableWriteStream.class/instance/stream..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCrPortableWriteStream.class/instance/stream..st new file mode 100644 index 000000000..2208df8c9 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCrPortableWriteStream.class/instance/stream..st @@ -0,0 +1,3 @@ +accessing +stream: aWriteStream + stream := aWriteStream \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnCrPortableWriteStream.class/properties.json b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCrPortableWriteStream.class/properties.json new file mode 100644 index 000000000..e7c3c9d58 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnCrPortableWriteStream.class/properties.json @@ -0,0 +1,16 @@ +{ + "commentStamp" : "", + "super" : "WriteStream", + "category" : "Zinc-Character-Encoding-Core", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ + "stream", + "cr", + "lf", + "previous" + ], + "name" : "ZnCrPortableWriteStream", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnDebuggingUTF8Encoder.class/README.md b/repository/Zinc-Character-Encoding-Core.v37.package/ZnDebuggingUTF8Encoder.class/README.md new file mode 100644 index 000000000..0b83d265b --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnDebuggingUTF8Encoder.class/README.md @@ -0,0 +1,8 @@ +I am ZnDebuggingUTF8Encoder.. +I am a ZnLossyUTF8Decoder and a ZnUTF8Decoder. + +I behave like my superclass but will output a verbose error when I am asked to write a Unicode code point that I cannot encode. + +For reading I inherit from my superclass. + +Part of Zinc HTTP Components. \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnDebuggingUTF8Encoder.class/class/handlesEncoding..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnDebuggingUTF8Encoder.class/class/handlesEncoding..st new file mode 100644 index 000000000..6be0877ec --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnDebuggingUTF8Encoder.class/class/handlesEncoding..st @@ -0,0 +1,5 @@ +accessing +handlesEncoding: string + "Return true when my instances handle the encoding described by string" + + ^ (self canonicalEncodingIdentifier: string) = 'utf8debug' \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnDebuggingUTF8Encoder.class/class/knownEncodingIdentifiers.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnDebuggingUTF8Encoder.class/class/knownEncodingIdentifiers.st new file mode 100644 index 000000000..1071d9092 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnDebuggingUTF8Encoder.class/class/knownEncodingIdentifiers.st @@ -0,0 +1,3 @@ +accessing +knownEncodingIdentifiers + ^ #( 'utf8debug' ) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnDebuggingUTF8Encoder.class/instance/defaultWriteErrorBlock.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnDebuggingUTF8Encoder.class/instance/defaultWriteErrorBlock.st new file mode 100644 index 000000000..c602e63f4 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnDebuggingUTF8Encoder.class/instance/defaultWriteErrorBlock.st @@ -0,0 +1,4 @@ +accessing +defaultWriteErrorBlock + ^ [ :codePoint | + '' format: { codePoint } ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnDebuggingUTF8Encoder.class/instance/errorOutsideRange.to..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnDebuggingUTF8Encoder.class/instance/errorOutsideRange.to..st new file mode 100644 index 000000000..2d2780d6b --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnDebuggingUTF8Encoder.class/instance/errorOutsideRange.to..st @@ -0,0 +1,7 @@ +error handling +errorOutsideRange: codePoint to: stream + | errorMessage | + errorMessage := self writeErrorBlock value: codePoint. + errorMessage isByteString + ifFalse: [ errorMessage := self defaultWriteErrorBlock value: codePoint ]. + stream nextPutAll: errorMessage asByteArray \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnDebuggingUTF8Encoder.class/instance/identifier.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnDebuggingUTF8Encoder.class/instance/identifier.st new file mode 100644 index 000000000..ce501d9fe --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnDebuggingUTF8Encoder.class/instance/identifier.st @@ -0,0 +1,3 @@ +accessing +identifier + ^ 'utf8debug' \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnDebuggingUTF8Encoder.class/instance/writeErrorBlock..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnDebuggingUTF8Encoder.class/instance/writeErrorBlock..st new file mode 100644 index 000000000..eb4ab388e --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnDebuggingUTF8Encoder.class/instance/writeErrorBlock..st @@ -0,0 +1,3 @@ +accessing +writeErrorBlock: aOneArgumentBlock + writeErrorBlock := aOneArgumentBlock \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnDebuggingUTF8Encoder.class/instance/writeErrorBlock.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnDebuggingUTF8Encoder.class/instance/writeErrorBlock.st new file mode 100644 index 000000000..91d97f7ae --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnDebuggingUTF8Encoder.class/instance/writeErrorBlock.st @@ -0,0 +1,3 @@ +accessing +writeErrorBlock + ^ writeErrorBlock ifNil: [ writeErrorBlock := self defaultWriteErrorBlock ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnDebuggingUTF8Encoder.class/properties.json b/repository/Zinc-Character-Encoding-Core.v37.package/ZnDebuggingUTF8Encoder.class/properties.json new file mode 100644 index 000000000..749883e20 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnDebuggingUTF8Encoder.class/properties.json @@ -0,0 +1,13 @@ +{ + "commentStamp" : "", + "super" : "ZnLossyUTF8Encoder", + "category" : "Zinc-Character-Encoding-Core", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ + "writeErrorBlock" + ], + "name" : "ZnDebuggingUTF8Encoder", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnDefaultCharacterEncoder.class/README.md b/repository/Zinc-Character-Encoding-Core.v37.package/ZnDefaultCharacterEncoder.class/README.md new file mode 100644 index 000000000..7be4511e0 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnDefaultCharacterEncoder.class/README.md @@ -0,0 +1,8 @@ +I am ZnDefaultCharacterEncoder. +I am a DynamicVariable and a ProcessSpecificVariable. + +I can be used to modify the default ZnCharacteEncoder on a per process basis, for example: + +ZnDefaultCharacterEncoder + value: ZnUTF8EncoderGS latin1 + during: [ ZnClient new get: 'http://zn.stfx.eu/zn/small.html' ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnDefaultCharacterEncoder.class/class/default.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnDefaultCharacterEncoder.class/class/default.st new file mode 100644 index 000000000..265c1e786 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnDefaultCharacterEncoder.class/class/default.st @@ -0,0 +1,4 @@ +accessing +default + "GemStone needs it on class side" + ^ ZnCharacterEncoderGS utf8 diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnDefaultCharacterEncoder.class/properties.json b/repository/Zinc-Character-Encoding-Core.v37.package/ZnDefaultCharacterEncoder.class/properties.json new file mode 100644 index 000000000..e7d7b9e16 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnDefaultCharacterEncoder.class/properties.json @@ -0,0 +1,11 @@ +{ + "commentStamp" : "", + "super" : "DynamicVariable", + "category" : "Zinc-Character-Encoding-Core", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "ZnDefaultCharacterEncoder", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedReadStream.extension/class/isAbstract.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedReadStream.extension/class/isAbstract.st new file mode 100644 index 000000000..b35955571 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedReadStream.extension/class/isAbstract.st @@ -0,0 +1,5 @@ +*zinc-character-encoding-core +isAbstract + "Protocol: testing" + + ^ self == ZnEncodedReadStream diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedReadStream.extension/instance/atEnd.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedReadStream.extension/instance/atEnd.st new file mode 100644 index 000000000..4f6e0a2ea --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedReadStream.extension/instance/atEnd.st @@ -0,0 +1,4 @@ +*zinc-character-encoding-core +atEnd + "Protocol: testing" + ^ peeked isNil and: [ stream atEnd ] diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedReadStream.extension/instance/back.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedReadStream.extension/instance/back.st new file mode 100644 index 000000000..f06f1a8b3 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedReadStream.extension/instance/back.st @@ -0,0 +1,8 @@ +*zinc-character-encoding-core +back + "Protocol: accessing" + self encoder backOnStream: stream. + peeked ifNotNil: [ + self encoder backOnStream: stream. + peeked := nil ]. + ^ nil diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedReadStream.extension/instance/collectionSpecies.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedReadStream.extension/instance/collectionSpecies.st new file mode 100644 index 000000000..1dc251efd --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedReadStream.extension/instance/collectionSpecies.st @@ -0,0 +1,4 @@ +*zinc-character-encoding-core +collectionSpecies + "Protocol: accessing" + ^ self subclassResponsibility diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedReadStream.extension/instance/contents.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedReadStream.extension/instance/contents.st new file mode 100644 index 000000000..c80f7d3c6 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedReadStream.extension/instance/contents.st @@ -0,0 +1,6 @@ +*zinc-character-encoding-core +contents + "Protocol: accessing" + "This is technically not correct, but it is better than nothing" + + ^ self upToEnd diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedReadStream.extension/instance/isReadOnly.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedReadStream.extension/instance/isReadOnly.st new file mode 100644 index 000000000..8726bf6ca --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedReadStream.extension/instance/isReadOnly.st @@ -0,0 +1,5 @@ +*zinc-character-encoding-core +isReadOnly + "Protocol: testing" + + ^ true diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedReadStream.extension/instance/next..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedReadStream.extension/instance/next..st new file mode 100644 index 000000000..e11fbb952 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedReadStream.extension/instance/next..st @@ -0,0 +1,9 @@ +*zinc-character-encoding-core +next: requestedCount + "Protocol: accessing" + "Read requestedCount elements into new collection and return it, + it could be that less elements were available" + + ^ self + next: requestedCount + into: (self collectionSpecies new: requestedCount) diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedReadStream.extension/instance/next.into..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedReadStream.extension/instance/next.into..st new file mode 100644 index 000000000..664e9e1d3 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedReadStream.extension/instance/next.into..st @@ -0,0 +1,10 @@ +*zinc-character-encoding-core +next: requestedCount into: collection + "Protocol: accessing" + "Read requestedCount elements into collection, + returning a copy if less elements are available" + + ^ self + next: requestedCount + into: collection + startingAt: 1 diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedReadStream.extension/instance/next.into.startingAt..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedReadStream.extension/instance/next.into.startingAt..st new file mode 100644 index 000000000..8049ca1e7 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedReadStream.extension/instance/next.into.startingAt..st @@ -0,0 +1,14 @@ +*zinc-character-encoding-core +next: requestedCount into: collection startingAt: offset + "Protocol: accessing" + "Read requestedCount elements into collection starting at offset, + returning a copy if less elements are available" + + | readCount | + readCount := self + readInto: collection + startingAt: offset + count: requestedCount. + ^ requestedCount = readCount + ifTrue: [ collection ] + ifFalse: [ collection copyFrom: 1 to: offset + readCount - 1 ] diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedReadStream.extension/instance/next.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedReadStream.extension/instance/next.st new file mode 100644 index 000000000..1a484e513 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedReadStream.extension/instance/next.st @@ -0,0 +1,10 @@ +*zinc-character-encoding-core +next + "Protocol: accessing" + ^ peeked + ifNil: [ + stream atEnd ifFalse: [ self nextElement ] ] + ifNotNil: [ | character | + character := peeked. + peeked := nil. + character ] diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedReadStream.extension/instance/nextElement.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedReadStream.extension/instance/nextElement.st new file mode 100644 index 000000000..18d89da4b --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedReadStream.extension/instance/nextElement.st @@ -0,0 +1,4 @@ +*zinc-character-encoding-core +nextElement + "Protocol: private" + self subclassResponsibility diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedReadStream.extension/instance/nextInto..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedReadStream.extension/instance/nextInto..st new file mode 100644 index 000000000..5785c846c --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedReadStream.extension/instance/nextInto..st @@ -0,0 +1,9 @@ +*zinc-character-encoding-core +nextInto: collection + "Protocol: accessing" + "Read the next elements of the receiver into collection, + returning a copy if less elements are available" + + ^ self + next: collection size + into: collection diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedReadStream.extension/instance/peek.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedReadStream.extension/instance/peek.st new file mode 100644 index 000000000..894e90d08 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedReadStream.extension/instance/peek.st @@ -0,0 +1,6 @@ +*zinc-character-encoding-core +peek + "Protocol: accessing" + ^ peeked + ifNil: [ + stream atEnd ifFalse: [ peeked := self nextElement ] ] diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedReadStream.extension/instance/peekFor..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedReadStream.extension/instance/peekFor..st new file mode 100644 index 000000000..76b61d9ef --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedReadStream.extension/instance/peekFor..st @@ -0,0 +1,8 @@ +*zinc-character-encoding-core +peekFor: object + "Protocol: accessing" + ^ self peek = object + ifTrue: [ + self next. + true ] + ifFalse: [ false ] diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedReadStream.extension/instance/position..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedReadStream.extension/instance/position..st new file mode 100644 index 000000000..64bd924e6 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedReadStream.extension/instance/position..st @@ -0,0 +1,10 @@ +*zinc-character-encoding-core +position: aPosition + "Protocol: accessing" + "Set the byte position in the underlying/wrapped binary stream to aPosition. + This is not a character based position! Positions are zero based. + I will move further backward if aPosition is not at the beginning of a code point." + + super position: aPosition. + self encoder ensureAtBeginOfCodePointOnStream: stream. + peeked := nil diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedReadStream.extension/instance/position.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedReadStream.extension/instance/position.st new file mode 100644 index 000000000..a9badf35a --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedReadStream.extension/instance/position.st @@ -0,0 +1,5 @@ +*zinc-character-encoding-core +position + "Protocol: accessing" + + ^ super position - (peeked ifNil: [ 0 ] ifNotNil: [ 1 ]) diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedReadStream.extension/instance/positionForward..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedReadStream.extension/instance/positionForward..st new file mode 100644 index 000000000..c33092c74 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedReadStream.extension/instance/positionForward..st @@ -0,0 +1,10 @@ +*zinc-character-encoding-core +positionForward: aPosition + "Protocol: accessing" + "Set the byte position in the underlying/wrapped binary stream to aPosition. + This is not a character based position! Positions are zero based. + I will move further forward if aPosition is not at the beginning of a code point." + + super position: aPosition. + self encoder skipToBeginOfCodePointOnStream: stream. + peeked := nil diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedReadStream.extension/instance/readInto.startingAt.count..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedReadStream.extension/instance/readInto.startingAt.count..st new file mode 100644 index 000000000..686a5e153 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedReadStream.extension/instance/readInto.startingAt.count..st @@ -0,0 +1,11 @@ +*zinc-character-encoding-core +readInto: collection startingAt: offset count: requestedCount + "Protocol: accessing" + "Read requestedCount elements into collection starting at offset, + returning the number of elements read, there could be less elements available. + This is an inefficient abstract implementation, reading one by one." + + 0 to: requestedCount - 1 do: [ :count | | object | + (object := self next) ifNil: [ ^ count ]. + collection at: offset + count put: object ]. + ^ requestedCount diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedReadStream.extension/instance/readStream.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedReadStream.extension/instance/readStream.st new file mode 100644 index 000000000..1d0682576 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedReadStream.extension/instance/readStream.st @@ -0,0 +1,4 @@ +*zinc-character-encoding-core +readStream + "Protocol: accessing" + ^ self diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedReadStream.extension/instance/skip..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedReadStream.extension/instance/skip..st new file mode 100644 index 000000000..0ece651ba --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedReadStream.extension/instance/skip..st @@ -0,0 +1,5 @@ +*zinc-character-encoding-core +skip: count + "Protocol: accessing" + count < 0 ifTrue: [ self error: 'cannot skip backwards' ]. + count timesRepeat: [ self next ] diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedReadStream.extension/instance/upTo..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedReadStream.extension/instance/upTo..st new file mode 100644 index 000000000..ade2785d0 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedReadStream.extension/instance/upTo..st @@ -0,0 +1,7 @@ +*zinc-character-encoding-core +upTo: anObject + "Protocol: accessing" + ^ self collectionSpecies + streamContents: [ :out | | element | + [ self atEnd or: [ (element := self next) = anObject ] ] whileFalse: [ + out nextPut: element ] ] diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedReadStream.extension/instance/upToEnd.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedReadStream.extension/instance/upToEnd.st new file mode 100644 index 000000000..88105a88e --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedReadStream.extension/instance/upToEnd.st @@ -0,0 +1,6 @@ +*zinc-character-encoding-core +upToEnd + "Protocol: accessing" + ^ self collectionSpecies + streamContents: [ :collectionStream | + [ self atEnd ] whileFalse: [ collectionStream nextPut: self next ] ] diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedReadStream.extension/properties.json b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedReadStream.extension/properties.json new file mode 100644 index 000000000..7fe8b127b --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedReadStream.extension/properties.json @@ -0,0 +1,2 @@ +{ + "name" : "ZnEncodedReadStream" } diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedStream.extension/class/defaultEncoder.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedStream.extension/class/defaultEncoder.st new file mode 100644 index 000000000..19ab5bd3d --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedStream.extension/class/defaultEncoder.st @@ -0,0 +1,4 @@ +*zinc-character-encoding-core +defaultEncoder + "Protocol: accessing" + ^ ZnCharacterEncoderGS utf8 diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedStream.extension/class/isAbstract.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedStream.extension/class/isAbstract.st new file mode 100644 index 000000000..eeee97aef --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedStream.extension/class/isAbstract.st @@ -0,0 +1,5 @@ +*zinc-character-encoding-core +isAbstract + "Protocol: testing" + + ^ self == ZnEncodedStream diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedStream.extension/class/on..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedStream.extension/class/on..st new file mode 100644 index 000000000..41fb400b4 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedStream.extension/class/on..st @@ -0,0 +1,6 @@ +*zinc-character-encoding-core +on: wrappedStream + "Protocol: instance creation" + ^ self new + on: wrappedStream; + yourself diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedStream.extension/class/on.encoding..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedStream.extension/class/on.encoding..st new file mode 100644 index 000000000..c0d2b0eeb --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedStream.extension/class/on.encoding..st @@ -0,0 +1,7 @@ +*zinc-character-encoding-core +on: wrappedStream encoding: encoding + "Protocol: instance creation" + ^ self new + on: wrappedStream; + encoding: encoding; + yourself diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedStream.extension/instance/close.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedStream.extension/instance/close.st new file mode 100644 index 000000000..bbe91acf5 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedStream.extension/instance/close.st @@ -0,0 +1,4 @@ +*zinc-character-encoding-core +close + "Protocol: initialize-release" + stream close diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedStream.extension/instance/closed.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedStream.extension/instance/closed.st new file mode 100644 index 000000000..3c045de46 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedStream.extension/instance/closed.st @@ -0,0 +1,4 @@ +*zinc-character-encoding-core +closed + "Protocol: testing" + ^ stream closed diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedStream.extension/instance/encoder..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedStream.extension/instance/encoder..st new file mode 100644 index 000000000..d2b92e67c --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedStream.extension/instance/encoder..st @@ -0,0 +1,4 @@ +*zinc-character-encoding-core +encoder: characterEncoder + "Protocol: initialize-release" + encoder := characterEncoder diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedStream.extension/instance/encoder.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedStream.extension/instance/encoder.st new file mode 100644 index 000000000..02c229015 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedStream.extension/instance/encoder.st @@ -0,0 +1,4 @@ +*zinc-character-encoding-core +encoder + "Protocol: accessing" + ^ encoder ifNil: [ encoder := self class defaultEncoder ] diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedStream.extension/instance/encoding..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedStream.extension/instance/encoding..st new file mode 100644 index 000000000..04a7e4d23 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedStream.extension/instance/encoding..st @@ -0,0 +1,4 @@ +*zinc-character-encoding-core +encoding: encoding + "Protocol: initialize-release" + encoder := encoding asZnCharacterEncoder diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedStream.extension/instance/flush.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedStream.extension/instance/flush.st new file mode 100644 index 000000000..6f7105f01 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedStream.extension/instance/flush.st @@ -0,0 +1,4 @@ +*zinc-character-encoding-core +flush + "Protocol: accessing" + ^ stream flush diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedStream.extension/instance/isBinary.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedStream.extension/instance/isBinary.st new file mode 100644 index 000000000..e80c63db4 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedStream.extension/instance/isBinary.st @@ -0,0 +1,4 @@ +*zinc-character-encoding-core +isBinary + "Protocol: testing" + ^ false diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedStream.extension/instance/isStream.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedStream.extension/instance/isStream.st new file mode 100644 index 000000000..0c04ed80c --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedStream.extension/instance/isStream.st @@ -0,0 +1,4 @@ +*zinc-character-encoding-core +isStream + "Protocol: testing" + ^ true diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedStream.extension/instance/on..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedStream.extension/instance/on..st new file mode 100644 index 000000000..0f8db1e2a --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedStream.extension/instance/on..st @@ -0,0 +1,4 @@ +*zinc-character-encoding-core +on: wrappedStream + "Protocol: initialize-release" + stream := wrappedStream diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedStream.extension/instance/position..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedStream.extension/instance/position..st new file mode 100644 index 000000000..9ac0c9d24 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedStream.extension/instance/position..st @@ -0,0 +1,4 @@ +*zinc-character-encoding-core +position: aPosition + "Protocol: accessing" + stream position: aPosition diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedStream.extension/instance/position.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedStream.extension/instance/position.st new file mode 100644 index 000000000..219e93bb7 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedStream.extension/instance/position.st @@ -0,0 +1,7 @@ +*zinc-character-encoding-core +position + "Protocol: accessing" + "Return the byte position in the underlying/wrapped binary stream, zero based. + This is not a character based position! But it is always at the beginning of a code point." + + ^ stream position diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedStream.extension/instance/rawStream.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedStream.extension/instance/rawStream.st new file mode 100644 index 000000000..3892476ff --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedStream.extension/instance/rawStream.st @@ -0,0 +1,8 @@ +*zinc-character-encoding-core +rawStream + "Protocol: accessing" + "Answer the innermost stream wrapped by the receiver, e.g. a raw binary file stream, + socket stream, or regular Read/WriteStream. + Defer to the wrappedStream." + + ^ self wrappedStream rawStream diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedStream.extension/instance/reset.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedStream.extension/instance/reset.st new file mode 100644 index 000000000..4edb7344e --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedStream.extension/instance/reset.st @@ -0,0 +1,5 @@ +*zinc-character-encoding-core +reset + "Protocol: initialization" + + ^ stream reset diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedStream.extension/instance/setToEnd.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedStream.extension/instance/setToEnd.st new file mode 100644 index 000000000..613a036fc --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedStream.extension/instance/setToEnd.st @@ -0,0 +1,4 @@ +*zinc-character-encoding-core +setToEnd + "Protocol: accessing" + stream setToEnd diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedStream.extension/instance/size.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedStream.extension/instance/size.st new file mode 100644 index 000000000..868c423f4 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedStream.extension/instance/size.st @@ -0,0 +1,4 @@ +*zinc-character-encoding-core +size + "Protocol: accessing" + ^ stream size diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedStream.extension/instance/truncate..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedStream.extension/instance/truncate..st new file mode 100644 index 000000000..d698aef6f --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedStream.extension/instance/truncate..st @@ -0,0 +1,4 @@ +*zinc-character-encoding-core +truncate: anInteger + "Protocol: accessing" + stream truncate: anInteger diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedStream.extension/instance/truncate.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedStream.extension/instance/truncate.st new file mode 100644 index 000000000..0aead35de --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedStream.extension/instance/truncate.st @@ -0,0 +1,4 @@ +*zinc-character-encoding-core +truncate + "Protocol: accessing" + stream truncate diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedStream.extension/instance/wrappedStream.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedStream.extension/instance/wrappedStream.st new file mode 100644 index 000000000..7ea898bb6 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedStream.extension/instance/wrappedStream.st @@ -0,0 +1,4 @@ +*zinc-character-encoding-core +wrappedStream + "Protocol: accessing" + ^ stream diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedStream.extension/properties.json b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedStream.extension/properties.json new file mode 100644 index 000000000..9782cb5a8 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedStream.extension/properties.json @@ -0,0 +1,2 @@ +{ + "name" : "ZnEncodedStream" } diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedWriteStream.extension/class/isAbstract.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedWriteStream.extension/class/isAbstract.st new file mode 100644 index 000000000..679f3a2c1 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedWriteStream.extension/class/isAbstract.st @@ -0,0 +1,5 @@ +*zinc-character-encoding-core +isAbstract + "Protocol: testing" + + ^ self == ZnEncodedWriteStream diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedWriteStream.extension/instance/^less.less.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedWriteStream.extension/instance/^less.less.st new file mode 100644 index 000000000..bbacf42d3 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedWriteStream.extension/instance/^less.less.st @@ -0,0 +1,10 @@ +*zinc-character-encoding-core +<< anObject + "Protocol: accessing" + "Write anObject to the receiver, dispatching using #putOn: + This is a shortcut for both nextPut: and nextPutAll: since anObject can be both + the element type of the receiver as well as a collection of those elements. + No further conversions of anObject are applied. + Return self to accomodate chaining." + + anObject putOn: self diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedWriteStream.extension/instance/flush.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedWriteStream.extension/instance/flush.st new file mode 100644 index 000000000..31fa9d301 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedWriteStream.extension/instance/flush.st @@ -0,0 +1,4 @@ +*zinc-character-encoding-core +flush + "Protocol: accessing" + stream flush diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedWriteStream.extension/instance/next.putAll..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedWriteStream.extension/instance/next.putAll..st new file mode 100644 index 000000000..a9768b824 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedWriteStream.extension/instance/next.putAll..st @@ -0,0 +1,7 @@ +*zinc-character-encoding-core +next: count putAll: collection + "Protocol: accessing" + self + next: count + putAll: collection + startingAt: 1 diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedWriteStream.extension/instance/next.putAll.startingAt..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedWriteStream.extension/instance/next.putAll.startingAt..st new file mode 100644 index 000000000..c954cd63c --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedWriteStream.extension/instance/next.putAll.startingAt..st @@ -0,0 +1,8 @@ +*zinc-character-encoding-core +next: count putAll: collection startingAt: offset + "Protocol: accessing" + "Write count items from collection starting at offset. + This is an inefficient abstract implementation writing one by one." + + 0 to: count - 1 do: [ :each | + self nextPut: (collection at: offset + each) ] diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedWriteStream.extension/instance/nextPut..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedWriteStream.extension/instance/nextPut..st new file mode 100644 index 000000000..fdfff6bcc --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedWriteStream.extension/instance/nextPut..st @@ -0,0 +1,4 @@ +*zinc-character-encoding-core +nextPut: anObject + "Protocol: accessing" + self subclassResponsibility diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedWriteStream.extension/instance/nextPutAll..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedWriteStream.extension/instance/nextPutAll..st new file mode 100644 index 000000000..576344329 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedWriteStream.extension/instance/nextPutAll..st @@ -0,0 +1,7 @@ +*zinc-character-encoding-core +nextPutAll: collection + "Protocol: accessing" + self + next: collection size + putAll: collection + startingAt: 1 diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedWriteStream.extension/properties.json b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedWriteStream.extension/properties.json new file mode 100644 index 000000000..ec298742d --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEncodedWriteStream.extension/properties.json @@ -0,0 +1,2 @@ +{ + "name" : "ZnEncodedWriteStream" } diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnEndianSensitiveUTFEncoder.class/README.md b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEndianSensitiveUTFEncoder.class/README.md new file mode 100644 index 000000000..187b260b3 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEndianSensitiveUTFEncoder.class/README.md @@ -0,0 +1,4 @@ +I am ZnEndianSensitiveUTFEncoder. +I am a ZnCharacterEncoderGS. +I add support for UTF encodings that are sensitive to endianness. +The default is big endian. diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnEndianSensitiveUTFEncoder.class/class/handlesEncoding..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEndianSensitiveUTFEncoder.class/class/handlesEncoding..st new file mode 100644 index 000000000..4cb9521a7 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEndianSensitiveUTFEncoder.class/class/handlesEncoding..st @@ -0,0 +1,5 @@ +accessing +handlesEncoding: string + "Return true when my instances handle the encoding described by string" + + ^ false \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnEndianSensitiveUTFEncoder.class/class/isAbstract.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEndianSensitiveUTFEncoder.class/class/isAbstract.st new file mode 100644 index 000000000..deebb9199 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEndianSensitiveUTFEncoder.class/class/isAbstract.st @@ -0,0 +1,3 @@ +testing +isAbstract + ^ self = ZnEndianSensitiveUTFEncoder \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnEndianSensitiveUTFEncoder.class/class/newForEncoding..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEndianSensitiveUTFEncoder.class/class/newForEncoding..st new file mode 100644 index 000000000..e93793046 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEndianSensitiveUTFEncoder.class/class/newForEncoding..st @@ -0,0 +1,11 @@ +instance creation +newForEncoding: string + "Return a new character encoder object for an encoding described by string. + Try to infer endianness from string, defaulting to big endian." + + | encoder | + encoder := self new. + encoder identifier: string. + (string asLowercase endsWith: 'be') ifTrue: [ encoder beBigEndian ]. + (string asLowercase endsWith: 'le') ifTrue: [ encoder beLittleEndian ]. + ^ encoder \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnEndianSensitiveUTFEncoder.class/instance/^equals.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEndianSensitiveUTFEncoder.class/instance/^equals.st new file mode 100644 index 000000000..873be250d --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEndianSensitiveUTFEncoder.class/instance/^equals.st @@ -0,0 +1,3 @@ +comparing += anObject + ^ super = anObject and: [ self identifier == anObject identifier ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnEndianSensitiveUTFEncoder.class/instance/beBigEndian.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEndianSensitiveUTFEncoder.class/instance/beBigEndian.st new file mode 100644 index 000000000..fc3b61b57 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEndianSensitiveUTFEncoder.class/instance/beBigEndian.st @@ -0,0 +1,3 @@ +initialization +beBigEndian + endianness := #big \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnEndianSensitiveUTFEncoder.class/instance/beLittleEndian.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEndianSensitiveUTFEncoder.class/instance/beLittleEndian.st new file mode 100644 index 000000000..57f36e444 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEndianSensitiveUTFEncoder.class/instance/beLittleEndian.st @@ -0,0 +1,3 @@ +initialization +beLittleEndian + endianness := #little \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnEndianSensitiveUTFEncoder.class/instance/endianness.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEndianSensitiveUTFEncoder.class/instance/endianness.st new file mode 100644 index 000000000..486f7c40c --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEndianSensitiveUTFEncoder.class/instance/endianness.st @@ -0,0 +1,3 @@ +accessing +endianness + ^ endianness \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnEndianSensitiveUTFEncoder.class/instance/hash.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEndianSensitiveUTFEncoder.class/instance/hash.st new file mode 100644 index 000000000..f5af769e9 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEndianSensitiveUTFEncoder.class/instance/hash.st @@ -0,0 +1,3 @@ +comparing +hash + ^ self identifier hash \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnEndianSensitiveUTFEncoder.class/instance/identifier..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEndianSensitiveUTFEncoder.class/instance/identifier..st new file mode 100644 index 000000000..eb195a155 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEndianSensitiveUTFEncoder.class/instance/identifier..st @@ -0,0 +1,3 @@ +accessing +identifier: anObject + identifier := anObject \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnEndianSensitiveUTFEncoder.class/instance/identifier.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEndianSensitiveUTFEncoder.class/instance/identifier.st new file mode 100644 index 000000000..c7b817464 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEndianSensitiveUTFEncoder.class/instance/identifier.st @@ -0,0 +1,3 @@ +accessing +identifier + ^ identifier \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnEndianSensitiveUTFEncoder.class/instance/initialize.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEndianSensitiveUTFEncoder.class/instance/initialize.st new file mode 100644 index 000000000..511d04fa7 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEndianSensitiveUTFEncoder.class/instance/initialize.st @@ -0,0 +1,3 @@ +initialization +initialize + endianness := #big \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnEndianSensitiveUTFEncoder.class/instance/isBigEndian.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEndianSensitiveUTFEncoder.class/instance/isBigEndian.st new file mode 100644 index 000000000..e4760229e --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEndianSensitiveUTFEncoder.class/instance/isBigEndian.st @@ -0,0 +1,3 @@ +testing +isBigEndian + ^ endianness = #big \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnEndianSensitiveUTFEncoder.class/instance/isLittleEndian.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEndianSensitiveUTFEncoder.class/instance/isLittleEndian.st new file mode 100644 index 000000000..530b70ca3 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEndianSensitiveUTFEncoder.class/instance/isLittleEndian.st @@ -0,0 +1,3 @@ +testing +isLittleEndian + ^ endianness = #little \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnEndianSensitiveUTFEncoder.class/instance/printOn..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEndianSensitiveUTFEncoder.class/instance/printOn..st new file mode 100644 index 000000000..b77a7f420 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEndianSensitiveUTFEncoder.class/instance/printOn..st @@ -0,0 +1,7 @@ +printing +printOn: stream + super printOn: stream. + stream nextPut: $(. + stream print: self identifier asString; space. + stream nextPutAll: endianness; nextPutAll: ' endian'. + stream nextPut: $) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnEndianSensitiveUTFEncoder.class/instance/swapEndianness.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEndianSensitiveUTFEncoder.class/instance/swapEndianness.st new file mode 100644 index 000000000..9e4f17cdd --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEndianSensitiveUTFEncoder.class/instance/swapEndianness.st @@ -0,0 +1,5 @@ +private +swapEndianness + self isLittleEndian + ifTrue: [ self beBigEndian ] + ifFalse: [ self beLittleEndian ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnEndianSensitiveUTFEncoder.class/properties.json b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEndianSensitiveUTFEncoder.class/properties.json new file mode 100644 index 000000000..6bd4d17f5 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEndianSensitiveUTFEncoder.class/properties.json @@ -0,0 +1,14 @@ +{ + "commentStamp" : "", + "super" : "ZnUTFEncoder", + "category" : "Zinc-Character-Encoding-Core", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ + "endianness", + "identifier" + ], + "name" : "ZnEndianSensitiveUTFEncoder", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnEndianessReadWriteStream.class/README.md b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEndianessReadWriteStream.class/README.md new file mode 100644 index 000000000..ae52d2c0e --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEndianessReadWriteStream.class/README.md @@ -0,0 +1 @@ +I am a stream decorator that knows how to read and write little endian numbers from my underlying stream. \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnEndianessReadWriteStream.class/class/on..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEndianessReadWriteStream.class/class/on..st new file mode 100644 index 000000000..49723c84a --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEndianessReadWriteStream.class/class/on..st @@ -0,0 +1,5 @@ +instance creation +on: writeStream + ^ self basicNew + on: writeStream; + yourself \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnEndianessReadWriteStream.class/class/on.do..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEndianessReadWriteStream.class/class/on.do..st new file mode 100644 index 000000000..fcaae6693 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEndianessReadWriteStream.class/class/on.do..st @@ -0,0 +1,10 @@ +instance creation +on: writeStream do: block + "Execute block with as argument a ZnBufferedWriteStream on writeStream, + making sure #flush is called at the end. Return the value of block." + + | bufferedWriteStream result | + bufferedWriteStream := self on: writeStream. + result := block value: bufferedWriteStream. + bufferedWriteStream flush. + ^ result \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnEndianessReadWriteStream.class/instance/nextLittleEndianNumber..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEndianessReadWriteStream.class/instance/nextLittleEndianNumber..st new file mode 100644 index 000000000..03f62bf38 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEndianessReadWriteStream.class/instance/nextLittleEndianNumber..st @@ -0,0 +1,9 @@ +endianess +nextLittleEndianNumber: n + "Answer the next n bytes as a positive Integer or LargePositiveInteger, where the bytes are ordered from least significant to most significant." + + | bytes s | + bytes := stream next: n. + s := 0. + n to: 1 by: -1 do: [:i | s := (s bitShift: 8) bitOr: (bytes at: i)]. + ^ s \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnEndianessReadWriteStream.class/instance/nextLittleEndianNumber.put..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEndianessReadWriteStream.class/instance/nextLittleEndianNumber.put..st new file mode 100644 index 000000000..69556284d --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEndianessReadWriteStream.class/instance/nextLittleEndianNumber.put..st @@ -0,0 +1,7 @@ +endianess +nextLittleEndianNumber: n put: value + "Answer the next n bytes as a positive Integer or LargePositiveInteger, where the bytes are ordered from least significant to most significant." + | bytes | + bytes := ByteArray new: n. + 1 to: n do: [:i | bytes at: i put: (value byteAt: i)]. + stream nextPutAll: bytes \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnEndianessReadWriteStream.class/instance/on..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEndianessReadWriteStream.class/instance/on..st new file mode 100644 index 000000000..9a091a797 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEndianessReadWriteStream.class/instance/on..st @@ -0,0 +1,4 @@ +initialize-release +on: aStream + + stream := aStream \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnEndianessReadWriteStream.class/properties.json b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEndianessReadWriteStream.class/properties.json new file mode 100644 index 000000000..5682f7ba9 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnEndianessReadWriteStream.class/properties.json @@ -0,0 +1,13 @@ +{ + "commentStamp" : "", + "super" : "Object", + "category" : "Zinc-Character-Encoding-Core", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ + "stream" + ], + "name" : "ZnEndianessReadWriteStream", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnFastLineReader.class/README.md b/repository/Zinc-Character-Encoding-Core.v37.package/ZnFastLineReader.class/README.md new file mode 100644 index 000000000..d1fbc3cbc --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnFastLineReader.class/README.md @@ -0,0 +1 @@ +I am ZnFastLineReader, a helper to efficiently read CR, LF or CRLF terminated lines from a character stream. \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnFastLineReader.class/class/on..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnFastLineReader.class/class/on..st new file mode 100644 index 000000000..764dfc268 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnFastLineReader.class/class/on..st @@ -0,0 +1,5 @@ +instance creation +on: characterReadStream + ^ self new + on: characterReadStream; + yourself \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnFastLineReader.class/instance/atEnd.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnFastLineReader.class/instance/atEnd.st new file mode 100644 index 000000000..b761ce7e9 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnFastLineReader.class/instance/atEnd.st @@ -0,0 +1,3 @@ +testing +atEnd + ^ readStream atEnd \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnFastLineReader.class/instance/beWide.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnFastLineReader.class/instance/beWide.st new file mode 100644 index 000000000..828993bd8 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnFastLineReader.class/instance/beWide.st @@ -0,0 +1,3 @@ +initialize +beWide + self bufferStream: (WideString new: 32) writeStream \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnFastLineReader.class/instance/bufferStream..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnFastLineReader.class/instance/bufferStream..st new file mode 100644 index 000000000..a4493fa5d --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnFastLineReader.class/instance/bufferStream..st @@ -0,0 +1,3 @@ +initialize +bufferStream: characterWriteStream + ^ bufferStream := characterWriteStream \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnFastLineReader.class/instance/close.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnFastLineReader.class/instance/close.st new file mode 100644 index 000000000..4342c782a --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnFastLineReader.class/instance/close.st @@ -0,0 +1,3 @@ +initialize +close + readStream close \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnFastLineReader.class/instance/initialize.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnFastLineReader.class/instance/initialize.st new file mode 100644 index 000000000..298f14551 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnFastLineReader.class/instance/initialize.st @@ -0,0 +1,5 @@ +initialization +initialize + super initialize. + cr := Character cr. + lf := Character lf \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnFastLineReader.class/instance/linesDo..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnFastLineReader.class/instance/linesDo..st new file mode 100644 index 000000000..561ee70dd --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnFastLineReader.class/instance/linesDo..st @@ -0,0 +1,4 @@ +accessing +linesDo: block + + [ self atEnd ] whileFalse: [ self nextLine ifNotNil: block ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnFastLineReader.class/instance/nextLine.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnFastLineReader.class/instance/nextLine.st new file mode 100644 index 000000000..da1d17cc3 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnFastLineReader.class/instance/nextLine.st @@ -0,0 +1,15 @@ +accessing +nextLine + "Read a CR, LF or CRLF terminated line, returning the contents of the line without the EOL. Return nil when the receiver is #atEnd." + + self atEnd ifTrue: [ ^ nil ]. + ^ self streamContents: [ :out | | eol char | + eol := false. + [ eol ] whileFalse: [ + char := readStream next. + (char isNil or: [ char == lf ]) + ifTrue: [ eol := true ] + ifFalse: [ + char == cr + ifTrue: [ eol := true. readStream peekFor: lf ] + ifFalse: [ out nextPut: char ] ] ] ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnFastLineReader.class/instance/on..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnFastLineReader.class/instance/on..st new file mode 100644 index 000000000..f94c9bd39 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnFastLineReader.class/instance/on..st @@ -0,0 +1,3 @@ +initialize +on: characterReadStream + readStream := characterReadStream \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnFastLineReader.class/instance/streamContents..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnFastLineReader.class/instance/streamContents..st new file mode 100644 index 000000000..29cdab814 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnFastLineReader.class/instance/streamContents..st @@ -0,0 +1,11 @@ +private +streamContents: block + "Like readStream collectionSpecies streamContents: block + but reusing the underlying buffer for improved efficiency" + + bufferStream + ifNil: [ + bufferStream := (readStream collectionSpecies new: 32) writeStream ]. + bufferStream reset. + block value: bufferStream. + ^ bufferStream contents \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnFastLineReader.class/properties.json b/repository/Zinc-Character-Encoding-Core.v37.package/ZnFastLineReader.class/properties.json new file mode 100644 index 000000000..e869b1337 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnFastLineReader.class/properties.json @@ -0,0 +1,16 @@ +{ + "commentStamp" : "", + "super" : "Object", + "category" : "Zinc-Character-Encoding-Core", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ + "readStream", + "cr", + "lf", + "bufferStream" + ], + "name" : "ZnFastLineReader", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnIncomplete.class/README.md b/repository/Zinc-Character-Encoding-Core.v37.package/ZnIncomplete.class/README.md new file mode 100644 index 000000000..529898796 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnIncomplete.class/README.md @@ -0,0 +1,9 @@ +I am ZnIncomplete. +I am a ZnCharacterEncodingError. +I am an Error. + +I signal when the binary stream from which a character is read does not contain enough data to form a full character. This typically occurs when the stream is #atEnd, a file is EOF or a network connection is closed - when the end of a stream is reached when more data is expected/needed. + +I can be used to ignore wrongly encoded input by resuming me. By default a question mark will be inserted for each problem and decoding will continue. This is not recommended, as faulty input should not be accepted. + +Part of Zinc HTTP Components \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnIncomplete.class/instance/defaultResumeValue.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnIncomplete.class/instance/defaultResumeValue.st new file mode 100644 index 000000000..738ae0a46 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnIncomplete.class/instance/defaultResumeValue.st @@ -0,0 +1,5 @@ +private +defaultResumeValue + "$? codePoint" + + ^ 63 \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnIncomplete.class/instance/isResumable.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnIncomplete.class/instance/isResumable.st new file mode 100644 index 000000000..db1f6cd8c --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnIncomplete.class/instance/isResumable.st @@ -0,0 +1,3 @@ +testing +isResumable + ^ true \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnIncomplete.class/instance/resume.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnIncomplete.class/instance/resume.st new file mode 100644 index 000000000..b6d3a1f49 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnIncomplete.class/instance/resume.st @@ -0,0 +1,5 @@ +Handling +resume + "Return from the message that signaled the receiver." + + ^ self resume: self defaultResumeValue diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnIncomplete.class/properties.json b/repository/Zinc-Character-Encoding-Core.v37.package/ZnIncomplete.class/properties.json new file mode 100644 index 000000000..bc7fdb6e4 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnIncomplete.class/properties.json @@ -0,0 +1,11 @@ +{ + "commentStamp" : "", + "super" : "ZnCharacterEncodingError", + "category" : "Zinc-Character-Encoding-Core", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "ZnIncomplete", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnInvalidUTF8.class/instance/defaultResumeValue.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnInvalidUTF8.class/instance/defaultResumeValue.st new file mode 100644 index 000000000..738ae0a46 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnInvalidUTF8.class/instance/defaultResumeValue.st @@ -0,0 +1,5 @@ +private +defaultResumeValue + "$? codePoint" + + ^ 63 \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnInvalidUTF8.class/instance/isResumable.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnInvalidUTF8.class/instance/isResumable.st new file mode 100644 index 000000000..db1f6cd8c --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnInvalidUTF8.class/instance/isResumable.st @@ -0,0 +1,3 @@ +testing +isResumable + ^ true \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnInvalidUTF8.class/instance/resume.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnInvalidUTF8.class/instance/resume.st new file mode 100644 index 000000000..b6d3a1f49 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnInvalidUTF8.class/instance/resume.st @@ -0,0 +1,5 @@ +Handling +resume + "Return from the message that signaled the receiver." + + ^ self resume: self defaultResumeValue diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnInvalidUTF8.class/methodProperties.json b/repository/Zinc-Character-Encoding-Core.v37.package/ZnInvalidUTF8.class/methodProperties.json deleted file mode 100644 index 0e4a66223..000000000 --- a/repository/Zinc-Character-Encoding-Core.v37.package/ZnInvalidUTF8.class/methodProperties.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "class" : { - }, - "instance" : { - } } diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnInvalidUTF8.class/properties.json b/repository/Zinc-Character-Encoding-Core.v37.package/ZnInvalidUTF8.class/properties.json index e61c6727e..90d2eb9f0 100644 --- a/repository/Zinc-Character-Encoding-Core.v37.package/ZnInvalidUTF8.class/properties.json +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnInvalidUTF8.class/properties.json @@ -1,14 +1,11 @@ { + "commentStamp" : "", + "super" : "ZnCharacterEncodingError", "category" : "Zinc-Character-Encoding-Core", - "classinstvars" : [ - ], - "classvars" : [ - ], - "commentStamp" : "", - "instvars" : [ - ], + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], "name" : "ZnInvalidUTF8", - "pools" : [ - ], - "super" : "ZnCharacterEncodingError", - "type" : "normal" } + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnLossyUTF8Encoder.class/README.md b/repository/Zinc-Character-Encoding-Core.v37.package/ZnLossyUTF8Encoder.class/README.md new file mode 100644 index 000000000..31614298b --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnLossyUTF8Encoder.class/README.md @@ -0,0 +1,17 @@ +I am ZnLossyUTF8Decoder. +I am a ZnUTF8Decoder. + +I behave like my superclass but will not signal errors when I see illegal UTF-8 encoded input, +instead I will output a Unicode Replacement Character (U+FFFD) for each error. + +In contrast to my superclass I can read any random byte sequence, decoding both legal and illegal UTF-8 sequences. + + Due to my stream based design and usage as well as my stateless implementation, + I will output multiple replacement characters when multiple illegal sequences occur. + + My convenience method #decodeBytesSingleReplacement: shows how to decode bytes so that + only a single replacement character stands for any amount of illegal encoding between legal encodings. + + When I encounter an illegal code point while writing, I output the encoding for the replacement character. + +Part of Zinc HTTP Components. \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnLossyUTF8Encoder.class/class/handlesEncoding..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnLossyUTF8Encoder.class/class/handlesEncoding..st new file mode 100644 index 000000000..df3741300 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnLossyUTF8Encoder.class/class/handlesEncoding..st @@ -0,0 +1,5 @@ +accessing +handlesEncoding: string + "Return true when my instances handle the encoding described by string" + + ^ (self canonicalEncodingIdentifier: string) = 'utf8lossy' \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnLossyUTF8Encoder.class/class/knownEncodingIdentifiers.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnLossyUTF8Encoder.class/class/knownEncodingIdentifiers.st new file mode 100644 index 000000000..26056b496 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnLossyUTF8Encoder.class/class/knownEncodingIdentifiers.st @@ -0,0 +1,3 @@ +accessing +knownEncodingIdentifiers + ^ #( 'utf8lossy' ) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnLossyUTF8Encoder.class/instance/decodeBytesSingleReplacement..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnLossyUTF8Encoder.class/instance/decodeBytesSingleReplacement..st new file mode 100644 index 000000000..eda00b537 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnLossyUTF8Encoder.class/instance/decodeBytesSingleReplacement..st @@ -0,0 +1,22 @@ +convenience +decodeBytesSingleReplacement: bytes + "Decode bytes and return the resulting string. + This variant of #decodeBytes: will only ever use + a single replacement character for each illegal UTF-8 sequence" + + | byteStream replaced replacement char | + byteStream := bytes readStream. + replaced := false. + replacement := self replacementCodePoint asCharacter. + ^ String streamContents: [ :stream | + [ byteStream atEnd ] whileFalse: [ + char := self nextFromStream: byteStream. + char = replacement + ifTrue: [ + replaced + ifFalse: [ + replaced := true. + stream nextPut: replacement ] ] + ifFalse: [ + replaced := false. + stream nextPut: char ] ] ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnLossyUTF8Encoder.class/instance/errorIllegalContinuationByte.from..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnLossyUTF8Encoder.class/instance/errorIllegalContinuationByte.from..st new file mode 100644 index 000000000..d17c38269 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnLossyUTF8Encoder.class/instance/errorIllegalContinuationByte.from..st @@ -0,0 +1,3 @@ +error handling +errorIllegalContinuationByte: byte from: stream + ^ self replacementCodePoint \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnLossyUTF8Encoder.class/instance/errorIllegalLeadingByte.from..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnLossyUTF8Encoder.class/instance/errorIllegalLeadingByte.from..st new file mode 100644 index 000000000..fafae5b8d --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnLossyUTF8Encoder.class/instance/errorIllegalLeadingByte.from..st @@ -0,0 +1,3 @@ +error handling +errorIllegalLeadingByte: byte from: stream + ^ self replacementCodePoint \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnLossyUTF8Encoder.class/instance/errorIncompleteFrom..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnLossyUTF8Encoder.class/instance/errorIncompleteFrom..st new file mode 100644 index 000000000..1ad8fad4d --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnLossyUTF8Encoder.class/instance/errorIncompleteFrom..st @@ -0,0 +1,3 @@ +error handling +errorIncompleteFrom: stream + ^ self replacementCodePoint \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnLossyUTF8Encoder.class/instance/errorOutsideRange.from..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnLossyUTF8Encoder.class/instance/errorOutsideRange.from..st new file mode 100644 index 000000000..2d1f12448 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnLossyUTF8Encoder.class/instance/errorOutsideRange.from..st @@ -0,0 +1,3 @@ +error handling +errorOutsideRange: codePoint from: stream + ^ self replacementCodePoint \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnLossyUTF8Encoder.class/instance/errorOutsideRange.to..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnLossyUTF8Encoder.class/instance/errorOutsideRange.to..st new file mode 100644 index 000000000..fbaa9d651 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnLossyUTF8Encoder.class/instance/errorOutsideRange.to..st @@ -0,0 +1,3 @@ +error handling +errorOutsideRange: codePoint to: stream + stream nextPutAll: self replacementCodePointEncoded \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnLossyUTF8Encoder.class/instance/errorOutsideRangeByteCount..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnLossyUTF8Encoder.class/instance/errorOutsideRangeByteCount..st new file mode 100644 index 000000000..997855d68 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnLossyUTF8Encoder.class/instance/errorOutsideRangeByteCount..st @@ -0,0 +1,3 @@ +error handling +errorOutsideRangeByteCount: codePoint + ^ 0 \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnLossyUTF8Encoder.class/instance/errorOverlong.from..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnLossyUTF8Encoder.class/instance/errorOverlong.from..st new file mode 100644 index 000000000..398b7ac13 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnLossyUTF8Encoder.class/instance/errorOverlong.from..st @@ -0,0 +1,3 @@ +error handling +errorOverlong: codePoint from: stream + ^ self replacementCodePoint \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnLossyUTF8Encoder.class/instance/identifier.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnLossyUTF8Encoder.class/instance/identifier.st new file mode 100644 index 000000000..d0d045a7b --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnLossyUTF8Encoder.class/instance/identifier.st @@ -0,0 +1,3 @@ +accessing +identifier + ^ 'utf8lossy' \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnLossyUTF8Encoder.class/instance/replacementCodePoint.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnLossyUTF8Encoder.class/instance/replacementCodePoint.st new file mode 100644 index 000000000..df425a657 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnLossyUTF8Encoder.class/instance/replacementCodePoint.st @@ -0,0 +1,5 @@ +accessing +replacementCodePoint + "Return the code point for the Unicode Replacement Character U+FFFD" + + ^ 16rFFFD \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnLossyUTF8Encoder.class/instance/replacementCodePointEncoded.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnLossyUTF8Encoder.class/instance/replacementCodePointEncoded.st new file mode 100644 index 000000000..57c3ddd0c --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnLossyUTF8Encoder.class/instance/replacementCodePointEncoded.st @@ -0,0 +1,7 @@ +accessing +replacementCodePointEncoded + "Return the encoded utf-8 byte sequence for the Unicode Replacement Character U+FFFD" + + "self replacementCodePoint asCharacter utf8Encoded" + + ^ #[239 191 189] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnLossyUTF8Encoder.class/properties.json b/repository/Zinc-Character-Encoding-Core.v37.package/ZnLossyUTF8Encoder.class/properties.json new file mode 100644 index 000000000..6f6e74372 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnLossyUTF8Encoder.class/properties.json @@ -0,0 +1,11 @@ +{ + "commentStamp" : "", + "super" : "ZnUTF8EncoderGS", + "category" : "Zinc-Character-Encoding-Core", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "ZnLossyUTF8Encoder", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnNewLineWriterStream.class/README.md b/repository/Zinc-Character-Encoding-Core.v37.package/ZnNewLineWriterStream.class/README.md new file mode 100644 index 000000000..214f0af34 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnNewLineWriterStream.class/README.md @@ -0,0 +1,13 @@ +I am a write stream wrapping a second stream. Whenever they ask me to write a cr, a lf, or a crlf I'll instead print a new line depending on a configured convention. By default I use the current platform convention. + +stream := '' writeStream. +converter := ZnNewLineWriterStream on: stream. +converter cr; cr; lf; nextPut: $a. +stream contents + +A ZnNewLineWriterStream can be configured with the desired line ending convention using the methods + +converter forCr. +converter forLf. +converter forCrLf. +converter forPlatformLineEnding. \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnNewLineWriterStream.class/class/on..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnNewLineWriterStream.class/class/on..st new file mode 100644 index 000000000..3db360862 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnNewLineWriterStream.class/class/on..st @@ -0,0 +1,7 @@ +instance creation +on: aStream + + ^ self basicNew + initialize; + stream: aStream; + yourself \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnNewLineWriterStream.class/instance/close.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnNewLineWriterStream.class/instance/close.st new file mode 100644 index 000000000..265a317a4 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnNewLineWriterStream.class/instance/close.st @@ -0,0 +1,3 @@ +open/close +close + stream close \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnNewLineWriterStream.class/instance/flush.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnNewLineWriterStream.class/instance/flush.st new file mode 100644 index 000000000..524c26421 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnNewLineWriterStream.class/instance/flush.st @@ -0,0 +1,3 @@ +flushing +flush + ^ stream flush \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnNewLineWriterStream.class/instance/forCr.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnNewLineWriterStream.class/instance/forCr.st new file mode 100644 index 000000000..8c4e7521b --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnNewLineWriterStream.class/instance/forCr.st @@ -0,0 +1,4 @@ +accessing +forCr + + lineEnding := String cr \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnNewLineWriterStream.class/instance/forCrLf.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnNewLineWriterStream.class/instance/forCrLf.st new file mode 100644 index 000000000..7c2fc3cd6 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnNewLineWriterStream.class/instance/forCrLf.st @@ -0,0 +1,4 @@ +accessing +forCrLf + + lineEnding := String crlf \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnNewLineWriterStream.class/instance/forLf.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnNewLineWriterStream.class/instance/forLf.st new file mode 100644 index 000000000..843ab23ad --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnNewLineWriterStream.class/instance/forLf.st @@ -0,0 +1,4 @@ +accessing +forLf + + lineEnding := String lf \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnNewLineWriterStream.class/instance/forPlatformLineEnding.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnNewLineWriterStream.class/instance/forPlatformLineEnding.st new file mode 100644 index 000000000..6e2b10ada --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnNewLineWriterStream.class/instance/forPlatformLineEnding.st @@ -0,0 +1,6 @@ +accessing +forPlatformLineEnding + "Decides only between Windows and linux/unix" + lineEnding := (Smalltalk os platformName asLowercase beginsWith: 'win') + ifTrue: [ String crlf ] + ifFalse: [ String lf ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnNewLineWriterStream.class/instance/initialize.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnNewLineWriterStream.class/instance/initialize.st new file mode 100644 index 000000000..db3efe4f5 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnNewLineWriterStream.class/instance/initialize.st @@ -0,0 +1,7 @@ +initialization +initialize + + super initialize. + cr := Character cr. + lf := Character lf. + self forPlatformLineEnding \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnNewLineWriterStream.class/instance/newLine.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnNewLineWriterStream.class/instance/newLine.st new file mode 100644 index 000000000..d9c35b328 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnNewLineWriterStream.class/instance/newLine.st @@ -0,0 +1,4 @@ +accessing +newLine + previous := nil. + stream nextPutAll: lineEnding \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnNewLineWriterStream.class/instance/nextPut..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnNewLineWriterStream.class/instance/nextPut..st new file mode 100644 index 000000000..f1845c7d3 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnNewLineWriterStream.class/instance/nextPut..st @@ -0,0 +1,11 @@ +accessing +nextPut: aCharacter + "Write aCharacter to the receivers stream. + Convert all line end combinations, i.e cr, lf, crlf, to the platform convention" + + (previous == cr and: [ aCharacter == lf ]) ifFalse: [ + (aCharacter == cr or: [ aCharacter == lf ]) ifTrue: + [ self newLine ] + ifFalse: + [ stream nextPut: aCharacter ] ]. + previous := aCharacter \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnNewLineWriterStream.class/instance/rawStream.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnNewLineWriterStream.class/instance/rawStream.st new file mode 100644 index 000000000..3f9aee222 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnNewLineWriterStream.class/instance/rawStream.st @@ -0,0 +1,7 @@ +accessing +rawStream + "Answer the innermost stream wrapped by the receiver, e.g. a raw binary file stream, + socket stream, or regular Read/WriteStream. + Defer to the wrappedStream." + + ^ self wrappedStream rawStream \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnNewLineWriterStream.class/instance/stream..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnNewLineWriterStream.class/instance/stream..st new file mode 100644 index 000000000..2208df8c9 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnNewLineWriterStream.class/instance/stream..st @@ -0,0 +1,3 @@ +accessing +stream: aWriteStream + stream := aWriteStream \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnNewLineWriterStream.class/instance/wrappedStream.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnNewLineWriterStream.class/instance/wrappedStream.st new file mode 100644 index 000000000..dd6b0f223 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnNewLineWriterStream.class/instance/wrappedStream.st @@ -0,0 +1,4 @@ +accessing +wrappedStream + + ^ stream \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnNewLineWriterStream.class/properties.json b/repository/Zinc-Character-Encoding-Core.v37.package/ZnNewLineWriterStream.class/properties.json new file mode 100644 index 000000000..64e62d135 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnNewLineWriterStream.class/properties.json @@ -0,0 +1,17 @@ +{ + "commentStamp" : "", + "super" : "WriteStream", + "category" : "Zinc-Character-Encoding-Core", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ + "stream", + "cr", + "lf", + "previous", + "lineEnding" + ], + "name" : "ZnNewLineWriterStream", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnNullEncoder.class/README.md b/repository/Zinc-Character-Encoding-Core.v37.package/ZnNullEncoder.class/README.md index 858f2a5ab..360e66600 100644 --- a/repository/Zinc-Character-Encoding-Core.v37.package/ZnNullEncoder.class/README.md +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnNullEncoder.class/README.md @@ -1,7 +1,7 @@ -I am ZnNullEncoder, a concrete subclass of ZnCharacterEncoder. +I am ZnNullEncoder, a concrete subclass of ZnCharacterEncoderGS. I perform no encoding or decoding at all for all characters with a code value below 256. I can only be used for ASCII. Note that in principle I could handle Latin1 (ISO-8859-1), although that is not completely correct. To get maximum efficiency, it remains an option. -Part of Zinc HTTP Components. \ No newline at end of file +Part of Zinc HTTP Components. diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnNullEncoder.class/class/handlesEncoding..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnNullEncoder.class/class/handlesEncoding..st index 106566921..0f3db634d 100644 --- a/repository/Zinc-Character-Encoding-Core.v37.package/ZnNullEncoder.class/class/handlesEncoding..st +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnNullEncoder.class/class/handlesEncoding..st @@ -1,7 +1,8 @@ accessing handlesEncoding: string "Return true when my instances handle the encoding described by string. - Note that in principle I could handle latin1 (iso-8859-1), although that is not - completely correct. To get maximum efficiency, it remains an option." - - ^ #( 'ascii' ) includes: string \ No newline at end of file + Note that in principle I could handle latin1 (iso-8859-1) and ASCII, + although that is not completely correct. + To get maximum efficiency, it remains an option." + + ^ (self canonicalEncodingIdentifier: string) = 'null' \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnNullEncoder.class/class/knownEncodingIdentifiers.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnNullEncoder.class/class/knownEncodingIdentifiers.st new file mode 100644 index 000000000..a6efbb926 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnNullEncoder.class/class/knownEncodingIdentifiers.st @@ -0,0 +1,3 @@ +accessing +knownEncodingIdentifiers + ^ #( 'null' ) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnNullEncoder.class/instance/decodeBytes..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnNullEncoder.class/instance/decodeBytes..st index b6823b947..ebbdef603 100644 --- a/repository/Zinc-Character-Encoding-Core.v37.package/ZnNullEncoder.class/instance/decodeBytes..st +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnNullEncoder.class/instance/decodeBytes..st @@ -1,3 +1,6 @@ convenience decodeBytes: bytes + "Decode bytes and return the resulting string" + "Overwritten for performance reasons" + ^ bytes asString \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnNullEncoder.class/instance/encodeString..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnNullEncoder.class/instance/encodeString..st index 85c24dce1..7b99eeecf 100644 --- a/repository/Zinc-Character-Encoding-Core.v37.package/ZnNullEncoder.class/instance/encodeString..st +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnNullEncoder.class/instance/encodeString..st @@ -1,3 +1,6 @@ convenience encodeString: string + "Encode string and return the resulting byte array" + "Overwritten for performance reasons" + ^ string asByteArray \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnNullEncoder.class/instance/encodedByteCountFor..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnNullEncoder.class/instance/encodedByteCountFor..st index 142610d47..a209b803e 100644 --- a/repository/Zinc-Character-Encoding-Core.v37.package/ZnNullEncoder.class/instance/encodedByteCountFor..st +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnNullEncoder.class/instance/encodedByteCountFor..st @@ -1,3 +1,6 @@ -converting +encoding - decoding encodedByteCountFor: character + "Return how many bytes are needed to encode character" + "Overwritten for performance reasons" + ^ 1 \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnNullEncoder.class/instance/encodedByteCountForCodePoint..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnNullEncoder.class/instance/encodedByteCountForCodePoint..st new file mode 100644 index 000000000..0d355599d --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnNullEncoder.class/instance/encodedByteCountForCodePoint..st @@ -0,0 +1,5 @@ +encoding - decoding +encodedByteCountForCodePoint: codePoint + "Return how many bytes are needed to encode integer code point" + + ^ 1 \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnNullEncoder.class/instance/encodedByteCountForCodePoints..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnNullEncoder.class/instance/encodedByteCountForCodePoints..st new file mode 100644 index 000000000..ddbab107c --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnNullEncoder.class/instance/encodedByteCountForCodePoints..st @@ -0,0 +1,6 @@ +convenience +encodedByteCountForCodePoints: codePoints + "Return the exact number of bytes it would take to encode codePoints as a byte array" + "Overwritten for performance reasons" + + ^ codePoints size \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnNullEncoder.class/instance/encodedByteCountForString..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnNullEncoder.class/instance/encodedByteCountForString..st index c54910426..6126b3e05 100644 --- a/repository/Zinc-Character-Encoding-Core.v37.package/ZnNullEncoder.class/instance/encodedByteCountForString..st +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnNullEncoder.class/instance/encodedByteCountForString..st @@ -1,3 +1,6 @@ convenience encodedByteCountForString: string + "Return the exact number of bytes it would take to encode string as a byte array" + "Overwritten for performance reasons" + ^ string size \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnNullEncoder.class/instance/ensureAtBeginOfCodePointOnStream..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnNullEncoder.class/instance/ensureAtBeginOfCodePointOnStream..st new file mode 100644 index 000000000..c83c96e14 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnNullEncoder.class/instance/ensureAtBeginOfCodePointOnStream..st @@ -0,0 +1,7 @@ +encoding - decoding +ensureAtBeginOfCodePointOnStream: stream + "Ensure that the current position of stream is a the beginning of an encoded code point, + if not move further backwards. This is necessary when a position in the binary stream is set, + not knowing if that position is on a proper encoded character boundary." + + "Nothing to be done, I am a byte encoding: each code point is encoded in a single byte" \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnNullEncoder.class/instance/identifier.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnNullEncoder.class/instance/identifier.st new file mode 100644 index 000000000..797925019 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnNullEncoder.class/instance/identifier.st @@ -0,0 +1,3 @@ +accessing +identifier + ^ 'null' \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnNullEncoder.class/instance/nextCodePointFromStream..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnNullEncoder.class/instance/nextCodePointFromStream..st new file mode 100644 index 000000000..ddb7d45be --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnNullEncoder.class/instance/nextCodePointFromStream..st @@ -0,0 +1,5 @@ +encoding - decoding +nextCodePointFromStream: stream + "Read and return the next integer code point from stream" + + ^ stream next \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnNullEncoder.class/instance/nextPutCodePoint.toStream..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnNullEncoder.class/instance/nextPutCodePoint.toStream..st new file mode 100644 index 000000000..214cd1f40 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnNullEncoder.class/instance/nextPutCodePoint.toStream..st @@ -0,0 +1,7 @@ +encoding - decoding +nextPutCodePoint: codePoint toStream: stream + "Write the encoding for Integer code point to stream" + + codePoint < 256 + ifTrue: [ stream nextPut: codePoint ] + ifFalse: [ ^ self errorOutsideRange: codePoint to: stream ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnNullEncoder.class/instance/skipToBeginOfCodePointOnStream..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnNullEncoder.class/instance/skipToBeginOfCodePointOnStream..st new file mode 100644 index 000000000..9d429f00c --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnNullEncoder.class/instance/skipToBeginOfCodePointOnStream..st @@ -0,0 +1,7 @@ +encoding - decoding +skipToBeginOfCodePointOnStream: stream + "Ensure that the current position of stream is a the beginning of an encoded code point, + if not move further forward. This is necessary when a position in the binary stream is set, + not knowing if that position is on a proper encoded character boundary." + + "Nothing to be done, I am a byte encoding: each code point is encoded in a single byte" \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnNullEncoder.class/methodProperties.json b/repository/Zinc-Character-Encoding-Core.v37.package/ZnNullEncoder.class/methodProperties.json deleted file mode 100644 index 3241ed518..000000000 --- a/repository/Zinc-Character-Encoding-Core.v37.package/ZnNullEncoder.class/methodProperties.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "class" : { - "handlesEncoding:" : "SvenVanCaekenberghe 12/17/2012 13:24", - "newForEncoding:" : "SvenVanCaekenberghe 1/25/2011 11:19" }, - "instance" : { - "decodeBytes:" : "SvenVanCaekenberghe 5/3/2012 11:32", - "encodeString:" : "SvenVanCaekenberghe 5/3/2012 11:32", - "encodedByteCountFor:" : "SvenVanCaekenberghe 11/29/2010 21:17", - "encodedByteCountForString:" : "SvenVanCaekenberghe 5/3/2012 11:32", - "next:putAll:startingAt:toStream:" : "JohanBrichau 05/02/2014 23:07", - "nextFromStream:" : "SvenVanCaekenberghe 1/4/2011 20:52", - "nextPut:toStream:" : "SvenVanCaekenberghe 1/25/2011 12:36", - "readInto:startingAt:count:fromStream:" : "dkh 02/27/2023 16:09" } } diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnNullEncoder.class/properties.json b/repository/Zinc-Character-Encoding-Core.v37.package/ZnNullEncoder.class/properties.json index 27316181d..4380ab907 100644 --- a/repository/Zinc-Character-Encoding-Core.v37.package/ZnNullEncoder.class/properties.json +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnNullEncoder.class/properties.json @@ -1,14 +1,11 @@ { + "commentStamp" : "", + "super" : "ZnCharacterEncoderGS", "category" : "Zinc-Character-Encoding-Core", - "classinstvars" : [ - ], - "classvars" : [ - ], - "commentStamp" : "", - "instvars" : [ - ], + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], "name" : "ZnNullEncoder", - "pools" : [ - ], - "super" : "ZnCharacterEncoder", - "type" : "normal" } + "type" : "normal" +} diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnPercentEncoder.class/README.md b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPercentEncoder.class/README.md index b467cd6e7..61e83a432 100644 --- a/repository/Zinc-Character-Encoding-Core.v37.package/ZnPercentEncoder.class/README.md +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPercentEncoder.class/README.md @@ -5,7 +5,7 @@ All characters that are not part of a safe set are encoded using a percent (%) f My #encode: and #decode: messages work from String to String. -My decoder additionally will accept + as an encoding for a space. +My decoder will accept + as an encoding for a space by default. See also http://en.wikipedia.org/wiki/Percent-encoding diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnPercentEncoder.class/class/rfc3986UnreservedCharacters.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPercentEncoder.class/class/rfc3986UnreservedCharacters.st new file mode 100644 index 000000000..c04cc2cac --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPercentEncoder.class/class/rfc3986UnreservedCharacters.st @@ -0,0 +1,6 @@ +accessing +rfc3986UnreservedCharacters + "Return the unreserved characters according to RFC 3986 section 2.3. + This is the most narrow safe set to be used in a better safe than sorry approach." + + ^ 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.~' \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnPercentEncoder.class/instance/characterEncoder.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPercentEncoder.class/instance/characterEncoder.st index fa6b92f76..2d57ed144 100644 --- a/repository/Zinc-Character-Encoding-Core.v37.package/ZnPercentEncoder.class/instance/characterEncoder.st +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPercentEncoder.class/instance/characterEncoder.st @@ -2,5 +2,5 @@ accessing characterEncoder "Return the character encoder that I currently use. If not set, I will default to using UTF-8." - - ^ characterEncoder ifNil: [ characterEncoder := ZnUTF8Encoder new ] \ No newline at end of file + + ^ characterEncoder ifNil: [ characterEncoder := ZnDefaultCharacterEncoder value ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnPercentEncoder.class/instance/decode..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPercentEncoder.class/instance/decode..st index 4594cf638..adc02ef71 100644 --- a/repository/Zinc-Character-Encoding-Core.v37.package/ZnPercentEncoder.class/instance/decode..st +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPercentEncoder.class/instance/decode..st @@ -5,5 +5,6 @@ decode: string | bytes stringStream | stringStream := string readStream. - bytes := ByteArray streamContents: [ :byteStream | self decode: stringStream to: byteStream ]. + bytes := ByteArray streamContents: [ :byteStream | + self decode: stringStream to: byteStream ]. ^ self characterEncoder decodeBytes: bytes \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnPercentEncoder.class/instance/decode.to..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPercentEncoder.class/instance/decode.to..st index 979e6f1d7..4199ab2a8 100644 --- a/repository/Zinc-Character-Encoding-Core.v37.package/ZnPercentEncoder.class/instance/decode.to..st +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPercentEncoder.class/instance/decode.to..st @@ -1,14 +1,12 @@ converting decode: stringStream to: byteStream | char | + self decodePlusAsSpace. [ stringStream atEnd ] - whileFalse: [ - (char := stringStream next) == $+ + whileFalse: [ + ((char := stringStream next) == $+ and: [ decodePlusAsSpace ]) ifTrue: [ byteStream nextPut: 32 ] - ifFalse: [ + ifFalse: [ char == $% ifTrue: [ byteStream nextPut: (self readHexFrom: stringStream) ] - ifFalse: [ - char charCode < 128 - ifTrue: [ byteStream nextPut: char charCode ] - ifFalse: [ ZnCharacterEncodingError signal: 'ASCII character expected' ] ] ] ] \ No newline at end of file + ifFalse: [ self decodeChar: char toByteStream: byteStream ] ] ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnPercentEncoder.class/instance/decodeChar.toByteStream..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPercentEncoder.class/instance/decodeChar.toByteStream..st new file mode 100644 index 000000000..411b2f8c7 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPercentEncoder.class/instance/decodeChar.toByteStream..st @@ -0,0 +1,9 @@ +private +decodeChar: char toByteStream: byteStream + char charCode < 128 + ifTrue: [ + byteStream nextPut: char charCode ] + ifFalse: [ + self urlAsIri + ifTrue: [ self characterEncoder nextPut: char toStream: byteStream ] + ifFalse: [ self errorAsciiCharacterExpected ] ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnPercentEncoder.class/instance/decodePlusAsSpace..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPercentEncoder.class/instance/decodePlusAsSpace..st new file mode 100644 index 000000000..77850b0f8 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPercentEncoder.class/instance/decodePlusAsSpace..st @@ -0,0 +1,8 @@ +initialize-release +decodePlusAsSpace: boolean + "When boolean is true, $+ on input will be decoded as Character space. + Else $+ is treated as a normal character, filtered by the safe set. + This is normally only done application/x-www-form-urlencoded data, + but is is on by default anyway." + + decodePlusAsSpace := boolean \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnPercentEncoder.class/instance/decodePlusAsSpace.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPercentEncoder.class/instance/decodePlusAsSpace.st new file mode 100644 index 000000000..35bb62748 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPercentEncoder.class/instance/decodePlusAsSpace.st @@ -0,0 +1,7 @@ +accessing +decodePlusAsSpace + "Return if $+ on input should be decoded as Character space. + This is normally only done application/x-www-form-urlencoded data, + but is is on by default anyway." + + ^ decodePlusAsSpace ifNil: [ decodePlusAsSpace := true ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnPercentEncoder.class/instance/encode.to..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPercentEncoder.class/instance/encode.to..st index 6502a012a..6ff09c4e9 100644 --- a/repository/Zinc-Character-Encoding-Core.v37.package/ZnPercentEncoder.class/instance/encode.to..st +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPercentEncoder.class/instance/encode.to..st @@ -1,15 +1,5 @@ converting encode: readStream to: writeStream - | bytes buffer byte | - buffer := (bytes := ByteArray new: 4) writeStream. - self safeSet; characterEncoder. - [ readStream atEnd ] - whileFalse: [ - buffer reset. - characterEncoder nextPut: readStream next toStream: buffer. - 1 to: buffer position do: [ :index | - (safeSet includes: (byte := bytes at: index)) - ifTrue: [ writeStream nextPut: byte asCharacter ] - ifFalse: [ - writeStream nextPut: $%. - byte printOn: writeStream base: 16 length: 2 padded: true ] ] ] \ No newline at end of file + self urlAsIri + ifTrue: [ self encodeAsIri: readStream to: writeStream ] + ifFalse: [ self encodeAsUrl: readStream to: writeStream ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnPercentEncoder.class/instance/encodeAsIri.to..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPercentEncoder.class/instance/encodeAsIri.to..st new file mode 100644 index 000000000..fb09558ef --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPercentEncoder.class/instance/encodeAsIri.to..st @@ -0,0 +1,13 @@ +converting +encodeAsIri: readStream to: writeStream + | character codePoint | + [ readStream atEnd ] + whileFalse: [ + character := readStream next. + codePoint := character codePoint. + ((self safeSet includes: codePoint) or: [ codePoint > 16rA0 ]) + ifTrue: [ + writeStream nextPut: character ] + ifFalse: [ + writeStream nextPut: $%. + self writeHex: codePoint to: writeStream ] ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnPercentEncoder.class/instance/encodeAsUrl.to..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPercentEncoder.class/instance/encodeAsUrl.to..st new file mode 100644 index 000000000..722845142 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPercentEncoder.class/instance/encodeAsUrl.to..st @@ -0,0 +1,15 @@ +converting +encodeAsUrl: readStream to: writeStream + | bytes buffer byte | + buffer := (bytes := ByteArray new: 4) writeStream. + self safeSet; characterEncoder. + [ readStream atEnd ] + whileFalse: [ + buffer reset. + characterEncoder nextPut: readStream next toStream: buffer. + 1 to: buffer position do: [ :index | + (safeSet includes: (byte := bytes at: index)) + ifTrue: [ writeStream nextPut: byte asCharacter ] + ifFalse: [ + writeStream nextPut: $%. + self writeHex: byte to: writeStream ] ] ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnPercentEncoder.class/instance/errorAsciiCharacterExpected.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPercentEncoder.class/instance/errorAsciiCharacterExpected.st new file mode 100644 index 000000000..8c41177f5 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPercentEncoder.class/instance/errorAsciiCharacterExpected.st @@ -0,0 +1,3 @@ +error handling +errorAsciiCharacterExpected + ZnCharacterEncodingError signal: 'ASCII character expected' \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnPercentEncoder.class/instance/errorHexDigitExpected.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPercentEncoder.class/instance/errorHexDigitExpected.st new file mode 100644 index 000000000..9ca7df84a --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPercentEncoder.class/instance/errorHexDigitExpected.st @@ -0,0 +1,3 @@ +error handling +errorHexDigitExpected + ZnCharacterEncodingError signal: 'hex digit expected' \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnPercentEncoder.class/instance/readHexFrom..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPercentEncoder.class/instance/readHexFrom..st index 1f3524a8a..0f9a64082 100644 --- a/repository/Zinc-Character-Encoding-Core.v37.package/ZnPercentEncoder.class/instance/readHexFrom..st +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPercentEncoder.class/instance/readHexFrom..st @@ -1,8 +1,8 @@ private readHexFrom: stream | first second | - (stream atEnd not and: [(first := stream next digitValue) between: 0 and: 15]) - ifFalse: [ ZnCharacterEncodingError signal: 'hex digit expected' ]. + (stream atEnd not and: [ (first := stream next digitValue) between: 0 and: 15 ]) + ifFalse: [ self errorHexDigitExpected ]. (stream atEnd not and: [ (second := stream next digitValue) between: 0 and: 15 ]) - ifFalse: [ ZnCharacterEncodingError signal: 'hex digit expected' ]. + ifFalse: [ self errorHexDigitExpected ]. ^ (first << 4) + second \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnPercentEncoder.class/instance/safeSet.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPercentEncoder.class/instance/safeSet.st index 487601371..131d4dc12 100644 --- a/repository/Zinc-Character-Encoding-Core.v37.package/ZnPercentEncoder.class/instance/safeSet.st +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPercentEncoder.class/instance/safeSet.st @@ -2,5 +2,5 @@ accessing safeSet "Return the safe set of characters that I will not encode, as a byte array. If not set, I will default to the most commonly used safe set" - - ^ safeSet ifNil: [ safeSet := 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.~' asByteArray ] \ No newline at end of file + + ^ safeSet ifNil: [ safeSet := self class rfc3986UnreservedCharacters asByteArray ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnPercentEncoder.class/instance/urlAsIri.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPercentEncoder.class/instance/urlAsIri.st new file mode 100644 index 000000000..826eac9ef --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPercentEncoder.class/instance/urlAsIri.st @@ -0,0 +1,3 @@ +private +urlAsIri + ^ ZnCurrentOptions at: #urlAsIri \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnPercentEncoder.class/instance/writeHex.to..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPercentEncoder.class/instance/writeHex.to..st new file mode 100644 index 000000000..35b46a10d --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPercentEncoder.class/instance/writeHex.to..st @@ -0,0 +1,3 @@ +private +writeHex: integer to: stream + integer printOn: stream base: 16 length: 2 padded: true \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnPercentEncoder.class/methodProperties.json b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPercentEncoder.class/methodProperties.json deleted file mode 100644 index 964cccec3..000000000 --- a/repository/Zinc-Character-Encoding-Core.v37.package/ZnPercentEncoder.class/methodProperties.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "class" : { - }, - "instance" : { - "characterEncoder" : "SvenVanCaekenberghe 12/15/2012 13:53", - "characterEncoder:" : "SvenVanCaekenberghe 12/15/2012 13:53", - "decode:" : "SvenVanCaekenberghe 12/15/2012 13:56", - "decode:to:" : "SvenVanCaekenberghe 12/16/2012 16:41", - "encode:" : "SvenVanCaekenberghe 12/15/2012 13:56", - "encode:to:" : "SvenVanCaekenberghe 3/1/2013 21:25", - "readHexFrom:" : "SvenVanCaekenberghe 12/16/2012 15:12", - "safeSet" : "SvenVanCaekenberghe 12/15/2012 14:02", - "safeSet:" : "SvenVanCaekenberghe 12/15/2012 13:58" } } diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnPercentEncoder.class/properties.json b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPercentEncoder.class/properties.json index f45fae22d..95cdd52a3 100644 --- a/repository/Zinc-Character-Encoding-Core.v37.package/ZnPercentEncoder.class/properties.json +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPercentEncoder.class/properties.json @@ -1,15 +1,15 @@ { + "commentStamp" : "", + "super" : "Object", "category" : "Zinc-Character-Encoding-Core", - "classinstvars" : [ - ], - "classvars" : [ - ], - "commentStamp" : "", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], "instvars" : [ "characterEncoder", - "safeSet" ], + "safeSet", + "decodePlusAsSpace" + ], "name" : "ZnPercentEncoder", - "pools" : [ - ], - "super" : "Object", - "type" : "normal" } + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/README.md b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/README.md new file mode 100644 index 000000000..a3417c357 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/README.md @@ -0,0 +1,26 @@ +I am ZnPositionableReadStream. +I am polymorphic with (the most used/important methods of) ReadStream and PositionableStream. + +I wrap another read stream and store the elements that I read in a sliding circular buffer so that I am able to go back to any position inside that buffer. + +Essentially, I implement #position and #position: to be used to back out of reading ahead. + +Note that the size of my buffer limits how far I can go backwards. A SubscriptOutOfBounds exception will be signalled when an attempt is made to go too far backwards. + +The index returned by #position should be considered abstract, without concrete meaning, but it is currently implemented as the count of elements read by #next on the wrapped stream. On a simple stream over an in memory collection, that will be equivalent to an integer index into that collection. But on network streams or streams that were already further along, this will no longer be the case. + +The most elementary example of my capabilities can be seen in my implementation of #peek. See also the unit tests #testPlainExcursion and #testSearch + +Of course, backing out of an excursion is only possible within the window of the buffer size. + +Implementation + +- stream the read stream that I wrap and add positioning to +- buffer sliding, circular buffer +- index zero based index into buffer, where next will be stored +- count number of next operations done on wrapped stream +- delta number of positions that I was moved backwards + +The real core methods are #next, #atEnd, #position and #position: and are used to implement the rest. + +Part of Zinc HTTP Components \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/class/on..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/class/on..st new file mode 100644 index 000000000..e8efe91dc --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/class/on..st @@ -0,0 +1,7 @@ +instance creation +on: readStream + "Create an instance of ZnPositionableReadStream that wraps readStream to add limited positioning capabilities to it." + + ^ self new + on: readStream; + yourself \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/class/on.do..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/class/on.do..st new file mode 100644 index 000000000..58131d41c --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/class/on.do..st @@ -0,0 +1,6 @@ +convenience +on: readStream do: block + "Execute block with as argument a ZnPositionableReadStream on readStream. + Return the value of block." + + ^ block value: (self on: readStream) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/instance/atEnd.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/instance/atEnd.st new file mode 100644 index 000000000..404ada572 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/instance/atEnd.st @@ -0,0 +1,5 @@ +testing +atEnd + "Answer whether I can access any more objects." + + ^ delta = 0 and: [ stream atEnd ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/instance/back.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/instance/back.st new file mode 100644 index 000000000..a260d53b7 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/instance/back.st @@ -0,0 +1,6 @@ +positioning +back + "Go back one element and return it." + + self skip: -1. + ^ self peek \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/instance/bufferSize.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/instance/bufferSize.st new file mode 100644 index 000000000..6649a4fcc --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/instance/bufferSize.st @@ -0,0 +1,5 @@ +accessing +bufferSize + "Return the size of my buffer, which limits how far I can be positioned backwards. See #sizeBuffer: to set another buffer size." + + ^ buffer size \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/instance/close.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/instance/close.st new file mode 100644 index 000000000..62eb3546a --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/instance/close.st @@ -0,0 +1,5 @@ +initialize-release +close + "Close me after which I can no longer be accessed. I delegate this to the stream that I wrap." + + stream close \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/instance/collectionSpecies.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/instance/collectionSpecies.st new file mode 100644 index 000000000..cabc4589c --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/instance/collectionSpecies.st @@ -0,0 +1,9 @@ +accessing +collectionSpecies + "Return the collection class able to hold my elements" + + ^ (stream respondsTo: #collectionSpecies) + ifTrue: [ stream collectionSpecies ] + ifFalse: [ stream isBinary + ifTrue: [ ByteArray ] + ifFalse: [ String ] ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/instance/defaultBufferSize.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/instance/defaultBufferSize.st new file mode 100644 index 000000000..4ef8f4aac --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/instance/defaultBufferSize.st @@ -0,0 +1,5 @@ +accessing +defaultBufferSize + "Return the default size of my buffer, which limits how far I can be positioned backwards. See #sizeBuffer: to set another buffer size." + + ^ 2 raisedToInteger: 8 \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/instance/initialize.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/instance/initialize.st new file mode 100644 index 000000000..51c43fa8a --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/instance/initialize.st @@ -0,0 +1,4 @@ +initialization +initialize + super initialize. + count := index := delta := 0 \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/instance/isBinary.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/instance/isBinary.st new file mode 100644 index 000000000..164862a7c --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/instance/isBinary.st @@ -0,0 +1,5 @@ +testing +isBinary + "Return whether I am binary, whether my elements are byte values (8 bit integers between 0 and 255)" + + ^ stream isBinary \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/instance/next..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/instance/next..st new file mode 100644 index 000000000..760fcbbf9 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/instance/next..st @@ -0,0 +1,8 @@ +accessing +next: requestedCount + "Read requestedCount elements and return them as a collection. + If less are available, a smaller collection will be returned." + + ^ self + next: requestedCount + into: (self collectionSpecies new: requestedCount) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/instance/next.into..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/instance/next.into..st new file mode 100644 index 000000000..f7138006e --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/instance/next.into..st @@ -0,0 +1,9 @@ +accessing +next: requestedCount into: collection + "Read requestedCount elements into collection, + returning a copy if less elements are available" + + ^ self + next: requestedCount + into: collection + startingAt: 1 \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/instance/next.into.startingAt..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/instance/next.into.startingAt..st new file mode 100644 index 000000000..1766eb600 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/instance/next.into.startingAt..st @@ -0,0 +1,13 @@ +accessing +next: requestedCount into: collection startingAt: offset + "Read requestedCount elements into collection starting at offset, + returning a copy if less elements are available" + + | read | + read := self + readInto: collection + startingAt: offset + count: requestedCount. + ^ read = requestedCount + ifTrue: [ collection ] + ifFalse: [ collection copyFrom: 1 to: offset + read - 1 ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/instance/next.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/instance/next.st new file mode 100644 index 000000000..7c799aa72 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/instance/next.st @@ -0,0 +1,15 @@ +accessing +next + "Return the next element and move over it" + + | next | + delta = 0 + ifTrue: [ + (next := stream next) ifNotNil: [ + count := count + 1. + buffer at: index + 1 put: next. + index := (index + 1) \\ buffer size ] ] + ifFalse: [ + next := buffer at: ((index - delta) \\ buffer size) + 1. + delta := delta - 1 ]. + ^ next \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/instance/nextInto..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/instance/nextInto..st new file mode 100644 index 000000000..a1d1dd5d5 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/instance/nextInto..st @@ -0,0 +1,8 @@ +accessing +nextInto: collection + "Read the next elements of the receiver into collection, + returning a copy if less elements are available" + + ^ self + next: collection size + into: collection \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/instance/on..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/instance/on..st new file mode 100644 index 000000000..05140ac19 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/instance/on..st @@ -0,0 +1,6 @@ +instance creation +on: readStream + "Initialize me on readStream" + + stream := readStream. + self sizeBuffer: self defaultBufferSize \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/instance/peek.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/instance/peek.st new file mode 100644 index 000000000..ec535e82c --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/instance/peek.st @@ -0,0 +1,5 @@ +accessing +peek + "Return the next element but do not move over it" + + ^ self savingPositionDo: [ self next ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/instance/peekFor..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/instance/peekFor..st new file mode 100644 index 000000000..03e71cc73 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/instance/peekFor..st @@ -0,0 +1,10 @@ +accessing +peekFor: object + "Answer false and do not move over the next element if it is not equal to object, or if the receiver is at the end. + Answer true and move over the next element when it is equal to object." + + ^ self peek = object + ifTrue: [ + self next. + true ] + ifFalse: [ false ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/instance/position..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/instance/position..st new file mode 100644 index 000000000..3be975c64 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/instance/position..st @@ -0,0 +1,13 @@ +positioning +position: newPosition + "Move my current position to newPosition, an object obtained by previously calling #position. My buffer size limits how far I can be positioned backwards. A SubscriptOutOfBounds exception will be signalled in case this operation cannot be completed. It is also no possible to go backwards unless data has been read previously." + + | newDelta | + newDelta := count - newPosition. + (newDelta between: 0 and: (buffer size min: count)) + ifFalse: [ + ^ SubscriptOutOfBounds + signalFor: self + lowerBound: self position + upperBound: self position - (buffer size min: count) ]. + ^ delta := newDelta \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/instance/position.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/instance/position.st new file mode 100644 index 000000000..d1c0dc1c0 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/instance/position.st @@ -0,0 +1,5 @@ +positioning +position + "Return my current position. This is an object that can be used as argument to #position: to move back to that position. Although opaque, it is currently an integer count of the number of #next operations done on the stream that I wrap." + + ^ count - delta \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/instance/rawStream.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/instance/rawStream.st new file mode 100644 index 000000000..3f9aee222 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/instance/rawStream.st @@ -0,0 +1,7 @@ +accessing +rawStream + "Answer the innermost stream wrapped by the receiver, e.g. a raw binary file stream, + socket stream, or regular Read/WriteStream. + Defer to the wrappedStream." + + ^ self wrappedStream rawStream \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/instance/readInto.startingAt.count..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/instance/readInto.startingAt.count..st new file mode 100644 index 000000000..39023385a --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/instance/readInto.startingAt.count..st @@ -0,0 +1,9 @@ +accessing +readInto: collection startingAt: offset count: requestedCount + "Read requestedCount elements into collection starting at offset, + returning the number of elements read, there could be less elements available." + + 0 to: requestedCount - 1 do: [ :aCount | | object | + (object := self next) ifNil: [ ^ aCount ]. + collection at: offset + aCount put: object ]. + ^ requestedCount \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/instance/readStream.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/instance/readStream.st new file mode 100644 index 000000000..6f19a3b33 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/instance/readStream.st @@ -0,0 +1,3 @@ +accessing +readStream + ^ self \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/instance/savingPositionDo..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/instance/savingPositionDo..st new file mode 100644 index 000000000..09d391726 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/instance/savingPositionDo..st @@ -0,0 +1,7 @@ +positioning +savingPositionDo: block + "Execute block so that any reading from me in it has no effect afterwards. I remember the current #position and move back to it using #position: after evaluating block. My buffer size limits how long the excursion can be. A SubscriptOutOfBounds exception will be signalled in case this operation cannot be completed." + + | savedPosition | + savedPosition := self position. + ^ block ensure: [ self position: savedPosition ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/instance/sizeBuffer..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/instance/sizeBuffer..st new file mode 100644 index 000000000..62db9c190 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/instance/sizeBuffer..st @@ -0,0 +1,5 @@ +initialize-release +sizeBuffer: size + "Change the buffer size. This should be done when I am still in my initial state." + + buffer := self collectionSpecies new: size \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/instance/skip..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/instance/skip..st new file mode 100644 index 000000000..aad7225cd --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/instance/skip..st @@ -0,0 +1,7 @@ +accessing +skip: integer + "Skip over integer count elements." + + integer > 0 + ifTrue: [ integer timesRepeat: [ self next ] ] + ifFalse: [ self position: (self position + integer) ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/instance/upTo..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/instance/upTo..st new file mode 100644 index 000000000..d07e07b59 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/instance/upTo..st @@ -0,0 +1,9 @@ +accessing +upTo: value + "Read upto but not including value and return them as a collection. + If value is not found, return the entire contents of the stream." + + ^ self collectionSpecies + streamContents: [ :writeStream | | element | + [ self atEnd or: [ (element := self next) = value ] ] whileFalse: [ + writeStream nextPut: element ] ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/instance/upToEnd.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/instance/upToEnd.st new file mode 100644 index 000000000..85985c0da --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/instance/upToEnd.st @@ -0,0 +1,7 @@ +accessing +upToEnd + "Read elements until the stream is atEnd and return them as a collection." + + ^ self collectionSpecies + streamContents: [ :collectionStream | + [ self atEnd ] whileFalse: [ collectionStream nextPut: self next ] ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/instance/wrappedStream.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/instance/wrappedStream.st new file mode 100644 index 000000000..1924e6af5 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/instance/wrappedStream.st @@ -0,0 +1,5 @@ +accessing +wrappedStream + "Return the read stream that I wrap." + + ^ stream \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/properties.json b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/properties.json new file mode 100644 index 000000000..3390a9166 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnPositionableReadStream.class/properties.json @@ -0,0 +1,17 @@ +{ + "commentStamp" : "", + "super" : "Object", + "category" : "Zinc-Character-Encoding-Core", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ + "stream", + "buffer", + "count", + "index", + "delta" + ], + "name" : "ZnPositionableReadStream", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/README.md b/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/README.md new file mode 100644 index 000000000..84460b74b --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/README.md @@ -0,0 +1,4 @@ +I am ZnSimplifiedByteEncoder, a concrete subclass of ZnCharacterEncoderGS. +I handle single byte encodings where byte values 0 to 127 map to ASCII and 128 to 255 are a permutation to Unicode characters. + +I am like ZnByteEncoder, a subclass of me, but I implement just two mappings, latin1 or iso-8859-1 and ASCII, to conserve memory. diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/class/asciiMapping.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/class/asciiMapping.st new file mode 100644 index 000000000..48c438d5c --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/class/asciiMapping.st @@ -0,0 +1,21 @@ +mappings +asciiMapping + "ASCII is only defined for the first 127 codes (7-bit)" + + ^ #( + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil ) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/class/byteTextConverters.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/class/byteTextConverters.st new file mode 100644 index 000000000..e51bda375 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/class/byteTextConverters.st @@ -0,0 +1,3 @@ +private +byteTextConverters + ^ byteTextConverters ifNil: [ self initializeByteTextConverters ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/class/handlesEncoding..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/class/handlesEncoding..st new file mode 100644 index 000000000..a912c76d3 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/class/handlesEncoding..st @@ -0,0 +1,5 @@ +accessing +handlesEncoding: string + "Return true when my instances handle the encoding described by string" + + ^ self byteTextConverters includesKey: (self canonicalEncodingIdentifier: string) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/class/initialize.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/class/initialize.st new file mode 100644 index 000000000..d985bbda5 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/class/initialize.st @@ -0,0 +1,8 @@ +class initialization +initialize + "Initialize and cache the converters that I know of. + This includes all of their aliases. + This method must be changed to make sure it runs + when loading in images where it is already present." + + self initializeByteTextConverters \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/class/initializeByteTextConverters.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/class/initializeByteTextConverters.st new file mode 100644 index 000000000..02a5eacd3 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/class/initializeByteTextConverters.st @@ -0,0 +1,11 @@ +private +initializeByteTextConverters + "Initialize and cache convertors based on specifications in methods that were autogenerated." + + byteTextConverters := Dictionary new. + self mappingToIdentifiers + keysAndValuesDo: [ :mapping :identifiers | + | tables | + tables := self tablesFromSpec: (self perform: mapping). + identifiers do: [ :each | byteTextConverters at: each put: tables ] ]. + ^ byteTextConverters \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/class/iso88591Mapping.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/class/iso88591Mapping.st new file mode 100644 index 000000000..04d214fef --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/class/iso88591Mapping.st @@ -0,0 +1,22 @@ +mappings +iso88591Mapping + "Specification generated by my optional subclass, ZnByteEncoder." + "ZnByteEncoder generateByteToUnicodeSpec: 'http://unicode.org/Public/MAPPINGS/ISO8859/8859-1.TXT'" + + ^ #( + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil + 16r00A0 16r00A1 16r00A2 16r00A3 16r00A4 16r00A5 16r00A6 16r00A7 + 16r00A8 16r00A9 16r00AA 16r00AB 16r00AC 16r00AD 16r00AE 16r00AF + 16r00B0 16r00B1 16r00B2 16r00B3 16r00B4 16r00B5 16r00B6 16r00B7 + 16r00B8 16r00B9 16r00BA 16r00BB 16r00BC 16r00BD 16r00BE 16r00BF + 16r00C0 16r00C1 16r00C2 16r00C3 16r00C4 16r00C5 16r00C6 16r00C7 + 16r00C8 16r00C9 16r00CA 16r00CB 16r00CC 16r00CD 16r00CE 16r00CF + 16r00D0 16r00D1 16r00D2 16r00D3 16r00D4 16r00D5 16r00D6 16r00D7 + 16r00D8 16r00D9 16r00DA 16r00DB 16r00DC 16r00DD 16r00DE 16r00DF + 16r00E0 16r00E1 16r00E2 16r00E3 16r00E4 16r00E5 16r00E6 16r00E7 + 16r00E8 16r00E9 16r00EA 16r00EB 16r00EC 16r00ED 16r00EE 16r00EF + 16r00F0 16r00F1 16r00F2 16r00F3 16r00F4 16r00F5 16r00F6 16r00F7 + 16r00F8 16r00F9 16r00FA 16r00FB 16r00FC 16r00FD 16r00FE 16r00FF ) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/class/knownEncodingIdentifiers.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/class/knownEncodingIdentifiers.st new file mode 100644 index 000000000..9020e9776 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/class/knownEncodingIdentifiers.st @@ -0,0 +1,3 @@ +accessing +knownEncodingIdentifiers + ^ self byteTextConverters keys \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/class/mappingToIdentifiers.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/class/mappingToIdentifiers.st new file mode 100644 index 000000000..997469ef2 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/class/mappingToIdentifiers.st @@ -0,0 +1,7 @@ +mappings +mappingToIdentifiers + "Return a dictionay mapping from encoding specifications to a list of encoding names." + + ^ Dictionary newFromPairs: #( + #iso88591Mapping #('iso88591' 'latin1') + #asciiMapping #('ascii') ) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/class/newForEncoding..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/class/newForEncoding..st new file mode 100644 index 000000000..e70571d16 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/class/newForEncoding..st @@ -0,0 +1,13 @@ +instance creation +newForEncoding: string + "Return a new character encoder object for an encoding described by string. + We use our precomputed ByteTextConverters tables." + + | tables canonicalName | + canonicalName := self canonicalEncodingIdentifier: string. + tables := self byteTextConverters at: canonicalName. + ^ self new + identifier: canonicalName; + byteToUnicode: tables first; + unicodeToByte: tables second; + yourself \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/class/tablesFromSpec..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/class/tablesFromSpec..st new file mode 100644 index 000000000..b72e302c1 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/class/tablesFromSpec..st @@ -0,0 +1,15 @@ +private +tablesFromSpec: mapping + "Initialize the mappings to and from Unicode based on the 128 element array mapping" + + | byteToUnicode unicodeToByte | + byteToUnicode := Array new: 128. + unicodeToByte := Dictionary new. + "Mind the offset because first 128 characters are not stored into byteToUnicodeSpec" + "Note that some entries are nil" + mapping + keysAndValuesDo: [ :index :unicode | + unicode ifNotNil: [ + byteToUnicode at: index put: (Character value: unicode). + unicodeToByte at: unicode put: 127 + index ] ]. + ^ Array with: byteToUnicode with: unicodeToByte \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/instance/^equals.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/instance/^equals.st new file mode 100644 index 000000000..fd8967c9c --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/instance/^equals.st @@ -0,0 +1,3 @@ +comparing += anObject + ^ super = anObject and: [ self identifier = anObject identifier ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/instance/backOnStream..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/instance/backOnStream..st new file mode 100644 index 000000000..86226f200 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/instance/backOnStream..st @@ -0,0 +1,3 @@ +encoding - decoding +backOnStream: stream + stream back \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/instance/beLenient.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/instance/beLenient.st new file mode 100644 index 000000000..596b3ed67 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/instance/beLenient.st @@ -0,0 +1,6 @@ +initialization +beLenient + "Don't be strict, which is the default. + This means that holes in the mapping are let to pass through." + + strict := false \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/instance/byteDomain.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/instance/byteDomain.st new file mode 100644 index 000000000..3700120b9 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/instance/byteDomain.st @@ -0,0 +1,5 @@ +accessing +byteDomain + "Return an array with the byte values that are in my domain, that I can decode" + + ^ (0 to: 127) asArray , ((byteToUnicode withIndexCollect: [ :each :index | each ifNotNil: [ index + 127 ] ]) reject: [ :each | each isNil ]) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/instance/byteToUnicode..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/instance/byteToUnicode..st new file mode 100644 index 000000000..629904b9e --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/instance/byteToUnicode..st @@ -0,0 +1,3 @@ +initialization +byteToUnicode: map + byteToUnicode := map \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/instance/characterDomain.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/instance/characterDomain.st new file mode 100644 index 000000000..59f4fe34e --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/instance/characterDomain.st @@ -0,0 +1,5 @@ +accessing +characterDomain + "Return a set with the characters that are in my domain, that I can encode" + + ^ ((0 to: 127) asSet, unicodeToByte keys) collect: [ :each | Character value: each ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/instance/encodedByteCountFor..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/instance/encodedByteCountFor..st new file mode 100644 index 000000000..793e3d1d6 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/instance/encodedByteCountFor..st @@ -0,0 +1,5 @@ +encoding - decoding +encodedByteCountFor: character + "Overwritten for performance reasons" + + ^ 1 \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/instance/encodedByteCountForCodePoint..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/instance/encodedByteCountForCodePoint..st new file mode 100644 index 000000000..9df2c0ced --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/instance/encodedByteCountForCodePoint..st @@ -0,0 +1,3 @@ +encoding - decoding +encodedByteCountForCodePoint: character + ^ 1 \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/instance/ensureAtBeginOfCodePointOnStream..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/instance/ensureAtBeginOfCodePointOnStream..st new file mode 100644 index 000000000..c83c96e14 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/instance/ensureAtBeginOfCodePointOnStream..st @@ -0,0 +1,7 @@ +encoding - decoding +ensureAtBeginOfCodePointOnStream: stream + "Ensure that the current position of stream is a the beginning of an encoded code point, + if not move further backwards. This is necessary when a position in the binary stream is set, + not knowing if that position is on a proper encoded character boundary." + + "Nothing to be done, I am a byte encoding: each code point is encoded in a single byte" \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/instance/hash.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/instance/hash.st new file mode 100644 index 000000000..f5af769e9 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/instance/hash.st @@ -0,0 +1,3 @@ +comparing +hash + ^ self identifier hash \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/instance/identifier..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/instance/identifier..st new file mode 100644 index 000000000..ceeb07240 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/instance/identifier..st @@ -0,0 +1,3 @@ +initialization +identifier: object + identifier := object \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/instance/identifier.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/instance/identifier.st new file mode 100644 index 000000000..c7b817464 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/instance/identifier.st @@ -0,0 +1,3 @@ +accessing +identifier + ^ identifier \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/instance/initialize.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/instance/initialize.st new file mode 100644 index 000000000..4348f2972 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/instance/initialize.st @@ -0,0 +1,4 @@ +initialization +initialize + super initialize. + strict := true \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/instance/isLenient.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/instance/isLenient.st new file mode 100644 index 000000000..9cede96ea --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/instance/isLenient.st @@ -0,0 +1,3 @@ +testing +isLenient + ^ strict not \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/instance/isStrict.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/instance/isStrict.st new file mode 100644 index 000000000..300ebdbf1 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/instance/isStrict.st @@ -0,0 +1,3 @@ +testing +isStrict + ^ strict \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/instance/nextCodePointFromStream..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/instance/nextCodePointFromStream..st new file mode 100644 index 000000000..f8c3d4394 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/instance/nextCodePointFromStream..st @@ -0,0 +1,14 @@ +encoding - decoding +nextCodePointFromStream: stream + "In non-strict mode, we let byte values for holes in our mapping pass through" + + | byteValue | + ^ (byteValue := stream next) < 128 + ifTrue: [ byteValue ] + ifFalse: [ + (byteToUnicode at: byteValue - 127 ifAbsent: [ nil ]) + ifNotNil: [ :unicode | unicode asInteger ] + ifNil: [ + strict + ifTrue: [ ^ self errorOutsideRange: byteValue from:stream ] + ifFalse: [ byteValue ] ] ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/instance/nextFromStream..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/instance/nextFromStream..st new file mode 100644 index 000000000..31e8ff6d8 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/instance/nextFromStream..st @@ -0,0 +1,15 @@ +encoding - decoding +nextFromStream: stream + "In non-strict mode, we let byte values for holes in our mapping pass through. + Overwritten for performance reasons" + + | byteValue | + ^ (byteValue := stream next ifNil: [ ^ self errorIncompleteFrom: stream ]) < 128 + ifTrue: [ Character value: byteValue ] + ifFalse: [ + (byteToUnicode at: byteValue - 127 ifAbsent: [ nil ]) + ifNotNil: [ :unicode | unicode ] + ifNil: [ + strict + ifTrue: [ ^ Character value: (self errorOutsideRange: byteValue from:stream) ] + ifFalse: [ Character value: byteValue ] ] ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/instance/nextPutCodePoint.toStream..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/instance/nextPutCodePoint.toStream..st new file mode 100644 index 000000000..2755a5b80 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/instance/nextPutCodePoint.toStream..st @@ -0,0 +1,12 @@ +encoding - decoding +nextPutCodePoint: codePoint toStream: stream + "In non-strict mode, we let code points for holes in our mapping table pass through" + + codePoint < 128 + ifTrue: [ stream nextPut: codePoint ] + ifFalse: [ + | byte | + byte := unicodeToByte at: codePoint ifAbsent: [ nil ]. + (byte isNil and: [ strict or: [ codePoint > 255 ] ]) + ifTrue: [ ^ self errorOutsideRange: codePoint to: stream ]. + stream nextPut: (byte ifNil: [ codePoint ]) ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/instance/printOn..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/instance/printOn..st new file mode 100644 index 000000000..649828dc7 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/instance/printOn..st @@ -0,0 +1,9 @@ +printing +printOn: stream + super printOn: stream. + stream + nextPut: $(; + print: identifier. + strict + ifTrue: [ stream nextPutAll: ' strict' ]. + stream nextPut: $) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/instance/skipToBeginOfCodePointOnStream..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/instance/skipToBeginOfCodePointOnStream..st new file mode 100644 index 000000000..9d429f00c --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/instance/skipToBeginOfCodePointOnStream..st @@ -0,0 +1,7 @@ +encoding - decoding +skipToBeginOfCodePointOnStream: stream + "Ensure that the current position of stream is a the beginning of an encoded code point, + if not move further forward. This is necessary when a position in the binary stream is set, + not knowing if that position is on a proper encoded character boundary." + + "Nothing to be done, I am a byte encoding: each code point is encoded in a single byte" \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/instance/unicodeToByte..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/instance/unicodeToByte..st new file mode 100644 index 000000000..d7ceab106 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/instance/unicodeToByte..st @@ -0,0 +1,3 @@ +initialization +unicodeToByte: map + unicodeToByte := map \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/properties.json b/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/properties.json new file mode 100644 index 000000000..04c767182 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnSimplifiedByteEncoder.class/properties.json @@ -0,0 +1,18 @@ +{ + "commentStamp" : "", + "super" : "ZnCharacterEncoderGS", + "category" : "Zinc-Character-Encoding-Core", + "classinstvars" : [ + "byteTextConverters" + ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ + "identifier", + "byteToUnicode", + "unicodeToByte", + "strict" + ], + "name" : "ZnSimplifiedByteEncoder", + "type" : "normal" +} diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF16Encoder.class/README.md b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF16Encoder.class/README.md new file mode 100644 index 000000000..af9ccc6f0 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF16Encoder.class/README.md @@ -0,0 +1,6 @@ +I am ZnUTF16Encoder, a concrete subclass of ZnCharacterEncoderGS. +I implement the variable length UTF-16 encoding and decoding of Unicode according to RFC 2781. + +Wikipedia reference http://en.wikipedia.org/wiki/UTF-16 + +Part of Zinc HTTP Components. diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF16Encoder.class/class/handlesEncoding..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF16Encoder.class/class/handlesEncoding..st new file mode 100644 index 000000000..b036e7826 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF16Encoder.class/class/handlesEncoding..st @@ -0,0 +1,5 @@ +accessing +handlesEncoding: string + "Return true when my instances handle the encoding described by string" + + ^ self knownEncodingIdentifiers includes: (self canonicalEncodingIdentifier: string) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF16Encoder.class/class/knownEncodingIdentifiers.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF16Encoder.class/class/knownEncodingIdentifiers.st new file mode 100644 index 000000000..8eb266fcb --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF16Encoder.class/class/knownEncodingIdentifiers.st @@ -0,0 +1,3 @@ +accessing +knownEncodingIdentifiers + ^ #( 'utf16' 'utf16be' 'utf16le' ) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF16Encoder.class/instance/back16BitWordOnStream..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF16Encoder.class/instance/back16BitWordOnStream..st new file mode 100644 index 000000000..988bdbfba --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF16Encoder.class/instance/back16BitWordOnStream..st @@ -0,0 +1,8 @@ +private +back16BitWordOnStream: stream + | firstByte secondByte | + firstByte := stream back. + secondByte := stream back. + ^ self isBigEndian + ifTrue: [ secondByte + (firstByte << 8) ] + ifFalse: [ firstByte + (secondByte << 8) ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF16Encoder.class/instance/backOnStream..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF16Encoder.class/instance/backOnStream..st new file mode 100644 index 000000000..bf81af73b --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF16Encoder.class/instance/backOnStream..st @@ -0,0 +1,9 @@ +encoding - decoding +backOnStream: stream + "Move back one character on stream" + + | word | + word := self back16BitWordOnStream: stream. + (self isSurrogateCodePoint: word) + ifTrue: [ + self back16BitWordOnStream: stream ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF16Encoder.class/instance/byteOrderMarkLE.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF16Encoder.class/instance/byteOrderMarkLE.st new file mode 100644 index 000000000..d6678b90a --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF16Encoder.class/instance/byteOrderMarkLE.st @@ -0,0 +1,5 @@ +accessing +byteOrderMarkLE + "My little endian sequence of the Unicode BOM. See #byteOrderMark" + + ^ 16rFFFE \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF16Encoder.class/instance/encodedByteCountForCodePoint..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF16Encoder.class/instance/encodedByteCountForCodePoint..st new file mode 100644 index 000000000..bb0273e12 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF16Encoder.class/instance/encodedByteCountForCodePoint..st @@ -0,0 +1,7 @@ +encoding - decoding +encodedByteCountForCodePoint: codePoint + "Return how many bytes are needed to encode integer code point" + + codePoint <= 65535 ifTrue: [ ^ 2 ]. + codePoint <= self maximumUTFCode ifTrue: [ ^ 4 ]. + ^ self errorOutsideRangeByteCount: codePoint \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF16Encoder.class/instance/ensureAtBeginOfCodePointOnStream..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF16Encoder.class/instance/ensureAtBeginOfCodePointOnStream..st new file mode 100644 index 000000000..fb9abb9ad --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF16Encoder.class/instance/ensureAtBeginOfCodePointOnStream..st @@ -0,0 +1,16 @@ +encoding - decoding +ensureAtBeginOfCodePointOnStream: stream + "Ensure that the current position of stream is a the beginning of an encoded code point, + if not move further backwards. This is necessary when a position in the binary stream is set, + not knowing if that position is on a proper encoded character boundary." + + | word | + "Each code point is encoded using words of 2 bytes, move backwards until our position is divisible by 2" + [ stream position \\ 2 = 0 ] whileFalse: [ stream back ]. + "Now read the next word and back up" + word := self read16BitWordFromStream: stream. + self back16BitWordOnStream: stream. + "If it is a low or trailing surrogate, move another word backwards until the high or leading surrogate" + (word between: 16rDC00 and: 16rDFFF) + ifTrue: [ + self back16BitWordOnStream: stream ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF16Encoder.class/instance/isFixedLength.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF16Encoder.class/instance/isFixedLength.st new file mode 100644 index 000000000..4dd53ade4 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF16Encoder.class/instance/isFixedLength.st @@ -0,0 +1,5 @@ +testing +isFixedLength + "Return true when I am a fixed length encoding" + + ^ false \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF16Encoder.class/instance/nextCodePointFromStream..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF16Encoder.class/instance/nextCodePointFromStream..st new file mode 100644 index 000000000..ed4e7b966 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF16Encoder.class/instance/nextCodePointFromStream..st @@ -0,0 +1,16 @@ +encoding - decoding +nextCodePointFromStream: stream + "Read and return the next integer code point from stream" + + | word leadSurrogate trailSurrogate code | + word := self read16BitWordFromStream: stream. + ((self processByteOrderMark: word) and: [ self ignoreByteOrderMark ]) + ifTrue: [ word := self read16BitWordFromStream: stream ]. + ^ (word < 16rD800 or: [ word > 16rDBFF ]) + ifTrue: [ + word ] + ifFalse: [ + leadSurrogate := word. + trailSurrogate := self read16BitWordFromStream: stream. + code := (leadSurrogate - 16rD800) * 16r400 + (trailSurrogate - 16rDC00). + 16r10000 + code ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF16Encoder.class/instance/nextPutCodePoint.toStream..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF16Encoder.class/instance/nextPutCodePoint.toStream..st new file mode 100644 index 000000000..a6fc15b1c --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF16Encoder.class/instance/nextPutCodePoint.toStream..st @@ -0,0 +1,19 @@ +encoding - decoding +nextPutCodePoint: codePoint toStream: stream + "Write the encoding for integer code point to stream" + + | leadSurrogate trailSurrogate shifted | + (self isSurrogateCodePoint: codePoint) + ifTrue: [ ^ self errorOutsideRange: codePoint to: stream ]. + codePoint <= 65535 + ifTrue: [ + ^ self write16BitWord: codePoint toStream: stream ]. + codePoint <= self maximumUTFCode + ifTrue: [ + shifted := codePoint - 16r10000. + leadSurrogate := 16rD800 + (shifted // 16r400). + trailSurrogate := 16rDC00 + (shifted \\ 16r400). + self write16BitWord: leadSurrogate toStream: stream. + self write16BitWord: trailSurrogate toStream: stream ] + ifFalse: [ + ^ self errorOutsideRange: codePoint to: stream ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF16Encoder.class/instance/processByteOrderMark..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF16Encoder.class/instance/processByteOrderMark..st new file mode 100644 index 000000000..26d216621 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF16Encoder.class/instance/processByteOrderMark..st @@ -0,0 +1,8 @@ +private +processByteOrderMark: word + ^ (word = self byteOrderMark or: [ word = self byteOrderMarkLE ]) + ifTrue: [ + word = self byteOrderMarkLE + ifTrue: [ self swapEndianness ]. + true ] + ifFalse: [ false ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF16Encoder.class/instance/read16BitWordFromStream..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF16Encoder.class/instance/read16BitWordFromStream..st new file mode 100644 index 000000000..1d8bebe2e --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF16Encoder.class/instance/read16BitWordFromStream..st @@ -0,0 +1,10 @@ +private +read16BitWordFromStream: stream + | firstByte secondByte | + firstByte := stream next. + secondByte := stream next. + (firstByte isNil or: [ secondByte isNil ]) + ifTrue: [ ^ self errorIncompleteFrom: stream ]. + ^ self isBigEndian + ifTrue: [ secondByte + (firstByte << 8) ] + ifFalse: [ firstByte + (secondByte << 8) ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF16Encoder.class/instance/skipToBeginOfCodePointOnStream..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF16Encoder.class/instance/skipToBeginOfCodePointOnStream..st new file mode 100644 index 000000000..ee017d6f7 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF16Encoder.class/instance/skipToBeginOfCodePointOnStream..st @@ -0,0 +1,16 @@ +encoding - decoding +skipToBeginOfCodePointOnStream: stream + "Ensure that the current position of stream is a the beginning of an encoded code point, + if not move further forward. This is necessary when a position in the binary stream is set, + not knowing if that position is on a proper encoded character boundary." + + | word | + "Each code point is encoded using words of 2 bytes, move forward until our position is divisible by 2" + [ stream position \\ 2 = 0 ] whileFalse: [ stream next ]. + "Now read the next word and back up" + word := self read16BitWordFromStream: stream. + self back16BitWordOnStream: stream. + "If it is a low or trailing surrogate, move another word forward until the high or leading surrogate" + (word between: 16rDC00 and: 16rDFFF) + ifTrue: [ + self read16BitWordFromStream: stream ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF16Encoder.class/instance/write16BitWord.toStream..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF16Encoder.class/instance/write16BitWord.toStream..st new file mode 100644 index 000000000..406f92369 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF16Encoder.class/instance/write16BitWord.toStream..st @@ -0,0 +1,11 @@ +private +write16BitWord: word toStream: stream + self isBigEndian + ifTrue: [ + stream + nextPut: (word byteAt: 2); + nextPut: (word byteAt: 1) ] + ifFalse: [ + stream + nextPut: (word byteAt: 1); + nextPut: (word byteAt: 2) ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF16Encoder.class/properties.json b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF16Encoder.class/properties.json new file mode 100644 index 000000000..c64fc23a7 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF16Encoder.class/properties.json @@ -0,0 +1,11 @@ +{ + "commentStamp" : "", + "super" : "ZnEndianSensitiveUTFEncoder", + "category" : "Zinc-Character-Encoding-Core", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "ZnUTF16Encoder", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF32Encoder.class/README.md b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF32Encoder.class/README.md new file mode 100644 index 000000000..df1fcc627 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF32Encoder.class/README.md @@ -0,0 +1,8 @@ +I am ZnUTF32Encoder, a concrete subclass of ZnCharacterEncoderGS. +I implement the fixed length UTF-32 encoding and decoding of Unicode according to http://www.unicode.org/versions/Unicode8.0.0/ch03.pdf definitions D90, D99, D100 and D101. + +Wikipedia reference http://en.wikipedia.org/wiki/UTF-32 + +UCS-4 is another name for the same encoding. + +Part of Zinc HTTP Components. diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF32Encoder.class/class/handlesEncoding..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF32Encoder.class/class/handlesEncoding..st new file mode 100644 index 000000000..b036e7826 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF32Encoder.class/class/handlesEncoding..st @@ -0,0 +1,5 @@ +accessing +handlesEncoding: string + "Return true when my instances handle the encoding described by string" + + ^ self knownEncodingIdentifiers includes: (self canonicalEncodingIdentifier: string) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF32Encoder.class/class/knownEncodingIdentifiers.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF32Encoder.class/class/knownEncodingIdentifiers.st new file mode 100644 index 000000000..090198c99 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF32Encoder.class/class/knownEncodingIdentifiers.st @@ -0,0 +1,3 @@ +accessing +knownEncodingIdentifiers + ^ #( 'utf32' 'utf32be' 'utf32le' 'ucs4' 'ucs4be' 'ucs4le') \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF32Encoder.class/instance/backOnStream..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF32Encoder.class/instance/backOnStream..st new file mode 100644 index 000000000..892207788 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF32Encoder.class/instance/backOnStream..st @@ -0,0 +1,5 @@ +encoding - decoding +backOnStream: stream + "Move back one character on stream" + + 4 timesRepeat: [ stream back ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF32Encoder.class/instance/byteOrderMarkLE.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF32Encoder.class/instance/byteOrderMarkLE.st new file mode 100644 index 000000000..4b4a53cf9 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF32Encoder.class/instance/byteOrderMarkLE.st @@ -0,0 +1,5 @@ +private +byteOrderMarkLE + "My little endian sequence of the Unicode BOM. See #byteOrderMark" + + ^ 16rFFFE0000 \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF32Encoder.class/instance/encodedByteCountForCodePoint..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF32Encoder.class/instance/encodedByteCountForCodePoint..st new file mode 100644 index 000000000..36104cbd4 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF32Encoder.class/instance/encodedByteCountForCodePoint..st @@ -0,0 +1,7 @@ +encoding - decoding +encodedByteCountForCodePoint: codePoint + "Return how many bytes are needed to encode integer codePoint" + + codePoint > self maximumUTFCode + ifTrue: [ ^ self errorOutsideRangeByteCount: codePoint ]. + ^ 4 \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF32Encoder.class/instance/ensureAtBeginOfCodePointOnStream..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF32Encoder.class/instance/ensureAtBeginOfCodePointOnStream..st new file mode 100644 index 000000000..536e74349 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF32Encoder.class/instance/ensureAtBeginOfCodePointOnStream..st @@ -0,0 +1,9 @@ +encoding - decoding +ensureAtBeginOfCodePointOnStream: stream + "Ensure that the current position of stream is a the beginning of an encoded code point, + if not move further backwards. This is necessary when a position in the binary stream is set, + not knowing if that position is on a proper encoded character boundary." + + "Each code point is encoded using exaxtly 4 bytes, move backwards until our position is divisible by 4" + + [ stream position \\ 4 = 0 ] whileFalse: [ stream back ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF32Encoder.class/instance/nextCodePointFromStream..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF32Encoder.class/instance/nextCodePointFromStream..st new file mode 100644 index 000000000..64db5e849 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF32Encoder.class/instance/nextCodePointFromStream..st @@ -0,0 +1,11 @@ +encoding - decoding +nextCodePointFromStream: stream + "Read and return the next integer code point from stream" + + | codePoint | + codePoint := self readCodePointFrom: stream. + ((self processByteOrderMark: codePoint) and: [ self ignoreByteOrderMark ]) + ifTrue: [ codePoint := self readCodePointFrom: stream ]. + ((self isSurrogateCodePoint: codePoint) or: [ codePoint > self maximumUTFCode ]) + ifTrue: [ ^ self errorOutsideRange: codePoint from: stream ]. + ^ codePoint \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF32Encoder.class/instance/nextPutCodePoint.toStream..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF32Encoder.class/instance/nextPutCodePoint.toStream..st new file mode 100644 index 000000000..3839e92a3 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF32Encoder.class/instance/nextPutCodePoint.toStream..st @@ -0,0 +1,11 @@ +encoding - decoding +nextPutCodePoint: codePoint toStream: stream + "Write the encoding for integer code point to stream" + + (self isSurrogateCodePoint: codePoint) + ifTrue: [ ^ self errorOutsideRange: codePoint to: stream ]. + codePoint <= self maximumUTFCode + ifTrue: [ + self writeCodePoint: codePoint to: stream ] + ifFalse: [ + ^ self errorOutsideRange: codePoint to: stream ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF32Encoder.class/instance/processByteOrderMark..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF32Encoder.class/instance/processByteOrderMark..st new file mode 100644 index 000000000..e45c718b3 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF32Encoder.class/instance/processByteOrderMark..st @@ -0,0 +1,8 @@ +private +processByteOrderMark: codePoint + ^ (codePoint = self byteOrderMark or: [ codePoint = self byteOrderMarkLE ]) + ifTrue: [ + codePoint = self byteOrderMarkLE + ifTrue: [ self swapEndianness ]. + true ] + ifFalse: [ false ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF32Encoder.class/instance/readCodePointFrom..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF32Encoder.class/instance/readCodePointFrom..st new file mode 100644 index 000000000..451e8ae93 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF32Encoder.class/instance/readCodePointFrom..st @@ -0,0 +1,14 @@ +private +readCodePointFrom: stream + | byte1 byte2 byte3 byte4 | + byte1 := stream next. + byte2 := stream next. + byte3 := stream next. + byte4 := stream next. + (byte1 isNil or: [ byte2 isNil or: [ byte3 isNil or: [ byte4 isNil ] ] ]) + ifTrue: [ ^ self errorIncompleteFrom: stream ]. + ^ self isBigEndian + ifTrue: [ + (byte1 bitShift: 24) + (byte2 bitShift: 16) + (byte3 bitShift: 8) + byte4 ] + ifFalse: [ + (byte4 bitShift: 24) + (byte3 bitShift: 16) + (byte2 bitShift: 8) + byte1 ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF32Encoder.class/instance/skipToBeginOfCodePointOnStream..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF32Encoder.class/instance/skipToBeginOfCodePointOnStream..st new file mode 100644 index 000000000..ebbad58cc --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF32Encoder.class/instance/skipToBeginOfCodePointOnStream..st @@ -0,0 +1,9 @@ +encoding - decoding +skipToBeginOfCodePointOnStream: stream + "Ensure that the current position of stream is a the beginning of an encoded code point, + if not move further forward. This is necessary when a position in the binary stream is set, + not knowing if that position is on a proper encoded character boundary." + + "Each code point is encoded using exaxtly 4 bytes, move forward until our position is divisible by 4" + + [ stream position \\ 4 = 0 ] whileFalse: [ stream next ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF32Encoder.class/instance/writeCodePoint.to..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF32Encoder.class/instance/writeCodePoint.to..st new file mode 100644 index 000000000..d89973218 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF32Encoder.class/instance/writeCodePoint.to..st @@ -0,0 +1,15 @@ +private +writeCodePoint: codePoint to: stream + self isBigEndian + ifTrue: [ + stream + nextPut: (codePoint byteAt: 4); + nextPut: (codePoint byteAt: 3); + nextPut: (codePoint byteAt: 2); + nextPut: (codePoint byteAt: 1) ] + ifFalse: [ + stream + nextPut: (codePoint byteAt: 1); + nextPut: (codePoint byteAt: 2); + nextPut: (codePoint byteAt: 3); + nextPut: (codePoint byteAt: 4) ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF32Encoder.class/properties.json b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF32Encoder.class/properties.json new file mode 100644 index 000000000..84b9aca01 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF32Encoder.class/properties.json @@ -0,0 +1,11 @@ +{ + "commentStamp" : "", + "super" : "ZnEndianSensitiveUTFEncoder", + "category" : "Zinc-Character-Encoding-Core", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "ZnUTF32Encoder", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF8Encoder.extension/instance/decodeBytesIntoWideString..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF8Encoder.extension/instance/decodeBytesIntoWideString..st deleted file mode 100644 index c7031eb40..000000000 --- a/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF8Encoder.extension/instance/decodeBytesIntoWideString..st +++ /dev/null @@ -1,3 +0,0 @@ -*zinc-character-encoding-core -decodeBytesIntoWideString: bytes - ^ bytes asByteArray decodeFromUTF8 \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF8Encoder.extension/methodProperties.json b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF8Encoder.extension/methodProperties.json deleted file mode 100644 index d5657c07e..000000000 --- a/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF8Encoder.extension/methodProperties.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "class" : { - }, - "instance" : { - "decodeBytesIntoWideString:" : "dkh 04/18/2023 18:28" } } diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF8EncoderGS.class/README.md b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF8EncoderGS.class/README.md new file mode 100644 index 000000000..512d249d9 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF8EncoderGS.class/README.md @@ -0,0 +1,6 @@ +I am ZnUTF8EncoderGS, a concrete subclass of ZnCharacterEncoderGS. +I implement the variable length UTF-8 encoding and decoding of Unicode according to RFC 3629. + +Wikipedia reference http://en.wikipedia.org/wiki/UTF-8 + +Part of Zinc HTTP Components. diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF8EncoderGS.class/class/default.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF8EncoderGS.class/class/default.st new file mode 100644 index 000000000..7df1ad94b --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF8EncoderGS.class/class/default.st @@ -0,0 +1,6 @@ +accessing +default + "Return a cached instance of the most commonly used encoder, + which is faster than going via #newForEncoding: that does a subclass search" + + ^ Default ifNil: [ Default := self new ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF8EncoderGS.class/class/handlesEncoding..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF8EncoderGS.class/class/handlesEncoding..st new file mode 100644 index 000000000..e03e57be9 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF8EncoderGS.class/class/handlesEncoding..st @@ -0,0 +1,5 @@ +accessing +handlesEncoding: string + "Return true when my instances handle the encoding described by string" + + ^ #( 'utf-8' 'utf8' ) includes: string \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF8EncoderGS.class/class/initialize.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF8EncoderGS.class/class/initialize.st new file mode 100644 index 000000000..ce6d7d970 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF8EncoderGS.class/class/initialize.st @@ -0,0 +1,18 @@ +class initialization +initialize + | encoder stream | + ByteASCIISet := ByteArray new: 256. + ByteUTF8Encoding := Array new: 256. + encoder := self new. + stream := ByteArray new writeStream. + 0 to: 255 do: [ :each | + | bytes | + stream reset. + encoder nextPut: (Character value: each) toStream: stream. + bytes := stream contents. + (bytes size = 1 and: [ bytes first = each ]) + ifTrue: [ + ByteASCIISet at: each + 1 put: 0 ] + ifFalse: [ + ByteASCIISet at: each + 1 put: 1. + ByteUTF8Encoding at: each + 1 put: bytes ] ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF8EncoderGS.class/class/knownEncodingIdentifiers.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF8EncoderGS.class/class/knownEncodingIdentifiers.st new file mode 100644 index 000000000..2d99b5727 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF8EncoderGS.class/class/knownEncodingIdentifiers.st @@ -0,0 +1,3 @@ +accessing +knownEncodingIdentifiers + ^ #( 'utf8' ) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF8EncoderGS.class/class/newForEncoding..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF8EncoderGS.class/class/newForEncoding..st new file mode 100644 index 000000000..87651bf31 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF8EncoderGS.class/class/newForEncoding..st @@ -0,0 +1,5 @@ +instance creation +newForEncoding: string + "No further parametrization needed" + + ^ self new \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/instance/decodeBytesIntoWideString..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF8EncoderGS.class/instance/decodeBytesIntoWideString..st similarity index 100% rename from repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/instance/decodeBytesIntoWideString..st rename to repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF8EncoderGS.class/instance/decodeBytesIntoWideString..st diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/instance/encodedByteCountFor..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF8EncoderGS.class/instance/encodedByteCountFor..st similarity index 100% rename from repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/instance/encodedByteCountFor..st rename to repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF8EncoderGS.class/instance/encodedByteCountFor..st diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF8EncoderGS.class/instance/encodedByteCountForCodePoint..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF8EncoderGS.class/instance/encodedByteCountForCodePoint..st new file mode 100644 index 000000000..43a782cf8 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF8EncoderGS.class/instance/encodedByteCountForCodePoint..st @@ -0,0 +1,9 @@ +encoding - decoding +encodedByteCountForCodePoint: codePoint + "Return how many bytes are needed to encode integer code point" + + codePoint < 128 ifTrue: [ ^ 1 ]. + codePoint < 2048 ifTrue: [ ^ 2 ]. + codePoint < 65535 ifTrue: [ ^ 3 ]. + codePoint <= self maximumUTFCode ifTrue: [ ^ 4 ]. + ^ self errorOutsideRangeByteCount: codePoint \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF8EncoderGS.class/instance/ensureAtBeginOfCodePointOnStream..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF8EncoderGS.class/instance/ensureAtBeginOfCodePointOnStream..st new file mode 100644 index 000000000..3f5685fa2 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF8EncoderGS.class/instance/ensureAtBeginOfCodePointOnStream..st @@ -0,0 +1,11 @@ +encoding - decoding +ensureAtBeginOfCodePointOnStream: stream + "Ensure that the current position of stream is a the beginning of an encoded code point, + if not move further backwards. This is necessary when a position in the binary stream is set, + not knowing if that position is on a proper encoded character boundary." + + "If we are at end-of-stream, we can't be in the middle of an encoded codepoint + (unless that codepoint is incomplete and thus invalid, which we won't worry about)" + stream atEnd ifTrue: [ ^ self ]. + "Back up until we are not longer on a continuation byte but on a leading byte" + [ (stream peek bitAnd: 2r11000000) == 2r10000000 ] whileTrue: [ stream back ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF8EncoderGS.class/instance/error..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF8EncoderGS.class/instance/error..st new file mode 100644 index 000000000..7bd423949 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF8EncoderGS.class/instance/error..st @@ -0,0 +1,3 @@ +error handling +error: message + ^ ZnInvalidUTF8 signal: message \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF8EncoderGS.class/instance/errorIllegalContinuationByte.from..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF8EncoderGS.class/instance/errorIllegalContinuationByte.from..st new file mode 100644 index 000000000..16c4b2b2c --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF8EncoderGS.class/instance/errorIllegalContinuationByte.from..st @@ -0,0 +1,3 @@ +error handling +errorIllegalContinuationByte: byte from: stream + ^ self error: 'Illegal continuation byte for utf-8 encoding' \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF8EncoderGS.class/instance/errorIllegalLeadingByte.from..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF8EncoderGS.class/instance/errorIllegalLeadingByte.from..st new file mode 100644 index 000000000..9393d2346 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF8EncoderGS.class/instance/errorIllegalLeadingByte.from..st @@ -0,0 +1,3 @@ +error handling +errorIllegalLeadingByte: byte from: stream + ^ self error: 'Illegal leading byte for utf-8 encoding' \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/instance/errorOutsideRange.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF8EncoderGS.class/instance/errorOutsideRange.st similarity index 100% rename from repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/instance/errorOutsideRange.st rename to repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF8EncoderGS.class/instance/errorOutsideRange.st diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF8EncoderGS.class/instance/errorOverlong.from..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF8EncoderGS.class/instance/errorOverlong.from..st new file mode 100644 index 000000000..dd58b93f6 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF8EncoderGS.class/instance/errorOverlong.from..st @@ -0,0 +1,3 @@ +error handling +errorOverlong: codePoint from: stream + ^ self error: 'Overlong utf-8 encoding (non-shortest form)' \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/instance/errorOverlong.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF8EncoderGS.class/instance/errorOverlong.st similarity index 100% rename from repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/instance/errorOverlong.st rename to repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF8EncoderGS.class/instance/errorOverlong.st diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF8EncoderGS.class/instance/identifier.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF8EncoderGS.class/instance/identifier.st new file mode 100644 index 000000000..ac7da7b23 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF8EncoderGS.class/instance/identifier.st @@ -0,0 +1,3 @@ +accessing +identifier + ^ 'utf8' \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/instance/maximumUTF8Code.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF8EncoderGS.class/instance/maximumUTF8Code.st similarity index 100% rename from repository/Zinc-Character-Encoding-Core.package/ZnUTF8Encoder.class/instance/maximumUTF8Code.st rename to repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF8EncoderGS.class/instance/maximumUTF8Code.st diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF8EncoderGS.class/instance/next.putAll.startingAt.toStream..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF8EncoderGS.class/instance/next.putAll.startingAt.toStream..st new file mode 100644 index 000000000..6f743c5be --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF8EncoderGS.class/instance/next.putAll.startingAt.toStream..st @@ -0,0 +1,5 @@ +convenience +next: count putAll: string startingAt: offset toStream: stream + "Write count characters from string starting at offset to stream." + + super next: count putAll: string startingAt: offset toStream: stream \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF8EncoderGS.class/instance/next.putAllASCII.startingAt.toStream..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF8EncoderGS.class/instance/next.putAllASCII.startingAt.toStream..st new file mode 100644 index 000000000..7fd87792f --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF8EncoderGS.class/instance/next.putAllASCII.startingAt.toStream..st @@ -0,0 +1,7 @@ +private +next: count putAllASCII: string startingAt: offset toStream: stream + "Write count bytes from string starting at offset to stream, + assuming all characters are in the ASCII set and need no translation" + + offset to: offset + count - 1 do: [ :index | + stream nextPut: (string byteAt: index) ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF8EncoderGS.class/instance/nextCodePointFromStream..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF8EncoderGS.class/instance/nextCodePointFromStream..st new file mode 100644 index 000000000..22071bf8e --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF8EncoderGS.class/instance/nextCodePointFromStream..st @@ -0,0 +1,39 @@ +encoding - decoding +nextCodePointFromStream: stream + "Read and return the next integer code point from stream" + + | code byte next | + (byte := stream next ifNil: [ ^ self errorIncompleteFrom: stream ]) < 128 + ifTrue: [ ^ byte ]. + (byte bitAnd: 2r11100000) == 2r11000000 + ifTrue: [ + code := byte bitAnd: 2r00011111. + ((next := stream next ifNil: [ ^ self errorIncompleteFrom: stream ]) bitAnd: 2r11000000) == 2r10000000 + ifTrue: [ code := (code bitShift: 6) + (next bitAnd: 2r00111111) ] + ifFalse: [ ^ self errorIllegalContinuationByte: next from: stream ]. + code < 128 ifTrue: [ ^ self errorOverlong: code from: stream ]. + ^ code ]. + (byte bitAnd: 2r11110000) == 2r11100000 + ifTrue: [ + code := byte bitAnd: 2r00001111. + 2 timesRepeat: [ + ((next := stream next ifNil: [ ^ self errorIncompleteFrom: stream ]) bitAnd: 2r11000000) == 2r10000000 + ifTrue: [ code := (code bitShift: 6) + (next bitAnd: 2r00111111) ] + ifFalse: [ ^ self errorIllegalContinuationByte: next from: stream ] ]. + code < 2048 ifTrue: [ ^ self errorOverlong: code from: stream ]. + (self isSurrogateCodePoint: code) ifTrue: [ ^ self errorOutsideRange: code from: stream ]. + (code = self byteOrderMark and: [ self ignoreByteOrderMark ]) ifTrue: [ + stream atEnd ifTrue: [ ^ self errorIncompleteFrom: stream ]. + ^ self nextCodePointFromStream: stream ]. + ^ code ]. + (byte bitAnd: 2r11111000) == 2r11110000 + ifTrue: [ + code := byte bitAnd: 2r00000111. + 3 timesRepeat: [ + ((next := stream next ifNil: [ ^ self errorIncompleteFrom: stream ]) bitAnd: 2r11000000) == 2r10000000 + ifTrue: [ code := (code bitShift: 6) + (next bitAnd: 2r00111111) ] + ifFalse: [ ^ self errorIllegalContinuationByte: next from: stream ] ]. + code < 65535 ifTrue: [ ^ self errorOverlong: code from: stream ]. + code > self maximumUTFCode ifTrue: [ ^ self errorOutsideRange: code from: stream ]. + ^ code ]. + ^ self errorIllegalLeadingByte: byte from: stream \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF8EncoderGS.class/instance/nextPutCodePoint.toStream..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF8EncoderGS.class/instance/nextPutCodePoint.toStream..st new file mode 100644 index 000000000..2bc54bb6f --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF8EncoderGS.class/instance/nextPutCodePoint.toStream..st @@ -0,0 +1,23 @@ +encoding - decoding +nextPutCodePoint: codePoint toStream: stream + "Write the encoding for Integer code point to stream" + + codePoint < 128 ifTrue: [ + ^ stream nextPut: codePoint ]. + codePoint < 2048 ifTrue: [ + ^ stream + nextPut: (2r11000000 + (codePoint bitShift: -6)); + nextPut: (2r10000000 + (codePoint bitAnd: 2r111111)) ]. + (self isSurrogateCodePoint: codePoint) ifTrue: [ ^ self errorOutsideRange: codePoint to: stream ]. + codePoint < 65536 ifTrue: [ + ^ stream + nextPut: (2r11100000 + (codePoint bitShift: -12)); + nextPut: (2r10000000 + ((codePoint bitShift: -6) bitAnd: 2r111111)); + nextPut: (2r10000000 + (codePoint bitAnd: 2r111111)) ]. + codePoint <= self maximumUTFCode ifTrue: [ + ^ stream + nextPut: (2r11110000 + (codePoint bitShift: -18)); + nextPut: (2r10000000 + ((codePoint bitShift: -12) bitAnd: 2r111111)); + nextPut: (2r10000000 + ((codePoint bitShift: -6) bitAnd: 2r111111)); + nextPut: (2r10000000 + (codePoint bitAnd: 2r111111)) ]. + ^ self errorOutsideRange: codePoint to: stream \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF8EncoderGS.class/properties.json b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF8EncoderGS.class/properties.json new file mode 100644 index 000000000..697a09534 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTF8EncoderGS.class/properties.json @@ -0,0 +1,15 @@ +{ + "commentStamp" : "", + "super" : "ZnUTFEncoder", + "category" : "Zinc-Character-Encoding-Core", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ + "ByteASCIISet", + "ByteUTF8Encoding", + "Default" + ], + "instvars" : [ ], + "name" : "ZnUTF8EncoderGS", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTFEncoder.class/README.md b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTFEncoder.class/README.md new file mode 100644 index 000000000..d1d3649e8 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTFEncoder.class/README.md @@ -0,0 +1 @@ +I am ZnUTFEncoder. I am a ZnCharacterEncoderGS. My subclasses deal with the full range of Unicode character code points. diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTFEncoder.class/class/handlesEncoding..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTFEncoder.class/class/handlesEncoding..st new file mode 100644 index 000000000..4cb9521a7 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTFEncoder.class/class/handlesEncoding..st @@ -0,0 +1,5 @@ +accessing +handlesEncoding: string + "Return true when my instances handle the encoding described by string" + + ^ false \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTFEncoder.class/class/isAbstract.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTFEncoder.class/class/isAbstract.st new file mode 100644 index 000000000..b86b3420c --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTFEncoder.class/class/isAbstract.st @@ -0,0 +1,3 @@ +testing +isAbstract + ^ self = ZnUTFEncoder \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTFEncoder.class/instance/byteOrderMark.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTFEncoder.class/instance/byteOrderMark.st new file mode 100644 index 000000000..21b31b1a4 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTFEncoder.class/instance/byteOrderMark.st @@ -0,0 +1,7 @@ +accessing +byteOrderMark + "The code point of the Unicode Byte-Order-Mark or BOM character. + This is the big endian sequence. + See https://en.wikipedia.org/wiki/Byte_order_mark" + + ^ 16rFEFF \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTFEncoder.class/instance/encodeStringWithByteOrderMark..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTFEncoder.class/instance/encodeStringWithByteOrderMark..st new file mode 100644 index 000000000..1b85fdaad --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTFEncoder.class/instance/encodeStringWithByteOrderMark..st @@ -0,0 +1,8 @@ +convenience +encodeStringWithByteOrderMark: string + "Encode string and return the resulting byte array. + Always add a Unicode byte order mark (BOM) in front." + + ^ ByteArray streamContents: [ :stream | + self nextPutByteOrderMarkToStream: stream. + self next: string size putAll: string startingAt: 1 toStream: stream ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTFEncoder.class/instance/ignoreByteOrderMark..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTFEncoder.class/instance/ignoreByteOrderMark..st new file mode 100644 index 000000000..54a1ba104 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTFEncoder.class/instance/ignoreByteOrderMark..st @@ -0,0 +1,5 @@ +accessing +ignoreByteOrderMark: boolean + "When boolean is true I ignore Unicode byte-order mark (BOM) occurences that I read (the default)." + + ignoreByteOrderMark := boolean \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTFEncoder.class/instance/ignoreByteOrderMark.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTFEncoder.class/instance/ignoreByteOrderMark.st new file mode 100644 index 000000000..a77db6ea8 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTFEncoder.class/instance/ignoreByteOrderMark.st @@ -0,0 +1,5 @@ +accessing +ignoreByteOrderMark + "Return true when I ignore Unicode byte-order mark (BOM) occurences that I read (the default)." + + ^ ignoreByteOrderMark ifNil: [ ignoreByteOrderMark := true ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTFEncoder.class/instance/isSurrogateCodePoint..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTFEncoder.class/instance/isSurrogateCodePoint..st new file mode 100644 index 000000000..10a7d3a68 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTFEncoder.class/instance/isSurrogateCodePoint..st @@ -0,0 +1,5 @@ +testing +isSurrogateCodePoint: codePoint + "Surrogate Code Points should not be encoded or decoded because they are not Unicode scalar values" + + ^ codePoint between: 16rD800 and: 16rDFFF \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTFEncoder.class/instance/maximumUTFCode.st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTFEncoder.class/instance/maximumUTFCode.st new file mode 100644 index 000000000..9f4830b9c --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTFEncoder.class/instance/maximumUTFCode.st @@ -0,0 +1,3 @@ +accessing +maximumUTFCode + ^ 16r10FFFF \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTFEncoder.class/instance/nextPutByteOrderMarkToStream..st b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTFEncoder.class/instance/nextPutByteOrderMarkToStream..st new file mode 100644 index 000000000..2474676d3 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTFEncoder.class/instance/nextPutByteOrderMarkToStream..st @@ -0,0 +1,5 @@ +convenience +nextPutByteOrderMarkToStream: stream + "Write the encoded byte-order-mark (BOM) to stream" + + self nextPutCodePoint: self byteOrderMark toStream: stream \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTFEncoder.class/properties.json b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTFEncoder.class/properties.json new file mode 100644 index 000000000..281bbc7fd --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.v37.package/ZnUTFEncoder.class/properties.json @@ -0,0 +1,13 @@ +{ + "commentStamp" : "", + "super" : "ZnCharacterEncoderGS", + "category" : "Zinc-Character-Encoding-Core", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ + "ignoreByteOrderMark" + ], + "name" : "ZnUTFEncoder", + "type" : "normal" +} diff --git a/repository/Zinc-Character-Encoding-Core.v37.package/monticello.meta/version b/repository/Zinc-Character-Encoding-Core.v37.package/monticello.meta/version deleted file mode 100644 index c71131145..000000000 --- a/repository/Zinc-Character-Encoding-Core.v37.package/monticello.meta/version +++ /dev/null @@ -1 +0,0 @@ -(name 'Zinc-Character-Encoding-Core.v37-dkh.55' message 'Issue #101: ZnNullEncoder is used when encoding string not recognized' id '08f0d77d-8f50-42cf-9e22-db2e399a76a6' date '04/19/2023' time '09:42:16' author 'dkh' ancestors ((name 'Zinc-Character-Encoding-Core.v37-dkh.54' message 'Issue #101: checkpoint with additional changes needed for latest version of FileSystemGs for 3.7.0' id '97dd7714-14c4-4a3d-ad49-886f69400f28' date '04/18/2023' time '18:56:26' author 'dkh' ancestors ((name 'Zinc-Character-Encoding-Core.v37-dkh.53' message 'Issue #101: ZnCharacterEncoder>>= added to base image, so override for ZnCharacterEncoder>>= no longer needed ...' id 'eb53f7df-4ea5-49c5-ae5e-f2d82895d130' date '03/06/2023' time '11:21:10' author 'dkh' ancestors ((name 'Zinc-Character-Encoding-Core.v37-dkh.52' message 'Issue #101: ZnCharacterEncoder>>= and ZnCharacterEncoder>>encodeString: are missing from base ZnCharacterEncoder' id '00846e8c-b3ce-48a4-96f1-a0671cdfacc2' date '02/27/2023' time '17:39:19' author 'dkh' ancestors ((name 'Zinc-Character-Encoding-Core.v37-dkh.51' message 'Issue #101: implement ZnByteEncoder>>readInto:startingAt:count:fromStream: to complete the port to 3.7.0...' id '4dc8c662-05cf-4e8a-a086-29406b6e4a50' date '02/27/2023' time '16:15:32' author 'dkh' ancestors ((name 'Zinc-Character-Encoding-Core.v37-dkh.50' message 'Issue #101: ZnByteEncoder class>>newForEncoding: needs to be implemented for 3.7.0' id '8f6939e6-004e-405f-9c08-571a4de41678' date '02/27/2023' time '16:02:21' author 'dkh' ancestors ((name 'Zinc-Character-Encoding-Core.v37-dkh.49' message 'Issue #101: ZnByteEncoder needs additional attention for 3.7.0' id 'd5fa2729-09cc-459e-ad37-35d3d8bf4a9e' date '02/27/2023' time '11:13:35' author 'dkh' ancestors ((name 'Zinc-Character-Encoding-Core.v37-dkh.48' message 'Issue #101: implement ZnCharacterEncoder>>beLenient for compatibity with original GLASS implementation ' id '0966a347-5ab3-45e3-a6d6-d9e729c456a8' date '02/24/2023' time '16:25:31' author 'dkh' ancestors ((name 'Zinc-Character-Encoding-Core.v37-dkh.47' message 'create a 3.7 version of this package ... With 3.7.0, the Zinc-Character-Encoding-Core package is included in the base as part of the FileSystemGs support' id '43ead04a-db3f-4021-ba12-56465407cc85' date '02/24/2023' time '11:48:34' author 'dkh' ancestors ((name 'Zinc-Character-Encoding-Core-dkh.46' message 'ZnUTF8Encoder>>next:putAll:startingAt:toStream: is also version dependent ...' id '0e725fb3-55ef-4bf9-b3c9-6df068c8f363' date '06/30/2014' time '07:23:19' author 'dkh' ancestors ((name 'Zinc-Character-Encoding-Core-dkh.45' message 'ZnUTF8Encoder>>encodeString: is version specific' id '3e2570ec-2aa2-4935-8378-333d737b417f' date '06/30/2014' time '00:04:22' author 'dkh' ancestors ((name 'Zinc-Character-Encoding-Core-dkh.44' message 'checkpoint for 3.1.0.5: 282 run, 280 passes, 1 expected defects, 1 failures, 0 errors, 0 unexpected passes' id '8ba436de-6334-45af-b6e6-a61a5e160fb5' date '06/29/2014' time '17:34:35' author 'dkh' ancestors ((name 'Zinc-Character-Encoding-Core-dkh.43' message 'checkpoint: 282 run, 273 passes, 0 expected defects, 7 failures, 2 errors, 0 unexpected passes - down to mainly chunked stream and gzip failures' id '11dd2a99-494d-4e49-8d10-ea3391a89dc1' date '06/27/2014' time '18:12:38' author 'dkh' ancestors ((name 'Zinc-Character-Encoding-Core-dkh.42' message 'fix Issue #51, signal ConnectionClosed when zero bytes returned in SocketStreamSocket>>receiveDataSignallingTimeout:into:startingAt: - 282 run, 267 passes, 0 expected defects, 11 failures, 4 errors, 0 unexpected passes' id 'f0a80c6a-c7ee-4109-b7b4-e926a756a5c0' date '06/27/2014' time '12:49:37' author 'dkh' ancestors ((name 'Zinc-Character-Encoding-Core-dkh.41' message 'checkpoint: 282 run, 267 passes, 0 expected defects, 11 failures, 4 errors, 0 unexpected passes ' id 'c7bd9eee-eed4-490d-a835-fd7390e1d981' date '06/26/2014' time '22:01:02' author 'dkh' ancestors ((name 'Zinc-Character-Encoding-Core-dkh.40' message 'checkpoint: 282 run, 263 passes, 0 expected defects, 13 failures, 6 errors, 0 unexpected passes' id 'b00757a9-4633-40d7-a907-4680c639290c' date '06/25/2014' time '22:19:23' author 'dkh' ancestors ((name 'Zinc-Character-Encoding-Core-dkh.39' message 'Checkpoint: 282 run, 258 passes, 0 expected defects, 10 failures, 14 errors, 0 unexpected passes ' id '124a5208-94ff-4ebb-af0b-1905e5b55849' date '06/25/2014' time '21:52:52' author 'dkh' ancestors ((name 'Zinc-Character-Encoding-Core-dkh.38' message 'Not surprisingly, ZnUTF8Encoder>>brokenReadInto:startingAt:count:fromStream: is the culprit' id 'ed6f2be1-a3da-48e9-829c-06ab7b05607d' date '06/24/2014' time '21:12:50' author 'dkh' ancestors ((name 'Zinc-Character-Encoding-Core-dkh.37' message 'looks like ZnByteStringBecameWideString is needed ... add defaultAction and cross fingers' id '684180f2-cf80-4407-9786-de5962315f18' date '05/25/2014' time '20:17:52' author 'dkh' ancestors ((name 'Zinc-Character-Encoding-Core-dkh.36' message 'ZnUTF8Encoder>>originalReadInto:startingAt:count:fromStream: is no better ... direct conversion of String to QueadByteString instead of ZnByteStringBecameWideString ... no defaultAction and no handler??? ' id '4acde385-6954-46de-9b0f-3a26b034b304' date '05/25/2014' time '14:48:14' author 'dkh' ancestors ((name 'Zinc-Character-Encoding-Core-dkh.35' message 'ZnByteStringBecameWideString not handled correctly ... I surrender for the moment ... swap out ZnUTF8Encoder>>brokenReadInto:startingAt:count:fromStream: for ZnUTF8Encoder>>originalReadInto:startingAt:count:fromStream: and cut down on the combinatorials...' id '2f16b108-be6b-4a45-8bdf-d41b8bb58f1a' date '05/25/2014' time '14:17:24' author 'dkh' ancestors ((name 'Zinc-Character-Encoding-Core-dkh.34' message 'another layer peeled ... ' id 'cf01b01d-4323-4bfd-b032-905b60446f74' date '05/25/2014' time '14:04:39' author 'dkh' ancestors ((name 'Zinc-Character-Encoding-Core-dkh.33' message 'finally, narrowing things down ... dare we hop that we are out of the woods?' id '0b1e304d-0519-4711-8553-b0b3b57d73e0' date '05/25/2014' time '13:53:39' author 'dkh' ancestors ((name 'Zinc-Character-Encoding-Core-dkh.32' message 'slog again, slog again ...' id '8b441bad-62b5-4160-86da-ae5478303eee' date '05/25/2014' time '13:43:23' author 'dkh' ancestors ((name 'Zinc-Character-Encoding-Core-dkh.31' message 'slogging away eliminating MNU during travis test... - oddly enough I don''t get the same errors running locally - wierd mixture of binary and strings ... I think that the pharo vm is forgiving in mixing characters and byte arrays in ways that gemstone is not - get things working and then we''ll look at what I''ve had to change to see if better sense can be made' id '0ea4a683-f957-4485-9a37-8dd34f006f82' date '05/25/2014' time '11:51:10' author 'dkh' ancestors ((name 'Zinc-Character-Encoding-Core-dkh.30' message 'implement CharacterCollection class>>findFirstByteInString:inSet:startingAt: for ZnUTF8Encoder>>findFirstNonASCIIIn:startingAt:' id '580863cb-53f5-45f6-8cd3-6c37d56a43d5' date '05/25/2014' time '11:35:48' author 'dkh' ancestors ((name 'Zinc-Character-Encoding-Core-dkh.29' message '' id '198f5a70-d630-4213-b79d-3df11c735918' date '05/24/2014' time '19:02:36' author 'dkh' ancestors ((name 'Zinc-Character-Encoding-Core-dkh.28' message '' id '6c3bd167-457d-46bd-9fc4-31052b41a309' date '05/24/2014' time '18:51:58' author 'dkh' ancestors ((name 'Zinc-Character-Encoding-Core-dkh.27' message '' id 'e15b4f86-79bf-418a-aaa9-b016000b131d' date '05/24/2014' time '18:06:09' author 'dkh' ancestors ((name 'Zinc-Character-Encoding-Core-dkh.26' message '' id 'cf85a2ae-1e78-4899-9441-1ba1dca325df' date '05/24/2014' time '17:55:56' author 'dkh' ancestors ((name 'Zinc-Character-Encoding-Core-dkh.25' message '' id '8f92edb3-2f07-42f0-83d7-ae02ba709caa' date '05/24/2014' time '17:35:05' author 'dkh' ancestors ((name 'Zinc-Character-Encoding-Core-JohanBrichau.24' message 'fix a test' id 'e7b92eb1-ccea-49f9-a76a-7da7381c165d' date '05/17/2014' time '20:01:31' author 'JohanBrichau' ancestors ((name 'Zinc-Character-Encoding-Core-JohanBrichau.23' message 'fixing some tests' id '12936963-cbd7-455d-99a5-2bbf16060112' date '05/02/2014' time '23:51:38' author 'JohanBrichau' ancestors ((name 'Zinc-Character-Encoding-Core-JohanBrichau.22' message 'porting code' id '66c3e067-13ac-49f3-a81b-f1859d0d931b' date '01/05/2014' time '15:26:36' author 'JohanBrichau' ancestors ((name 'Zinc-Character-Encoding-Core-SvenVanCaekenberghe.21' message 'Added an optimalization to ZnUTF8Encoder>>#readInto:startingAt:count:fromStream: to avoid the price of #becomeForward: when a ByteString to WideString conversion happens' id '29f57ebd-e428-46d7-aa36-233e4bc40938' date '06/11/2013' time '04:31:30' author 'SvenVanCaekenberghe' ancestors ((name 'Zinc-Character-Encoding-Core-SvenVanCaekenberghe.20' message 'merge' id '23dc613d-4596-483b-945a-95e8497e06e9' date '06/11/2013' time '09:21:39' author 'SvenVanCaekenberghe' ancestors ((name 'Zinc-Character-Encoding-Core-SvenVanCaekenberghe.19' message 'Added an optimized ZnUTF8Encoder>>#decodeBytes: and an even faster #decodeBytesIntoWideString: (thx johnny/JanStruz)' id '2fd6df01-681f-4453-abc0-9422a8103e65' date '06/10/2013' time '11:19:58' author 'SvenVanCaekenberghe' ancestors () stepChildren ())(name 'Zinc-Character-Encoding-Core-SvenVanCaekenberghe.18' message 'Added support to ZnUTF8Encoder to detect overlong (non-shortest form) encodings as well as to skip the Unicode Byte Order Mark (BOM) character' id 'd07b55a8-4a53-40d8-85eb-63af21c7fb12' date '06/04/2013' time '05:28:27' author 'SvenVanCaekenberghe' ancestors ((name 'Zinc-Character-Encoding-Core-SvenVanCaekenberghe.17' message 'Introduction of an explicit ZnInvalidUTF8 exception.' id 'aae299b0-a550-47c6-a444-847d01206d94' date '06/03/2013' time '08:13:30' author 'SvenVanCaekenberghe' ancestors ((name 'Zinc-Character-Encoding-Core-SvenVanCaekenberghe.16' message 'Fix to an edge case in ZnUTF8Encoder>>#optimizedReadInto:startingAt:count:fromStream:' id 'd6bdd5aa-3f6d-4786-a3b8-5dcaeba2a5aa' date '05/27/2013' time '04:19:29' author 'SvenVanCaekenberghe' ancestors ((name 'Zinc-Character-Encoding-Core-SvenVanCaekenberghe.15' message 'Bugfix to ZnUTF8Encoder class>>#initialize (circular dependency)' id '2c097f3b-3eaa-4626-ae1f-620df08ef898' date '05/25/2013' time '02:00:52' author 'SvenVanCaekenberghe' ancestors ((name 'Zinc-Character-Encoding-Core-SvenVanCaekenberghe.14' message 'ZnUTF8Encoder: - enabled #next:putAll:startingAt:toStream: for real - added & enabled #optimizedReadInto:startingAt:count:fromStream: - #nextFromStream now signals specific errors on eof - some refactoring/cleanup' id 'a4e03928-dd20-4e7c-b686-28e10a8130c3' date '05/25/2013' time '10:29:45' author 'SvenVanCaekenberghe' ancestors ((name 'Zinc-Character-Encoding-Core-SvenVanCaekenberghe.13' message 'Added ZnCharacterEncoder>>#readInto:startingAt:count:fromStream with an optimized implementation for ZnNullEncoder' id 'fbc0480f-5050-4930-ab24-0fb8464d82a1' date '05/23/2013' time '12:25:16' author 'SvenVanCaekenberghe' ancestors ((name 'Zinc-Character-Encoding-Core-SvenVanCaekenberghe.12' message 'Introduction of ZnCharacterEncoder>>#next:putAll:startingAt:toStream with optimized implementations in ZnNullEncoder and ZnUTF8Encoder for ByteString instances' id '7505c957-45dc-4689-a9e3-25a0a00be1f6' date '05/22/2013' time '04:15:39' author 'SvenVanCaekenberghe' ancestors ((name 'Zinc-Character-Encoding-Core-SvenVanCaekenberghe.11' message 'Added ZnBufferedWriteStream>>#finish as alias for #flushBuffer' id '14216331-a683-4994-9aa2-cdf56d325fb7' date '05/19/2013' time '11:45:46' author 'SvenVanCaekenberghe' ancestors ((name 'Zinc-Character-Encoding-Core-SvenVanCaekenberghe.10' message 'Bugfix to ZnUTF8Encoder>>#nextPut:toStream (codepoints > 65535 were wrongly encoded)' id '9548942a-1b84-48a0-8976-dac39be9f314' date '05/16/2013' time '11:11:26' author 'SvenVanCaekenberghe' ancestors ((name 'Zinc-Character-Encoding-Core-SvenVanCaekenberghe.9' message 'fixed a typo in a class comment' id '304b757c-8af9-4723-a7c0-fed57c353db2' date '05/14/2013' time '01:37:37' author 'SvenVanCaekenberghe' ancestors ((name 'Zinc-Character-Encoding-Core-SvenVanCaekenberghe.8' message 'Typo/bug in ZnCharacterWriteStream>>#encoding: (thx Stephane Ducasse)' id '2642837d-126e-44c1-a980-e147d940e9d2' date '04/19/2013' time '01:03:26' author 'SvenVanCaekenberghe' ancestors ((name 'Zinc-Character-Encoding-Core-SvenVanCaekenberghe.7' message 'Added String>>#urlEncoded & #urlDecoded - Thx Camillo Bruni' id '6715de50-a8b8-4240-a1ef-1282e1e343c7' date '04/16/2013' time '09:19:02' author 'SvenVanCaekenberghe' ancestors ((name 'Zinc-Character-Encoding-Core-SvenVanCaekenberghe.6' message 'Bugfix to ZnPercentEncoder: always use 2 hex digits (Thanks Benjamin Van Ryseghem)' id 'af573099-bafb-4e38-9192-4440765e8883' date '03/01/2013' time '09:35:27' author 'SvenVanCaekenberghe' ancestors ((name 'Zinc-Character-Encoding-Core-SvenVanCaekenberghe.5' message 'merging in some Gemstone portability changes by Ken Treis' id 'aa29124f-b47d-438c-b086-8cb23a17d2cd' date '01/21/2013' time '01:13:52' author 'SvenVanCaekenberghe' ancestors ((name 'Zinc-Character-Encoding-Core-KenTreis.4.1' message 'Minor changes for GemStone compatibility: * Removed a stray period after a method comment * When printing in base 16, used #printOn:base:showRadix:' id 'bc01d2d5-7bf2-4bb3-be36-8f9faff96af3' date '01/19/2013' time '11:22:49' author 'KenTreis' ancestors ((name 'Zinc-Character-Encoding-Core-SvenVanCaekenberghe.4' message 'add a comment to ZnByteEncoder class>>#initialize to make sure it get executed when loaded in an image where it is already present (Thx Lukas Renggli for suggesting the idea)' id '2070bf5a-a914-4d68-9469-58eb6c85aeb8' date '01/15/2013' time '05:09:22' author 'SvenVanCaekenberghe' ancestors ((name 'Zinc-Character-Encoding-Core-SvenVanCaekenberghe.3' message 'use ''asZnUrl retrieveContents'' for simple. one off, non critical HTTP client usage in ZnByteEncoder class>>#parseUnicodeOrgSpec' id '1804c2bb-41a6-48ab-9404-64ea1e486ed5' date '01/15/2013' time '02:58:21' author 'SvenVanCaekenberghe' ancestors ((name 'Zinc-Character-Encoding-Core-SvenVanCaekenberghe.2' message 'stop using ZnNullEncoder for latin1; added #beLenient option to make a ZnByteEncoder non-strict (the old behavior)' id '07e720c3-e179-40b0-94de-073e11a8bd45' date '12/17/2012' time '04:08:17' author 'SvenVanCaekenberghe' ancestors ((name 'Zinc-Character-Encoding-Core-SvenVanCaekenberghe.1' message 'creation of Zinc-Character-Encoding-[Core|Tests] by moving various classes out of Zinc-HTTP' id '4e1d9613-d6ec-4e2c-8587-f69086cb2208' date '12/16/2012' time '05:01:29' author 'SvenVanCaekenberghe' ancestors () stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ()) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-GS-Tests.package/ZnCharacterEncoderTests.extension/instance/expectedFailures.st b/repository/Zinc-Character-Encoding-GS-Tests.package/ZnCharacterEncoderTest.extension/instance/expectedFailures.st similarity index 100% rename from repository/Zinc-Character-Encoding-GS-Tests.package/ZnCharacterEncoderTests.extension/instance/expectedFailures.st rename to repository/Zinc-Character-Encoding-GS-Tests.package/ZnCharacterEncoderTest.extension/instance/expectedFailures.st diff --git a/repository/Zinc-Character-Encoding-GS-Tests.package/ZnCharacterEncoderTest.extension/properties.json b/repository/Zinc-Character-Encoding-GS-Tests.package/ZnCharacterEncoderTest.extension/properties.json new file mode 100644 index 000000000..bc0ec4e5c --- /dev/null +++ b/repository/Zinc-Character-Encoding-GS-Tests.package/ZnCharacterEncoderTest.extension/properties.json @@ -0,0 +1,2 @@ +{ + "name" : "ZnCharacterEncoderTest" } diff --git a/repository/Zinc-Character-Encoding-GS-Tests.package/ZnCharacterEncoderTests.extension/methodProperties.json b/repository/Zinc-Character-Encoding-GS-Tests.package/ZnCharacterEncoderTests.extension/methodProperties.json deleted file mode 100644 index 5459793f8..000000000 --- a/repository/Zinc-Character-Encoding-GS-Tests.package/ZnCharacterEncoderTests.extension/methodProperties.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "class" : { - }, - "instance" : { - "expectedFailures" : "dkh 06/29/2014 17:25" } } diff --git a/repository/Zinc-Character-Encoding-GS-Tests.package/ZnCharacterEncoderTests.extension/properties.json b/repository/Zinc-Character-Encoding-GS-Tests.package/ZnCharacterEncoderTests.extension/properties.json deleted file mode 100644 index 32aceeb54..000000000 --- a/repository/Zinc-Character-Encoding-GS-Tests.package/ZnCharacterEncoderTests.extension/properties.json +++ /dev/null @@ -1,2 +0,0 @@ -{ - "name" : "ZnCharacterEncoderTests" } diff --git a/repository/Zinc-Character-Encoding-GS-Tests.package/monticello.meta/version b/repository/Zinc-Character-Encoding-GS-Tests.package/monticello.meta/version deleted file mode 100644 index cbd987f92..000000000 --- a/repository/Zinc-Character-Encoding-GS-Tests.package/monticello.meta/version +++ /dev/null @@ -1 +0,0 @@ -(name 'Zinc-Character-Encoding-GS-Tests-dkh.1' message 'checkpoint for 3.1.0.5: 282 run, 280 passes, 1 expected defects, 1 failures, 0 errors, 0 unexpected passes' id '6d241e01-bdee-4dbf-9da1-95e08cc935ce' date '06/29/2014' time '17:34:38' author 'dkh' ancestors () stepChildren ()) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-GS2-Tests.package/ZnCharacterEncoderTests.extension/instance/testUTF8EncoderIncomplete.st b/repository/Zinc-Character-Encoding-GS2-Tests.package/ZnCharacterEncoderTests.extension/instance/testUTF8EncoderIncomplete.st deleted file mode 100644 index 5871aa966..000000000 --- a/repository/Zinc-Character-Encoding-GS2-Tests.package/ZnCharacterEncoderTests.extension/instance/testUTF8EncoderIncomplete.st +++ /dev/null @@ -1,15 +0,0 @@ -*zinc-character-encoding-gs2-tests -testUTF8EncoderIncomplete - "The examples are taken from http://en.wikipedia.org/wiki/UTF-8#Description" - - | gsVersion encoder | - gsVersion := System gemVersionReport at: 'gsVersion'. - ((gsVersion beginsWith: '3.1') or: [ gsVersion beginsWith: '3.0' ]) - ifTrue: [ ^ self ]. - encoder := ZnUTF8Encoder new. - #(#(16rC2 16rA2) #(16rE2 16r82 16rAC) #(16rF0 16rA4 16rAD 16rA2)) - do: [ :each | - 2 to: each size do: [ :count | - self - should: [ encoder decodeBytes: (each allButLast: count - 1) ] - raise: ZnInvalidUTF8 , Error ] ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-GS2-Tests.package/ZnCharacterEncoderTests.extension/instance/testUTF8Overlong.st b/repository/Zinc-Character-Encoding-GS2-Tests.package/ZnCharacterEncoderTests.extension/instance/testUTF8Overlong.st deleted file mode 100644 index 0ed5ad178..000000000 --- a/repository/Zinc-Character-Encoding-GS2-Tests.package/ZnCharacterEncoderTests.extension/instance/testUTF8Overlong.st +++ /dev/null @@ -1,11 +0,0 @@ -*zinc-character-encoding-gs2-tests -testUTF8Overlong - "Overlong encoding, aka Non shortest form characters should be rejected. - See http://en.wikipedia.org/wiki/UTF-8#Overlong_encodings" - - self - should: [ ZnUTF8Encoder new decodeBytes: #(16rF0 16r82 16r82 16rAC) asByteArray ] - raise: ZnInvalidUTF8 , Error. - self - should: [ ZnUTF8Encoder new decodeBytes: #(193 129 193 130 193 131) ] - raise: ZnInvalidUTF8 , Error \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-GS2-Tests.package/ZnCharacterEncoderTests.extension/methodProperties.json b/repository/Zinc-Character-Encoding-GS2-Tests.package/ZnCharacterEncoderTests.extension/methodProperties.json deleted file mode 100644 index 3ab7c8ae8..000000000 --- a/repository/Zinc-Character-Encoding-GS2-Tests.package/ZnCharacterEncoderTests.extension/methodProperties.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "class" : { - }, - "instance" : { - "testUTF8EncoderIncomplete" : "dkh 06/30/2014 07:49", - "testUTF8Overlong" : "dkh 06/30/2014 07:49" } } diff --git a/repository/Zinc-Character-Encoding-GS2-Tests.package/ZnCharacterEncoderTests.extension/properties.json b/repository/Zinc-Character-Encoding-GS2-Tests.package/ZnCharacterEncoderTests.extension/properties.json deleted file mode 100644 index 32aceeb54..000000000 --- a/repository/Zinc-Character-Encoding-GS2-Tests.package/ZnCharacterEncoderTests.extension/properties.json +++ /dev/null @@ -1,2 +0,0 @@ -{ - "name" : "ZnCharacterEncoderTests" } diff --git a/repository/Zinc-Character-Encoding-GS2-Tests.package/monticello.meta/package b/repository/Zinc-Character-Encoding-GS2-Tests.package/monticello.meta/package deleted file mode 100644 index b21ae71a7..000000000 --- a/repository/Zinc-Character-Encoding-GS2-Tests.package/monticello.meta/package +++ /dev/null @@ -1 +0,0 @@ -(name 'Zinc-Character-Encoding-GS2-Tests') \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-GS2-Tests.package/monticello.meta/version b/repository/Zinc-Character-Encoding-GS2-Tests.package/monticello.meta/version deleted file mode 100644 index eedf0ed38..000000000 --- a/repository/Zinc-Character-Encoding-GS2-Tests.package/monticello.meta/version +++ /dev/null @@ -1 +0,0 @@ -(name 'Zinc-Character-Encoding-GS2-Tests-dkh.1' message '2.4 specific tests' id 'd9668ef6-9618-472c-9399-213d4dd826a7' date '06/30/2014' time '07:49:52' author 'dkh' ancestors () stepChildren ()) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-GS24-Core.package/ByteArray.extension/instance/decodeFromUTF8.st b/repository/Zinc-Character-Encoding-GS24-Core.package/ByteArray.extension/instance/decodeFromUTF8.st deleted file mode 100644 index 27b975337..000000000 --- a/repository/Zinc-Character-Encoding-GS24-Core.package/ByteArray.extension/instance/decodeFromUTF8.st +++ /dev/null @@ -1,5 +0,0 @@ -*zinc-character-encoding-gs24-core -decodeFromUTF8 - "Decode receiver from UTF8 format" - - ^ self asString decodeFromUTF8 \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-GS24-Core.package/ByteArray.extension/methodProperties.json b/repository/Zinc-Character-Encoding-GS24-Core.package/ByteArray.extension/methodProperties.json deleted file mode 100644 index 03179a375..000000000 --- a/repository/Zinc-Character-Encoding-GS24-Core.package/ByteArray.extension/methodProperties.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "class" : { - }, - "instance" : { - "decodeFromUTF8" : "dkh 06/29/2014 23:44" } } diff --git a/repository/Zinc-Character-Encoding-GS24-Core.package/ZnUTF8Encoder.extension/instance/encodeString..st b/repository/Zinc-Character-Encoding-GS24-Core.package/ZnUTF8Encoder.extension/instance/encodeString..st deleted file mode 100644 index bf04d5d7e..000000000 --- a/repository/Zinc-Character-Encoding-GS24-Core.package/ZnUTF8Encoder.extension/instance/encodeString..st +++ /dev/null @@ -1,3 +0,0 @@ -*zinc-character-encoding-gs24-core -encodeString: string - ^ string encodeAsUTF8 asByteArray \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-GS24-Core.package/ZnUTF8Encoder.extension/instance/next.putAll.startingAt.toStream..st b/repository/Zinc-Character-Encoding-GS24-Core.package/ZnUTF8Encoder.extension/instance/next.putAll.startingAt.toStream..st deleted file mode 100644 index 1f00740e4..000000000 --- a/repository/Zinc-Character-Encoding-GS24-Core.package/ZnUTF8Encoder.extension/instance/next.putAll.startingAt.toStream..st +++ /dev/null @@ -1,8 +0,0 @@ -*zinc-character-encoding-gs24-core -next: count putAll: string startingAt: offset toStream: stream - "Write count encoded bytes from string starting at offset to stream." - - | bytes str | - str := string copyFrom: offset to: offset + count - 1. - bytes := str encodeAsUTF8 asByteArray. - stream nextPutAll: bytes \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-GS24-Core.package/ZnUTF8Encoder.extension/methodProperties.json b/repository/Zinc-Character-Encoding-GS24-Core.package/ZnUTF8Encoder.extension/methodProperties.json deleted file mode 100644 index a800f8ad5..000000000 --- a/repository/Zinc-Character-Encoding-GS24-Core.package/ZnUTF8Encoder.extension/methodProperties.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "class" : { - }, - "instance" : { - "encodeString:" : "dkh 06/30/2014 00:05", - "next:putAll:startingAt:toStream:" : "dkh 06/30/2014 07:22" } } diff --git a/repository/Zinc-Character-Encoding-GS24-Core.package/ZnUTF8Encoder.extension/properties.json b/repository/Zinc-Character-Encoding-GS24-Core.package/ZnUTF8Encoder.extension/properties.json deleted file mode 100644 index 840b7bc04..000000000 --- a/repository/Zinc-Character-Encoding-GS24-Core.package/ZnUTF8Encoder.extension/properties.json +++ /dev/null @@ -1,2 +0,0 @@ -{ - "name" : "ZnUTF8Encoder" } diff --git a/repository/Zinc-Character-Encoding-GS24-Core.package/monticello.meta/package b/repository/Zinc-Character-Encoding-GS24-Core.package/monticello.meta/package deleted file mode 100644 index 318b75ce3..000000000 --- a/repository/Zinc-Character-Encoding-GS24-Core.package/monticello.meta/package +++ /dev/null @@ -1 +0,0 @@ -(name 'Zinc-Character-Encoding-GS24-Core') \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-GS24-Core.package/monticello.meta/version b/repository/Zinc-Character-Encoding-GS24-Core.package/monticello.meta/version deleted file mode 100644 index 35c7b9b5e..000000000 --- a/repository/Zinc-Character-Encoding-GS24-Core.package/monticello.meta/version +++ /dev/null @@ -1 +0,0 @@ -(name 'Zinc-Character-Encoding-GS24-Core-dkh.4' message '2.x and 3.0.x version of ZnUTF8Encoder>>next:putAll:startingAt:toStream:' id '0a90a454-5d53-4310-b9e3-092763964954' date '06/30/2014' time '07:24:53' author 'dkh' ancestors ((name 'Zinc-Character-Encoding-GS24-Core-dkh.3' message '2.4.5.2 implementation of ZnUTF8Encoder>>encodeString:' id 'e41db613-4ba7-4bb7-809c-eb925debedae' date '06/30/2014' time '00:08:23' author 'dkh' ancestors ((name 'Zinc-Character-Encoding-GS24-Core-dkh.2' message 'implement ByteArray>>decodeFromUTF8 as needed for Zinc ... compatability with GemStone3.2 implementation' id 'b1d4daea-f632-406b-91c5-159943d00452' date '06/29/2014' time '23:46:10' author 'dkh' ancestors ((name 'Zinc-Character-Encoding-GS24-Core-dkh.1' message 'dummy version' id '97b6b273-6c2a-478a-a7af-562df05efcb0' date '06/29/2014' time '23:42:57' author 'dkh' ancestors () stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ()) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnBufferedReadWriteStreamTest.extension/instance/testReadThenWrite.st b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnBufferedReadWriteStreamTest.extension/instance/testReadThenWrite.st new file mode 100644 index 000000000..546303de6 --- /dev/null +++ b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnBufferedReadWriteStreamTest.extension/instance/testReadThenWrite.st @@ -0,0 +1,23 @@ +*zinc-character-encoding-gs3-tests +testReadThenWrite + "Protocol: tests" + "GS requires to use ANSI version of the streams. Legacy stream position + will be used otherise! That will yield incorrect results." + | stream stringStream | + + stringStream := AnsiReadWriteStream with: '0123456789' copy. + stringStream reset. + stream := ZnBufferedReadWriteStream on: stringStream. + stream sizeBuffer: 8. + + stream next: 4. + self assert: stream position equals: 4. + + stream nextPutAll: 'ABCD'. + self assert: stream position equals: 8. + + self assert: stream peek equals: $8. + self assert: stream upToEnd equals: '89'. + self assert: stream atEnd. + + self assert: stringStream contents equals: '0123ABCD89' diff --git a/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnBufferedReadWriteStreamTest.extension/instance/testWriteThenRead.st b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnBufferedReadWriteStreamTest.extension/instance/testWriteThenRead.st new file mode 100644 index 000000000..9ad95c0c2 --- /dev/null +++ b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnBufferedReadWriteStreamTest.extension/instance/testWriteThenRead.st @@ -0,0 +1,21 @@ +*zinc-character-encoding-gs3-tests +testWriteThenRead + "Protocol: tests" + "GS requires to use ANSI version of the streams. Legacy stream position + will be used otherise! That will yield incorrect results." + | stream stringStream | + + stringStream := AnsiReadWriteStream with: '0123456789' copy. + stringStream reset. + stream := ZnBufferedReadWriteStream on: stringStream. + stream sizeBuffer: 8. + + stream nextPutAll: 'ABCD'. + + self assert: stream peek equals: $4. + self assert: stream position equals: 4. + self assert: stream upToEnd equals: '456789'. + self assert: stream position equals: 10. + self assert: stream atEnd. + + self assert: stringStream contents equals: 'ABCD456789' diff --git a/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnBufferedReadWriteStreamTest.extension/properties.json b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnBufferedReadWriteStreamTest.extension/properties.json new file mode 100644 index 000000000..3fbefa12a --- /dev/null +++ b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnBufferedReadWriteStreamTest.extension/properties.json @@ -0,0 +1,2 @@ +{ + "name" : "ZnBufferedReadWriteStreamTest" } diff --git a/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testAllByteEncoderDomains.st b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testAllByteEncoderDomains.st new file mode 100644 index 000000000..2e986da16 --- /dev/null +++ b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testAllByteEncoderDomains.st @@ -0,0 +1,20 @@ +*zinc-character-encoding-gs3-tests +testAllByteEncoderDomains + "Protocol: testing" + | encoder characterDomain byteDomain encoded | + ZnByteEncoder knownEncodingIdentifiers do: [ :identifier | + encoder := ZnCharacterEncoderGS newForEncoding: identifier. + self assert: encoder identifier equals: identifier. + self assert: encoder isStrict. + self assert: encoder isLenient not. + self assert: (encoder encodeString: 'hello') equals: #[104 101 108 108 111] . + self assert: (encoder decodeBytes: #[104 101 108 108 111] ) equals: 'hello'. + characterDomain := encoder characterDomain. + byteDomain := encoder byteDomain. + characterDomain do: [ :each | + self assert: (encoder encodedByteCountFor: each) equals: 1. + encoded := ByteArray streamContents: [ :out | encoder nextPut: each toStream: out ]. + self assert: encoded size equals: 1. + self assert: (byteDomain includes: encoded first) ]. + byteDomain do: [ :each | + self assert: (characterDomain includes: (encoder nextFromStream: (ByteArray with: each) readStream)) ] ] diff --git a/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testBeLenient.st b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testBeLenient.st new file mode 100644 index 000000000..82df8ddc8 --- /dev/null +++ b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testBeLenient.st @@ -0,0 +1,11 @@ +*zinc-character-encoding-gs3-tests +testBeLenient + "Protocol: testing" + | encoder unmapped | + encoder := ZnCharacterEncoderGS newForEncoding: 'iso-8859-1'. + unmapped := (128 to: 159) asByteArray. + self should: [ encoder encodeString: unmapped asString ] raise: ZnCharacterEncodingError. + self should: [ encoder decodeBytes: unmapped ] raise: ZnCharacterEncodingError. + encoder beLenient. + self assert: (encoder encodeString: unmapped asString) equals: unmapped. + self assert: (encoder decodeBytes: unmapped) equals: unmapped asString diff --git a/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testByteDecoding.st b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testByteDecoding.st new file mode 100644 index 000000000..42d23cd7c --- /dev/null +++ b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testByteDecoding.st @@ -0,0 +1,9 @@ +*zinc-character-encoding-gs3-tests +testByteDecoding + "Protocol: testing" + | encoder bytes | + encoder := ZnUTF8EncoderGS new. + bytes := encoder encodeString: 'élève en Français'. + self assert: (bytes decodeWith: encoder) equals: (encoder decodeBytes: bytes). + self assert: (bytes decodeWith: #utf8) equals: (encoder decodeBytes: bytes). + self assert: bytes utf8Decoded equals: (encoder decodeBytes: bytes) diff --git a/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testCodePointEncodingDecoding.st b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testCodePointEncodingDecoding.st new file mode 100644 index 000000000..e94b00673 --- /dev/null +++ b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testCodePointEncodingDecoding.st @@ -0,0 +1,14 @@ +*zinc-character-encoding-gs3-tests +testCodePointEncodingDecoding + "Protocol: testing" + | encoder input output | + input := 'Düsseldorf Königsallee' collect: #codePoint as: Array. + self assert: input isCollection. + self assert: (input allSatisfy: #isInteger). + #(utf8 utf16 utf32 latin1 null) do: [ :each | + encoder := each asZnCharacterEncoder. + output := encoder encodeCodePoints: input. + self assert: output isCollection. + self assert: (output allSatisfy: [ :e | e isInteger and: [ e between: 0 and: 255 ] ] ). + self assert: (encoder encodedByteCountForCodePoints: input) equals: output size. + self assert: (encoder decodeAsCodePoints: output) equals: input ] diff --git a/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testCodePointStreams.st b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testCodePointStreams.st new file mode 100644 index 000000000..87c327ad4 --- /dev/null +++ b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testCodePointStreams.st @@ -0,0 +1,16 @@ +*zinc-character-encoding-gs3-tests +testCodePointStreams + "Protocol: testing" + | string codePoints bytes result | + string := 'Düsseldorf Königsallee'. + codePoints := string collect: #codePoint as: Array. + self assert: codePoints isCollection. + self assert: (codePoints allSatisfy: #isInteger). + #(utf8 utf16 utf32 latin1 null) do: [ :each | + bytes := ByteArray streamContents: [ :out | + (ZnCodePointWriteStream on: out encoding: each) + nextPutAll: codePoints ]. + self assert: bytes equals: (each asZnCharacterEncoder encodeString: string). + result := (ZnCodePointReadStream on: bytes readStream encoding: each) upToEnd. + self assert: result equals: codePoints. + self assert: (codePoints collect: #asCharacter as: String) equals: string ] diff --git a/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testConvencienceMethods.st b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testConvencienceMethods.st new file mode 100644 index 000000000..249befa66 --- /dev/null +++ b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testConvencienceMethods.st @@ -0,0 +1,11 @@ +*zinc-character-encoding-gs3-tests +testConvencienceMethods + "Protocol: testing" + | encoder string | + encoder := ZnUTF8EncoderGS new. + string := 'élève en Français'. + self assert: (encoder decodeBytes: (encoder encodeString: string)) equals: string. + self assert: (encoder encodedByteCountForString: string) equals: 20. + + #( 'ccc' 'ççç' 'c' 'ç' 'çc' 'cç' ) do: [ :each | + self assert: (encoder decodeBytes: (encoder encodeString: each)) equals: each ] diff --git a/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testDebuggingUTF8.st b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testDebuggingUTF8.st new file mode 100644 index 000000000..a0dc7551d --- /dev/null +++ b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testDebuggingUTF8.st @@ -0,0 +1,7 @@ +*zinc-character-encoding-gs3-tests +testDebuggingUTF8 + "Protocol: testing" + + self + should: [ (({ $A. 55296 asCharacter . $B } as: String) encodeWith: #'utf8debug') utf8Decoded ] + raise: OutOfRange diff --git a/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testDefault.st b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testDefault.st new file mode 100644 index 000000000..8155fd019 --- /dev/null +++ b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testDefault.st @@ -0,0 +1,19 @@ +*zinc-character-encoding-gs3-tests +testDefault + "Protocol: testing" + | string bytes | + self assert: ZnCharacterEncoderGS default equals: ZnUTF8EncoderGS new. + string := 'Der Weg zur Hölle ist mit guten Vorsätzen gepflastert.'. + bytes := ZnUTF8EncoderGS new encodeString: string. + ZnDefaultCharacterEncoder + value: ZnUTF8EncoderGS new + during: [ + self + assert: (ZnCharacterEncoderGS default decodeBytes: bytes) + equals: string ]. + ZnDefaultCharacterEncoder + value: ZnUTF8EncoderGS new + during: [ + self + assert: ((ZnCharacterEncoderGS newForEncoding: 'unknown') decodeBytes: bytes) + equals: string ] diff --git a/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testDetectEncoding.st b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testDetectEncoding.st new file mode 100644 index 000000000..499dd3128 --- /dev/null +++ b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testDetectEncoding.st @@ -0,0 +1,10 @@ +*zinc-character-encoding-gs3-tests +testDetectEncoding + "Protocol: testing" + | bytes | + bytes := 'abc' asByteArray. + self assert: (ZnCharacterEncoderGS detectEncoding: bytes) equals: ZnCharacterEncoderGS ascii. + bytes := ZnCharacterEncoderGS iso88591 encodeString: 'Les élèves Français'. + self assert: (ZnCharacterEncoderGS detectEncoding: bytes) equals: ZnCharacterEncoderGS iso88591. + bytes := ZnCharacterEncoderGS utf8 encodeString: 'Les élèves Français'. + self assert: (ZnCharacterEncoderGS detectEncoding: bytes) equals: ZnCharacterEncoderGS utf8 diff --git a/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testKnownEncodingIdentifiers.st b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testKnownEncodingIdentifiers.st new file mode 100644 index 000000000..9406149d7 --- /dev/null +++ b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testKnownEncodingIdentifiers.st @@ -0,0 +1,20 @@ +*zinc-character-encoding-gs3-tests +testKnownEncodingIdentifiers + "Protocol: testing" + | all minimal asciiString notSelfIdentifying| + all := ZnCharacterEncoderGS knownEncodingIdentifiers asSet. + minimal := #('utf8' 'latin1' 'null' 'ascii' 'iso88591') asSet. + "make sure at least a minimal set is present" + self assert: (all intersection: minimal) equals: minimal. + asciiString := String withAll: ($a to: $z) , ($A to: $Z) , ($0 to: $9). + "make sure that each identifier can be used to instanciate a decoder, + and that those decoders at least work on a ASCII string in both directions" + all do: [ :each | + | encoder bytes | + encoder := ZnCharacterEncoderGS newForEncoding: each. + bytes := encoder encodeString: asciiString. + self assert: (encoder decodeBytes: bytes) equals: asciiString ]. + "make sure identifiers are preserved" + notSelfIdentifying := ZnCharacterEncoderGS knownEncodingIdentifiers reject: [ :each | + each asZnCharacterEncoder identifier = each ]. + self assert: notSelfIdentifying isEmpty diff --git a/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testLatin1Encoder.st b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testLatin1Encoder.st new file mode 100644 index 000000000..cfb1cef77 --- /dev/null +++ b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testLatin1Encoder.st @@ -0,0 +1,9 @@ +*zinc-character-encoding-gs3-tests +testLatin1Encoder + "Protocol: testing" + | encoder string bytes | + encoder := ZnCharacterEncoderGS newForEncoding: 'latin1'. + string := 'élève en Français'. + bytes := #(233 108 232 118 101 32 101 110 32 70 114 97 110 231 97 105 115) asByteArray. + self assert: (encoder encodeString: string) equals: bytes. + self assert: (encoder decodeBytes: bytes) equals: string diff --git a/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testLatin2Encoder.st b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testLatin2Encoder.st new file mode 100644 index 000000000..52d0eebda --- /dev/null +++ b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testLatin2Encoder.st @@ -0,0 +1,17 @@ +*zinc-character-encoding-gs3-tests +testLatin2Encoder + "Protocol: testing" + "Example characters taken from http://en.wikipedia.org/wiki/Latin2" + + | encoder inputBytes outputBytes inputString outputString | + encoder := ZnCharacterEncoderGS newForEncoding: 'latin2'. + inputString := String + with: 16r0154 asCharacter + with: 16r0110 asCharacter + with: 16r0155 asCharacter + with: 16r0111 asCharacter. + inputBytes := #( 192 208 224 240 ) asByteArray. + outputBytes := self encodeString: inputString with: encoder. + self assert: outputBytes equals: inputBytes. + outputString := self decodeBytes: inputBytes with: encoder. + self assert: outputString equals: inputString diff --git a/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testLossyUTF8.st b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testLossyUTF8.st new file mode 100644 index 000000000..9abbb953c --- /dev/null +++ b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testLossyUTF8.st @@ -0,0 +1,22 @@ +*zinc-character-encoding-gs3-tests +testLossyUTF8 + "Protocol: testing" + | encoder replacement | + encoder := ZnLossyUTF8Encoder new. + self assert: #utf8lossy asZnCharacterEncoder equals: encoder. + replacement := encoder replacementCodePoint asCharacter. + self + assert: (#[65 160 66] decodeWith: encoder) + equals: ({ $A. replacement . $B } as: String). + self + assert: (#[16rE1 16rA0 16rC0] decodeWith: encoder) + equals: replacement asString. + self + assert: (encoder decodeBytes: #[16r41 16rA1 16rA2 16rA3 16r42]) + equals: ({ $A. replacement . replacement . replacement . $B } as: String). + self + assert: (encoder decodeBytesSingleReplacement: #[16r41 16rA1 16rA2 16rA3 16r42]) + equals: ({ $A. replacement . $B } as: String). + self + assert: (encoder encodeString: ({ $A . 16rFFFD asCharacter . $B } as: String)) + equals: ({ $A . replacement . $B } as: String) utf8Encoded diff --git a/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testNextPutAllStartingAtToStream.st b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testNextPutAllStartingAtToStream.st new file mode 100644 index 000000000..17d7dde0e --- /dev/null +++ b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testNextPutAllStartingAtToStream.st @@ -0,0 +1,20 @@ +*zinc-character-encoding-gs3-tests +testNextPutAllStartingAtToStream + "Protocol: testing" + | encoder | + encoder := ZnUTF8EncoderGS new. + #('ccc' 'ççç' 'c' 'ç' 'çc' 'cç' 'çç') + do: [ :each | + #(#('' '') #('ABC' '') #('' 'ABC') #('ABC' 'ABC') #('AéC' '') #('' 'AèC') + #('AéC' 'AèC') #('AXC' 'AèC') #('AéC' 'AXC') #('PRE' 'ç')) do: [ :extra | + | prefix postfix string bytes | + prefix := extra first. + postfix := extra last. + string := prefix , each , postfix. + bytes := ByteArray streamContents: [ :out | + encoder + next: each size + putAll: string + startingAt: prefix size + 1 + toStream: out ]. + self assert: (encoder decodeBytes: bytes) equals: each ] ] diff --git a/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testReadIntoStartingAtCountFromStream.st b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testReadIntoStartingAtCountFromStream.st new file mode 100644 index 000000000..f967304cd --- /dev/null +++ b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testReadIntoStartingAtCountFromStream.st @@ -0,0 +1,19 @@ +*zinc-character-encoding-gs3-tests +testReadIntoStartingAtCountFromStream + "Protocol: testing" + | encoder | + encoder := ZnUTF8EncoderGS new. + #( 'ccc' 'ççç' 'c' 'ç' 'çc' 'cç' 'çç' ) do: [ :each | + #( ( '' '' ) ( 'ABC' '' ) ( '' 'ABC' ) ( 'ABC' 'ABC' ) + ( 'AéC' '' ) ( '' 'AèC' ) ( 'AéC' 'AèC' ) + ( 'AXC' 'AèC' ) ( 'AéC' 'AXC' ) + ( 'PRE' 'ç' ) ) do: [ :extra | + | prefix postfix string bytes buffer read | + prefix := extra first. + postfix := extra last. + string := prefix, each. + bytes := encoder encodeString: string, postfix. + buffer := String new: string size. + read := encoder readInto: buffer startingAt: 1 count: string size fromStream: bytes readStream. + self assert: buffer equals: string. + self assert: read equals: string size ] ] diff --git a/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testReadIntoStartingAtCountFromStreamAtEnd.st b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testReadIntoStartingAtCountFromStreamAtEnd.st new file mode 100644 index 000000000..0a17d091f --- /dev/null +++ b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testReadIntoStartingAtCountFromStreamAtEnd.st @@ -0,0 +1,12 @@ +*zinc-character-encoding-gs3-tests +testReadIntoStartingAtCountFromStreamAtEnd + "Protocol: testing" + | input encoder bytes readStream string read | + encoder := ZnUTF8EncoderGS new. + input := 'élève'. + bytes := encoder encodeString: input. + readStream := bytes readStream. + string := String new: 5 withAll: $_. + read := encoder readInto: string startingAt: 1 count: 10 fromStream: readStream. + self assert: string equals: input. + self assert: read equals: 5 diff --git a/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testReadIntoStartingAtCountFromStreamWide.st b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testReadIntoStartingAtCountFromStreamWide.st new file mode 100644 index 000000000..81c212c36 --- /dev/null +++ b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testReadIntoStartingAtCountFromStreamWide.st @@ -0,0 +1,25 @@ +*zinc-character-encoding-gs3-tests +testReadIntoStartingAtCountFromStreamWide + "Protocol: tests" + | encoder | + encoder := ZnUTF8EncoderGS new. + {('abc' + , (QuadByteString withAll: {(300 asCharacter). (400 asCharacter). (500 asCharacter)}) + , 'xyz')} do: [ :each | + | bytes buffer notified | + bytes := encoder encodeString: each. + buffer := String new: each size. + notified := false. + [ encoder + readInto: buffer + startingAt: 1 + count: each size + fromStream: bytes readStream ] + on: ZnByteStringBecameWideString + do: [ :notification | + self deny: notified. + notified := true. + buffer := notification wideString. + notification resume ]. + self deny: notified. "WideString monkey business not needed in GemStone" + self assert: buffer equals: each ] diff --git a/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testReadIntoStartingAtCountFromStreamWithOffset.st b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testReadIntoStartingAtCountFromStreamWithOffset.st new file mode 100644 index 000000000..3256ed874 --- /dev/null +++ b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testReadIntoStartingAtCountFromStreamWithOffset.st @@ -0,0 +1,21 @@ +*zinc-character-encoding-gs3-tests +testReadIntoStartingAtCountFromStreamWithOffset + "Protocol: testing" + | input encoder bytes readStream string read | + encoder := ZnUTF8EncoderGS new. + input := '_élève_'. + bytes := encoder encodeString: input. + readStream := bytes readStream. + readStream next. + string := String new: 7 withAll: $_. + read := encoder readInto: string startingAt: 2 count: 5 fromStream: readStream. + self assert: string equals: input. + self assert: read equals: 5. + input := '_Français_'. + bytes := encoder encodeString: input. + readStream := bytes readStream. + readStream next. + string := String new: 10 withAll: $_. + read := encoder readInto: string startingAt: 2 count: 8 fromStream: readStream. + self assert: string equals: input. + self assert: read equals: 8 diff --git a/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testStringEncoding.st b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testStringEncoding.st new file mode 100644 index 000000000..515fb20fa --- /dev/null +++ b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testStringEncoding.st @@ -0,0 +1,9 @@ +*zinc-character-encoding-gs3-tests +testStringEncoding + "Protocol: testing" + | encoder string | + encoder := ZnUTF8EncoderGS new. + string := 'élève en Français'. + self assert: (string encodeWith: encoder) equals: (encoder encodeString: string). + self assert: (string encodeWith: #utf8) equals: (encoder encodeString: string). + self assert: string utf8Encoded equals: (encoder encodeString: string) diff --git a/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testUTF32EncoderExampleFromD100.st b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testUTF32EncoderExampleFromD100.st new file mode 100644 index 000000000..8b20e0905 --- /dev/null +++ b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testUTF32EncoderExampleFromD100.st @@ -0,0 +1,11 @@ +*zinc-character-encoding-gs3-tests +testUTF32EncoderExampleFromD100 + "Protocol: testing" + | string bytes encoder | + string := #(16r0000004D 16r00000430 16r00004E8C 16r00010302) collect: #asCharacter as: String. + bytes := ByteArray readHexFrom: '4D000000300400008C4E000002030100'. + encoder := #utf32 asZnCharacterEncoder. + encoder beLittleEndian. + self assert: encoder isLittleEndian. + self assert: (encoder encodeString: string) equals: bytes. + self assert: (encoder decodeBytes: bytes) equals: string diff --git a/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testUTF32EncoderExampleFromD101.st b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testUTF32EncoderExampleFromD101.st new file mode 100644 index 000000000..69c8469c0 --- /dev/null +++ b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testUTF32EncoderExampleFromD101.st @@ -0,0 +1,17 @@ +*zinc-character-encoding-gs3-tests +testUTF32EncoderExampleFromD101 + "Protocol: testing" + | string encoder bytesBigEndianWithBom bytesLittleEndianWithBom | + string := #(16r0000004D 16r00000430 16r00004E8C 16r00010302) collect: #asCharacter as: String. + encoder := #utf32 asZnCharacterEncoder. + encoder beLittleEndian. + "start with the wrong endianness (LE)" + bytesBigEndianWithBom := ByteArray readHexFrom: '0000FEFF0000004D0000043000004E8C00010302'. + "the correct endianness (BE) should be detected" + self assert: (encoder decodeBytes: bytesBigEndianWithBom) equals: string. + self assert: encoder isBigEndian. + "start with the wrong endianness (BE)" + bytesLittleEndianWithBom := ByteArray readHexFrom: 'FFFE00004D000000300400008C4E000002030100'. + "the correct endianness (LE) should be detected" + self assert: (encoder decodeBytes: bytesLittleEndianWithBom) equals: string. + self assert: encoder isLittleEndian diff --git a/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testUTF32EncoderExampleFromD99.st b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testUTF32EncoderExampleFromD99.st new file mode 100644 index 000000000..64e030ee0 --- /dev/null +++ b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testUTF32EncoderExampleFromD99.st @@ -0,0 +1,11 @@ +*zinc-character-encoding-gs3-tests +testUTF32EncoderExampleFromD99 + "Protocol: testing" + | string bytes encoder | + string := #(16r0000004D 16r00000430 16r00004E8C 16r00010302) collect: #asCharacter as: String. + bytes := ByteArray readHexFrom: '0000004D0000043000004E8C00010302'. + encoder := #utf32 asZnCharacterEncoder. + encoder beBigEndian. + self assert: encoder isBigEndian. + self assert: (encoder encodeString: string) equals: bytes. + self assert: (encoder decodeBytes: bytes) equals: string diff --git a/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testUTF32EncoderSimple.st b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testUTF32EncoderSimple.st new file mode 100644 index 000000000..0d21790dc --- /dev/null +++ b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testUTF32EncoderSimple.st @@ -0,0 +1,11 @@ +*zinc-character-encoding-gs3-tests +testUTF32EncoderSimple + "Protocol: testing" + | string bytes encoder | + string := 'élève en Français'. + bytes := ByteArray readHexFrom: '000000e90000006c000000e8000000760000006500000020000000650000006e000000200000004600000072000000610000006e000000e7000000610000006900000073'. + encoder := #utf32 asZnCharacterEncoder. + self assert: encoder isBigEndian. + self assert: (encoder encodedByteCountForString: string) equals: 17 * 4. + self assert: (encoder encodeString: string) equals: bytes. + self assert: (encoder decodeBytes: bytes) equals: string diff --git a/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testUTF8Back.st b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testUTF8Back.st new file mode 100644 index 000000000..24fbe089a --- /dev/null +++ b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testUTF8Back.st @@ -0,0 +1,14 @@ +*zinc-character-encoding-gs3-tests +testUTF8Back + "Protocol: testing" + | encoder stream | + encoder := ZnUTF8EncoderGS new. + stream := (encoder encodeString: 'Les élèves Françaises') readStream. + self should: [ encoder backOnStream: stream ] raise: Error. + 4 timesRepeat: [ encoder nextFromStream: stream ]. + self assert: (encoder nextFromStream: stream) equals: $é. + encoder backOnStream: stream. + self assert: (encoder nextFromStream: stream) equals: $é. + 10 timesRepeat: [ encoder nextFromStream: stream ]. + 13 timesRepeat: [ encoder backOnStream: stream ]. + self assert: (encoder nextFromStream: stream) equals: $s diff --git a/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testUTF8Boundaries.st b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testUTF8Boundaries.st new file mode 100644 index 000000000..76b1df841 --- /dev/null +++ b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testUTF8Boundaries.st @@ -0,0 +1,18 @@ +*zinc-character-encoding-gs3-tests +testUTF8Boundaries + "Protocol: testing" + "Test encoding and decoding of the characters at the boundaries between 1, 2, 3, and 4 multi-byte sequences. + Values taken from http://en.wikipedia.org/wiki/Utf8#Description with the new RFC 3629 limit" + + | utf8Encoder string encoded | + utf8Encoder := ZnUTF8EncoderGS new. + #( (0 16r7f) + (16r80 16r07FF) + (16r0800 16rFFFF) + (16r10000 16r10FFFF) + ) doWithIndex: [ :boundaries :byteCount | + boundaries do: [ :each | + string := String with: each asCharacter. + encoded := utf8Encoder encodeString: string. + self assert: (utf8Encoder decodeBytes: encoded) equals: string. + self assert: encoded size equals: byteCount ] ] diff --git a/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testUTF8ByteOrderMark.st b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testUTF8ByteOrderMark.st new file mode 100644 index 000000000..2c5778744 --- /dev/null +++ b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testUTF8ByteOrderMark.st @@ -0,0 +1,20 @@ +*zinc-character-encoding-gs3-tests +testUTF8ByteOrderMark + "Protocol: testing" + "The Unicode Byte Order Mark (BOM) should be skipped." + + | bom string bytes encoder decodedString | + encoder := ZnUTF8EncoderGS new. + string := 'élève en Français'. + bytes := encoder encodeStringWithByteOrderMark: string. + self assert: (encoder decodeBytes: bytes) equals: string. + + string := 'Foo'. + bytes := encoder encodeStringWithByteOrderMark: string. + decodedString := String new: string size. + ZnUTF8EncoderGS new + readInto: decodedString startingAt: 1 count: string size fromStream: bytes readStream. + self assert: decodedString equals: string. + + bom := encoder encodeStringWithByteOrderMark: ''. + self should: [ encoder decodeBytes: bom ] raise: ZnIncomplete \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testUTF8ByteOrderMarkSignificant.st b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testUTF8ByteOrderMarkSignificant.st new file mode 100644 index 000000000..fd90cba7c --- /dev/null +++ b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testUTF8ByteOrderMarkSignificant.st @@ -0,0 +1,11 @@ +*zinc-character-encoding-gs3-tests +testUTF8ByteOrderMarkSignificant + "Protocol: testing" + | input encoder result | + input := #[16r41 16rEF 16rBB 16rBF 16r42]. + encoder := ZnUTF8EncoderGS new. + encoder ignoreByteOrderMark: false. + result := encoder decodeBytes: input. + self assert: result first equals: $A. + self assert: result second equals: encoder byteOrderMark asCharacter. + self assert: result third equals: $B diff --git a/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testUTF8Encoder.st b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testUTF8Encoder.st new file mode 100644 index 000000000..843e37a77 --- /dev/null +++ b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testUTF8Encoder.st @@ -0,0 +1,19 @@ +*zinc-character-encoding-gs3-tests +testUTF8Encoder + "Protocol: testing" + + "The examples are taken from http://en.wikipedia.org/wiki/UTF-8#Description" + + | encoder inputBytes outputBytes inputString outputString | + encoder := ZnUTF8EncoderGS new. + inputString := String + with: $$ + with: 16r00A2 asCharacter + with: 16r20AC asCharacter + with: 16r024B62 asCharacter. + inputBytes := #( 16r24 16rC2 16rA2 16rE2 16r82 16rAC 16rF0 16rA4 + 16rAD 16rA2 ) asByteArray. + outputBytes := self encodeString: inputString with: encoder. + self assert: outputBytes equals: inputBytes. + outputString := self decodeBytes: inputBytes with: encoder. + self assert: outputString equals: inputString diff --git a/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testUTF8EncoderAuto.st b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testUTF8EncoderAuto.st new file mode 100644 index 000000000..fbfb01ccf --- /dev/null +++ b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testUTF8EncoderAuto.st @@ -0,0 +1,12 @@ +*zinc-character-encoding-gs3-tests +testUTF8EncoderAuto + "Protocol: testing" + + | encoder inputString bytes outputString | + encoder := ZnUTF8EncoderGS new. + inputString := String withAll: + ((1 to: 3072) collect: [ :each | + Character value: each ]). + bytes := self encodeString: inputString with: encoder. + outputString := self decodeBytes: bytes with: encoder. + self assert: inputString equals: outputString diff --git a/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testUTF8EncoderByteCount.st b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testUTF8EncoderByteCount.st new file mode 100644 index 000000000..152a14fa9 --- /dev/null +++ b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testUTF8EncoderByteCount.st @@ -0,0 +1,10 @@ +*zinc-character-encoding-gs3-tests +testUTF8EncoderByteCount + "Protocol: testing" + + | encoder | + encoder := ZnUTF8EncoderGS new. + self assert: (encoder encodedByteCountFor: $$) equals: 1. + self assert: (encoder encodedByteCountFor: 16r00A2 asCharacter) equals: 2. + self assert: (encoder encodedByteCountFor: 16r20AC asCharacter) equals: 3. + self assert: (encoder encodedByteCountFor: 16r024B62 asCharacter) equals: 4 diff --git a/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testUTF8EncoderIncomplete.st b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testUTF8EncoderIncomplete.st new file mode 100644 index 000000000..a41a1f591 --- /dev/null +++ b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testUTF8EncoderIncomplete.st @@ -0,0 +1,12 @@ +*zinc-character-encoding-gs3-tests +testUTF8EncoderIncomplete + "Protocol: testing" + "The examples are taken from http://en.wikipedia.org/wiki/UTF-8#Description" + + | encoder | + encoder := ZnUTF8EncoderGS new. + #( (16rC2 16rA2) (16rE2 16r82 16rAC) (16rF0 16rA4 16rAD 16rA2) ) do: [ :each | + 2 to: each size do: [ :count | + self + should: [ encoder decodeBytes: (each allButLast: count - 1) ] + raise: ZnIncomplete ] ] diff --git a/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testUTF8EncoderWide.st b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testUTF8EncoderWide.st new file mode 100644 index 000000000..560d28034 --- /dev/null +++ b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testUTF8EncoderWide.st @@ -0,0 +1,9 @@ +*zinc-character-encoding-gs3-tests +testUTF8EncoderWide + "Protocol: testing" + | encoder | + encoder := ZnUTF8EncoderGS new. + { 'abc'. 'élève en Français'. 'Pra-ská' copy at: 4 put: (Character value: 382); yourself. '' } + do: [ :each | | bytes | + bytes := self encodeString: each with: encoder. + self assert: (encoder decodeBytesIntoWideString: bytes) equals: each ] diff --git a/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testUTF8IllegalInput.st b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testUTF8IllegalInput.st new file mode 100644 index 000000000..2900b3ccb --- /dev/null +++ b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testUTF8IllegalInput.st @@ -0,0 +1,13 @@ +*zinc-character-encoding-gs3-tests +testUTF8IllegalInput + "Protocol: testing" + "See Unicode 14 standard, chapter 3, Conformance, 3.9 Unicode Encoding Forms, tables 3.6 & 3.7" + + { + #[16rC0 16rAF]. + #[16rE0 16r9F 16r80]. + #[16rF4 16r90 16r80 16r80] + } do: [ :bytes | + self + should: [ ZnCharacterEncoderGS utf8 decodeBytes:bytes ] + raise: ZnInvalidUTF8 ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testUTF8Overlong.st b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testUTF8Overlong.st new file mode 100644 index 000000000..3a326ab75 --- /dev/null +++ b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testUTF8Overlong.st @@ -0,0 +1,11 @@ +*zinc-character-encoding-gs3-tests +testUTF8Overlong + "Overlong encoding, aka Non shortest form characters should be rejected. + See http://en.wikipedia.org/wiki/UTF-8#Overlong_encodings" + + self + should: [ ZnUTF8EncoderGS new decodeBytes: #(16rF0 16r82 16r82 16rAC) asByteArray ] + raise: ZnInvalidUTF8 , ArgumentError. + self + should: [ ZnUTF8EncoderGS new decodeBytes: #(193 129 193 130 193 131) asByteArray ] + raise: ZnInvalidUTF8 , ArgumentError \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testUTF8SurrogateCodePointsShouldFail.st b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testUTF8SurrogateCodePointsShouldFail.st new file mode 100644 index 000000000..b0545061b --- /dev/null +++ b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/instance/testUTF8SurrogateCodePointsShouldFail.st @@ -0,0 +1,13 @@ +*zinc-character-encoding-gs3-tests +testUTF8SurrogateCodePointsShouldFail + "Protocol: testing" + | encoder surrogateCodePoint | + encoder := #utf8 asZnCharacterEncoder. + surrogateCodePoint := 16rD801. + self assert: (encoder isSurrogateCodePoint: surrogateCodePoint). + self + should: [ encoder encodeString: surrogateCodePoint asCharacter asString ] + raise: ZnInvalidUTF8. + self + should: [ encoder decodeBytes: #[237 160 129] ] + raise: ZnInvalidUTF8 diff --git a/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/properties.json b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/properties.json new file mode 100644 index 000000000..bc0ec4e5c --- /dev/null +++ b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTest.extension/properties.json @@ -0,0 +1,2 @@ +{ + "name" : "ZnCharacterEncoderTest" } diff --git a/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTests.extension/instance/testUTF8EncoderIncomplete.st b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTests.extension/instance/testUTF8EncoderIncomplete.st deleted file mode 100644 index 6d56209e9..000000000 --- a/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTests.extension/instance/testUTF8EncoderIncomplete.st +++ /dev/null @@ -1,17 +0,0 @@ -*zinc-character-encoding-gs3-tests -testUTF8EncoderIncomplete - "The examples are taken from http://en.wikipedia.org/wiki/UTF-8#Description" - - | gsVersion encoder | - gsVersion := System gemVersionReport at: 'gsVersion'. - ((gsVersion beginsWith: '3.1') or: [ gsVersion beginsWith: '3.0' ]) - ifTrue: [ ^ self ]. - encoder := ZnUTF8Encoder new. - {#[16rC2 16rA2]. - #[16rE2 16r82 16rAC]. - #[16rF0 16rA4 16rAD 16rA2]} - do: [ :byteArray | - 2 to: byteArray size do: [ :count | - self - should: [ encoder decodeBytes: (byteArray allButLast: count - 1) ] - raise: ZnInvalidUTF8 , ArgumentError ] ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTests.extension/instance/testUTF8Overlong.st b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTests.extension/instance/testUTF8Overlong.st deleted file mode 100644 index 86b9402b2..000000000 --- a/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTests.extension/instance/testUTF8Overlong.st +++ /dev/null @@ -1,11 +0,0 @@ -*zinc-character-encoding-gs3-tests -testUTF8Overlong - "Overlong encoding, aka Non shortest form characters should be rejected. - See http://en.wikipedia.org/wiki/UTF-8#Overlong_encodings" - - self - should: [ ZnUTF8Encoder new decodeBytes: #(16rF0 16r82 16r82 16rAC) asByteArray ] - raise: ZnInvalidUTF8 , ArgumentError. - self - should: [ ZnUTF8Encoder new decodeBytes: #(193 129 193 130 193 131) asByteArray ] - raise: ZnInvalidUTF8 , ArgumentError \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTests.extension/methodProperties.json b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTests.extension/methodProperties.json deleted file mode 100644 index cc9440a50..000000000 --- a/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTests.extension/methodProperties.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "class" : { - }, - "instance" : { - "testUTF8EncoderIncomplete" : "dkh 04/18/2023 19:02", - "testUTF8Overlong" : "dkh 04/18/2023 18:29" } } diff --git a/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTests.extension/properties.json b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTests.extension/properties.json deleted file mode 100644 index 32aceeb54..000000000 --- a/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterEncoderTests.extension/properties.json +++ /dev/null @@ -1,2 +0,0 @@ -{ - "name" : "ZnCharacterEncoderTests" } diff --git a/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterStreamTest.extension/instance/testSimpleUTF8WriteStream.st b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterStreamTest.extension/instance/testSimpleUTF8WriteStream.st new file mode 100644 index 000000000..36a79aa9e --- /dev/null +++ b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterStreamTest.extension/instance/testSimpleUTF8WriteStream.st @@ -0,0 +1,9 @@ +*zinc-character-encoding-gs3-tests +testSimpleUTF8WriteStream + "Protocol: tests" + | string bytes stream | + string := 'élève en Français'. + bytes := ZnUTF8EncoderGS new encodeString: string. + stream := ZnCharacterWriteStream on: (AnsiWriteStream on: ByteArray new). + stream nextPutAll: string. + self assert: stream wrappedStream contents equals: bytes asByteArray "in GemStone this an instance of Utf8" diff --git a/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterStreamTest.extension/instance/testUTF8ByteOrderMark.st b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterStreamTest.extension/instance/testUTF8ByteOrderMark.st new file mode 100644 index 000000000..9656c3a3d --- /dev/null +++ b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterStreamTest.extension/instance/testUTF8ByteOrderMark.st @@ -0,0 +1,12 @@ +*zinc-character-encoding-gs3-tests +testUTF8ByteOrderMark + "Protocol: testing" + "The Unicode Byte Order Mark (BOM) should be skipped." + + | bom string bytes encoder decoded | + encoder := ZnUTF8EncoderGS new. + bom := #[239 187 191]. + string := 'élève en Français'. + bytes := encoder encodeString: string. + self assert: (encoder decodeBytes: bom , bytes) equals: string. + self should: [ decoded := encoder decodeBytes: bom ] raise: ZnIncomplete. \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterStreamTest.extension/properties.json b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterStreamTest.extension/properties.json new file mode 100644 index 000000000..20a587060 --- /dev/null +++ b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnCharacterStreamTest.extension/properties.json @@ -0,0 +1,2 @@ +{ + "name" : "ZnCharacterStreamTest" } diff --git a/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnNewLineWriterStreamTest.extension/instance/testNextPut.st b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnNewLineWriterStreamTest.extension/instance/testNextPut.st new file mode 100644 index 000000000..7ba8b4262 --- /dev/null +++ b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnNewLineWriterStreamTest.extension/instance/testNextPut.st @@ -0,0 +1,20 @@ +*zinc-character-encoding-gs3-tests +testNextPut + "Protocol: tests" + "Ensure that the line ends are written correctly" + +| lineEnding expectedString stream crStream | + lineEnding := (Smalltalk os platformName asLowercase beginsWith: 'win') + ifTrue: [ String crlf ] + ifFalse: [ String lf ]. + expectedString := 'a', lineEnding, 'b'. + { String cr. + String lf. + String crlf. } do: [ :lineEnd | + stream := String new writeStream. + crStream := ZnNewLineWriterStream on: stream. + crStream + << 'a'; + << lineEnd; + << 'b'. + self assert: stream contents equals: expectedString ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnNewLineWriterStreamTest.extension/properties.json b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnNewLineWriterStreamTest.extension/properties.json new file mode 100644 index 000000000..9c4481273 --- /dev/null +++ b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnNewLineWriterStreamTest.extension/properties.json @@ -0,0 +1,2 @@ +{ + "name" : "ZnNewLineWriterStreamTest" } diff --git a/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnPercentEncoderTest.extension/instance/testNonAscii.st b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnPercentEncoderTest.extension/instance/testNonAscii.st new file mode 100644 index 000000000..722938a8f --- /dev/null +++ b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnPercentEncoderTest.extension/instance/testNonAscii.st @@ -0,0 +1,14 @@ +*zinc-character-encoding-gs3-tests +testNonAscii + "Protocol: tests" + | encoder | + encoder := ZnPercentEncoder new. + self + assert: encoder characterEncoder + equals: (ZnCharacterEncoderGS newForEncoding: 'utf-8'). + self + assert: (encoder encode: 'élève en Français') + equals: '%C3%A9l%C3%A8ve%20en%20Fran%C3%A7ais'. + self + assert: (encoder decode: '%C3%A9l%C3%A8ve%20en%20Fran%C3%A7ais') + equals: 'élève en Français' \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnPercentEncoderTest.extension/properties.json b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnPercentEncoderTest.extension/properties.json new file mode 100644 index 000000000..5ab3e26ef --- /dev/null +++ b/repository/Zinc-Character-Encoding-GS3-Tests.package/ZnPercentEncoderTest.extension/properties.json @@ -0,0 +1,2 @@ +{ + "name" : "ZnPercentEncoderTest" } diff --git a/repository/Zinc-Character-Encoding-GS3-Tests.package/monticello.meta/version b/repository/Zinc-Character-Encoding-GS3-Tests.package/monticello.meta/version deleted file mode 100644 index f3aea688e..000000000 --- a/repository/Zinc-Character-Encoding-GS3-Tests.package/monticello.meta/version +++ /dev/null @@ -1 +0,0 @@ -(name 'Zinc-Character-Encoding-GS3-Tests-dkh.3' message 'Issue #101: literal byte arrays not allowed in literal arrays in 3.5.3 ... adjust' id 'e5af637d-ca0d-4b75-a1a8-54d46afa38cb' date '04/18/2023' time '19:05:03' author 'dkh' ancestors ((name 'Zinc-Character-Encoding-GS3-Tests-dkh.2' message 'Issue #101: checkpoint with additional changes needed for latest version of FileSystemGs for 3.7.0' id '0dcbd6aa-54f3-4cec-b6a7-6d992e05d689' date '04/18/2023' time '18:56:27' author 'dkh' ancestors ((name 'Zinc-Character-Encoding-GS3-Tests-dkh.1' message 'split out tests that need to be different betwee GemStone 2.x and 3.x' id '1dc1dfa0-29df-4282-b3fb-39448a6e6faf' date '06/30/2014' time '07:52:09' author 'dkh' ancestors () stepChildren ())) stepChildren ())) stepChildren ()) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-GS32-Core.package/ZnUTF8Encoder.extension/methodProperties.json b/repository/Zinc-Character-Encoding-GS32-Core.package/ZnUTF8Encoder.extension/methodProperties.json deleted file mode 100644 index b6f3a245b..000000000 --- a/repository/Zinc-Character-Encoding-GS32-Core.package/ZnUTF8Encoder.extension/methodProperties.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "class" : { - }, - "instance" : { - "encodeString:" : "dkh 06/30/2014 00:03", - "next:putAll:startingAt:toStream:" : "dkh 06/26/2014 21:11", - "readInto:startingAt:count:fromStream:" : "dkh 06/27/2014 18:09" } } diff --git a/repository/Zinc-Character-Encoding-GS32-Core.package/monticello.meta/version b/repository/Zinc-Character-Encoding-GS32-Core.package/monticello.meta/version deleted file mode 100644 index e5814cf32..000000000 --- a/repository/Zinc-Character-Encoding-GS32-Core.package/monticello.meta/version +++ /dev/null @@ -1 +0,0 @@ -(name 'Zinc-Character-Encoding-GS32-Core-dkh.3' message 'ZnUTF8Encoder>>next:putAll:startingAt:toStream: is also version dependent ...' id '5ac79d54-e507-483c-8eff-1a2dfc2ebc75' date '06/30/2014' time '07:23:20' author 'dkh' ancestors ((name 'Zinc-Character-Encoding-GS32-Core-dkh.2' message 'ZnUTF8Encoder>>encodeString: is version specific' id 'c6089058-b314-431a-bcaa-02091949a757' date '06/30/2014' time '00:04:22' author 'dkh' ancestors ((name 'Zinc-Character-Encoding-GS32-Core-dkh.1' message 'optimized (for 3.2 and beyond) version of ZnUTF8Encoder>>readInto:startingAt:count:fromStream:' id '096c116d-db2a-472f-9c38-6adfa55ce395' date '06/29/2014' time '17:17:07' author 'dkh' ancestors () stepChildren ())) stepChildren ())) stepChildren ()) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-GS32-Core.v37.package/monticello.meta/version b/repository/Zinc-Character-Encoding-GS32-Core.v37.package/monticello.meta/version deleted file mode 100644 index 75dad02e4..000000000 --- a/repository/Zinc-Character-Encoding-GS32-Core.v37.package/monticello.meta/version +++ /dev/null @@ -1 +0,0 @@ -(name 'Zinc-Character-Encoding-GS32-Core.v37-dkh.4' message 'create a 3.7 version of this package ... With 3.7.0, the ZnUTF8Encoder is included in the base as part of the FileSystemGs support, so the extension methods are not needed' id '2d0d63a1-7bb1-4c1e-aa03-624e45aa7210' date '02/24/2023' time '12:05:33' author 'dkh' ancestors ((name 'Zinc-Character-Encoding-GS32-Core-dkh.3' message 'ZnUTF8Encoder>>next:putAll:startingAt:toStream: is also version dependent ...' id '5ac79d54-e507-483c-8eff-1a2dfc2ebc75' date '06/30/2014' time '07:23:20' author 'dkh' ancestors ((name 'Zinc-Character-Encoding-GS32-Core-dkh.2' message 'ZnUTF8Encoder>>encodeString: is version specific' id 'c6089058-b314-431a-bcaa-02091949a757' date '06/30/2014' time '00:04:22' author 'dkh' ancestors ((name 'Zinc-Character-Encoding-GS32-Core-dkh.1' message 'optimized (for 3.2 and beyond) version of ZnUTF8Encoder>>readInto:startingAt:count:fromStream:' id '096c116d-db2a-472f-9c38-6adfa55ce395' date '06/29/2014' time '17:17:07' author 'dkh' ancestors () stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ()) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/.filetree b/repository/Zinc-Character-Encoding-Tests.package/.filetree index 8998102c2..57a679737 100644 --- a/repository/Zinc-Character-Encoding-Tests.package/.filetree +++ b/repository/Zinc-Character-Encoding-Tests.package/.filetree @@ -1,4 +1,5 @@ { - "noMethodMetaData" : true, "separateMethodMetaAndSource" : false, - "useCypressPropertiesFile" : true } + "noMethodMetaData" : true, + "useCypressPropertiesFile" : true +} \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterStreamTests.class/README.md b/repository/Zinc-Character-Encoding-Tests.package/ZnBase64EncoderTest.class/README.md similarity index 100% rename from repository/Zinc-Character-Encoding-Tests.package/ZnCharacterStreamTests.class/README.md rename to repository/Zinc-Character-Encoding-Tests.package/ZnBase64EncoderTest.class/README.md diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnBase64EncoderTest.class/class/bench10kDecode.st b/repository/Zinc-Character-Encoding-Tests.package/ZnBase64EncoderTest.class/class/bench10kDecode.st new file mode 100644 index 000000000..920dad21e --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnBase64EncoderTest.class/class/bench10kDecode.st @@ -0,0 +1,9 @@ +benchmarks +bench10kDecode + "self bench10kDecode" + + | string alphabet | + alphabet := 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'. + string := String new: 10240 streamContents: [ :out | + 10240 timesRepeat: [ out nextPut: alphabet atRandom ] ]. + ^ [ ZnBase64Encoder new decode: string ] bench \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnBase64EncoderTest.class/class/bench10kEncode.st b/repository/Zinc-Character-Encoding-Tests.package/ZnBase64EncoderTest.class/class/bench10kEncode.st new file mode 100644 index 000000000..152be0a56 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnBase64EncoderTest.class/class/bench10kEncode.st @@ -0,0 +1,8 @@ +benchmarks +bench10kEncode + "self bench10kEncode" + + | bytes | + bytes := ByteArray new: 10240 streamContents: [ :out | + 10240 timesRepeat: [ out nextPut: 256 atRandom - 1 ] ]. + ^ [ ZnBase64Encoder new encode: bytes ] bench \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnBase64EncoderTest.class/class/bench1kDecode.st b/repository/Zinc-Character-Encoding-Tests.package/ZnBase64EncoderTest.class/class/bench1kDecode.st new file mode 100644 index 000000000..628be5972 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnBase64EncoderTest.class/class/bench1kDecode.st @@ -0,0 +1,9 @@ +benchmarks +bench1kDecode + "self bench1kDecode" + + | string alphabet | + alphabet := 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'. + string := String new: 1024 streamContents: [ :out | + 1024 timesRepeat: [ out nextPut: alphabet atRandom ] ]. + ^ [ ZnBase64Encoder new decode: string ] bench \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnBase64EncoderTest.class/class/bench1kEncode.st b/repository/Zinc-Character-Encoding-Tests.package/ZnBase64EncoderTest.class/class/bench1kEncode.st new file mode 100644 index 000000000..78a010501 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnBase64EncoderTest.class/class/bench1kEncode.st @@ -0,0 +1,8 @@ +benchmarks +bench1kEncode + "self bench1kEncode" + + | bytes | + bytes := ByteArray new: 1024 streamContents: [ :out | + 1024 timesRepeat: [ out nextPut: 256 atRandom - 1 ] ]. + ^ [ ZnBase64Encoder new encode: bytes ] bench \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnBase64EncoderTest.class/class/benchmarks.st b/repository/Zinc-Character-Encoding-Tests.package/ZnBase64EncoderTest.class/class/benchmarks.st new file mode 100644 index 000000000..225ea0d56 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnBase64EncoderTest.class/class/benchmarks.st @@ -0,0 +1,6 @@ +benchmarks +benchmarks + "self benchmarks" + + ^ (#( bench1kEncode bench1kDecode bench10kEncode bench10kDecode ) + collect: [ :each | each -> (self perform: each) ]) asDictionary \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnBase64EncoderTest.class/instance/testCustomAlphabetFullSpectrum.st b/repository/Zinc-Character-Encoding-Tests.package/ZnBase64EncoderTest.class/instance/testCustomAlphabetFullSpectrum.st new file mode 100644 index 000000000..2cf3ff16b --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnBase64EncoderTest.class/instance/testCustomAlphabetFullSpectrum.st @@ -0,0 +1,12 @@ +tests +testCustomAlphabetFullSpectrum + | encoder input output | + encoder := ZnBase64Encoder new. + encoder standardAlphabetWith: $- and: $_. + encoder noPadding; beLenient. + input := (0 to: 255) asByteArray , (255 to: 0) asByteArray. + output := encoder encode: input. + self assert: (encoder decode: output) equals: input. + encoder breakLines. + output := encoder encode: input. + self assert: (encoder decode: output) equals: input \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnBase64EncoderTest.class/instance/testCustomLineBreaking.st b/repository/Zinc-Character-Encoding-Tests.package/ZnBase64EncoderTest.class/instance/testCustomLineBreaking.st new file mode 100644 index 000000000..89e3a4856 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnBase64EncoderTest.class/instance/testCustomLineBreaking.st @@ -0,0 +1,10 @@ +tests +testCustomLineBreaking + | encoder input output charCount | + encoder := ZnBase64Encoder new. + encoder breakLinesAt: 16. + input := (0 to: 255) asByteArray. + output := encoder encode: input. + self assert: (encoder decode: output) equals: input. + charCount := ((256 // 3) + (256 \\ 3) sign) * 4. + self assert: output size equals: (charCount + (charCount // 16 * String crlf size)) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnBase64EncoderTest.class/instance/testDecodingErrors.st b/repository/Zinc-Character-Encoding-Tests.package/ZnBase64EncoderTest.class/instance/testDecodingErrors.st new file mode 100644 index 000000000..141af197a --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnBase64EncoderTest.class/instance/testDecodingErrors.st @@ -0,0 +1,17 @@ +tests +testDecodingErrors + | encoder | + encoder := ZnBase64Encoder new. + self should: [ encoder decode: 'A' ] raise: ZnCharacterEncodingError. + self should: [ encoder decode: 'AB' ] raise: ZnCharacterEncodingError. + self should: [ encoder decode: 'ABC' ] raise: ZnCharacterEncodingError. + encoder whitespace: #separator. + self should: [ encoder decode: '*' ] raise: ZnCharacterEncodingError. + self should: [ encoder decode: '**' ] raise: ZnCharacterEncodingError. + self should: [ encoder decode: '***' ] raise: ZnCharacterEncodingError. + self should: [ encoder decode: '****' ] raise: ZnCharacterEncodingError. + encoder whitespace: nil. + self should: [ encoder decode: '*' ] raise: ZnCharacterEncodingError. + self should: [ encoder decode: '**' ] raise: ZnCharacterEncodingError. + self should: [ encoder decode: '***' ] raise: ZnCharacterEncodingError. + self should: [ encoder decode: '****' ] raise: ZnCharacterEncodingError \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnBase64EncoderTest.class/instance/testEmpty.st b/repository/Zinc-Character-Encoding-Tests.package/ZnBase64EncoderTest.class/instance/testEmpty.st new file mode 100644 index 000000000..37d262521 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnBase64EncoderTest.class/instance/testEmpty.st @@ -0,0 +1,10 @@ +tests +testEmpty + | encoder | + encoder := ZnBase64Encoder new. + self + assert: (encoder encode: #[] asByteArray) + equals: ''. + self + assert: (encoder decode: '') + equals: #[] asByteArray diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnBase64EncoderTest.class/instance/testFullAlphabet.st b/repository/Zinc-Character-Encoding-Tests.package/ZnBase64EncoderTest.class/instance/testFullAlphabet.st new file mode 100644 index 000000000..20e79db81 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnBase64EncoderTest.class/instance/testFullAlphabet.st @@ -0,0 +1,10 @@ +tests +testFullAlphabet + | encoder input output | + encoder := ZnBase64Encoder new. + input := encoder alphabet. + output := encoder decode: input. + self assert: (encoder encode: output) equals: input. + encoder breakLines. + output := encoder decode: input. + self assert: (encoder encode: output) equals: input \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnBase64EncoderTests.class/instance/testFullSpectrum.st b/repository/Zinc-Character-Encoding-Tests.package/ZnBase64EncoderTest.class/instance/testFullSpectrum.st similarity index 81% rename from repository/Zinc-Character-Encoding-Tests.package/ZnBase64EncoderTests.class/instance/testFullSpectrum.st rename to repository/Zinc-Character-Encoding-Tests.package/ZnBase64EncoderTest.class/instance/testFullSpectrum.st index 9fc0d93ec..cf3e60445 100644 --- a/repository/Zinc-Character-Encoding-Tests.package/ZnBase64EncoderTests.class/instance/testFullSpectrum.st +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnBase64EncoderTest.class/instance/testFullSpectrum.st @@ -1,4 +1,4 @@ -testing +tests testFullSpectrum | encoder input output | encoder := ZnBase64Encoder new. @@ -7,4 +7,4 @@ testFullSpectrum self assert: (encoder decode: output) equals: input. encoder breakLines. output := encoder encode: input. - self assert: (encoder decode: output) equals: input. + self assert: (encoder decode: output) equals: input \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnBase64EncoderTest.class/instance/testPadding.st b/repository/Zinc-Character-Encoding-Tests.package/ZnBase64EncoderTest.class/instance/testPadding.st new file mode 100644 index 000000000..507fded0b --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnBase64EncoderTest.class/instance/testPadding.st @@ -0,0 +1,13 @@ +tests +testPadding + | encoder | + encoder := ZnBase64Encoder new. + self assert: (encoder encode: 'M' asByteArray) equals: 'TQ=='. + self assert: (encoder decode: 'TQ==') equals: 'M' asByteArray. + self assert: (encoder encode: 'Ma' asByteArray) equals: 'TWE='. + self assert: (encoder decode: 'TWE=') equals: 'Ma' asByteArray. + encoder noPadding; beLenient. + self assert: (encoder encode: 'M' asByteArray) equals: 'TQ'. + self assert: (encoder decode: 'TQ') equals: 'M' asByteArray. + self assert: (encoder encode: 'Ma' asByteArray) equals: 'TWE'. + self assert: (encoder decode: 'TWE') equals: 'Ma' asByteArray \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnBase64EncoderTests.class/instance/testQuote.st b/repository/Zinc-Character-Encoding-Tests.package/ZnBase64EncoderTest.class/instance/testQuote.st similarity index 82% rename from repository/Zinc-Character-Encoding-Tests.package/ZnBase64EncoderTests.class/instance/testQuote.st rename to repository/Zinc-Character-Encoding-Tests.package/ZnBase64EncoderTest.class/instance/testQuote.st index f73eb2b1f..083b9cb5b 100644 --- a/repository/Zinc-Character-Encoding-Tests.package/ZnBase64EncoderTests.class/instance/testQuote.st +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnBase64EncoderTest.class/instance/testQuote.st @@ -1,17 +1,17 @@ -testing +tests testQuote | input output encoder break | encoder := ZnBase64Encoder new lineEndConvention: #cr; breakLines; yourself. input := 'Man is distinguished, not only by his reason, but by this singular passion from other animals, which is a lust of the mind, that by a perseverance of delight in the continued and indefatigable generation of knowledge, exceeds the short vehemence of any carnal pleasure.'. break := String with: Character cr. - output := 'TWFuIGlzIGRpc3Rpbmd1aXNoZWQsIG5vdCBvbmx5IGJ5IGhpcyByZWFzb24sIGJ1dCBieSB0aGlz' , break - , 'IHNpbmd1bGFyIHBhc3Npb24gZnJvbSBvdGhlciBhbmltYWxzLCB3aGljaCBpcyBhIGx1c3Qgb2Yg' , break - , 'dGhlIG1pbmQsIHRoYXQgYnkgYSBwZXJzZXZlcmFuY2Ugb2YgZGVsaWdodCBpbiB0aGUgY29udGlu' , break - , 'dWVkIGFuZCBpbmRlZmF0aWdhYmxlIGdlbmVyYXRpb24gb2Yga25vd2xlZGdlLCBleGNlZWRzIHRo' , break + output := 'TWFuIGlzIGRpc3Rpbmd1aXNoZWQsIG5vdCBvbmx5IGJ5IGhpcyByZWFzb24sIGJ1dCBieSB0aGlz' , break + , 'IHNpbmd1bGFyIHBhc3Npb24gZnJvbSBvdGhlciBhbmltYWxzLCB3aGljaCBpcyBhIGx1c3Qgb2Yg' , break + , 'dGhlIG1pbmQsIHRoYXQgYnkgYSBwZXJzZXZlcmFuY2Ugb2YgZGVsaWdodCBpbiB0aGUgY29udGlu' , break + , 'dWVkIGFuZCBpbmRlZmF0aWdhYmxlIGdlbmVyYXRpb24gb2Yga25vd2xlZGdlLCBleGNlZWRzIHRo' , break , 'ZSBzaG9ydCB2ZWhlbWVuY2Ugb2YgYW55IGNhcm5hbCBwbGVhc3VyZS4='. - self + self assert: (encoder encode: input asByteArray) equals: output. - self - assert: (encoder decode: output) + self + assert: (encoder decode: output) equals: input asByteArray \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnBase64EncoderTest.class/instance/testSimple.st b/repository/Zinc-Character-Encoding-Tests.package/ZnBase64EncoderTest.class/instance/testSimple.st new file mode 100644 index 000000000..e704b81bd --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnBase64EncoderTest.class/instance/testSimple.st @@ -0,0 +1,10 @@ +tests +testSimple + | encoder | + encoder := ZnBase64Encoder new. + self + assert: (encoder encode: 'Man' asByteArray) + equals: 'TWFu'. + self + assert: (encoder decode: 'TWFu') + equals: 'Man' asByteArray \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnBase64EncoderTest.class/instance/testWhitespaceAtEnd.st b/repository/Zinc-Character-Encoding-Tests.package/ZnBase64EncoderTest.class/instance/testWhitespaceAtEnd.st new file mode 100644 index 000000000..766474bfa --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnBase64EncoderTest.class/instance/testWhitespaceAtEnd.st @@ -0,0 +1,10 @@ +tests +testWhitespaceAtEnd + | encoder | + encoder := ZnBase64Encoder new. + "whitespace is #any non-alphabet character" + self assert: (encoder decode: 'TQ==' , String lf) equals: 'M' asByteArray. + encoder whitespace: #separator. + self assert: (encoder decode: 'TQ==' , String lf) equals: 'M' asByteArray. + encoder whitespace: nil. + self should: [ encoder decode: 'TQ==' , String lf ] raise: ZnCharacterEncodingError \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnBase64EncoderTest.class/properties.json b/repository/Zinc-Character-Encoding-Tests.package/ZnBase64EncoderTest.class/properties.json new file mode 100644 index 000000000..3fb98a1e8 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnBase64EncoderTest.class/properties.json @@ -0,0 +1,11 @@ +{ + "commentStamp" : "", + "super" : "TestCase", + "category" : "Zinc-Character-Encoding-Tests", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "ZnBase64EncoderTest", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnBase64EncoderTests.class/instance/testDecodingErrors.st b/repository/Zinc-Character-Encoding-Tests.package/ZnBase64EncoderTests.class/instance/testDecodingErrors.st deleted file mode 100644 index b66bb08e7..000000000 --- a/repository/Zinc-Character-Encoding-Tests.package/ZnBase64EncoderTests.class/instance/testDecodingErrors.st +++ /dev/null @@ -1,7 +0,0 @@ -testing -testDecodingErrors - | encoder | - encoder := ZnBase64Encoder new. - self should: [ encoder decode: 'A' ] raise: Error. - self should: [ encoder decode: 'AB' ] raise: Error. - self should: [ encoder decode: 'ABC' ] raise: Error. \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnBase64EncoderTests.class/instance/testEmpty.st b/repository/Zinc-Character-Encoding-Tests.package/ZnBase64EncoderTests.class/instance/testEmpty.st deleted file mode 100644 index 466e5846d..000000000 --- a/repository/Zinc-Character-Encoding-Tests.package/ZnBase64EncoderTests.class/instance/testEmpty.st +++ /dev/null @@ -1,10 +0,0 @@ -testing -testEmpty - | encoder | - encoder := ZnBase64Encoder new. - self - assert: (encoder encode: #[] asByteArray) - equals: ''. - self - assert: (encoder decode: '') - equals: #[] asByteArray \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnBase64EncoderTests.class/instance/testPadding.st b/repository/Zinc-Character-Encoding-Tests.package/ZnBase64EncoderTests.class/instance/testPadding.st deleted file mode 100644 index 80b968f36..000000000 --- a/repository/Zinc-Character-Encoding-Tests.package/ZnBase64EncoderTests.class/instance/testPadding.st +++ /dev/null @@ -1,8 +0,0 @@ -testing -testPadding - | encoder | - encoder := ZnBase64Encoder new. - self assert: (encoder encode: 'M' asByteArray) equals: 'TQ=='. - self assert: (encoder decode: 'TQ==') equals: 'M' asByteArray. - self assert: (encoder encode: 'Ma' asByteArray) equals: 'TWE='. - self assert: (encoder decode: 'TWE=') equals: 'Ma' asByteArray \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnBase64EncoderTests.class/instance/testSimple.st b/repository/Zinc-Character-Encoding-Tests.package/ZnBase64EncoderTests.class/instance/testSimple.st deleted file mode 100644 index 9189e480a..000000000 --- a/repository/Zinc-Character-Encoding-Tests.package/ZnBase64EncoderTests.class/instance/testSimple.st +++ /dev/null @@ -1,10 +0,0 @@ -testing -testSimple - | encoder | - encoder := ZnBase64Encoder new. - self - assert: (encoder encode: 'Man' asByteArray) - equals: 'TWFu'. - self - assert: (encoder decode: 'TWFu') - equals: 'Man' asByteArray \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnBase64EncoderTests.class/methodProperties.json b/repository/Zinc-Character-Encoding-Tests.package/ZnBase64EncoderTests.class/methodProperties.json deleted file mode 100644 index bd5dd6c2f..000000000 --- a/repository/Zinc-Character-Encoding-Tests.package/ZnBase64EncoderTests.class/methodProperties.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "class" : { - }, - "instance" : { - "testDecodingErrors" : "SvenVanCaekenberghe 12/15/2012 13:43", - "testEmpty" : "dkh 06/23/2013 04:58", - "testFullSpectrum" : "SvenVanCaekenberghe 12/15/2012 10:16", - "testPadding" : "SvenVanCaekenberghe 12/15/2012 13:39", - "testQuote" : "KenTreis 01/19/2013 09:28", - "testSimple" : "SvenVanCaekenberghe 12/15/2012 00:07" } } diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnBase64EncoderTests.class/properties.json b/repository/Zinc-Character-Encoding-Tests.package/ZnBase64EncoderTests.class/properties.json deleted file mode 100644 index 3a70d4595..000000000 --- a/repository/Zinc-Character-Encoding-Tests.package/ZnBase64EncoderTests.class/properties.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "category" : "Zinc-Character-Encoding-Tests", - "classinstvars" : [ - ], - "classvars" : [ - ], - "commentStamp" : "", - "instvars" : [ - ], - "name" : "ZnBase64EncoderTests", - "pools" : [ - ], - "super" : "TestCase", - "type" : "normal" } diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadStreamTests.class/README.md b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadStreamTest.class/README.md similarity index 100% rename from repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadStreamTests.class/README.md rename to repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadStreamTest.class/README.md diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadStreamTest.class/instance/testBack.st b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadStreamTest.class/instance/testBack.st new file mode 100644 index 000000000..93b65f79f --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadStreamTest.class/instance/testBack.st @@ -0,0 +1,20 @@ +tests +testBack + "Check that ZnBufferedReadStream>>#back behaves as expected" + + | stream source | + + "Allocate a buffer larger than the default size (65536)" + self assert: ZnBufferedReadStream basicNew defaultBufferSize < 66000. + source := ByteArray new: 70000. + 1 to: 70000 do: [ :i | + source at: i put: i \\ 256 ]. + + stream := ZnBufferedReadStream on: source readStream. + stream position: 1. + self assert: stream peek equals: (source at: 2). + self assert: stream back equals: (source at: 1). + "Position the stream beyond the end of the initial buffer" + stream position: 66000. + self assert: stream peek equals: (source at: 66001). + self assert: stream back equals: (source at: 66000). \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadStreamTest.class/instance/testBuffering.st b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadStreamTest.class/instance/testBuffering.st new file mode 100644 index 000000000..46ca47190 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadStreamTest.class/instance/testBuffering.st @@ -0,0 +1,10 @@ +tests +testBuffering + | stream | + stream := ZnBufferedReadStream on: '01234567890123456789' readStream. + stream sizeBuffer: 8. + self deny: stream atEnd. + self assert: (stream next: 10) equals: '0123456789'. + self deny: stream atEnd. + self assert: (stream next: 10) equals: '0123456789'. + self assert: stream atEnd \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadStreamTest.class/instance/testPeek.st b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadStreamTest.class/instance/testPeek.st new file mode 100644 index 000000000..86eab8f18 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadStreamTest.class/instance/testPeek.st @@ -0,0 +1,12 @@ +tests +testPeek + | stream | + stream := ZnBufferedReadStream on: '0123456789' readStream. + stream sizeBuffer: 8. + '0123456789' do: [ :each | + self deny: stream atEnd. + self assert: stream peek equals: each. + self assert: stream next equals: each ]. + self assert: stream atEnd. + self assert: stream peek isNil. + self assert: stream next isNil \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadStreamTest.class/instance/testPositioning.st b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadStreamTest.class/instance/testPositioning.st new file mode 100644 index 000000000..67296118d --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadStreamTest.class/instance/testPositioning.st @@ -0,0 +1,21 @@ +tests +testPositioning + | byteArray stream | + + byteArray := (1 to: 255) as: ByteArray. + + stream := ZnBufferedReadStream on: byteArray readStream. + stream sizeBuffer: 32. + + self assert: stream position equals: 0. + self assert: stream next equals: 1. + self assert: stream position equals: 1. + + self assert: (stream next: 100) equals: ((2 to: 101) as: ByteArray). + self assert: stream position equals: 101. + + stream position: 99. + self assert: stream position equals: 99. + + self assert: stream next equals: 100. + self assert: stream position equals: 100 \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadStreamTest.class/instance/testReadInto.st b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadStreamTest.class/instance/testReadInto.st new file mode 100644 index 000000000..a61b29f14 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadStreamTest.class/instance/testReadInto.st @@ -0,0 +1,14 @@ +tests +testReadInto + | stream buffer count | + stream := ZnBufferedReadStream on: '0123456789' readStream. + stream sizeBuffer: 8. + buffer := String new: 6 withAll: Character space. + stream skip: 1. + stream readInto: buffer startingAt: 4 count: 3. + self assert: buffer equals: ' 123'. + stream readInto: buffer startingAt: 1 count: 3. + self assert: buffer equals: '456123'. + count := stream readInto: buffer startingAt: 1 count: 100. + self assert: count equals: 3. + self assert: buffer equals: '789123' \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadStreamTest.class/instance/testReadIntoLarger.st b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadStreamTest.class/instance/testReadIntoLarger.st new file mode 100644 index 000000000..b9a8c7dd4 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadStreamTest.class/instance/testReadIntoLarger.st @@ -0,0 +1,9 @@ +tests +testReadIntoLarger + | stream buffer count | + stream := ZnBufferedReadStream on: '0123456789' readStream. + stream sizeBuffer: 4. + buffer := String new: 10. + count := stream readInto: buffer startingAt: 1 count: 10. + self assert: count equals: 10. + self assert: buffer equals: '0123456789' \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadStreamTest.class/instance/testReadUpTo.st b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadStreamTest.class/instance/testReadUpTo.st new file mode 100644 index 000000000..d1392d4d3 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadStreamTest.class/instance/testReadUpTo.st @@ -0,0 +1,8 @@ +tests +testReadUpTo + | stream | + stream := ZnBufferedReadStream on: '0123456789' readStream. + stream sizeBuffer: 8. + self assert: (stream upTo: $5) equals: '01234'. + self assert: stream upToEnd equals: '6789'. + self assert: stream atEnd \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadStreamTest.class/instance/testReadUpToEnd.st b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadStreamTest.class/instance/testReadUpToEnd.st new file mode 100644 index 000000000..d37f3f454 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadStreamTest.class/instance/testReadUpToEnd.st @@ -0,0 +1,11 @@ +tests +testReadUpToEnd + | stream | + stream := ZnBufferedReadStream on: '0123456789' readStream. + stream sizeBuffer: 4. + stream next: 2. + self assert: stream upToEnd equals: '23456789'. + self assert: stream atEnd. + stream := ZnBufferedReadStream on: #[] readStream. + self assert: stream upToEnd equals: #[]. + self assert: stream atEnd \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadStreamTest.class/instance/testSetToEnd.st b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadStreamTest.class/instance/testSetToEnd.st new file mode 100644 index 000000000..3c1b4316d --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadStreamTest.class/instance/testSetToEnd.st @@ -0,0 +1,17 @@ +tests +testSetToEnd + | stream source | + source := '0123456789'. + stream := ZnBufferedReadStream on: source readStream. + stream sizeBuffer: source size. + + "Call setToEnd on new stream" + self assert: stream position equals: 0. + stream setToEnd. + self assert: stream position equals: source size. + + "Call setToEnd without after reading some elements" + stream position: 2. + self assert: (stream next: 4) equals: '2345'. + stream setToEnd. + self assert: stream position equals: source size \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadStreamTest.class/properties.json b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadStreamTest.class/properties.json new file mode 100644 index 000000000..7ba926d35 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadStreamTest.class/properties.json @@ -0,0 +1,11 @@ +{ + "commentStamp" : "", + "super" : "TestCase", + "category" : "Zinc-Character-Encoding-Tests", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "ZnBufferedReadStreamTest", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadStreamTests.class/instance/testBuffering.st b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadStreamTests.class/instance/testBuffering.st deleted file mode 100644 index c91eee2d8..000000000 --- a/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadStreamTests.class/instance/testBuffering.st +++ /dev/null @@ -1,10 +0,0 @@ -testing -testBuffering - | stream | - stream := ZnBufferedReadStream on: '01234567890123456789' readStream. - stream sizeBuffer: 8. - self deny: stream atEnd. - self assert: (stream next: 10) equals: '0123456789'. - self deny: stream atEnd. - self assert: (stream next: 10) equals: '0123456789'. - self assert: stream atEnd \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadStreamTests.class/instance/testPeek.st b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadStreamTests.class/instance/testPeek.st deleted file mode 100644 index 1913f1d9b..000000000 --- a/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadStreamTests.class/instance/testPeek.st +++ /dev/null @@ -1,12 +0,0 @@ -testing -testPeek - | stream | - stream := ZnBufferedReadStream on: '0123456789' readStream. - stream sizeBuffer: 8. - '0123456789' do: [ :each | - self deny: stream atEnd. - self assert: stream peek equals: each. - self assert: stream next equals: each ]. - self assert: stream atEnd. - self assert: stream peek isNil. - self assert: stream next isNil \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadStreamTests.class/instance/testReadInto.st b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadStreamTests.class/instance/testReadInto.st deleted file mode 100644 index 8370031f9..000000000 --- a/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadStreamTests.class/instance/testReadInto.st +++ /dev/null @@ -1,14 +0,0 @@ -testing -testReadInto - | stream buffer count | - stream := ZnBufferedReadStream on: '0123456789' readStream. - stream sizeBuffer: 8. - buffer := String new: 6 withAll: Character space. - stream skip: 1. - stream readInto: buffer startingAt: 4 count: 3. - self assert: buffer equals: ' 123'. - stream readInto: buffer startingAt: 1 count: 3. - self assert: buffer equals: '456123'. - count := stream readInto: buffer startingAt: 1 count: 100. - self assert: count equals: 3. - self assert: buffer equals: '789123' \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadStreamTests.class/instance/testReadIntoLarger.st b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadStreamTests.class/instance/testReadIntoLarger.st deleted file mode 100644 index 042acaf4f..000000000 --- a/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadStreamTests.class/instance/testReadIntoLarger.st +++ /dev/null @@ -1,9 +0,0 @@ -testing -testReadIntoLarger - | stream buffer count | - stream := ZnBufferedReadStream on: '0123456789' readStream. - stream sizeBuffer: 4. - buffer := String new: 10. - count := stream readInto: buffer startingAt: 1 count: 10. - self assert: count equals: 10. - self assert: buffer equals: '0123456789' \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadStreamTests.class/instance/testReadUpTo.st b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadStreamTests.class/instance/testReadUpTo.st deleted file mode 100644 index 77782ab50..000000000 --- a/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadStreamTests.class/instance/testReadUpTo.st +++ /dev/null @@ -1,8 +0,0 @@ -testing -testReadUpTo - | stream | - stream := ZnBufferedReadStream on: '0123456789' readStream. - stream sizeBuffer: 8. - self assert: (stream upTo: $5) equals: '01234'. - self assert: stream upToEnd equals: '6789'. - self assert: stream atEnd \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadStreamTests.class/instance/testReadUpToEnd.st b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadStreamTests.class/instance/testReadUpToEnd.st deleted file mode 100644 index a8a07d6ef..000000000 --- a/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadStreamTests.class/instance/testReadUpToEnd.st +++ /dev/null @@ -1,8 +0,0 @@ -testing -testReadUpToEnd - | stream | - stream := ZnBufferedReadStream on: '0123456789' readStream. - stream sizeBuffer: 4. - stream next: 2. - self assert: stream upToEnd equals: '23456789'. - self assert: stream atEnd \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadStreamTests.class/methodProperties.json b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadStreamTests.class/methodProperties.json deleted file mode 100644 index 4325956c7..000000000 --- a/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadStreamTests.class/methodProperties.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "class" : { - }, - "instance" : { - "testBuffering" : "SvenVanCaekenberghe 11/30/2012 20:47", - "testPeek" : "SvenVanCaekenberghe 11/30/2012 20:49", - "testReadInto" : "SvenVanCaekenberghe 11/30/2012 20:56", - "testReadIntoLarger" : "SvenVanCaekenberghe 11/30/2012 21:02", - "testReadUpTo" : "SvenVanCaekenberghe 12/16/2012 16:24", - "testReadUpToEnd" : "SvenVanCaekenberghe 12/16/2012 16:25" } } diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadStreamTests.class/properties.json b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadStreamTests.class/properties.json deleted file mode 100644 index 1f9f43da5..000000000 --- a/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadStreamTests.class/properties.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "category" : "Zinc-Character-Encoding-Tests", - "classinstvars" : [ - ], - "classvars" : [ - ], - "commentStamp" : "", - "instvars" : [ - ], - "name" : "ZnBufferedReadStreamTests", - "pools" : [ - ], - "super" : "TestCase", - "type" : "normal" } diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnPercentEncoderTests.class/README.md b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadWriteStreamTest.class/README.md similarity index 100% rename from repository/Zinc-Character-Encoding-Tests.package/ZnPercentEncoderTests.class/README.md rename to repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadWriteStreamTest.class/README.md diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadWriteStreamTest.class/instance/testBuffering.st b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadWriteStreamTest.class/instance/testBuffering.st new file mode 100644 index 000000000..2521e90e6 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadWriteStreamTest.class/instance/testBuffering.st @@ -0,0 +1,10 @@ +tests +testBuffering + | stream | + stream := ZnBufferedReadWriteStream on: '01234567890123456789' readStream. + stream sizeBuffer: 8. + self deny: stream atEnd. + self assert: (stream next: 10) equals: '0123456789'. + self deny: stream atEnd. + self assert: (stream next: 10) equals: '0123456789'. + self assert: stream atEnd \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadWriteStreamTest.class/instance/testNextPutAllStartingAt.st b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadWriteStreamTest.class/instance/testNextPutAllStartingAt.st new file mode 100644 index 000000000..e130f2f20 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadWriteStreamTest.class/instance/testNextPutAllStartingAt.st @@ -0,0 +1,11 @@ +tests +testNextPutAllStartingAt + | string | + string := String streamContents: [ :stringStream | + ZnBufferedReadWriteStream on: stringStream do: [ : bufferedStream | + bufferedStream sizeBuffer: 8. + bufferedStream next: 5 putAll: '--012345--' startingAt: 3. + bufferedStream next: 5 putAll: '0123456789XX' startingAt: 6. + bufferedStream next: 5 putAll: '--012345--' startingAt: 3. + bufferedStream next: 5 putAll: '0123456789XX' startingAt: 6.] ]. + self assert: string equals: '01234567890123456789' \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadWriteStreamTest.class/instance/testPeek.st b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadWriteStreamTest.class/instance/testPeek.st new file mode 100644 index 000000000..bfee2775a --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadWriteStreamTest.class/instance/testPeek.st @@ -0,0 +1,12 @@ +tests +testPeek + | stream | + stream := ZnBufferedReadWriteStream on: '0123456789' readStream. + stream sizeBuffer: 8. + '0123456789' do: [ :each | + self deny: stream atEnd. + self assert: stream peek equals: each. + self assert: stream next equals: each ]. + self assert: stream atEnd. + self assert: stream peek isNil. + self assert: stream next isNil \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadWriteStreamTest.class/instance/testReadInto.st b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadWriteStreamTest.class/instance/testReadInto.st new file mode 100644 index 000000000..cfe2335ba --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadWriteStreamTest.class/instance/testReadInto.st @@ -0,0 +1,14 @@ +tests +testReadInto + | stream buffer count | + stream := ZnBufferedReadWriteStream on: '0123456789' readStream. + stream sizeBuffer: 8. + buffer := String new: 6 withAll: Character space. + stream skip: 1. + stream readInto: buffer startingAt: 4 count: 3. + self assert: buffer equals: ' 123'. + stream readInto: buffer startingAt: 1 count: 3. + self assert: buffer equals: '456123'. + count := stream readInto: buffer startingAt: 1 count: 100. + self assert: count equals: 3. + self assert: buffer equals: '789123' \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadWriteStreamTest.class/instance/testReadIntoLarger.st b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadWriteStreamTest.class/instance/testReadIntoLarger.st new file mode 100644 index 000000000..11fcb7180 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadWriteStreamTest.class/instance/testReadIntoLarger.st @@ -0,0 +1,9 @@ +tests +testReadIntoLarger + | stream buffer count | + stream := ZnBufferedReadWriteStream on: '0123456789' readStream. + stream sizeBuffer: 4. + buffer := String new: 10. + count := stream readInto: buffer startingAt: 1 count: 10. + self assert: count equals: 10. + self assert: buffer equals: '0123456789' \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadWriteStreamTest.class/instance/testReadUpTo.st b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadWriteStreamTest.class/instance/testReadUpTo.st new file mode 100644 index 000000000..2bca519ce --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadWriteStreamTest.class/instance/testReadUpTo.st @@ -0,0 +1,8 @@ +tests +testReadUpTo + | stream | + stream := ZnBufferedReadWriteStream on: '0123456789' readStream. + stream sizeBuffer: 8. + self assert: (stream upTo: $5) equals: '01234'. + self assert: stream upToEnd equals: '6789'. + self assert: stream atEnd \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadWriteStreamTest.class/instance/testReadUpToEnd.st b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadWriteStreamTest.class/instance/testReadUpToEnd.st new file mode 100644 index 000000000..a3128fc19 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadWriteStreamTest.class/instance/testReadUpToEnd.st @@ -0,0 +1,8 @@ +tests +testReadUpToEnd + | stream | + stream := ZnBufferedReadWriteStream on: '0123456789' readStream. + stream sizeBuffer: 4. + stream next: 2. + self assert: stream upToEnd equals: '23456789'. + self assert: stream atEnd \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadWriteStreamTest.class/instance/testWriting.st b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadWriteStreamTest.class/instance/testWriting.st new file mode 100644 index 000000000..9c4b109cb --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadWriteStreamTest.class/instance/testWriting.st @@ -0,0 +1,8 @@ +tests +testWriting + | string | + string := String streamContents: [ :stringStream | | bufferedStream | + bufferedStream := ZnBufferedReadWriteStream on: stringStream. + 0 to: 9 do: [ :each | bufferedStream nextPut: (Character digitValue: each) ]. + bufferedStream flush ]. + self assert: string equals: '0123456789' \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadWriteStreamTest.class/instance/testWritingOverflow.st b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadWriteStreamTest.class/instance/testWritingOverflow.st new file mode 100644 index 000000000..21461017b --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadWriteStreamTest.class/instance/testWritingOverflow.st @@ -0,0 +1,11 @@ +tests +testWritingOverflow + | string | + string := String streamContents: [ :stringStream | | bufferedStream | + bufferedStream := ZnBufferedReadWriteStream on: stringStream. + bufferedStream sizeBuffer: 8. + 0 to: 9 do: [ :each | bufferedStream nextPut: (Character digitValue: each) ]. + bufferedStream nextPutAll: '0123'; nextPutAll: '4567'; nextPutAll: '89'. + bufferedStream nextPutAll: '0123456789'; nextPutAll: '0123456789'. + bufferedStream flush ]. + self assert: string equals: '0123456789012345678901234567890123456789' \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadWriteStreamTest.class/properties.json b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadWriteStreamTest.class/properties.json new file mode 100644 index 000000000..18582e3f4 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadWriteStreamTest.class/properties.json @@ -0,0 +1,11 @@ +{ + "commentStamp" : "", + "super" : "TestCase", + "category" : "Zinc-Character-Encoding-Tests", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "ZnBufferedReadWriteStreamTest", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedStreamByteTest.class/README.md b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedStreamByteTest.class/README.md new file mode 100644 index 000000000..c26d3e64f --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedStreamByteTest.class/README.md @@ -0,0 +1,8 @@ +Tests for bufferer read/write streams that are assumed to contain bytes. + +Right now, integer encoding/decoding + +References + +https://en.wikipedia.org/wiki/Endianness +https://en.wikipedia.org/wiki/Two%27s_complement \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedStreamByteTest.class/instance/integerEncodingSpec.st b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedStreamByteTest.class/instance/integerEncodingSpec.st new file mode 100644 index 000000000..71d3173a1 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedStreamByteTest.class/instance/integerEncodingSpec.st @@ -0,0 +1,58 @@ +accessing +integerEncodingSpec + ^ #( +" unsigned|signed big-endian|little-endian" +('00' 0 u be) +('00' 0 s be) +('01' 1 u be) +('01' 1 s be) +('FF' -1 s be) +('FF' 255 u be) +('7B' 123 u be) +('7B' 123 s be) +('85' -123 s be) +('7F' 127 u be) +('7F' 127 s be) +('80' -128 s be) +('00' 0 u le) +('00' 0 s le) +('01' 1 u le) +('01' 1 s le) +('FF' -1 s le) +('FF' 255 u le) +('7B' 123 u le) +('7B' 123 s le) +('85' -123 s le) +('7F' 127 u le) +('7F' 127 s le) +('80' -128 s le) +('00000000' 0 u be) +('00000000' 0 s be) +('00000000' 0 u le) +('00000000' 0 s le) +('00000001' 1 u be) +('00000001' 1 s be) +('01000000' 1 u le) +('01000000' 1 s le) +('FFFFFFFF' -1 s be) +('FFFFFFFF' -1 s le) +('000004D2' 1234 u be) +('000004D2' 1234 s be) +('FFFFFB2E' -1234 s be) +('D2040000' 1234 u le) +('D2040000' 1234 s le) +('2EFBFFFF' -1234 s le) +('FFFFFFFF' 4294967295 u be) +('FFFFFFFF' 4294967295 u le) +('7FFFFFFF' 2147483647 u be) +('7FFFFFFF' 2147483647 s be) +('80000000' -2147483648 s be) +('FFFFFF7F' 2147483647 s le) +('00000080' -2147483648 s le) +('499602D2' 1234567890 u be) +('499602D2' 1234567890 s be) +('B669FD2E' -1234567890 s be) +('D2029649' 1234567890 u le) +('D2029649' 1234567890 s le) +('2EFD69B6' -1234567890 s le) +) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedStreamByteTest.class/instance/testInt16Aliases.st b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedStreamByteTest.class/instance/testInt16Aliases.st new file mode 100644 index 000000000..5d8ea3c31 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedStreamByteTest.class/instance/testInt16Aliases.st @@ -0,0 +1,20 @@ +tests +testInt16Aliases + | input writer | + writer := [ :block | + ByteArray streamContents: [ :out | + ZnBufferedWriteStream on: out do: block ] ]. + input := ByteArray readHexFrom: '04D2'. + self assert: (ZnBufferedReadStream on: input readStream) int16 equals: 1234. + self assert: (ZnBufferedReadStream on: input readStream) uint16 equals: 1234. + self assert: (ZnBufferedReadStream on: input readStream) nextWord equals: 1234. + self assert: ((ZnBufferedReadStream on: input readStream) nextNumber: 2) equals: 1234. + self assert: ((ZnBufferedReadStream on: input reversed readStream) nextLittleEndianNumber: 2) equals: 1234. + self assert: (writer value: [ :out | out int16: 1234 ]) equals: input. + self assert: (writer value: [ :out | out uint16: 1234 ]) equals: input. + self assert: (writer value: [ :out | out nextWordPut: 1234 ]) equals: input. + self assert: (writer value: [ :out | out nextNumber: 2 put: 1234 ]) equals: input. + self assert: (writer value: [ :out | out nextLittleEndianNumber: 2 put: 1234 ]) equals: input reversed. + input := ByteArray readHexFrom: 'FB2E'. + self assert: (ZnBufferedReadStream on: input readStream) int16 equals: -1234. + self assert: (writer value: [ :out | out int16: -1234 ]) equals: input \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedStreamByteTest.class/instance/testInt32Aliases.st b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedStreamByteTest.class/instance/testInt32Aliases.st new file mode 100644 index 000000000..cdb5f4484 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedStreamByteTest.class/instance/testInt32Aliases.st @@ -0,0 +1,22 @@ +tests +testInt32Aliases + | input writer | + writer := [ :block | + ByteArray streamContents: [ :out | + ZnBufferedWriteStream on: out do: block ] ]. + input := ByteArray readHexFrom: '499602D2'. + self assert: (ZnBufferedReadStream on: input readStream) int32 equals: 1234567890. + self assert: (ZnBufferedReadStream on: input readStream) uint32 equals: 1234567890. + self assert: (ZnBufferedReadStream on: input readStream) nextInt32 equals: 1234567890. + self assert: ((ZnBufferedReadStream on: input readStream) nextNumber: 4) equals: 1234567890. + self assert: ((ZnBufferedReadStream on: input reversed readStream) nextLittleEndianNumber: 4) equals: 1234567890. + self assert: (writer value: [ :out | out int32: 1234567890 ]) equals: input. + self assert: (writer value: [ :out | out uint32: 1234567890 ]) equals: input. + self assert: (writer value: [ :out | out nextInt32Put: 1234567890 ]) equals: input. + self assert: (writer value: [ :out | out nextNumber: 4 put: 1234567890 ]) equals: input. + self assert: (writer value: [ :out | out nextLittleEndianNumber: 4 put: 1234567890 ]) equals: input reversed. + input := ByteArray readHexFrom: 'B669FD2E'. + self assert: (ZnBufferedReadStream on: input readStream) int32 equals: -1234567890. + self assert: (ZnBufferedReadStream on: input readStream) nextInt32 equals: -1234567890. + self assert: (writer value: [ :out | out int32: -1234567890 ]) equals: input. + self assert: (writer value: [ :out | out nextInt32Put: -1234567890 ]) equals: input \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedStreamByteTest.class/instance/testInt8.st b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedStreamByteTest.class/instance/testInt8.st new file mode 100644 index 000000000..e78fd9bf1 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedStreamByteTest.class/instance/testInt8.st @@ -0,0 +1,14 @@ +tests +testInt8 + | bytes readStream | + bytes := ByteArray streamContents: [ :out | + ZnBufferedWriteStream on: out do: [ :bout | + bout int8: 123; uint8: 123; int8: -123 ] ]. + readStream := ZnBufferedReadStream on: bytes readStream. + self assert: readStream peek equals: 123. + self assert: readStream int8 equals: 123. + self assert: readStream peek equals: 123. + self assert: readStream uint8 equals: 123. + self deny: readStream peek equals: 123. + self deny: readStream peek equals: -123. + self assert: readStream int8 equals: -123 \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedStreamByteTest.class/instance/testNextIntegerOfSizeSignedBigEndian.st b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedStreamByteTest.class/instance/testNextIntegerOfSizeSignedBigEndian.st new file mode 100644 index 000000000..edfd1acca --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedStreamByteTest.class/instance/testNextIntegerOfSizeSignedBigEndian.st @@ -0,0 +1,10 @@ +tests +testNextIntegerOfSizeSignedBigEndian + self integerEncodingSpec do: [ :spec | + | input integer | + input := ByteArray readHexFrom: spec first. + integer := (ZnBufferedReadStream on: input readStream) + nextIntegerOfSize: input + size signed: spec third = #s + bigEndian: spec fourth = #be. + self assert: integer equals: spec second ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedStreamByteTest.class/instance/testNextIntegerOfSizeSignedBigEndianPut.st b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedStreamByteTest.class/instance/testNextIntegerOfSizeSignedBigEndianPut.st new file mode 100644 index 000000000..974d7df10 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedStreamByteTest.class/instance/testNextIntegerOfSizeSignedBigEndianPut.st @@ -0,0 +1,13 @@ +tests +testNextIntegerOfSizeSignedBigEndianPut + self integerEncodingSpec do: [ :spec | + | input output | + input := ByteArray readHexFrom: spec first. + output := ByteArray streamContents: [ :out | + ZnBufferedWriteStream on: out do: [ :bout | + bout + nextIntegerOfSize: input size + signed: spec third = #s + bigEndian: spec fourth = #be + put: spec second ] ]. + self assert: output equals: input ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedStreamByteTest.class/properties.json b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedStreamByteTest.class/properties.json new file mode 100644 index 000000000..1e9f44209 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedStreamByteTest.class/properties.json @@ -0,0 +1,11 @@ +{ + "commentStamp" : "", + "super" : "TestCase", + "category" : "Zinc-Character-Encoding-Tests", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "ZnBufferedStreamByteTest", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Zinc-HTTP.package/HTTPProgress.class/README.md b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedWriteStreamTest.class/README.md similarity index 100% rename from repository/Zinc-HTTP.package/HTTPProgress.class/README.md rename to repository/Zinc-Character-Encoding-Tests.package/ZnBufferedWriteStreamTest.class/README.md diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedWriteStreamTest.class/instance/testNextPutAllStartingAt.st b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedWriteStreamTest.class/instance/testNextPutAllStartingAt.st new file mode 100644 index 000000000..092c295fa --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedWriteStreamTest.class/instance/testNextPutAllStartingAt.st @@ -0,0 +1,11 @@ +tests +testNextPutAllStartingAt + | string | + string := String streamContents: [ :stringStream | + ZnBufferedWriteStream on: stringStream do: [ : bufferedStream | + bufferedStream sizeBuffer: 8. + bufferedStream next: 5 putAll: '--012345--' startingAt: 3. + bufferedStream next: 5 putAll: '0123456789XX' startingAt: 6. + bufferedStream next: 5 putAll: '--012345--' startingAt: 3. + bufferedStream next: 5 putAll: '0123456789XX' startingAt: 6.] ]. + self assert: string equals: '01234567890123456789' \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedWriteStreamTest.class/instance/testWriting.st b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedWriteStreamTest.class/instance/testWriting.st new file mode 100644 index 000000000..d55ed9d76 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedWriteStreamTest.class/instance/testWriting.st @@ -0,0 +1,9 @@ +tests +testWriting + | string | + string := String streamContents: [ :stringStream | + | bufferedStream | + bufferedStream := ZnBufferedWriteStream on: stringStream. + 0 to: 9 do: [ :each | bufferedStream nextPut: (Character digitValue: each) ]. + bufferedStream flush ]. + self assert: string = '0123456789' diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedWriteStreamTest.class/instance/testWritingOverflow.st b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedWriteStreamTest.class/instance/testWritingOverflow.st new file mode 100644 index 000000000..ede16dbff --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedWriteStreamTest.class/instance/testWritingOverflow.st @@ -0,0 +1,11 @@ +tests +testWritingOverflow + | string | + string := String streamContents: [ :stringStream | | bufferedStream | + bufferedStream := ZnBufferedWriteStream on: stringStream. + bufferedStream sizeBuffer: 8. + 0 to: 9 do: [ :each | bufferedStream nextPut: (Character digitValue: each) ]. + bufferedStream nextPutAll: '0123'; nextPutAll: '4567'; nextPutAll: '89'. + bufferedStream nextPutAll: '0123456789'; nextPutAll: '0123456789'. + bufferedStream flush ]. + self assert: string equals: '0123456789012345678901234567890123456789' \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedWriteStreamTest.class/instance/testWritingReset.st b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedWriteStreamTest.class/instance/testWritingReset.st new file mode 100644 index 000000000..d330e36ba --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedWriteStreamTest.class/instance/testWritingReset.st @@ -0,0 +1,15 @@ +tests +testWritingReset + + | file writeStream readStream | + file := 'test.txt' asFileReference ensureCreateFile. + + writeStream := file binaryWriteStream. + writeStream nextPutAll: 'towertalk'. + writeStream reset. + writeStream nextPutAll: 'small'. + writeStream close. + + readStream := file readStream. + self assert: readStream contents equals: 'smalltalk'. + file ensureDelete \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedWriteStreamTest.class/instance/testWritingResetWithBinaryRead.st b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedWriteStreamTest.class/instance/testWritingResetWithBinaryRead.st new file mode 100644 index 000000000..374151747 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedWriteStreamTest.class/instance/testWritingResetWithBinaryRead.st @@ -0,0 +1,15 @@ +tests +testWritingResetWithBinaryRead + + | file writeStream readStream | + file := 'test.txt' asFileReference ensureCreateFile. + + writeStream := file binaryWriteStream. + writeStream nextPutAll: 'towertalk'. + writeStream reset. + writeStream nextPutAll: 'small'. + writeStream close. + + readStream := file binaryReadStream. + self assert: readStream contents equals: 'smalltalk'. + file ensureDelete \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedWriteStreamTest.class/properties.json b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedWriteStreamTest.class/properties.json new file mode 100644 index 000000000..b20981661 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedWriteStreamTest.class/properties.json @@ -0,0 +1,11 @@ +{ + "commentStamp" : "", + "super" : "TestCase", + "category" : "Zinc-Character-Encoding-Tests", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "ZnBufferedWriteStreamTest", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedWriteStreamTests.class/instance/testNextPutAllStartingAt.st b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedWriteStreamTests.class/instance/testNextPutAllStartingAt.st deleted file mode 100644 index c3ca9e4bd..000000000 --- a/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedWriteStreamTests.class/instance/testNextPutAllStartingAt.st +++ /dev/null @@ -1,11 +0,0 @@ -testing -testNextPutAllStartingAt - | string | - string := String streamContents: [ :stringStream | - ZnBufferedWriteStream on: stringStream do: [ : bufferedStream | - bufferedStream sizeBuffer: 8. - bufferedStream next: 5 putAll: '--012345--' startingAt: 3. - bufferedStream next: 5 putAll: '0123456789XX' startingAt: 6. - bufferedStream next: 5 putAll: '--012345--' startingAt: 3. - bufferedStream next: 5 putAll: '0123456789XX' startingAt: 6.] ]. - self assert: string equals: '01234567890123456789' \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedWriteStreamTests.class/instance/testWriting.st b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedWriteStreamTests.class/instance/testWriting.st deleted file mode 100644 index beba3aee7..000000000 --- a/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedWriteStreamTests.class/instance/testWriting.st +++ /dev/null @@ -1,10 +0,0 @@ -testing -testWriting - | string | - string := String - streamContents: [ :stringStream | - | bufferedStream | - bufferedStream := ZnBufferedWriteStream on: stringStream. - 0 to: 9 do: [ :each | bufferedStream nextPut: (Character digitValue: each) ]. - bufferedStream flush ]. - self assert: string = '0123456789' \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedWriteStreamTests.class/instance/testWritingOverflow.st b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedWriteStreamTests.class/instance/testWritingOverflow.st deleted file mode 100644 index 9c4d64a57..000000000 --- a/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedWriteStreamTests.class/instance/testWritingOverflow.st +++ /dev/null @@ -1,11 +0,0 @@ -testing -testWritingOverflow - | string | - string := String streamContents: [ :stringStream | | bufferedStream | - bufferedStream := ZnBufferedWriteStream on: stringStream. - bufferedStream sizeBuffer: 8. - 0 to: 9 do: [ :each | bufferedStream nextPut: (Character digitValue: each) ]. - bufferedStream nextPutAll: '0123'; nextPutAll: '4567'; nextPutAll: '89'. - bufferedStream nextPutAll: '0123456789'; nextPutAll: '0123456789'. - bufferedStream flush ]. - self assert: string = '0123456789012345678901234567890123456789' \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedWriteStreamTests.class/methodProperties.json b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedWriteStreamTests.class/methodProperties.json deleted file mode 100644 index 4001c723c..000000000 --- a/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedWriteStreamTests.class/methodProperties.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "class" : { - }, - "instance" : { - "testNextPutAllStartingAt" : "SvenVanCaekenberghe 11/30/2012 21:08", - "testWriting" : "dkh 06/29/2014 15:45", - "testWritingOverflow" : "SvenVanCaekenberghe 12/8/2010 09:53" } } diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedWriteStreamTests.class/properties.json b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedWriteStreamTests.class/properties.json deleted file mode 100644 index ab10f4029..000000000 --- a/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedWriteStreamTests.class/properties.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "category" : "Zinc-Character-Encoding-Tests", - "classinstvars" : [ - ], - "classvars" : [ - ], - "commentStamp" : "", - "instvars" : [ - ], - "name" : "ZnBufferedWriteStreamTests", - "pools" : [ - ], - "super" : "TestCase", - "type" : "normal" } diff --git a/repository/Zinc-HTTP.package/KeyNotFound.class/README.md b/repository/Zinc-Character-Encoding-Tests.package/ZnCRLFReadStreamTest.class/README.md similarity index 100% rename from repository/Zinc-HTTP.package/KeyNotFound.class/README.md rename to repository/Zinc-Character-Encoding-Tests.package/ZnCRLFReadStreamTest.class/README.md diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnCRLFReadStreamTest.class/instance/testBasicStream.st b/repository/Zinc-Character-Encoding-Tests.package/ZnCRLFReadStreamTest.class/instance/testBasicStream.st new file mode 100644 index 000000000..6e442371b --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnCRLFReadStreamTest.class/instance/testBasicStream.st @@ -0,0 +1,25 @@ +tests +testBasicStream + + | lines input output | + + lines := #('Line 1' 'Line 2' 'Line 3'). + input := String streamContents: [ :stream | + stream + << lines first; + << String cr; + << lines second; + << String lf; + << lines third; + << String crlf ]. + output := String streamContents: [ :stream | + stream + << lines first; + << String crlf; + << lines second; + << String crlf; + << lines third; + << String crlf ]. + self + assert: (ZnCRLFReadStream on: input asByteArray readStream) upToEnd + equals: output asByteArray \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnCRLFReadStreamTest.class/instance/testDoubleEnding.st b/repository/Zinc-Character-Encoding-Tests.package/ZnCRLFReadStreamTest.class/instance/testDoubleEnding.st new file mode 100644 index 000000000..f056eae9a --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnCRLFReadStreamTest.class/instance/testDoubleEnding.st @@ -0,0 +1,31 @@ +tests +testDoubleEnding + + | lines input output | + + lines := #('Line 1' 'Line 2' 'Line 3'). + input := String streamContents: [ :stream | + stream + << lines first; + << String cr; + << String cr; + << lines second; + << String lf; + << String lf; + << lines third; + << String crlf; + << String crlf ]. + output := String streamContents: [ :stream | + stream + << lines first; + << String crlf; + << String crlf; + << lines second; + << String crlf; + << String crlf; + << lines third; + << String crlf; + << String crlf ]. + self + assert: (ZnCRLFReadStream on: input asByteArray readStream) upToEnd + equals: output asByteArray \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnCRLFReadStreamTest.class/instance/testPeek.st b/repository/Zinc-Character-Encoding-Tests.package/ZnCRLFReadStreamTest.class/instance/testPeek.st new file mode 100644 index 000000000..4097911ba --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnCRLFReadStreamTest.class/instance/testPeek.st @@ -0,0 +1,35 @@ +tests +testPeek + + | input stream | + + input := String streamContents: [ :str | + str + << 'a'; + << String cr; + << 'b'; + << String lf; + << 'c'; + << String crlf ]. + stream := ZnCRLFReadStream on: input asByteArray readStream. + self + assert: stream peek + equals: $a asInteger. + self + assert: stream next + equals: $a asInteger. + self + assert: stream next + equals: Character cr asInteger. + self + assert: stream peek + equals: Character lf asInteger. + self + assert: stream next + equals: Character lf asInteger. + self + assert: stream peek + equals: $b asInteger. + self + assert: stream next + equals: $b asInteger \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnCRLFReadStreamTest.class/properties.json b/repository/Zinc-Character-Encoding-Tests.package/ZnCRLFReadStreamTest.class/properties.json new file mode 100644 index 000000000..136ceaac9 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnCRLFReadStreamTest.class/properties.json @@ -0,0 +1,11 @@ +{ + "commentStamp" : "", + "super" : "TestCase", + "category" : "Zinc-Character-Encoding-Tests", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "ZnCRLFReadStreamTest", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Zinc-HTTP.package/NotFound.class/README.md b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTest.class/README.md similarity index 100% rename from repository/Zinc-HTTP.package/NotFound.class/README.md rename to repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTest.class/README.md diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTest.class/class/asciiCharacterSource.st b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTest.class/class/asciiCharacterSource.st new file mode 100644 index 000000000..fa05c9513 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTest.class/class/asciiCharacterSource.st @@ -0,0 +1,3 @@ +accessing +asciiCharacterSource + ^ ($A to: $Z), ($a to: $z), ($0 to: $9), '.-_/*+=|,;?!$&<>^%#', ' ' \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTest.class/class/latin1CharacterSource.st b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTest.class/class/latin1CharacterSource.st new file mode 100644 index 000000000..fb84ba5cc --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTest.class/class/latin1CharacterSource.st @@ -0,0 +1,3 @@ +accessing +latin1CharacterSource + ^ ($A to: $Z), ($a to: $z), ($0 to: $9), '.-_/*+=|,;?!$&<>^%#', ' ', 'éèçüäßñ' \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTest.class/class/stringOfSize.fromSource..st b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTest.class/class/stringOfSize.fromSource..st new file mode 100644 index 000000000..f7906f7a6 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTest.class/class/stringOfSize.fromSource..st @@ -0,0 +1,6 @@ +accessing +stringOfSize: size fromSource: source + "self stringOfSize: 1024 fromSource: self unicodeCharacterSource" + + ^ String new: size streamContents: [ :out | + size timesRepeat: [ out nextPut: source atRandom ] ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTest.class/class/unicodeCharacterSource.st b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTest.class/class/unicodeCharacterSource.st new file mode 100644 index 000000000..7b26323e0 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTest.class/class/unicodeCharacterSource.st @@ -0,0 +1,3 @@ +accessing +unicodeCharacterSource + ^ ($A to: $Z), ($a to: $z), ($0 to: $9), '.-_/*+=|,;?!$&<>^%#', ' ', 'éèçüäßñα', '€∏' \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTests.class/instance/decodeBytes.with..st b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTest.class/instance/decodeBytes.with..st similarity index 78% rename from repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTests.class/instance/decodeBytes.with..st rename to repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTest.class/instance/decodeBytes.with..st index aa78dcb40..3a636e724 100644 --- a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTests.class/instance/decodeBytes.with..st +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTest.class/instance/decodeBytes.with..st @@ -1,7 +1,7 @@ -private +test support decodeBytes: bytes with: encoder | input | input := bytes readStream. ^ String streamContents: [ :stream | - [ input atEnd ] whileFalse: [ + [ input atEnd ] whileFalse: [ stream nextPut: (encoder nextFromStream: input) ] ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTests.class/instance/encodeString.with..st b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTest.class/instance/encodeString.with..st similarity index 91% rename from repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTests.class/instance/encodeString.with..st rename to repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTest.class/instance/encodeString.with..st index f3fdc2c52..36010dfd5 100644 --- a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTests.class/instance/encodeString.with..st +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTest.class/instance/encodeString.with..st @@ -1,4 +1,4 @@ -private +test support encodeString: string with: encoder ^ ByteArray streamContents: [ :stream | string do: [ :each | diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTest.class/instance/testByteEncoderFromUrl.st b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTest.class/instance/testByteEncoderFromUrl.st new file mode 100644 index 000000000..d77206090 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTest.class/instance/testByteEncoderFromUrl.st @@ -0,0 +1,18 @@ +testing +testByteEncoderFromUrl + | encoderFromUrl iso88592 bytes characters | + + encoderFromUrl := ZnByteEncoder newFromUrl: 'http://files.pharo.org/extra/unicode/8859-2.TXT'. + iso88592 := (Smalltalk includesKey: #'ZnCharacterEncoderGS') + ifTrue: [ ZnCharacterEncoderGS newForEncoding: #'iso88592' ] "GemStone version" + ifFalse: [ ZnCharacterEncoder newForEncoding: #iso88592 ]. "Pharo version" + self assert: encoderFromUrl byteDomain equals: iso88592 byteDomain. + self assert: encoderFromUrl characterDomain equals: iso88592 characterDomain. + bytes := encoderFromUrl byteDomain. + self + assert: (encoderFromUrl decodeBytes: bytes) + equals: (iso88592 decodeBytes: bytes). + characters := String withAll: encoderFromUrl characterDomain asArray. + self + assert: (encoderFromUrl encodeString: characters) + equals: (iso88592 encodeString: characters) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTest.class/instance/testLossyUTF8Random.st b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTest.class/instance/testLossyUTF8Random.st new file mode 100644 index 000000000..6f2f5c218 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTest.class/instance/testLossyUTF8Random.st @@ -0,0 +1,6 @@ +testing +testLossyUTF8Random + | bytes string | + bytes := ((1 to: 10000) collect: [ :_ | 256 atRandom - 1 ]) asByteArray. + string := bytes decodeWith: ZnLossyUTF8Encoder new. + self assert: string isString \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTest.class/instance/testNullEncoder.st b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTest.class/instance/testNullEncoder.st new file mode 100644 index 000000000..189f6e6cf --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTest.class/instance/testNullEncoder.st @@ -0,0 +1,9 @@ +testing +testNullEncoder + + | encoder bytes string | + encoder := ZnNullEncoder new. + bytes := self encodeString: 'abc' with: encoder. + self assert: bytes equals: #( 97 98 99 ) asByteArray. + string := self decodeBytes: #( 65 66 67 ) asByteArray with: encoder. + self assert: string equals: 'ABC' \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTest.class/instance/testUTF16Back.st b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTest.class/instance/testUTF16Back.st new file mode 100644 index 000000000..a6c59bb77 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTest.class/instance/testUTF16Back.st @@ -0,0 +1,13 @@ +testing +testUTF16Back + | encoder stream | + encoder := ZnUTF16Encoder new. + stream := (encoder encodeString: 'Les élèves Françaises') readStream. + self should: [ encoder backOnStream: stream ] raise: Error. + 4 timesRepeat: [ encoder nextFromStream: stream ]. + self assert: (encoder nextFromStream: stream) equals: $é. + encoder backOnStream: stream. + self assert: (encoder nextFromStream: stream) equals: $é. + 10 timesRepeat: [ encoder nextFromStream: stream ]. + 13 timesRepeat: [ encoder backOnStream: stream ]. + self assert: (encoder nextFromStream: stream) equals: $s \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTest.class/instance/testUTF16EncoderBigEndian.st b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTest.class/instance/testUTF16EncoderBigEndian.st new file mode 100644 index 000000000..a21dd4732 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTest.class/instance/testUTF16EncoderBigEndian.st @@ -0,0 +1,10 @@ +testing +testUTF16EncoderBigEndian + | string bytes encoder | + string := 'élève en Français'. + bytes := ByteArray readHexFrom: + '00E9006C00E80076006500200065006E0020004600720061006E00E7006100690073'. + encoder := ZnUTF16Encoder new. + self assert: encoder isBigEndian. + self assert: (encoder encodeString: string) equals: bytes. + self assert: (encoder decodeBytes: bytes) equals: string \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTest.class/instance/testUTF16EncoderByteOrderMark.st b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTest.class/instance/testUTF16EncoderByteOrderMark.st new file mode 100644 index 000000000..0b4c8cc4c --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTest.class/instance/testUTF16EncoderByteOrderMark.st @@ -0,0 +1,19 @@ +testing +testUTF16EncoderByteOrderMark + | string bytes encoder encoded | + string := 'foo'. + bytes := ByteArray readHexFrom: 'FEFF0066006f006f'. + encoder := ZnUTF16Encoder new. + self assert: encoder isBigEndian. + encoded := ByteArray streamContents: [ :out | + encoder nextPutByteOrderMarkToStream: out. + encoder next: string size putAll: string startingAt: 1 toStream: out ]. + self assert: encoded equals: bytes. + self assert: (encoder decodeBytes: bytes) equals: string. + encoder beLittleEndian. + self assert: encoder isLittleEndian. + self assert: (encoder decodeBytes: bytes) equals: string. + self assert: encoder isBigEndian. + 1 to: bytes size by: 2 do: [ :each | bytes swap: each with: each + 1 ]. + self assert: (encoder decodeBytes: bytes) equals: string. + self assert: encoder isLittleEndian \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTest.class/instance/testUTF16EncoderLittleEndian.st b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTest.class/instance/testUTF16EncoderLittleEndian.st new file mode 100644 index 000000000..27311b61e --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTest.class/instance/testUTF16EncoderLittleEndian.st @@ -0,0 +1,11 @@ +testing +testUTF16EncoderLittleEndian + | string bytes encoder | + string := 'élève en Français'. + bytes := ByteArray readHexFrom: + 'E9006C00E80076006500200065006E0020004600720061006E00E700610069007300'. + encoder := ZnUTF16Encoder new. + encoder beLittleEndian. + self assert: encoder isLittleEndian. + self assert: (encoder encodeString: string) equals: bytes. + self assert: (encoder decodeBytes: bytes) equals: string \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTest.class/instance/testUTF16EncoderWide1.st b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTest.class/instance/testUTF16EncoderWide1.st new file mode 100644 index 000000000..9dc545c23 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTest.class/instance/testUTF16EncoderWide1.st @@ -0,0 +1,9 @@ +testing +testUTF16EncoderWide1 + | string bytes encoder | + string := (Character codePoint: 16r1d11e) asString. "MUSICAL SYMBOL G CLEF" + bytes := ByteArray readHexFrom: 'D834DD1E'. + encoder := ZnUTF16Encoder new. + self assert: encoder isBigEndian. + self assert: (encoder encodeString: string) equals: bytes. + self assert: (encoder decodeBytes: bytes) equals: string \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTest.class/instance/testUTF32EncoderWide.st b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTest.class/instance/testUTF32EncoderWide.st new file mode 100644 index 000000000..78383c391 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTest.class/instance/testUTF32EncoderWide.st @@ -0,0 +1,13 @@ +testing +testUTF32EncoderWide + | encoder | + encoder := ZnUTF32Encoder new. + { + 'abc'. + 'élève en Français'. + 'Pra-ská' copy at: 4 put: (Character value: 382); yourself. + (Character codePoint: 16r1d11e) asString. "MUSICAL SYMBOL G CLEF" + '' } do: [ :each | + | bytes | + bytes := self encodeString: each with: encoder. + self assert: (encoder decodeBytesIntoWideString: bytes) equals: each ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTest.class/instance/testUTF8EncoderRandom.st b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTest.class/instance/testUTF8EncoderRandom.st new file mode 100644 index 000000000..185a3c5d9 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTest.class/instance/testUTF8EncoderRandom.st @@ -0,0 +1,8 @@ +testing +testUTF8EncoderRandom + #(unicodeCharacterSource latin1CharacterSource asciiCharacterSource) do: [ :source | + | string bytes result | + string := self class stringOfSize: 256 fromSource: source. + bytes := string utf8Encoded. + result := bytes utf8Decoded. + self assert: result equals: string ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTest.class/instance/testUTF8ReadFaultyInput.st b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTest.class/instance/testUTF8ReadFaultyInput.st new file mode 100644 index 000000000..2ee2c2fb0 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTest.class/instance/testUTF8ReadFaultyInput.st @@ -0,0 +1,30 @@ +testing +testUTF8ReadFaultyInput + "Although not recommended, it is possible to read faulty UTF-8 encoded input by resuming ZnInvalidUTF8" + + "illegal leading byte" + self + should: [ #[102 111 111 160 102 111 111] utf8Decoded ] + raise: ZnInvalidUTF8. + self + assert: ([ #[102 111 111 160 102 111 111] utf8Decoded ] on: ZnInvalidUTF8 do: [ :exception | exception resume ]) + equals: 'foo?foo'. + self + assert: ([ #[102 111 111 160 102 111 111] utf8Decoded ] on: ZnInvalidUTF8 do: [ :exception | exception resume: $_ codePoint ]) + equals: 'foo_foo'. + + "illegal continuation byte" + self + should: [ #[102 111 111 195 0 102 111 111] utf8Decoded ] + raise: ZnInvalidUTF8. + self + assert: ([ #[102 111 111 195 0 102 111 111] utf8Decoded ] on: ZnInvalidUTF8 do: [ :exception | exception resume ]) + equals: 'foo?foo'. + + "incomplete input" + self + should: [ #[102 111 111 195 ] utf8Decoded ] + raise: ZnIncomplete. + self + assert: ([ #[102 111 111 195 ] utf8Decoded ] on: ZnInvalidUTF8 , ZnIncomplete do: [ :exception | exception resume ]) + equals: 'foo?' \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTest.class/properties.json b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTest.class/properties.json new file mode 100644 index 000000000..b91361180 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTest.class/properties.json @@ -0,0 +1,11 @@ +{ + "commentStamp" : "", + "super" : "TestCase", + "category" : "Zinc-Character-Encoding-Tests", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "ZnCharacterEncoderTest", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTests.class/instance/testBeLenient.st b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTests.class/instance/testBeLenient.st deleted file mode 100644 index 7c381aa88..000000000 --- a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTests.class/instance/testBeLenient.st +++ /dev/null @@ -1,10 +0,0 @@ -testing -testBeLenient - | encoder unmapped | - encoder := ZnCharacterEncoder newForEncoding: 'iso-8859-1'. - unmapped := (128 to: 159) asByteArray. - self should: [ encoder encodeString: unmapped asString ] raise: ZnCharacterEncodingError. - self should: [ encoder decodeBytes: unmapped ] raise: ZnCharacterEncodingError. - encoder beLenient. - self assert: (encoder encodeString: unmapped asString) equals: unmapped. - self assert: (encoder decodeBytes: unmapped) equals: unmapped asString. \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTests.class/instance/testConvencienceMethods.st b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTests.class/instance/testConvencienceMethods.st deleted file mode 100644 index 838c461ed..000000000 --- a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTests.class/instance/testConvencienceMethods.st +++ /dev/null @@ -1,10 +0,0 @@ -testing -testConvencienceMethods - | encoder string | - encoder := ZnUTF8Encoder new. - string := 'élève en Français'. - self assert: (encoder decodeBytes: (encoder encodeString: string)) equals: string. - self assert: (encoder encodedByteCountForString: string) = 20. - - #( 'ccc' 'ççç' 'c' 'ç' 'çc' 'cç' ) do: [ :each | - self assert: (encoder decodeBytes: (encoder encodeString: each)) equals: each ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTests.class/instance/testLatin1Encoder.st b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTests.class/instance/testLatin1Encoder.st deleted file mode 100644 index 5af2d202d..000000000 --- a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTests.class/instance/testLatin1Encoder.st +++ /dev/null @@ -1,8 +0,0 @@ -testing -testLatin1Encoder - | encoder string bytes | - encoder := ZnCharacterEncoder newForEncoding: 'latin1'. - string := 'élève en Français'. - bytes := #(233 108 232 118 101 32 101 110 32 70 114 97 110 231 97 105 115) asByteArray. - self assert: (encoder encodeString: string) equals: bytes. - self assert: (encoder decodeBytes: bytes) equals: string \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTests.class/instance/testLatin2Encoder.st b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTests.class/instance/testLatin2Encoder.st deleted file mode 100644 index 970071372..000000000 --- a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTests.class/instance/testLatin2Encoder.st +++ /dev/null @@ -1,14 +0,0 @@ -testing -testLatin2Encoder - "Example characters taken from http://en.wikipedia.org/wiki/Latin2" - - | encoder inputBytes outputBytes inputString outputString | - encoder := ZnCharacterEncoder newForEncoding: 'latin2'. - inputString := String - with: (16r0154 asCharacter) with: (16r0110 asCharacter) - with: ( 16r0155 asCharacter) with: (16r0111 asCharacter). - inputBytes := #(192 208 224 240) asByteArray. - outputBytes := self encodeString: inputString with: encoder. - self assert: outputBytes = inputBytes. - outputString := self decodeBytes: inputBytes with: encoder. - self assert: outputString = inputString \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTests.class/instance/testNextPutAllStartingAtToStream.st b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTests.class/instance/testNextPutAllStartingAtToStream.st deleted file mode 100644 index 7c11b1790..000000000 --- a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTests.class/instance/testNextPutAllStartingAtToStream.st +++ /dev/null @@ -1,20 +0,0 @@ -testing -testNextPutAllStartingAtToStream - | encoder | - encoder := ZnUTF8Encoder new. - #('ccc' 'ççç' 'c' 'ç' 'çc' 'cç' 'çç') - do: [ :each | - #(#('' '') #('ABC' '') #('' 'ABC') #('ABC' 'ABC') #('AéC' '') #('' 'AèC') #('AéC' 'AèC') #('AXC' 'AèC') #('AéC' 'AXC') #('PRE' 'ç')) - do: [ :extra | - | prefix postfix string bytes | - prefix := extra first. - postfix := extra last. - string := prefix , each , postfix. - bytes := ByteArray - streamContents: [ :out | - encoder - next: each size - putAll: string - startingAt: prefix size + 1 - toStream: out ]. - self assert: (encoder decodeBytes: bytes) equals: each ] ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTests.class/instance/testNullEncoder.st b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTests.class/instance/testNullEncoder.st deleted file mode 100644 index dbc8ab9e8..000000000 --- a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTests.class/instance/testNullEncoder.st +++ /dev/null @@ -1,8 +0,0 @@ -testing -testNullEncoder - | encoder bytes string | - encoder := ZnNullEncoder new. - bytes := self encodeString: 'abc' with: encoder. - self assert: bytes = #(97 98 99) asByteArray. - string := self decodeBytes: #(65 66 67) asByteArray with: encoder. - self assert: string = 'ABC' \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTests.class/instance/testReadIntoStartingAtCountFromStream.st b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTests.class/instance/testReadIntoStartingAtCountFromStream.st deleted file mode 100644 index fb1509a5a..000000000 --- a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTests.class/instance/testReadIntoStartingAtCountFromStream.st +++ /dev/null @@ -1,17 +0,0 @@ -testing -testReadIntoStartingAtCountFromStream - | encoder | - encoder := ZnUTF8Encoder new. - #( 'ccc' 'ççç' 'c' 'ç' 'çc' 'cç' 'çç' ) do: [ :each | - #( ( '' '' ) ( 'ABC' '' ) ( '' 'ABC' ) ( 'ABC' 'ABC' ) - ( 'AéC' '' ) ( '' 'AèC' ) ( 'AéC' 'AèC' ) - ( 'AXC' 'AèC' ) ( 'AéC' 'AXC' ) - ( 'PRE' 'ç' ) ) do: [ :extra | - | prefix postfix string bytes buffer | - prefix := extra first. - postfix := extra last. - string := prefix, each. - bytes := encoder encodeString: string, postfix. - buffer := String new: string size. - encoder readInto: buffer startingAt: 1 count: string size fromStream: bytes readStream. - self assert: buffer equals: string ] ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTests.class/instance/testReadIntoStartingAtCountFromStreamWide.st b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTests.class/instance/testReadIntoStartingAtCountFromStreamWide.st deleted file mode 100644 index 7da15932a..000000000 --- a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTests.class/instance/testReadIntoStartingAtCountFromStreamWide.st +++ /dev/null @@ -1,31 +0,0 @@ -testing -testReadIntoStartingAtCountFromStreamWide - | encoder | - encoder := ZnUTF8Encoder new. - {('abc' - , - (QuadByteString - withAll: - {(300 asCharacter). - (400 asCharacter). - (500 asCharacter)}) - , 'xyz')} - do: [ :each | - | bytes buffer notified | - bytes := encoder encodeString: each. - buffer := String new: each size. - notified := false. - [ - encoder - readInto: buffer - startingAt: 1 - count: each size - fromStream: bytes readStream ] - on: ZnByteStringBecameWideString - do: [ :notification | - self deny: notified. - notified := true. - buffer := notification wideString. - notification resume ]. - self deny: notified. "WideString monkey business not needed in GemStone" - self assert: buffer equals: each ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTests.class/instance/testUTF8ByteOrderMark.st b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTests.class/instance/testUTF8ByteOrderMark.st deleted file mode 100644 index 990767a7c..000000000 --- a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTests.class/instance/testUTF8ByteOrderMark.st +++ /dev/null @@ -1,11 +0,0 @@ -testing -testUTF8ByteOrderMark - "The Unicode Byte Order Mark (BOM) should be skipped." - - | bom string bytes encoder decoded | - encoder := ZnUTF8Encoder new. - bom := #[239 187 191]. - string := 'élève en Français'. - bytes := encoder encodeString: string. - self assert: (encoder decodeBytes: bom , bytes) equals: string. - self shouldnt: [ decoded := encoder decodeBytes: bom ] raise: ZnInvalidUTF8 \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTests.class/instance/testUTF8Encoder.st b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTests.class/instance/testUTF8Encoder.st deleted file mode 100644 index 275eb85e0..000000000 --- a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTests.class/instance/testUTF8Encoder.st +++ /dev/null @@ -1,12 +0,0 @@ -testing -testUTF8Encoder - "The examples are taken from http://en.wikipedia.org/wiki/UTF-8#Description" - - | encoder inputBytes outputBytes inputString outputString | - encoder := ZnUTF8Encoder new. - inputString := String with: $$ with: (16r00A2 asCharacter) with: (16r20AC asCharacter) with: (16r024B62 asCharacter). - inputBytes := #(16r24 16rC2 16rA2 16rE2 16r82 16rAC 16rF0 16rA4 16rAD 16rA2) asByteArray. - outputBytes := self encodeString: inputString with: encoder. - self assert: outputBytes = inputBytes. - outputString := self decodeBytes: inputBytes with: encoder. - self assert: outputString = inputString \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTests.class/instance/testUTF8EncoderAuto.st b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTests.class/instance/testUTF8EncoderAuto.st deleted file mode 100644 index c9747d1d7..000000000 --- a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTests.class/instance/testUTF8EncoderAuto.st +++ /dev/null @@ -1,8 +0,0 @@ -testing -testUTF8EncoderAuto - | encoder inputString bytes outputString | - encoder := ZnUTF8Encoder new. - inputString := String withAll: ((1 to: 3072) collect: [ :each | Character value: each ]). - bytes := self encodeString: inputString with: encoder. - outputString := self decodeBytes: bytes with: encoder. - self assert: inputString = outputString \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTests.class/instance/testUTF8EncoderByteCount.st b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTests.class/instance/testUTF8EncoderByteCount.st deleted file mode 100644 index 02e5bbc7b..000000000 --- a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTests.class/instance/testUTF8EncoderByteCount.st +++ /dev/null @@ -1,8 +0,0 @@ -testing -testUTF8EncoderByteCount - | encoder | - encoder := ZnUTF8Encoder new. - self assert: (encoder encodedByteCountFor: $$) = 1. - self assert: (encoder encodedByteCountFor: (16r00A2 asCharacter)) = 2. - self assert: (encoder encodedByteCountFor: (16r20AC asCharacter)) = 3. - self assert: (encoder encodedByteCountFor: (16r024B62 asCharacter)) = 4 \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTests.class/instance/testUTF8EncoderWide.st b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTests.class/instance/testUTF8EncoderWide.st deleted file mode 100644 index 751ead97a..000000000 --- a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTests.class/instance/testUTF8EncoderWide.st +++ /dev/null @@ -1,8 +0,0 @@ -testing -testUTF8EncoderWide - | encoder | - encoder := ZnUTF8Encoder new. - { 'abc'. 'élève en Français'. 'Pra-ská' copy at: 4 put: (Character value: 382); yourself. '' } - do: [ :each | | bytes | - bytes := self encodeString: each with: encoder. - self assert: (encoder decodeBytesIntoWideString: bytes) equals: each ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTests.class/methodProperties.json b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTests.class/methodProperties.json deleted file mode 100644 index 97232254d..000000000 --- a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTests.class/methodProperties.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "class" : { - }, - "instance" : { - "decodeBytes:with:" : "SvenVanCaekenberghe 11/30/2010 11:57", - "encodeString:with:" : "SvenVanCaekenberghe 11/30/2010 11:57", - "testBeLenient" : "SvenVanCaekenberghe 12/17/2012 15:13", - "testConvencienceMethods" : "SvenVanCaekenberghe 5/22/2013 13:51", - "testLatin1Encoder" : "SvenVanCaekenberghe 12/15/2012 19:12", - "testLatin2Encoder" : "dkh 08/01/2012 14:37", - "testNextPutAllStartingAtToStream" : "dkh 06/26/2014 21:12", - "testNullEncoder" : "PaulDeBruicker 04/10/2011 10:45", - "testReadIntoStartingAtCountFromStream" : "SvenVanCaekenberghe 5/24/2013 16:22", - "testReadIntoStartingAtCountFromStreamWide" : "dkh 06/27/2014 15:32", - "testUTF8ByteOrderMark" : "dkh 04/18/2023 18:17", - "testUTF8Encoder" : "PaulDeBruicker 04/10/2011 10:44", - "testUTF8EncoderAuto" : "SvenVanCaekenberghe 11/30/2010 13:42", - "testUTF8EncoderByteCount" : "PaulDeBruicker 04/10/2011 10:44", - "testUTF8EncoderWide" : "SvenVanCaekenberghe 6/10/2013 23:12" } } diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTests.class/properties.json b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTests.class/properties.json deleted file mode 100644 index c385a5bbe..000000000 --- a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTests.class/properties.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "category" : "Zinc-Character-Encoding-Tests", - "classinstvars" : [ - ], - "classvars" : [ - ], - "commentStamp" : "", - "instvars" : [ - ], - "name" : "ZnCharacterEncoderTests", - "pools" : [ - ], - "super" : "TestCase", - "type" : "normal" } diff --git a/repository/Zinc-HTTP.package/ZnDefaultGsTransactionalServerDelegate.class/README.md b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterStreamTest.class/README.md similarity index 100% rename from repository/Zinc-HTTP.package/ZnDefaultGsTransactionalServerDelegate.class/README.md rename to repository/Zinc-Character-Encoding-Tests.package/ZnCharacterStreamTest.class/README.md diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterStreamTest.class/instance/assertUpToAll..st b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterStreamTest.class/instance/assertUpToAll..st new file mode 100644 index 000000000..d89031fb1 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterStreamTest.class/instance/assertUpToAll..st @@ -0,0 +1,6 @@ +test support +assertUpToAll: array + | utf8Stream | + utf8Stream := self utf8ReadStreamOn: array first. + self assert: (array first readStream upToAll: array second) equals: array third. + self assert: (utf8Stream upToAll: array second) equals: array third \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterStreamTest.class/instance/testNextLine.st b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterStreamTest.class/instance/testNextLine.st new file mode 100644 index 000000000..0a0d00667 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterStreamTest.class/instance/testNextLine.st @@ -0,0 +1,32 @@ +tests +testNextLine + | stream | + stream := ZnCharacterReadStream on: 'abc' asByteArray readStream. + self assert: stream nextLine equals: 'abc'. + self assert: stream nextLine equals: nil. + stream := ZnCharacterReadStream on: '' asByteArray readStream. + self assert: stream nextLine equals: nil. + stream := ZnCharacterReadStream on: ({ + $a. Character cr. + $b. Character lf. + $c } collect: [:each | each charCode]) readStream. + self assert: stream nextLine equals: 'a'. + self assert: stream nextLine equals: 'b'. + self assert: stream nextLine equals: 'c'. + self assert: stream nextLine equals: nil. + stream := ZnCharacterReadStream on: ({ + $a. Character cr. Character lf. + $b. Character cr. Character lf. + $c. Character cr. Character lf } collect: #charCode) readStream. + self assert: stream nextLine equals: 'a'. + self assert: stream nextLine equals: 'b'. + self assert: stream nextLine equals: 'c'. + self assert: stream nextLine equals: nil. + stream := ZnCharacterReadStream on: ({ + $a. Character cr. Character lf. + Character cr. Character lf. + $c. Character cr. Character lf } collect: #charCode) readStream. + self assert: stream nextLine equals: 'a'. + self assert: stream nextLine equals: ''. + self assert: stream nextLine equals: 'c'. + self assert: stream nextLine equals: nil \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterStreamTest.class/instance/testPeek.st b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterStreamTest.class/instance/testPeek.st new file mode 100644 index 000000000..2e689ed25 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterStreamTest.class/instance/testPeek.st @@ -0,0 +1,12 @@ +tests +testPeek + | string bytes readStream | + string := 'élève en Français'. + bytes := ZnUTF8Encoder new encodeString: string. + readStream := ZnCharacterReadStream on: bytes readStream. + self assert: readStream peek equals: 'é' first. + self assert: readStream peek equals: 'é' first. + self assert: readStream next equals: 'é' first. + readStream skip: 'lève ' size. + self assert: readStream peek equals: $e. + self assert: (readStream next: 'en Français' size) equals: 'en Français' \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterStreamTest.class/instance/testReadStream.st b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterStreamTest.class/instance/testReadStream.st new file mode 100644 index 000000000..4e4a78e6c --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterStreamTest.class/instance/testReadStream.st @@ -0,0 +1,18 @@ +tests +testReadStream + | stream | + stream := ZnCharacterReadStream on: 'ABC' asByteArray readStream. + self deny: stream atEnd. + self deny: stream isBinary. + self assert: stream next equals: $A. + self deny: stream atEnd. + self assert: stream peek equals: $B. + self deny: stream atEnd. + self assert: stream peek equals: $B. + self deny: stream atEnd. + self assert: stream next equals: $B. + self deny: stream atEnd. + self assert: stream next equals: $C. + self assert: stream atEnd. + self assert: stream next isNil. + self assert: stream peek isNil \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterStreamTest.class/instance/testReadStreamManipulation.st b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterStreamTest.class/instance/testReadStreamManipulation.st new file mode 100644 index 000000000..133404c81 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterStreamTest.class/instance/testReadStreamManipulation.st @@ -0,0 +1,20 @@ +tests +testReadStreamManipulation + #('abc' 'élève' 'français' 'ö-ö') do: [ :string | + #(utf8 latin1 utf16 utf32) do: [ :encoding | + | bytes stream | + bytes := string encodeWith: encoding. + stream := ZnCharacterReadStream on: bytes readStream encoding: encoding. + self assert: stream upToEnd equals: string. + stream back. + self assert: stream next equals: string last. + string size timesRepeat: [ stream back ]. + self assert: stream next equals: string first. + 0 to: bytes size - 1 do: [ :position | + stream position: position. + self assert: (string includes: stream next) ]. + self assert: stream atEnd. + stream position: 0. + self assert: stream next equals: string first. + stream position: bytes size - 1. + self assert: stream next equals: string last ] ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterStreamTest.class/instance/testReset.st b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterStreamTest.class/instance/testReset.st new file mode 100644 index 000000000..678390b01 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterStreamTest.class/instance/testReset.st @@ -0,0 +1,8 @@ +tests +testReset + + | stream | + stream := ZnCharacterReadStream on: 'abc' asByteArray readStream. + self assert: stream next equals: $a. + stream reset. + self assert: stream next equals: $a \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterStreamTests.class/instance/testSimpleUTF8ReadStream.st b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterStreamTest.class/instance/testSimpleUTF8ReadStream.st similarity index 93% rename from repository/Zinc-Character-Encoding-Tests.package/ZnCharacterStreamTests.class/instance/testSimpleUTF8ReadStream.st rename to repository/Zinc-Character-Encoding-Tests.package/ZnCharacterStreamTest.class/instance/testSimpleUTF8ReadStream.st index df8890b82..b077e166b 100644 --- a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterStreamTests.class/instance/testSimpleUTF8ReadStream.st +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterStreamTest.class/instance/testSimpleUTF8ReadStream.st @@ -1,8 +1,8 @@ -testing +tests testSimpleUTF8ReadStream | string bytes | string := 'élève en Français'. bytes := ZnUTF8Encoder new encodeString: string. - self + self assert: (ZnCharacterReadStream on: bytes readStream) upToEnd equals: string \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterStreamTest.class/instance/testUTF8ReadStreamBack.st b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterStreamTest.class/instance/testUTF8ReadStreamBack.st new file mode 100644 index 000000000..d9de2d318 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterStreamTest.class/instance/testUTF8ReadStreamBack.st @@ -0,0 +1,12 @@ +tests +testUTF8ReadStreamBack + | stream | + stream := ZnCharacterReadStream on: 'élève' utf8Encoded readStream. + self assert: (stream next: 3) equals: 'élè'. + stream back. + self assert: stream next equals: $è. + self assert: stream peek equals: $v. + stream back. + self assert: stream next equals: $è. + 3 timesRepeat: [ stream back ]. + self assert: stream upToEnd equals: 'élève' \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterStreamTest.class/instance/testUTF8ReadStreamPositioning.st b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterStreamTest.class/instance/testUTF8ReadStreamPositioning.st new file mode 100644 index 000000000..14378fea8 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterStreamTest.class/instance/testUTF8ReadStreamPositioning.st @@ -0,0 +1,22 @@ +tests +testUTF8ReadStreamPositioning + | bytes stream | + bytes := 'élève' utf8Encoded. + stream := ZnCharacterReadStream on: bytes readStream. + self assert: stream position equals: 0. + stream position: 0. + self assert: stream next equals: $é. + stream position: 1. + self assert: stream next equals: $é. + stream position: 2. + self assert: stream next equals: $l. + stream position: 3. + self assert: stream next equals: $è. + stream position: 4. + self assert: stream next equals: $è. + stream position: 5. + self assert: stream next equals: $v. + stream position: 6. + self assert: stream next equals: $e. + stream position: 7. + self assert: stream atEnd. \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterStreamTest.class/instance/testUTF8ReadStreamReadInto.st b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterStreamTest.class/instance/testUTF8ReadStreamReadInto.st new file mode 100644 index 000000000..08ce0f106 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterStreamTest.class/instance/testUTF8ReadStreamReadInto.st @@ -0,0 +1,17 @@ +tests +testUTF8ReadStreamReadInto + | string bytes stream buffer | + string := 'élève en Français'. + bytes := ZnUTF8Encoder new encodeString: string. + stream := ZnCharacterReadStream on: bytes readStream. + buffer := String new: string size. + stream next: string size into: buffer. + self assert: buffer equals: string. + self assert: stream atEnd. + string := 'Czech in Czech is {1}e{2}tina.' format: { 269 asCharacter. 353 asCharacter }. + bytes := ZnUTF8Encoder new encodeString: string. + stream := ZnCharacterReadStream on: bytes readStream. + buffer := String new: string size. + stream next: string size into: buffer. + self assert: buffer equals: string. + self assert: stream atEnd \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterStreamTest.class/instance/testUpToAll.st b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterStreamTest.class/instance/testUpToAll.st new file mode 100644 index 000000000..7386241ba --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterStreamTest.class/instance/testUpToAll.st @@ -0,0 +1,42 @@ +tests +testUpToAll + #( + ('' '' '') + ('' 'ß' '') + ('' 'ße' '') + ('ß' '' '') + ('ße' '' '') + ('ß' 'ß' '') + ('ße' 'ß' '') + ('ß' 'ße' 'ß') + ('ß' 'e' 'ß') + ('ße' 'e' 'ß') + ('ßen' 'e' 'ß') + ('ßen' 'en' 'ß') + ('ßend' 'en' 'ß') + ('iße' 'e' 'iß') + ('ißen' 'e' 'iß') + ('ißen' 'en' 'iß') + ('ißend' 'en' 'iß') + ('iß' 'ß' 'i') + ('iße' 'ß' 'i') + ('eißen' 'ßend' 'eißen') + ('abcdefgh' 'cd' 'ab') + ('a' '' '') + ('a' 'a' '') + ('a' 'b' 'a') + ('ab' '' '') + ('ab' 'a' '') + ('ab' 'b' 'a') + ('ab' 'c' 'ab') + ('ab' 'ab' '') + ('abc' '' '') + ('abc' 'a' '') + ('abc' 'b' 'a') + ('abc' 'c' 'ab') + ('abc' 'd' 'abc') + ('abc' 'ab' '') + ('abc' 'bc' 'a') + ('abc' 'cd' 'abc') + ('ababc' 'abc' 'ab') + ) do: [ :array | self assertUpToAll: array ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterStreamTest.class/instance/testUpToAllTwice.st b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterStreamTest.class/instance/testUpToAllTwice.st new file mode 100644 index 000000000..706657c6c --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterStreamTest.class/instance/testUpToAllTwice.st @@ -0,0 +1,10 @@ +tests +testUpToAllTwice + | utf8Stream stream | + utf8Stream := self utf8ReadStreamOn: 'eißendeße'. + self assert: (utf8Stream upToAll: 'ße') equals: 'ei'. + self assert: (utf8Stream upToAll: 'ße') equals: 'nde'. + + stream := 'eißendeße' readStream. + self assert: (stream upToAll: 'ße') equals: 'ei'. + self assert: (stream upToAll: 'ße') equals: 'nde' \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterStreamTest.class/instance/utf8ReadStreamOn..st b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterStreamTest.class/instance/utf8ReadStreamOn..st new file mode 100644 index 000000000..6cfce9d06 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterStreamTest.class/instance/utf8ReadStreamOn..st @@ -0,0 +1,5 @@ +test support +utf8ReadStreamOn: string + ^ ZnCharacterReadStream + on: (ZnUTF8Encoder new encodeString: string) readStream + encoding: #utf8 \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterStreamTest.class/properties.json b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterStreamTest.class/properties.json new file mode 100644 index 000000000..efc716ff7 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterStreamTest.class/properties.json @@ -0,0 +1,11 @@ +{ + "commentStamp" : "", + "super" : "TestCase", + "category" : "Zinc-Character-Encoding-Tests", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "ZnCharacterStreamTest", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterStreamTests.class/instance/testReadStream.st b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterStreamTests.class/instance/testReadStream.st deleted file mode 100644 index 0debe73b3..000000000 --- a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterStreamTests.class/instance/testReadStream.st +++ /dev/null @@ -1,18 +0,0 @@ -testing -testReadStream - | stream | - stream := ZnCharacterReadStream on: 'ABC' asByteArray readStream. - self deny: stream atEnd. - self deny: stream isBinary. - self assert: stream next = $A. - self deny: stream atEnd. - self assert: stream peek = $B. - self deny: stream atEnd. - self assert: stream peek = $B. - self deny: stream atEnd. - self assert: stream next = $B. - self deny: stream atEnd. - self assert: stream next = $C. - self assert: stream atEnd. - self assert: stream next isNil. - self assert: stream peek isNil \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterStreamTests.class/instance/testSimpleUTF8WriteStream.st b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterStreamTests.class/instance/testSimpleUTF8WriteStream.st deleted file mode 100644 index fb220529a..000000000 --- a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterStreamTests.class/instance/testSimpleUTF8WriteStream.st +++ /dev/null @@ -1,8 +0,0 @@ -testing -testSimpleUTF8WriteStream - | string bytes stream | - string := 'élève en Français'. - bytes := ZnUTF8Encoder new encodeString: string. - stream := ZnCharacterWriteStream on: (AnsiWriteStream on: ByteArray new). - stream nextPutAll: string. - self assert: stream wrappedStream contents equals: bytes asByteArray "in GemStone this an instance of Utf8" \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterStreamTests.class/methodProperties.json b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterStreamTests.class/methodProperties.json deleted file mode 100644 index 6135963b1..000000000 --- a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterStreamTests.class/methodProperties.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "class" : { - }, - "instance" : { - "testReadStream" : "SvenVanCaekenberghe 5/3/2012 21:35", - "testSimpleUTF8ReadStream" : "SvenVanCaekenberghe 5/3/2012 21:26", - "testSimpleUTF8WriteStream" : "dkh 06/27/2014 16:11" } } diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterStreamTests.class/properties.json b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterStreamTests.class/properties.json deleted file mode 100644 index 97f7b7dc7..000000000 --- a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterStreamTests.class/properties.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "category" : "Zinc-Character-Encoding-Tests", - "classinstvars" : [ - ], - "classvars" : [ - ], - "commentStamp" : "", - "instvars" : [ - ], - "name" : "ZnCharacterStreamTests", - "pools" : [ - ], - "super" : "TestCase", - "type" : "normal" } diff --git a/repository/Zinc-HTTP.package/ZnObjectLogLogger.class/README.md b/repository/Zinc-Character-Encoding-Tests.package/ZnFastLineReaderTest.class/README.md similarity index 100% rename from repository/Zinc-HTTP.package/ZnObjectLogLogger.class/README.md rename to repository/Zinc-Character-Encoding-Tests.package/ZnFastLineReaderTest.class/README.md diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnFastLineReaderTest.class/instance/testLinesDo.st b/repository/Zinc-Character-Encoding-Tests.package/ZnFastLineReaderTest.class/instance/testLinesDo.st new file mode 100644 index 000000000..f6f04761d --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnFastLineReaderTest.class/instance/testLinesDo.st @@ -0,0 +1,9 @@ +tests +testLinesDo + | lines reader | + lines := #( 'foo' 'bar' 'last'). + reader := ZnFastLineReader on: (Character lf join: lines) readStream. + self + assert: (Array streamContents: [ :out | + reader linesDo: [ :line | out nextPut: line ] ]) + equals: lines \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnFastLineReaderTest.class/instance/testNextLine.st b/repository/Zinc-Character-Encoding-Tests.package/ZnFastLineReaderTest.class/instance/testNextLine.st new file mode 100644 index 000000000..bb9408f7a --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnFastLineReaderTest.class/instance/testNextLine.st @@ -0,0 +1,34 @@ +tests +testNextLine + | reader | + reader := ZnFastLineReader on: 'abc' readStream. + self assert: reader nextLine equals: 'abc'. + self assert: reader atEnd. + self assert: reader nextLine equals: nil. + reader := ZnFastLineReader on: '' readStream. + self assert: reader nextLine equals: nil. + self assert: reader atEnd. + reader := ZnFastLineReader on: (String withAll: { + $a. Character cr. + $b. Character lf. + $c }) readStream. + self assert: reader nextLine equals: 'a'. + self assert: reader nextLine equals: 'b'. + self assert: reader nextLine equals: 'c'. + self assert: reader nextLine equals: nil. + reader := ZnFastLineReader on: (String withAll: { + $a. Character cr. Character lf. + $b. Character cr. Character lf. + $c. Character cr. Character lf }) readStream. + self assert: reader nextLine equals: 'a'. + self assert: reader nextLine equals: 'b'. + self assert: reader nextLine equals: 'c'. + self assert: reader nextLine equals: nil. + reader := ZnFastLineReader on: (String withAll: { + $a. Character cr. Character lf. + Character cr. Character lf. + $c. Character cr. Character lf }) readStream. + self assert: reader nextLine equals: 'a'. + self assert: reader nextLine equals: ''. + self assert: reader nextLine equals: 'c'. + self assert: reader atEnd \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnFastLineReaderTest.class/properties.json b/repository/Zinc-Character-Encoding-Tests.package/ZnFastLineReaderTest.class/properties.json new file mode 100644 index 000000000..2d3e67daf --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnFastLineReaderTest.class/properties.json @@ -0,0 +1,11 @@ +{ + "commentStamp" : "", + "super" : "TestCase", + "category" : "Zinc-Character-Encoding-Tests", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "ZnFastLineReaderTest", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Zinc-REST.package/ZnGsPersistentStorageRestServerDelegateTest.class/README.md b/repository/Zinc-Character-Encoding-Tests.package/ZnNewLineWriterStreamTest.class/README.md similarity index 100% rename from repository/Zinc-REST.package/ZnGsPersistentStorageRestServerDelegateTest.class/README.md rename to repository/Zinc-Character-Encoding-Tests.package/ZnNewLineWriterStreamTest.class/README.md diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnNewLineWriterStreamTest.class/instance/testClose.st b/repository/Zinc-Character-Encoding-Tests.package/ZnNewLineWriterStreamTest.class/instance/testClose.st new file mode 100644 index 000000000..5527420ea --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnNewLineWriterStreamTest.class/instance/testClose.st @@ -0,0 +1,11 @@ +tests +testClose + | string result znstream | + string := 'abcčřž' , String cr. + result := String streamContents: [ :out | + znstream := ZnNewLineWriterStream on: (ZnBufferedWriteStream on: out). + znstream forLf. + znstream nextPutAll: string. + znstream close ]. + string at: string size put: Character lf. + self assert: result equals: string \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnNewLineWriterStreamTest.class/properties.json b/repository/Zinc-Character-Encoding-Tests.package/ZnNewLineWriterStreamTest.class/properties.json new file mode 100644 index 000000000..45d437be4 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnNewLineWriterStreamTest.class/properties.json @@ -0,0 +1,11 @@ +{ + "commentStamp" : "", + "super" : "TestCase", + "category" : "Zinc-Character-Encoding-Tests", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "ZnNewLineWriterStreamTest", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Zinc-Resource-Meta-FileSystem.package/ZnFileUrlTests.class/README.md b/repository/Zinc-Character-Encoding-Tests.package/ZnPercentEncoderTest.class/README.md similarity index 100% rename from repository/Zinc-Resource-Meta-FileSystem.package/ZnFileUrlTests.class/README.md rename to repository/Zinc-Character-Encoding-Tests.package/ZnPercentEncoderTest.class/README.md diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnPercentEncoderTest.class/instance/testDecodePlusAsSpace.st b/repository/Zinc-Character-Encoding-Tests.package/ZnPercentEncoderTest.class/instance/testDecodePlusAsSpace.st new file mode 100644 index 000000000..3b12f32be --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnPercentEncoderTest.class/instance/testDecodePlusAsSpace.st @@ -0,0 +1,9 @@ +tests +testDecodePlusAsSpace + | encoder | + encoder := ZnPercentEncoder new. + self assert: (encoder decode: '+') equals: ' '. + self assert: encoder decodePlusAsSpace. + encoder decodePlusAsSpace: false. + self assert: (encoder decode: '+') equals: '+'. + self deny: encoder decodePlusAsSpace \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnPercentEncoderTest.class/instance/testDecodingErrors.st b/repository/Zinc-Character-Encoding-Tests.package/ZnPercentEncoderTest.class/instance/testDecodingErrors.st new file mode 100644 index 000000000..af6d4210e --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnPercentEncoderTest.class/instance/testDecodingErrors.st @@ -0,0 +1,9 @@ +tests +testDecodingErrors + | encoder | + encoder := ZnPercentEncoder new. + self should: [ encoder decode: 'foo%%bar' ] raise: ZnCharacterEncodingError. + self should: [ encoder decode: 'fooçbar' ] raise: ZnCharacterEncodingError. + self should: [ encoder decode: 'foo%' ] raise: ZnCharacterEncodingError. + self should: [ encoder decode: '%XX' ] raise: ZnCharacterEncodingError. + self should: [ encoder decode: 'foo%F' ] raise: ZnCharacterEncodingError \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnPercentEncoderTests.class/instance/testLeadingZero.st b/repository/Zinc-Character-Encoding-Tests.package/ZnPercentEncoderTest.class/instance/testLeadingZero.st similarity index 98% rename from repository/Zinc-Character-Encoding-Tests.package/ZnPercentEncoderTests.class/instance/testLeadingZero.st rename to repository/Zinc-Character-Encoding-Tests.package/ZnPercentEncoderTest.class/instance/testLeadingZero.st index 6de906d6a..204c37aec 100644 --- a/repository/Zinc-Character-Encoding-Tests.package/ZnPercentEncoderTests.class/instance/testLeadingZero.st +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnPercentEncoderTest.class/instance/testLeadingZero.st @@ -1,4 +1,4 @@ -testing +tests testLeadingZero | encoder | encoder := ZnPercentEncoder new. diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnPercentEncoderTest.class/instance/testNonAscii.st b/repository/Zinc-Character-Encoding-Tests.package/ZnPercentEncoderTest.class/instance/testNonAscii.st new file mode 100644 index 000000000..51281177d --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnPercentEncoderTest.class/instance/testNonAscii.st @@ -0,0 +1,13 @@ +tests +testNonAscii + | encoder | + encoder := ZnPercentEncoder new. + self + assert: encoder characterEncoder + equals: (ZnCharacterEncoder newForEncoding: 'utf-8'). + self + assert: (encoder encode: 'élève en Français') + equals: '%C3%A9l%C3%A8ve%20en%20Fran%C3%A7ais'. + self + assert: (encoder decode: '%C3%A9l%C3%A8ve%20en%20Fran%C3%A7ais') + equals: 'élève en Français' \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnPercentEncoderTest.class/instance/testSimple.st b/repository/Zinc-Character-Encoding-Tests.package/ZnPercentEncoderTest.class/instance/testSimple.st new file mode 100644 index 000000000..3c2475cd2 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnPercentEncoderTest.class/instance/testSimple.st @@ -0,0 +1,10 @@ +tests +testSimple + | encoder | + encoder := ZnPercentEncoder new. + self assert: (encoder encode: 'foo bar') equals: 'foo%20bar'. + self assert: (encoder decode: 'foo%20bar') equals: 'foo bar'. + self assert: (encoder encode: '') equals: ''. + self assert: (encoder decode: '') equals: ''. + self assert: (encoder decode: 'foo%25bar') equals: 'foo%bar'. + self assert: (encoder decode: 'foo+bar') equals: 'foo bar' \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnPercentEncoderTests.class/instance/testStringUrlDecoded.st b/repository/Zinc-Character-Encoding-Tests.package/ZnPercentEncoderTest.class/instance/testStringUrlDecoded.st similarity index 90% rename from repository/Zinc-Character-Encoding-Tests.package/ZnPercentEncoderTests.class/instance/testStringUrlDecoded.st rename to repository/Zinc-Character-Encoding-Tests.package/ZnPercentEncoderTest.class/instance/testStringUrlDecoded.st index e547a5b5a..329667f4d 100644 --- a/repository/Zinc-Character-Encoding-Tests.package/ZnPercentEncoderTests.class/instance/testStringUrlDecoded.st +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnPercentEncoderTest.class/instance/testStringUrlDecoded.st @@ -1,3 +1,3 @@ -testing +tests testStringUrlDecoded self assert: ('foo%20bar' urlDecoded) equals: 'foo bar' \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnPercentEncoderTests.class/instance/testStringUrlEncoded.st b/repository/Zinc-Character-Encoding-Tests.package/ZnPercentEncoderTest.class/instance/testStringUrlEncoded.st similarity index 90% rename from repository/Zinc-Character-Encoding-Tests.package/ZnPercentEncoderTests.class/instance/testStringUrlEncoded.st rename to repository/Zinc-Character-Encoding-Tests.package/ZnPercentEncoderTest.class/instance/testStringUrlEncoded.st index 63c7f07e4..180ad2a7f 100644 --- a/repository/Zinc-Character-Encoding-Tests.package/ZnPercentEncoderTests.class/instance/testStringUrlEncoded.st +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnPercentEncoderTest.class/instance/testStringUrlEncoded.st @@ -1,3 +1,3 @@ -testing +tests testStringUrlEncoded self assert: ('foo bar' urlEncoded) equals: 'foo%20bar' \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnPercentEncoderTest.class/properties.json b/repository/Zinc-Character-Encoding-Tests.package/ZnPercentEncoderTest.class/properties.json new file mode 100644 index 000000000..1ef4a29cd --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnPercentEncoderTest.class/properties.json @@ -0,0 +1,11 @@ +{ + "commentStamp" : "", + "super" : "TestCase", + "category" : "Zinc-Character-Encoding-Tests", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "ZnPercentEncoderTest", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnPercentEncoderTests.class/instance/testDecodingErrors.st b/repository/Zinc-Character-Encoding-Tests.package/ZnPercentEncoderTests.class/instance/testDecodingErrors.st deleted file mode 100644 index 781b13a57..000000000 --- a/repository/Zinc-Character-Encoding-Tests.package/ZnPercentEncoderTests.class/instance/testDecodingErrors.st +++ /dev/null @@ -1,9 +0,0 @@ -testing -testDecodingErrors - | encoder | - encoder := ZnPercentEncoder new. - self should: [ encoder decode: 'foo%%bar' ] raise: ZnCharacterEncodingError. - self should: [ encoder decode: 'fooçbar' ] raise: ZnCharacterEncodingError. - self should: [ encoder decode: 'foo%' ] raise: ZnCharacterEncodingError. - self should: [ encoder decode: '%XX' ] raise: ZnCharacterEncodingError. - self should: [ encoder decode: 'foo%F' ] raise: ZnCharacterEncodingError \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnPercentEncoderTests.class/instance/testNonAscii.st b/repository/Zinc-Character-Encoding-Tests.package/ZnPercentEncoderTests.class/instance/testNonAscii.st deleted file mode 100644 index 95a0ca7e7..000000000 --- a/repository/Zinc-Character-Encoding-Tests.package/ZnPercentEncoderTests.class/instance/testNonAscii.st +++ /dev/null @@ -1,13 +0,0 @@ -testing -testNonAscii - | encoder | - encoder := ZnPercentEncoder new. - self - assert: encoder characterEncoder - equals: (ZnCharacterEncoder newForEncoding: 'utf-8'). - self - assert: (encoder encode: 'élève en Français') - equals: '%C3%A9l%C3%A8ve%20en%20Fran%C3%A7ais'. - self - assert: (encoder decode: '%C3%A9l%C3%A8ve%20en%20Fran%C3%A7ais') - equals: 'élève en Français' \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnPercentEncoderTests.class/instance/testSimple.st b/repository/Zinc-Character-Encoding-Tests.package/ZnPercentEncoderTests.class/instance/testSimple.st deleted file mode 100644 index 32279699d..000000000 --- a/repository/Zinc-Character-Encoding-Tests.package/ZnPercentEncoderTests.class/instance/testSimple.st +++ /dev/null @@ -1,10 +0,0 @@ -testing -testSimple - | encoder | - encoder := ZnPercentEncoder new. - self assert: (encoder encode: 'foo bar') equals: 'foo%20bar'. - self assert: (encoder decode: 'foo%20bar') equals: 'foo bar'. - self assert: (encoder encode: '') equals: ''. - self assert: (encoder decode: '') equals: ''. - self assert: (encoder decode: 'foo%25bar') equals: 'foo%bar'. - self assert: (encoder decode: 'foo+bar') equals: 'foo bar' \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnPercentEncoderTests.class/methodProperties.json b/repository/Zinc-Character-Encoding-Tests.package/ZnPercentEncoderTests.class/methodProperties.json deleted file mode 100644 index e772459ba..000000000 --- a/repository/Zinc-Character-Encoding-Tests.package/ZnPercentEncoderTests.class/methodProperties.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "class" : { - }, - "instance" : { - "testDecodingErrors" : "SvenVanCaekenberghe 12/16/2012 15:12", - "testLeadingZero" : "SvenVanCaekenberghe 3/1/2013 21:29", - "testNonAscii" : "SvenVanCaekenberghe 12/13/2012 11:26", - "testSimple" : "SvenVanCaekenberghe 12/13/2012 11:58", - "testStringUrlDecoded" : "CamilloBruni 3/26/2013 23:18", - "testStringUrlEncoded" : "CamilloBruni 3/26/2013 23:18" } } diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnPercentEncoderTests.class/properties.json b/repository/Zinc-Character-Encoding-Tests.package/ZnPercentEncoderTests.class/properties.json deleted file mode 100644 index 5b5b6d434..000000000 --- a/repository/Zinc-Character-Encoding-Tests.package/ZnPercentEncoderTests.class/properties.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "category" : "Zinc-Character-Encoding-Tests", - "classinstvars" : [ - ], - "classvars" : [ - ], - "commentStamp" : "", - "instvars" : [ - ], - "name" : "ZnPercentEncoderTests", - "pools" : [ - ], - "super" : "TestCase", - "type" : "normal" } diff --git a/repository/Zinc-Resource-Meta-Tests.package/ZnMimeTypeTests.class/README.md b/repository/Zinc-Character-Encoding-Tests.package/ZnPositionableReadStreamTest.class/README.md similarity index 100% rename from repository/Zinc-Resource-Meta-Tests.package/ZnMimeTypeTests.class/README.md rename to repository/Zinc-Character-Encoding-Tests.package/ZnPositionableReadStreamTest.class/README.md diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnPositionableReadStreamTest.class/instance/testBulkReading.st b/repository/Zinc-Character-Encoding-Tests.package/ZnPositionableReadStreamTest.class/instance/testBulkReading.st new file mode 100644 index 000000000..e5b0a37be --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnPositionableReadStreamTest.class/instance/testBulkReading.st @@ -0,0 +1,13 @@ +tests +testBulkReading + | stream buffer | + stream := ZnPositionableReadStream on: #(0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15) readStream. + buffer := Array new: 6. + self assert: (stream readInto: buffer startingAt: 1 count: 6) equals: 6. + self assert: buffer equals: #(0 1 2 3 4 5). + self assert: (stream readInto: buffer startingAt: 4 count: 3) equals: 3. + self assert: (stream readInto: buffer startingAt: 1 count: 3) equals: 3. + self assert: buffer equals: #(9 10 11 6 7 8). + buffer atAllPut: 0. + self assert: (stream readInto: buffer startingAt: 1 count: 6) equals: 4. + self assert: buffer equals: #(12 13 14 15 0 0) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnPositionableReadStreamTest.class/instance/testEmpty.st b/repository/Zinc-Character-Encoding-Tests.package/ZnPositionableReadStreamTest.class/instance/testEmpty.st new file mode 100644 index 000000000..57ad7c1b8 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnPositionableReadStreamTest.class/instance/testEmpty.st @@ -0,0 +1,8 @@ +tests +testEmpty + | stream | + stream := ZnPositionableReadStream on: '' readStream. + self assert: stream atEnd. + self assert: stream peek isNil. + self assert: stream next isNil. + self assert: stream position isZero \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnPositionableReadStreamTest.class/instance/testNestedExcursion.st b/repository/Zinc-Character-Encoding-Tests.package/ZnPositionableReadStreamTest.class/instance/testNestedExcursion.st new file mode 100644 index 000000000..376ede466 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnPositionableReadStreamTest.class/instance/testNestedExcursion.st @@ -0,0 +1,13 @@ +tests +testNestedExcursion + | stream | + stream := ZnPositionableReadStream on: 'abcdef---XYZ!1--------' readStream. + self assert: (stream next: 3) equals: 'abc'. + stream savingPositionDo: [ + self assert: (stream next: 3) equals: 'def'. + stream savingPositionDo: [ + stream upTo: $!. + self assert: (stream peekFor: $1) ]. + stream skip: 3. + self assert: (stream next: 3) equals: 'XYZ' ]. + self assert: (stream next: 3) equals: 'def' \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnPositionableReadStreamTest.class/instance/testNew.st b/repository/Zinc-Character-Encoding-Tests.package/ZnPositionableReadStreamTest.class/instance/testNew.st new file mode 100644 index 000000000..74d3fa8c9 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnPositionableReadStreamTest.class/instance/testNew.st @@ -0,0 +1,7 @@ +tests +testNew + | stream | + stream := ZnPositionableReadStream on: 'abc' readStream. + self assert: stream position isZero. + self assert: stream bufferSize equals: stream defaultBufferSize. + self deny: stream atEnd \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnPositionableReadStreamTest.class/instance/testPlainExcursion.st b/repository/Zinc-Character-Encoding-Tests.package/ZnPositionableReadStreamTest.class/instance/testPlainExcursion.st new file mode 100644 index 000000000..4c83c4f91 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnPositionableReadStreamTest.class/instance/testPlainExcursion.st @@ -0,0 +1,7 @@ +tests +testPlainExcursion + | stream | + stream := ZnPositionableReadStream on: 'abcdef-----------' readStream. + self assert: (stream next: 3) equals: 'abc'. + self assert: (stream savingPositionDo: [ stream next: 3 ]) equals: 'def'. + self assert: (stream next: 3) equals: 'def' \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnPositionableReadStreamTest.class/instance/testPlainNext.st b/repository/Zinc-Character-Encoding-Tests.package/ZnPositionableReadStreamTest.class/instance/testPlainNext.st new file mode 100644 index 000000000..f43028557 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnPositionableReadStreamTest.class/instance/testPlainNext.st @@ -0,0 +1,10 @@ +tests +testPlainNext + | stream | + stream := ZnPositionableReadStream on: 'abc' readStream. + self assert: stream next equals: $a. + self deny: stream atEnd. + self assert: stream next equals: $b. + self assert: stream position equals: 2. + self assert: stream next equals: $c. + self assert: stream atEnd \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnPositionableReadStreamTest.class/instance/testPlainPeek.st b/repository/Zinc-Character-Encoding-Tests.package/ZnPositionableReadStreamTest.class/instance/testPlainPeek.st new file mode 100644 index 000000000..52bf77431 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnPositionableReadStreamTest.class/instance/testPlainPeek.st @@ -0,0 +1,11 @@ +tests +testPlainPeek + | stream | + stream := ZnPositionableReadStream on: 'abc' readStream. + self assert: stream next equals: $a. + self assert: stream peek equals: $b. + self assert: stream next equals: $b. + self assert: stream position equals: 2. + self assert: stream peek equals: $c. + self assert: stream next equals: $c. + self assert: stream atEnd \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnPositionableReadStreamTest.class/instance/testPositionErrors.st b/repository/Zinc-Character-Encoding-Tests.package/ZnPositionableReadStreamTest.class/instance/testPositionErrors.st new file mode 100644 index 000000000..2f9a1382a --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnPositionableReadStreamTest.class/instance/testPositionErrors.st @@ -0,0 +1,17 @@ +tests +testPositionErrors + | data stream | + data := ByteArray new: 1000 streamContents: [ :out | + 100 timesRepeat: [ out nextPutAll: #[ 0 1 2 3 4 5 6 7 8 9 ] ] ]. + stream := ZnPositionableReadStream on: data readStream. + self should: [ stream position: 1 ] raise: SubscriptOutOfBounds. + stream next: 100. + self should: [ stream position: -1 ] raise: SubscriptOutOfBounds. + self should: [ stream position: 101 ] raise: SubscriptOutOfBounds. + stream next: 500. + self should: [ stream position: 100 ] raise: SubscriptOutOfBounds. + self should: [ stream position: 600 - stream bufferSize - 1 ] raise: SubscriptOutOfBounds. + stream position: 400. + stream next: 599. + self assert: stream next equals: 9. + self assert: stream atEnd \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnPositionableReadStreamTest.class/instance/testReadAll.st b/repository/Zinc-Character-Encoding-Tests.package/ZnPositionableReadStreamTest.class/instance/testReadAll.st new file mode 100644 index 000000000..c90fdc5d2 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnPositionableReadStreamTest.class/instance/testReadAll.st @@ -0,0 +1,17 @@ +tests +testReadAll + | data stream | + data := String new: 200 streamContents: [ :out | + 200 timesRepeat: [ out nextPut: 'abc' atRandom ] ]. + stream := ZnPositionableReadStream on: data readStream. + self deny: stream atEnd. + self assert: stream position isZero. + stream savingPositionDo: [ + self assert: stream upToEnd equals: data. + self assert: stream atEnd. + self assert: stream position equals: 200 ]. + self deny: stream atEnd. + self assert: stream position isZero. + self assert: stream upToEnd equals: data. + self assert: stream atEnd. + self assert: stream position equals: 200 \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnPositionableReadStreamTest.class/instance/testReadAllLargerBuffer.st b/repository/Zinc-Character-Encoding-Tests.package/ZnPositionableReadStreamTest.class/instance/testReadAllLargerBuffer.st new file mode 100644 index 000000000..4f66e0bb5 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnPositionableReadStreamTest.class/instance/testReadAllLargerBuffer.st @@ -0,0 +1,18 @@ +tests +testReadAllLargerBuffer + | data stream | + data := String new: 500 streamContents: [ :out | + 500 timesRepeat: [ out nextPut: 'abc' atRandom ] ]. + stream := ZnPositionableReadStream on: data readStream. + stream sizeBuffer: 500. + self deny: stream atEnd. + self assert: stream position isZero. + stream savingPositionDo: [ + self assert: stream upToEnd equals: data. + self assert: stream atEnd. + self assert: stream position equals: 500 ]. + self deny: stream atEnd. + self assert: stream position isZero. + self assert: stream upToEnd equals: data. + self assert: stream atEnd. + self assert: stream position equals: 500 \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnPositionableReadStreamTest.class/instance/testSearch.st b/repository/Zinc-Character-Encoding-Tests.package/ZnPositionableReadStreamTest.class/instance/testSearch.st new file mode 100644 index 000000000..ca1936723 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnPositionableReadStreamTest.class/instance/testSearch.st @@ -0,0 +1,16 @@ +tests +testSearch + | data stream found | + data := String new: 2000 streamContents: [ :out | + 2000 timesRepeat: [ out nextPut: 'abc' atRandom ] ]. + data replaceFrom: 1000 to: 1005 with: 'TARGET'. + stream := ZnPositionableReadStream on: data readStream. + found := false. + [ stream atEnd ] whileFalse: [ + stream savingPositionDo: [ + (stream next: 6) = 'TARGET' + ifTrue: [ + found := true. + self assert: stream position equals: 1005 ] ]. + stream next ]. + self assert: found \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnPositionableReadStreamTest.class/instance/testSearchBinary.st b/repository/Zinc-Character-Encoding-Tests.package/ZnPositionableReadStreamTest.class/instance/testSearchBinary.st new file mode 100644 index 000000000..3517b8709 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnPositionableReadStreamTest.class/instance/testSearchBinary.st @@ -0,0 +1,17 @@ +tests +testSearchBinary + | data stream pattern found | + data := ByteArray new: 2000 streamContents: [ :out | + 2000 timesRepeat: [ out nextPut: 256 atRandom - 1 ] ]. + pattern := ByteArray readHexFrom: 'FF77ABAB'. + data replaceFrom: 1000 to: 1000 + pattern size - 1 with: pattern. + stream := ZnPositionableReadStream on: data readStream. + found := false. + [ stream atEnd ] whileFalse: [ + stream savingPositionDo: [ + (stream next: pattern size) = pattern + ifTrue: [ + found := true. + self assert: stream position equals: 1000 + pattern size - 1 ] ]. + stream next ]. + self assert: found \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnPositionableReadStreamTest.class/instance/testSkipAndBack.st b/repository/Zinc-Character-Encoding-Tests.package/ZnPositionableReadStreamTest.class/instance/testSkipAndBack.st new file mode 100644 index 000000000..9e77b54f3 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnPositionableReadStreamTest.class/instance/testSkipAndBack.st @@ -0,0 +1,13 @@ +tests +testSkipAndBack + | stream | + stream := ZnPositionableReadStream on: 'abcdef' readStream. + stream skip: 2. + self assert: stream next equals: $c. + stream skip: 1. + self assert: stream back equals: $d. + self assert: stream back equals: $c. + stream skip: -2. + self assert: stream next equals: $a. + stream back. + self assert: stream upToEnd equals: 'abcdef' \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnPositionableReadStreamTest.class/instance/testUTF8.st b/repository/Zinc-Character-Encoding-Tests.package/ZnPositionableReadStreamTest.class/instance/testUTF8.st new file mode 100644 index 000000000..1bb961ac0 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnPositionableReadStreamTest.class/instance/testUTF8.st @@ -0,0 +1,15 @@ +tests +testUTF8 + | data stream | + data := 'Les élèves Françaises ont 100 €'. + stream := ZnPositionableReadStream on: (ZnCharacterReadStream on: data utf8Encoded readStream). + self assert: (stream next: 3) equals: 'Les'. + stream skip: 1. + stream savingPositionDo: [ + self assert: (stream next: 6) equals: 'élèves'. + self assert: stream next equals: Character space ]. + self assert: (stream next: 6) equals: 'élèves'. + self assert: (stream peekFor: Character space). + 2 timesRepeat: [ stream upTo: Character space ]. + self assert: (stream upTo: $€) trimBoth asNumber equals: 100. + self assert: stream atEnd \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnPositionableReadStreamTest.class/properties.json b/repository/Zinc-Character-Encoding-Tests.package/ZnPositionableReadStreamTest.class/properties.json new file mode 100644 index 000000000..d7239e96c --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnPositionableReadStreamTest.class/properties.json @@ -0,0 +1,11 @@ +{ + "commentStamp" : "", + "super" : "TestCase", + "category" : "Zinc-Character-Encoding-Tests", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "ZnPositionableReadStreamTest", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/monticello.meta/version b/repository/Zinc-Character-Encoding-Tests.package/monticello.meta/version deleted file mode 100644 index a2eda9bb8..000000000 --- a/repository/Zinc-Character-Encoding-Tests.package/monticello.meta/version +++ /dev/null @@ -1 +0,0 @@ -(name 'Zinc-Character-Encoding-Tests-dkh.23' message 'Issue #101: checkpoint with additional changes needed for latest version of FileSystemGs for 3.7.0' id 'ae141add-d29c-4d5a-a1f0-5a968ffa59e2' date '04/18/2023' time '18:56:27' author 'dkh' ancestors ((name 'Zinc-Character-Encoding-Tests-dkh.22' message 'split out tests that need to be different betwee GemStone 2.x and 3.x' id '4c0bffed-04c9-4711-bf04-3fde20470ea2' date '06/30/2014' time '07:52:08' author 'dkh' ancestors ((name 'Zinc-Character-Encoding-Tests-dkh.21' message 'Zinc-Character-Encoding-GS24-Core needed for 2.x only ... ZnCharacterEncoderTests>>testUTF8EncoderIncomplete cannot be run in 3.0 either' id '68468062-383b-431a-b20e-16a00e1d09f9' date '06/30/2014' time '00:29:40' author 'dkh' ancestors ((name 'Zinc-Character-Encoding-Tests-dkh.20' message 'checkpoint for 3.1.0.5: 282 run, 280 passes, 1 expected defects, 1 failures, 0 errors, 0 unexpected passes' id 'cb5f0161-46e5-4c9d-94ff-d0eccd381bee' date '06/29/2014' time '17:34:37' author 'dkh' ancestors ((name 'Zinc-Character-Encoding-Tests-dkh.19' message 'remove extra tracing code ... tests greeen for GemStone 3.2' id '0bdf631d-f40e-44bf-aea9-96bbd9e993b4' date '06/29/2014' time '15:48:13' author 'dkh' ancestors ((name 'Zinc-Character-Encoding-Tests-dkh.18' message 'more ZnBufferedWriteStreamTests>>testWriting tracing' id 'd764e722-a133-4c78-8a66-9405f16fd6b5' date '06/29/2014' time '15:29:47' author 'dkh' ancestors ((name 'Zinc-Character-Encoding-Tests-dkh.17' message 'tracing for ZnBufferedWriteStreamTests>>testWriting travis failures' id '5a42fe42-4a01-4d70-8a17-892318983352' date '06/29/2014' time '15:20:31' author 'dkh' ancestors ((name 'Zinc-Character-Encoding-Tests-dkh.16' message 'strip ZnByteStringBecameWideString out of the zinc code (leave in tests) ... test fixes - 282 run, 272 passes, 0 expected defects, 8 failures, 2 errors, 0 unexpected passes' id '6926364f-f8dd-4728-9e61-3827736f5748' date '06/27/2014' time '16:22:44' author 'dkh' ancestors ((name 'Zinc-Character-Encoding-Tests-dkh.15' message 'checkpoint: 282 run, 267 passes, 0 expected defects, 11 failures, 4 errors, 0 unexpected passes ' id 'b60bc46f-0862-45a7-8dfa-a312d7010a0c' date '06/26/2014' time '22:01:03' author 'dkh' ancestors ((name 'Zinc-Character-Encoding-Tests-dkh.14' message 'Checkpoint: 282 run, 258 passes, 0 expected defects, 10 failures, 14 errors, 0 unexpected passes ' id 'ea6bacc3-e91e-48be-ac84-bdfed2a54020' date '06/25/2014' time '21:52:53' author 'dkh' ancestors ((name 'Zinc-Character-Encoding-Tests-JohanBrichau.13' message 'porting code' id '0ca8097f-781c-4081-be27-d7d538ea2df1' date '01/05/2014' time '15:26:59' author 'JohanBrichau' ancestors ((name 'Zinc-Character-Encoding-Tests-SvenVanCaekenberghe.12' message 'Added an optimalization to ZnUTF8Encoder>>#readInto:startingAt:count:fromStream: to avoid the price of #becomeForward: when a ByteString to WideString conversion happens' id '691abf05-9485-451a-aea0-6a3a08dd2939' date '06/11/2013' time '04:33:14' author 'SvenVanCaekenberghe' ancestors ((name 'Zinc-Character-Encoding-Tests-SvenVanCaekenberghe.11' message 'merge' id '352e538c-d3c0-411c-be19-bb8e7181b391' date '06/11/2013' time '09:22:23' author 'SvenVanCaekenberghe' ancestors ((name 'Zinc-Character-Encoding-Tests-SvenVanCaekenberghe.10' message 'Added an optimized ZnUTF8Encoder>>#decodeBytes: and an even faster #decodeBytesIntoWideString: (thx johnny/JanStruz)' id 'c4338bce-4823-4afd-9c03-ed82ddf2afff' date '06/10/2013' time '11:20:45' author 'SvenVanCaekenberghe' ancestors () stepChildren ())(name 'Zinc-Character-Encoding-Tests-SvenVanCaekenberghe.9' message 'Added support to ZnUTF8Encoder to detect overlong (non-shortest form) encodings as well as to skip the Unicode Byte Order Mark (BOM) character' id '3cfdf396-c625-4c8f-9aea-ede90630edcb' date '06/04/2013' time '05:29:38' author 'SvenVanCaekenberghe' ancestors ((name 'Zinc-Character-Encoding-Tests-SvenVanCaekenberghe.8' message 'Introduction of an explicit ZnInvalidUTF8 exception.' id '873f8d6a-5631-4dfb-8fb5-cda3e522c9ee' date '06/03/2013' time '08:15:02' author 'SvenVanCaekenberghe' ancestors ((name 'Zinc-Character-Encoding-Tests-SvenVanCaekenberghe.7' message 'ZnUTF8Encoder: - enabled #next:putAll:startingAt:toStream: for real - added & enabled #optimizedReadInto:startingAt:count:fromStream: - #nextFromStream now signals specific errors on eof - some refactoring/cleanup' id 'dc085fe8-a4e4-46f4-a5c0-2678315e7428' date '05/25/2013' time '10:30:26' author 'SvenVanCaekenberghe' ancestors ((name 'Zinc-Character-Encoding-Tests-SvenVanCaekenberghe.6' message 'Introduction of ZnCharacterEncoder>>#next:putAll:startingAt:toStream with optimized implementations in ZnNullEncoder and ZnUTF8Encoder for ByteString instances' id '49bd7fce-ffab-4c09-9bf3-a3c550090cab' date '05/22/2013' time '04:16:17' author 'SvenVanCaekenberghe' ancestors ((name 'Zinc-Character-Encoding-Tests-SvenVanCaekenberghe.5' message 'Added String>>#urlEncoded & #urlDecoded - Thx Camillo Bruni' id 'c0387a62-53b8-421c-b74b-43d224d63afc' date '04/16/2013' time '09:19:26' author 'SvenVanCaekenberghe' ancestors ((name 'Zinc-Character-Encoding-Tests-SvenVanCaekenberghe.4' message 'Bugfix to ZnPercentEncoder: always use 2 hex digits (Thanks Benjamin Van Ryseghem)' id 'a1f1c1f3-7878-45db-a609-0d4c3ff81e69' date '03/01/2013' time '09:36:51' author 'SvenVanCaekenberghe' ancestors ((name 'Zinc-Character-Encoding-Tests-SvenVanCaekenberghe.3' message 'merging in some Gemstone portability changes by Ken Treis' id '9045618f-8b58-4d47-b6f8-8c18ca27869d' date '01/21/2013' time '01:16:18' author 'SvenVanCaekenberghe' ancestors ((name 'Zinc-Character-Encoding-Tests-KenTreis.2.1' message 'Minor changes for GemStone Compatibility that hopefully don''t break anything in Pharo: * Use `ByteArray new writeStream` rather than `#[] writeStream` * In ZnBase64EncoderTests, put CRs in for line breaks explicitly' id '0c541244-918a-4df3-9543-170b07bd6870' date '01/19/2013' time '11:05:42' author 'KenTreis' ancestors ((name 'Zinc-Character-Encoding-Tests-SvenVanCaekenberghe.2' message 'stop using ZnNullEncoder for latin1; added #beLenient option to make a ZnByteEncoder non-strict (the old behavior)' id '5a82017c-5d0e-448c-a7a3-1b8f35aae2d2' date '12/17/2012' time '04:08:57' author 'SvenVanCaekenberghe' ancestors ((name 'Zinc-Character-Encoding-Tests-SvenVanCaekenberghe.1' message 'creation of Zinc-Character-Encoding-[Core|Tests] by moving various classes out of Zinc-HTTP' id '9f23b0ec-9909-4839-b631-db4c10c9f613' date '12/16/2012' time '05:01:49' author 'SvenVanCaekenberghe' ancestors () stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ()) \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/properties.json b/repository/Zinc-Character-Encoding-Tests.package/properties.json index f037444a7..6f31cf5a2 100644 --- a/repository/Zinc-Character-Encoding-Tests.package/properties.json +++ b/repository/Zinc-Character-Encoding-Tests.package/properties.json @@ -1,2 +1 @@ -{ - } +{ } \ No newline at end of file diff --git a/repository/Zinc-FileSystem-Legacy.package/ZnFileSystemUtils.class/methodProperties.json b/repository/Zinc-FileSystem-Legacy.package/ZnFileSystemUtils.class/methodProperties.json deleted file mode 100644 index 14f435fd2..000000000 --- a/repository/Zinc-FileSystem-Legacy.package/ZnFileSystemUtils.class/methodProperties.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "class" : { - "baseNameFor:" : "dkh 07/29/2012 17:53", - "defaultDirectory" : "dkh 07/29/2012 17:53", - "defaultDirectoryPath" : "dkh 07/29/2012 17:54", - "delete:" : "dkh 07/29/2012 17:54", - "deleteIfExists:" : "SvenVanCaekenberghe 7/2/2012 16:57", - "directory:" : "SvenVanCaekenberghe 8/28/2012 21:28", - "downloadPathTo:for:" : "dkh 07/29/2012 17:54", - "exists:" : "dkh 07/29/2012 17:54", - "extensionFor:" : "dkh 07/29/2012 17:54", - "fileDirectoryClass" : "dkh 07/30/2012 19:48", - "fileNamed:do:" : "dkh 07/30/2012 18:27", - "fileSizeFor:" : "dkh 07/29/2012 17:54", - "fileStreamClass" : "dkh 07/29/2012 17:54", - "fileStreamFor:" : "dkh 07/29/2012 17:55", - "fullNameFor:" : "dkh 07/29/2012 17:55", - "modificationTimeFor:" : "dkh 07/29/2012 17:55", - "newFileNamed:do:" : "dkh 07/30/2012 18:27", - "oldFileNamed:do:" : "dkh 07/30/2012 18:27", - "oldFileStreamFor:" : "dkh 07/30/2012 18:27" }, - "instance" : { - } } diff --git a/repository/Zinc-FileSystem-Legacy.package/ZnMonticelloServerDelegate.class/methodProperties.json b/repository/Zinc-FileSystem-Legacy.package/ZnMonticelloServerDelegate.class/methodProperties.json deleted file mode 100644 index 62ecd148c..000000000 --- a/repository/Zinc-FileSystem-Legacy.package/ZnMonticelloServerDelegate.class/methodProperties.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "class" : { - }, - "instance" : { - "directory" : "SvenVanCaekenberghe 9/17/2010 10:20", - "directory:" : "SvenVanCaekenberghe 9/17/2010 10:20", - "handleGetMczEntry:" : "SvenVanCaekenberghe 1/4/2011 14:49", - "handleListMczEntries:" : "SvenVanCaekenberghe 8/18/2011 14:25", - "handlePutMczEntry:" : "SvenVanCaekenberghe 1/4/2011 14:49", - "handleRequest:" : "SvenVanCaekenberghe 1/4/2011 13:42", - "handleRequest:gemServer:" : "dkh 01/12/2015 10:23", - "isValidMczName:" : "SvenVanCaekenberghe 9/17/2010 10:24", - "mczEntries" : "SvenVanCaekenberghe 9/17/2010 10:21", - "repositoryListing" : "SvenVanCaekenberghe 9/17/2010 11:00", - "value:" : "SvenVanCaekenberghe 8/22/2012 14:41" } } diff --git a/repository/Zinc-FileSystem-Legacy.package/ZnStaticFileServerDelegate.class/methodProperties.json b/repository/Zinc-FileSystem-Legacy.package/ZnStaticFileServerDelegate.class/methodProperties.json deleted file mode 100644 index 63e006e23..000000000 --- a/repository/Zinc-FileSystem-Legacy.package/ZnStaticFileServerDelegate.class/methodProperties.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "class" : { - "defaultMimeTypeExpirations" : "SvenVanCaekenberghe 5/14/2012 10:26" }, - "instance" : { - "actualFilenameFor:" : "SvenVanCaekenberghe 5/15/2012 11:02", - "directory" : "SvenVanCaekenberghe 4/26/2011 11:06", - "directory:" : "SvenVanCaekenberghe 4/26/2011 11:07", - "directoryRedirectFor:" : "SvenVanCaekenberghe 4/26/2011 12:35", - "expirationDateFor:" : "SvenVanCaekenberghe 5/14/2012 10:30", - "handleRequest:" : "PaulDeBruicker 5/12/2012 09:56", - "handleRequest:gemServer:" : "dkh 01/12/2015 10:24", - "indexFileIn:" : "SvenVanCaekenberghe 8/18/2011 14:25", - "maxAgeFor:" : "SvenVanCaekenberghe 5/14/2012 09:41", - "mimeTypeExpirations" : "SvenVanCaekenberghe 5/14/2012 09:39", - "mimeTypeExpirations:" : "SvenVanCaekenberghe 5/14/2012 09:39", - "prefix" : "SvenVanCaekenberghe 4/26/2011 12:46", - "prefix:" : "SvenVanCaekenberghe 4/26/2011 11:08", - "prefixFromString:" : "SvenVanCaekenberghe 4/26/2011 11:09", - "redirectNeededFor:actualFilename:" : "SvenVanCaekenberghe 1/14/2013 13:56", - "responseForFile:fromRequest:" : "dkh 06/23/2013 05:44" } } diff --git a/repository/Zinc-FileSystem-Legacy.package/monticello.meta/version b/repository/Zinc-FileSystem-Legacy.package/monticello.meta/version deleted file mode 100644 index 69c6a579a..000000000 --- a/repository/Zinc-FileSystem-Legacy.package/monticello.meta/version +++ /dev/null @@ -1 +0,0 @@ -(name 'Zinc-FileSystem-Legacy-dkh.8' message 'Issue #69: GsApplicationTools v1.0.2 integrated .... leave HTTP error handling to the handler up the stack ... logging and proper error response handling is already defined ...revise comments in delegate handleRequest:gemServer: methods' id '309eac17-50b8-437a-a902-25563bb7deb1' date '01/12/2015' time '10:30:23' author 'dkh' ancestors ((name 'Zinc-FileSystem-Legacy-dkh.7' message 'Issue #69: push ZnGemServer up to ZnAbstractGemServer and create sibling ZnNewGemServer that is married with ZnGemServerManagingMultiThreadedServer which is a refactored ZnTransactionSafeManagingMultiThreadedServer/ZnManagingMultiThreadedServer that replaces all of the error handling with gemServer:* calls ... create interfact to delegates so that ZnGemServerManagingMultiThreadedServer can be used with any existing delegates, although by default there are no transactions being performed, but the handleRequest:gemServer: method can changed to add transactions ... no tests for the new boys ... yet' id '333d1191-f7a0-482c-a6d8-9ef8d8f7b319' date '01/07/2015' time '19:52:42' author 'dkh' ancestors ((name 'Zinc-FileSystem-Legacy-dkh.6' message 'block in at:ifPresent: call in ZnStaticFileServerDelegate>>responseForFile:fromRequest: needs to have an arg' id 'd8c3612b-7112-4055-84a5-0a7250d7e203' date '06/23/2013' time '05:54:30' author 'dkh' ancestors ((name 'Zinc-FileSystem-Legacy-SvenVanCaekenberghe.5' message 'Moving ZnMonticelloServerDelegate from Zinc-HTTP-Client-Server to Zinc-FileSystem and Zinc-FileSystem-Legacy' id 'e54384f6-1a1f-45d5-ab42-048e08a5a975' date '01/30/2013' time '07:57:02' author 'SvenVanCaekenberghe' ancestors ((name 'Zinc-FileSystem-Legacy-SvenVanCaekenberghe.4' message 'tracking API changes' id '7d5eb508-7db8-4fb2-90b8-e36d2c3c9fd8' date '01/14/2013' time '01:57:46' author 'SvenVanCaekenberghe' ancestors ((name 'Zinc-FileSystem-Legacy-SvenVanCaekenberghe.3' message 'added ZnFileSystemUtils class>>#directory:' id 'd9ab6ff0-6c69-4162-aa1a-2d714416ec30' date '08/28/2012' time '09:29:36' author 'SvenVanCaekenberghe' ancestors ((name 'Zinc-FileSystem-Legacy-SvenVanCaekenberghe.2' message 'fixed a logic problem in ZnFileSystemUtils class>>#downloadPathTo:for:' id '30263aa4-76ea-4db1-8c10-9fd5eae0e1fb' date '07/20/2012' time '13:14:58' author 'SvenVanCaekenberghe' ancestors ((name 'Zinc-FileSystem-Legacy-SvenVanCaekenberghe.1' message 'introduction of the Zinc-FileSystem-Legacy package (including the new ZnFileSystemUtils class) to deal with pre/post FIleSystem introduction in Pharo 2.0 - this is the old code' id '207f349a-f8a3-41da-b78b-8ae9107259a8' date '07/03/2012' time '01:48:48' author 'SvenVanCaekenberghe' ancestors () stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ()) \ No newline at end of file diff --git a/repository/Zinc-FileSystem.package/ZnFileSystemUtils.class/class/fileNamed.do..st b/repository/Zinc-FileSystem.package/ZnFileSystemUtils.class/class/fileNamed.do..st deleted file mode 100644 index 0025301ea..000000000 --- a/repository/Zinc-FileSystem.package/ZnFileSystemUtils.class/class/fileNamed.do..st +++ /dev/null @@ -1,4 +0,0 @@ -streams -fileNamed: fileName do: block - ^ fileName asFileReference - writeStreamDo: block \ No newline at end of file diff --git a/repository/Zinc-FileSystem.package/ZnFileSystemUtils.class/methodProperties.json b/repository/Zinc-FileSystem.package/ZnFileSystemUtils.class/methodProperties.json deleted file mode 100644 index e4c644ec4..000000000 --- a/repository/Zinc-FileSystem.package/ZnFileSystemUtils.class/methodProperties.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "class" : { - "baseNameFor:" : "SvenVanCaekenberghe 7/3/2012 15:07", - "defaultDirectory" : "SvenVanCaekenberghe 7/3/2012 15:09", - "defaultDirectoryPath" : "SvenVanCaekenberghe 7/3/2012 15:09", - "delete:" : "SvenVanCaekenberghe 7/3/2012 15:10", - "deleteIfExists:" : "SvenVanCaekenberghe 7/2/2012 16:57", - "directory:" : "SvenVanCaekenberghe 8/28/2012 21:18", - "downloadPathTo:for:" : "SvenVanCaekenberghe 7/20/2012 11:53", - "exists:" : "SvenVanCaekenberghe 7/3/2012 15:10", - "extensionFor:" : "SvenVanCaekenberghe 7/3/2012 15:11", - "fileNamed:do:" : "SvenVanCaekenberghe 9/12/2012 20:44", - "fileSizeFor:" : "SvenVanCaekenberghe 7/3/2012 15:12", - "fileStreamFor:" : "SvenVanCaekenberghe 7/3/2012 16:12", - "fullNameFor:" : "SvenVanCaekenberghe 7/3/2012 15:14", - "modificationTimeFor:" : "SvenVanCaekenberghe 7/3/2012 15:15", - "newFileNamed:do:" : "SvenVanCaekenberghe 7/3/2012 16:12", - "oldFileNamed:do:" : "SvenVanCaekenberghe 7/3/2012 16:13", - "oldFileStreamFor:" : "SvenVanCaekenberghe 7/3/2012 16:13" }, - "instance" : { - } } diff --git a/repository/Zinc-FileSystem.package/ZnMonticelloServerDelegate.class/instance/directory.st b/repository/Zinc-FileSystem.package/ZnMonticelloServerDelegate.class/instance/directory.st deleted file mode 100644 index b051abbe6..000000000 --- a/repository/Zinc-FileSystem.package/ZnMonticelloServerDelegate.class/instance/directory.st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -directory - ^ directory \ No newline at end of file diff --git a/repository/Zinc-FileSystem.package/ZnMonticelloServerDelegate.class/instance/handleRequest..st b/repository/Zinc-FileSystem.package/ZnMonticelloServerDelegate.class/instance/handleRequest..st deleted file mode 100644 index e5fb424d6..000000000 --- a/repository/Zinc-FileSystem.package/ZnMonticelloServerDelegate.class/instance/handleRequest..st +++ /dev/null @@ -1,10 +0,0 @@ -public -handleRequest: request - (request method = #GET) - ifTrue: [ - ^ request uri isSlash - ifTrue: [ self handleListMczEntries: request ] - ifFalse: [ self handleGetMczEntry: request ] ]. - ^ (request method = #PUT) - ifTrue: [ self handlePutMczEntry: request ] - ifFalse: [ ZnResponse badRequest: request ] \ No newline at end of file diff --git a/repository/Zinc-FileSystem.package/ZnMonticelloServerDelegate.class/instance/repositoryListing.st b/repository/Zinc-FileSystem.package/ZnMonticelloServerDelegate.class/instance/repositoryListing.st deleted file mode 100644 index 5063a3a65..000000000 --- a/repository/Zinc-FileSystem.package/ZnMonticelloServerDelegate.class/instance/repositoryListing.st +++ /dev/null @@ -1,9 +0,0 @@ -private -repositoryListing - ^ String streamContents: [ :str | - str nextPutAll: 'Monticello Repository'. - str nextPutAll: '

Monticello Repository

'. - str nextPutAll: '' ] \ No newline at end of file diff --git a/repository/Zinc-FileSystem.package/ZnMonticelloServerDelegate.class/methodProperties.json b/repository/Zinc-FileSystem.package/ZnMonticelloServerDelegate.class/methodProperties.json deleted file mode 100644 index 2a1ff0ee3..000000000 --- a/repository/Zinc-FileSystem.package/ZnMonticelloServerDelegate.class/methodProperties.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "class" : { - }, - "instance" : { - "directory" : "SvenVanCaekenberghe 9/17/2010 10:20", - "directory:" : "SvenVanCaekenberghe 1/30/2013 20:21", - "handleGetMczEntry:" : "SvenVanCaekenberghe 1/30/2013 21:07", - "handleListMczEntries:" : "SvenVanCaekenberghe 8/18/2011 14:25", - "handlePutMczEntry:" : "SvenVanCaekenberghe 1/30/2013 21:08", - "handleRequest:" : "SvenVanCaekenberghe 1/4/2011 13:42", - "isValidMczName:" : "SvenVanCaekenberghe 9/17/2010 10:24", - "mczEntries" : "SvenVanCaekenberghe 9/17/2010 10:21", - "repositoryListing" : "SvenVanCaekenberghe 9/17/2010 11:00", - "value:" : "SvenVanCaekenberghe 8/22/2012 14:41" } } diff --git a/repository/Zinc-FileSystem.package/ZnMonticelloServerDelegate.class/properties.json b/repository/Zinc-FileSystem.package/ZnMonticelloServerDelegate.class/properties.json deleted file mode 100644 index c8cb406e0..000000000 --- a/repository/Zinc-FileSystem.package/ZnMonticelloServerDelegate.class/properties.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "category" : "Zinc-FileSystem", - "classinstvars" : [ - ], - "classvars" : [ - ], - "commentStamp" : "", - "instvars" : [ - "directory" ], - "name" : "ZnMonticelloServerDelegate", - "pools" : [ - ], - "super" : "Object", - "type" : "normal" } diff --git a/repository/Zinc-FileSystem.package/ZnStaticFileServerDelegate.class/instance/redirectNeededFor.actualFilename..st b/repository/Zinc-FileSystem.package/ZnStaticFileServerDelegate.class/instance/redirectNeededFor.actualFilename..st deleted file mode 100644 index 977e82658..000000000 --- a/repository/Zinc-FileSystem.package/ZnStaticFileServerDelegate.class/instance/redirectNeededFor.actualFilename..st +++ /dev/null @@ -1,4 +0,0 @@ -private -redirectNeededFor: uri actualFilename: actualFilename - uri isDirectoryPath ifTrue: [ ^ false ]. - ^ (actualFilename endsWith: uri lastPathSegment) not \ No newline at end of file diff --git a/repository/Zinc-FileSystem.package/ZnStaticFileServerDelegate.class/methodProperties.json b/repository/Zinc-FileSystem.package/ZnStaticFileServerDelegate.class/methodProperties.json deleted file mode 100644 index 2acdd3747..000000000 --- a/repository/Zinc-FileSystem.package/ZnStaticFileServerDelegate.class/methodProperties.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "class" : { - "defaultMimeTypeExpirations" : "SvenVanCaekenberghe 5/14/2012 10:26" }, - "instance" : { - "actualFilenameFor:" : "SvenVanCaekenberghe 7/3/2012 16:38", - "directory" : "SvenVanCaekenberghe 4/26/2011 11:06", - "directory:" : "SvenVanCaekenberghe 4/26/2011 11:07", - "directoryRedirectFor:" : "SvenVanCaekenberghe 4/26/2011 12:35", - "expirationDateFor:" : "SvenVanCaekenberghe 5/14/2012 10:30", - "handleRequest:" : "PaulDeBruicker 5/12/2012 09:56", - "indexFileIn:" : "SvenVanCaekenberghe 7/3/2012 14:43", - "maxAgeFor:" : "SvenVanCaekenberghe 5/14/2012 09:41", - "mimeTypeExpirations" : "SvenVanCaekenberghe 5/14/2012 09:39", - "mimeTypeExpirations:" : "SvenVanCaekenberghe 5/14/2012 09:39", - "prefix" : "SvenVanCaekenberghe 4/26/2011 12:46", - "prefix:" : "SvenVanCaekenberghe 4/26/2011 11:08", - "prefixFromString:" : "SvenVanCaekenberghe 4/26/2011 11:09", - "redirectNeededFor:actualFilename:" : "SvenVanCaekenberghe 1/14/2013 11:37", - "responseForFile:fromRequest:" : "SvenVanCaekenberghe 7/3/2012 14:56", - "value:" : "SvenVanCaekenberghe 8/22/2012 14:41" } } diff --git a/repository/Zinc-FileSystem.package/monticello.meta/version b/repository/Zinc-FileSystem.package/monticello.meta/version deleted file mode 100644 index 8f13b029d..000000000 --- a/repository/Zinc-FileSystem.package/monticello.meta/version +++ /dev/null @@ -1 +0,0 @@ -(name 'Zinc-FileSystem-SvenVanCaekenberghe.9' message 'Moving ZnMonticelloServerDelegate from Zinc-HTTP-Client-Server to Zinc-FileSystem and Zinc-FileSystem-Legacy; Ported to FileSystem' id 'e3e4ac01-a11e-4a2b-9161-1d65a7e6c006' date '30 January 2013' time '9:12:41.494 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Zinc-FileSystem-SvenVanCaekenberghe.8' message 'tracking API changes' id '3886af4a-5c10-4267-b30c-40212c6d845d' date '14 January 2013' time '1:19:15.151 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Zinc-FileSystem-SvenVanCaekenberghe.7' message 'fixed ZnFileSystemUtils class>>#fileNamed:do: to use #writeStreamDo:' id 'e20ba17f-3b3a-4d63-b518-7498f4f085d3' date '14 September 2012' time '8:24:02.708 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Zinc-FileSystem-SvenVanCaekenberghe.6' message 'added ZnFileSystemUtils class>>#directory:' id '857a92bc-4e38-4f39-b301-8fc47e5f5ab3' date '28 August 2012' time '9:26:22.191 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Zinc-FileSystem-MarcusDenker.5' message 'Issue 6300: Detach keymaping shortcuts http://code.google.com/p/pharo/issues/detail?id=6300 Issue 6332: Zero in DateAndTime offset http://code.google.com/p/pharo/issues/detail?id=6332 Issue 6333: FileSystem refactoring http://code.google.com/p/pharo/issues/detail?id=6333' id '45c87a8c-d3eb-4b2a-a288-8f8b6d9578db' date '12 July 2012' time '12:04:19.764 pm' author 'MarcusDenker' ancestors ((name 'Zinc-FileSystem-abc.4' message 'major cleanup of FileSystem' id '8341dc4e-09af-413c-8bd4-b6b64fddd9d2' date '10 July 2012' time '11:12:39.495 pm' author 'abc' ancestors ((name 'Zinc-FileSystem-MarcusDenker.3' message 'ScriptLoader new addHomeRepositoryToAllPackages. Compiler recompileAll.' id '1eed2077-f0ae-4a4d-8f23-f22fcdee2ec5' date '5 July 2012' time '9:05:03.53 am' author 'MarcusDenker' ancestors ((name 'Zinc-FileSystem-SeanDeNigris.2' message '* Remove empty FileSystem-Legacy category' id '15a3ad74-95f8-426f-b252-203a63ee86fe' date '5 July 2012' time '1:00:40.15 am' author 'SeanDeNigris' ancestors ((name 'Zinc-FileSystem-SvenVanCaekenberghe.1' message 'introduction of the Zinc-FileSystem package (including the new ZnFileSystemUtils class) to deal with pre/post FIleSystem introduction in Pharo 2.0 - this is the new code' id '86bb1c9c-e744-4d9f-a31d-3a31f82a3775' date '3 July 2012' time '4:50:07.683 pm' author 'SvenVanCaekenberghe' ancestors () stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())(name 'Zinc-FileSystem-SvenVanCaekenberghe.5' message 'added ZnStaticFileServerDelegate>>#value:' id 'a5200061-5273-446c-85c9-83969529e2b7' date '22 August 2012' time '2:58:31.355 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Zinc-FileSystem-SvenVanCaekenberghe.4' message 'fixed a logic problem in ZnFileSystemUtils class>>#downloadPathTo:for:' id '89d4336a-deb2-4d29-ae1a-cad2c0ac7e3c' date '20 July 2012' time '1:08:51.891 pm' author 'SvenVanCaekenberghe' ancestors ((id '1eed2077-f0ae-4a4d-8f23-f22fcdee2ec5')) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ()) \ No newline at end of file diff --git a/repository/Zinc-GemStone-Character-Encoding-Core.v37.package/.filetree b/repository/Zinc-GemStone-Character-Encoding-Core.v37.package/.filetree new file mode 100644 index 000000000..57a679737 --- /dev/null +++ b/repository/Zinc-GemStone-Character-Encoding-Core.v37.package/.filetree @@ -0,0 +1,5 @@ +{ + "separateMethodMetaAndSource" : false, + "noMethodMetaData" : true, + "useCypressPropertiesFile" : true +} \ No newline at end of file diff --git a/repository/Zinc-GemStone-Character-Encoding-Core.v37.package/SocketStream.extension/class/openConnectionToHost.port..st b/repository/Zinc-GemStone-Character-Encoding-Core.v37.package/SocketStream.extension/class/openConnectionToHost.port..st new file mode 100644 index 000000000..c0d0ad9b4 --- /dev/null +++ b/repository/Zinc-GemStone-Character-Encoding-Core.v37.package/SocketStream.extension/class/openConnectionToHost.port..st @@ -0,0 +1,13 @@ +*zinc-gemstone-character-encoding-core +openConnectionToHost: hostAddress port: portNumber + | theAddress | + theAddress := hostAddress. + (hostAddress isKindOf: ByteArray) + ifTrue: [ + theAddress := ''. + 1 to: hostAddress size - 1 do: [ :index | theAddress := theAddress , (hostAddress at: index) printString , '.' ]. + theAddress := theAddress , (hostAddress at: hostAddress size) printString ]. + ^ self + openConnectionToHost: theAddress + port: portNumber + timeout: SocketStreamSocket standardTimeout \ No newline at end of file diff --git a/repository/Zinc-GemStone-Character-Encoding-Core.v37.package/SocketStream.extension/instance/rawStream.st b/repository/Zinc-GemStone-Character-Encoding-Core.v37.package/SocketStream.extension/instance/rawStream.st new file mode 100644 index 000000000..8e51188c7 --- /dev/null +++ b/repository/Zinc-GemStone-Character-Encoding-Core.v37.package/SocketStream.extension/instance/rawStream.st @@ -0,0 +1,7 @@ +*zinc-gemstone-character-encoding-core +rawStream + "Answer the innermost stream wrapped by the receiver, e.g. a raw binary file stream, + socket stream, or regular Read/WriteStream. + Since this the base stream, answer ourself." + + ^ self \ No newline at end of file diff --git a/repository/Zinc-GemStone-Character-Encoding-Core.v37.package/SocketStream.extension/instance/wrappedStream.st b/repository/Zinc-GemStone-Character-Encoding-Core.v37.package/SocketStream.extension/instance/wrappedStream.st new file mode 100644 index 000000000..88df752f5 --- /dev/null +++ b/repository/Zinc-GemStone-Character-Encoding-Core.v37.package/SocketStream.extension/instance/wrappedStream.st @@ -0,0 +1,6 @@ +*zinc-gemstone-character-encoding-core +wrappedStream + "Answer the stream that the receiver wraps. + Since this the base stream, answer nil" + + ^ nil \ No newline at end of file diff --git a/repository/Zinc-GemStone-Character-Encoding-Core.v37.package/SocketStream.extension/properties.json b/repository/Zinc-GemStone-Character-Encoding-Core.v37.package/SocketStream.extension/properties.json new file mode 100644 index 000000000..797e09e50 --- /dev/null +++ b/repository/Zinc-GemStone-Character-Encoding-Core.v37.package/SocketStream.extension/properties.json @@ -0,0 +1,3 @@ +{ + "name" : "SocketStream" +} \ No newline at end of file diff --git a/repository/Zinc-GemStone-Character-Encoding-Core.v37.package/ZnBase64Encoder.extension/instance/isLegalCharacter..st b/repository/Zinc-GemStone-Character-Encoding-Core.v37.package/ZnBase64Encoder.extension/instance/isLegalCharacter..st new file mode 100644 index 000000000..c70824490 --- /dev/null +++ b/repository/Zinc-GemStone-Character-Encoding-Core.v37.package/ZnBase64Encoder.extension/instance/isLegalCharacter..st @@ -0,0 +1,8 @@ +*zinc-gemstone-character-encoding-core +isLegalCharacter: character + "Protocol: private" + "Return true when character is part of my alphabet" + | code | + code := character charCode. + ^ (code between: 0 and: 127) + and: [ (inverse at: code + 1) notNil ] diff --git a/repository/Zinc-GemStone-Character-Encoding-Core.v37.package/ZnBase64Encoder.extension/instance/valueForCharacter..st b/repository/Zinc-GemStone-Character-Encoding-Core.v37.package/ZnBase64Encoder.extension/instance/valueForCharacter..st new file mode 100644 index 000000000..3c0ede7e5 --- /dev/null +++ b/repository/Zinc-GemStone-Character-Encoding-Core.v37.package/ZnBase64Encoder.extension/instance/valueForCharacter..st @@ -0,0 +1,8 @@ +*zinc-gemstone-character-encoding-core +valueForCharacter: char + "Protocol: private" + | code | + code := char charCode. + (code between: 0 and: 127) + ifTrue: [ (inverse at: code + 1) ifNotNil: [ :byteValue | ^ byteValue ] ]. + ZnCharacterEncodingError signal: 'Illegal Base64 input' diff --git a/repository/Zinc-GemStone-Character-Encoding-Core.v37.package/ZnBase64Encoder.extension/properties.json b/repository/Zinc-GemStone-Character-Encoding-Core.v37.package/ZnBase64Encoder.extension/properties.json new file mode 100644 index 000000000..164ca0ea8 --- /dev/null +++ b/repository/Zinc-GemStone-Character-Encoding-Core.v37.package/ZnBase64Encoder.extension/properties.json @@ -0,0 +1,2 @@ +{ + "name" : "ZnBase64Encoder" } diff --git a/repository/Zinc-GemStone-Character-Encoding-Core.v37.package/ZnNewLineWriterStream.extension/instance/in..st b/repository/Zinc-GemStone-Character-Encoding-Core.v37.package/ZnNewLineWriterStream.extension/instance/in..st new file mode 100644 index 000000000..ae6197382 --- /dev/null +++ b/repository/Zinc-GemStone-Character-Encoding-Core.v37.package/ZnNewLineWriterStream.extension/instance/in..st @@ -0,0 +1,7 @@ +*zinc-gemstone-character-encoding-core +in: aBlock + "Protocol: evaluating" + "Added for ZnCookieJar>>writeNetscapeFormatTo:" + "Evaluate the given block with the receiver as its argument." + + ^ aBlock value: self diff --git a/repository/Zinc-GemStone-Character-Encoding-Core.v37.package/ZnNewLineWriterStream.extension/properties.json b/repository/Zinc-GemStone-Character-Encoding-Core.v37.package/ZnNewLineWriterStream.extension/properties.json new file mode 100644 index 000000000..1aa639a1e --- /dev/null +++ b/repository/Zinc-GemStone-Character-Encoding-Core.v37.package/ZnNewLineWriterStream.extension/properties.json @@ -0,0 +1,2 @@ +{ + "name" : "ZnNewLineWriterStream" } diff --git a/repository/Zinc-GemStone-Character-Encoding-Core.v37.package/ZnUTF8EncoderGS.extension/instance/backOnStream..st b/repository/Zinc-GemStone-Character-Encoding-Core.v37.package/ZnUTF8EncoderGS.extension/instance/backOnStream..st new file mode 100644 index 000000000..05452d25e --- /dev/null +++ b/repository/Zinc-GemStone-Character-Encoding-Core.v37.package/ZnUTF8EncoderGS.extension/instance/backOnStream..st @@ -0,0 +1,6 @@ +*zinc-gemstone-character-encoding-core +backOnStream: stream + "Protocol: encoding - decoding" + "Move back one character on stream" + + [ (stream back bitAnd: 2r11000000) == 2r10000000 ] whileTrue \ No newline at end of file diff --git a/repository/Zinc-GemStone-Character-Encoding-Core.v37.package/ZnUTF8EncoderGS.extension/properties.json b/repository/Zinc-GemStone-Character-Encoding-Core.v37.package/ZnUTF8EncoderGS.extension/properties.json new file mode 100644 index 000000000..7eec25d6a --- /dev/null +++ b/repository/Zinc-GemStone-Character-Encoding-Core.v37.package/ZnUTF8EncoderGS.extension/properties.json @@ -0,0 +1,2 @@ +{ + "name" : "ZnUTF8EncoderGS" } diff --git a/repository/Zinc-GemStone-Character-Encoding-Core.v37.package/ZnUTFEncoder.extension/instance/decodeBytes..st b/repository/Zinc-GemStone-Character-Encoding-Core.v37.package/ZnUTFEncoder.extension/instance/decodeBytes..st new file mode 100644 index 000000000..d38343935 --- /dev/null +++ b/repository/Zinc-GemStone-Character-Encoding-Core.v37.package/ZnUTFEncoder.extension/instance/decodeBytes..st @@ -0,0 +1,17 @@ +*zinc-gemstone-character-encoding-core +decodeBytes: bytes + "Protocol: convenience" + "Overridden to prevent the automagic switch from ByteString to QuadByteString. + See also #decodeBytesIntoQuadByteString:" + + | byteStream | + byteStream := bytes readStream. + ^ String streamContents: [ :stream | + [ byteStream atEnd ] whileFalse: [ | codePoint | + codePoint := self nextCodePointFromStream: byteStream. + (codePoint > 255 and: [ stream originalContents isQuadByteString not ]) + ifTrue: [ | quadByteString position | + position := stream position. + quadByteString := QuadByteString withAll: stream originalContents. + stream on: quadByteString; setFrom: position + 1 to: position ]. + stream nextPut: (Character value: codePoint) ] ] diff --git a/repository/Zinc-GemStone-Character-Encoding-Core.v37.package/ZnUTFEncoder.extension/instance/decodeBytesIntoQuadByteString..st b/repository/Zinc-GemStone-Character-Encoding-Core.v37.package/ZnUTFEncoder.extension/instance/decodeBytesIntoQuadByteString..st new file mode 100644 index 000000000..9a3b1af16 --- /dev/null +++ b/repository/Zinc-GemStone-Character-Encoding-Core.v37.package/ZnUTFEncoder.extension/instance/decodeBytesIntoQuadByteString..st @@ -0,0 +1,10 @@ +*zinc-gemstone-character-encoding-core +decodeBytesIntoQuadByteString: bytes + "Protocol: convenience" + "Variant of #decodeBytes: that is faster when you know upfront that a QuadByteString is probably needed" + + | byteStream | + byteStream := bytes readStream. + ^ QuadByteString streamContents: [ :stream | + [ byteStream atEnd ] whileFalse: [ + stream nextPut: (self nextFromStream: byteStream) ] ] diff --git a/repository/Zinc-GemStone-Character-Encoding-Core.v37.package/ZnUTFEncoder.extension/instance/decodeBytesIntoWideString..st b/repository/Zinc-GemStone-Character-Encoding-Core.v37.package/ZnUTFEncoder.extension/instance/decodeBytesIntoWideString..st new file mode 100644 index 000000000..8be4075cd --- /dev/null +++ b/repository/Zinc-GemStone-Character-Encoding-Core.v37.package/ZnUTFEncoder.extension/instance/decodeBytesIntoWideString..st @@ -0,0 +1,4 @@ +*zinc-gemstone-character-encoding-core +decodeBytesIntoWideString: bytes + "Protocol: convenience" + ^ self decodeBytesIntoQuadByteString: bytes \ No newline at end of file diff --git a/repository/Zinc-GemStone-Character-Encoding-Core.v37.package/ZnUTFEncoder.extension/properties.json b/repository/Zinc-GemStone-Character-Encoding-Core.v37.package/ZnUTFEncoder.extension/properties.json new file mode 100644 index 000000000..c992dce7d --- /dev/null +++ b/repository/Zinc-GemStone-Character-Encoding-Core.v37.package/ZnUTFEncoder.extension/properties.json @@ -0,0 +1,2 @@ +{ + "name" : "ZnUTFEncoder" } diff --git a/repository/Zinc-GemStone-Character-Encoding-Core.v37.package/monticello.meta/categories.st b/repository/Zinc-GemStone-Character-Encoding-Core.v37.package/monticello.meta/categories.st new file mode 100644 index 000000000..b4c5e4df3 --- /dev/null +++ b/repository/Zinc-GemStone-Character-Encoding-Core.v37.package/monticello.meta/categories.st @@ -0,0 +1 @@ +self packageOrganizer ensurePackage: #'Zinc-GemStone-Character-Encoding-Core' withTags: #()! diff --git a/repository/Zodiac-Core.package/monticello.meta/initializers.st b/repository/Zinc-GemStone-Character-Encoding-Core.v37.package/monticello.meta/initializers.st similarity index 100% rename from repository/Zodiac-Core.package/monticello.meta/initializers.st rename to repository/Zinc-GemStone-Character-Encoding-Core.v37.package/monticello.meta/initializers.st diff --git a/repository/Zinc-GemStone-Character-Encoding-Core.v37.package/monticello.meta/package b/repository/Zinc-GemStone-Character-Encoding-Core.v37.package/monticello.meta/package new file mode 100644 index 000000000..98862539e --- /dev/null +++ b/repository/Zinc-GemStone-Character-Encoding-Core.v37.package/monticello.meta/package @@ -0,0 +1 @@ +(name 'Zinc-GemStone-Character-Encoding-Core') \ No newline at end of file diff --git a/repository/Zinc-GemStone-Character-Encoding-Core.v37.package/properties.json b/repository/Zinc-GemStone-Character-Encoding-Core.v37.package/properties.json new file mode 100644 index 000000000..6f31cf5a2 --- /dev/null +++ b/repository/Zinc-GemStone-Character-Encoding-Core.v37.package/properties.json @@ -0,0 +1 @@ +{ } \ No newline at end of file diff --git a/repository/Zinc-GemStone-HTTP-Examples.package/.filetree b/repository/Zinc-GemStone-HTTP-Examples.package/.filetree new file mode 100644 index 000000000..57a679737 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP-Examples.package/.filetree @@ -0,0 +1,5 @@ +{ + "separateMethodMetaAndSource" : false, + "noMethodMetaData" : true, + "useCypressPropertiesFile" : true +} \ No newline at end of file diff --git a/repository/Zinc-GemStone-HTTP-Examples.package/ZnReadEvalPrintDelegate.class/README.md b/repository/Zinc-GemStone-HTTP-Examples.package/ZnReadEvalPrintDelegate.class/README.md new file mode 100644 index 000000000..40d9391ce --- /dev/null +++ b/repository/Zinc-GemStone-HTTP-Examples.package/ZnReadEvalPrintDelegate.class/README.md @@ -0,0 +1 @@ +Unit test for ZnReadEvalPrintDelegate \ No newline at end of file diff --git a/repository/Zinc-GemStone-HTTP-Examples.package/ZnReadEvalPrintDelegate.class/class/startInServerOn..st b/repository/Zinc-GemStone-HTTP-Examples.package/ZnReadEvalPrintDelegate.class/class/startInServerOn..st new file mode 100644 index 000000000..890f24e3e --- /dev/null +++ b/repository/Zinc-GemStone-HTTP-Examples.package/ZnReadEvalPrintDelegate.class/class/startInServerOn..st @@ -0,0 +1,12 @@ +*zinc-gemstone-http-examples +startInServerOn: port + "Protocol: public" + "Start a new server bound to port on the local network running a REPL web service" + + "self startInServerOn: 1701" + + ^ (ZnServer on: port) + bindingAddress: (GsSocket getHostAddressByName: 'localhost'); + delegate: self new; + start; + yourself \ No newline at end of file diff --git a/repository/Zinc-GemStone-HTTP-Examples.package/ZnReadEvalPrintDelegate.class/instance/evaluate..st b/repository/Zinc-GemStone-HTTP-Examples.package/ZnReadEvalPrintDelegate.class/instance/evaluate..st new file mode 100644 index 000000000..d05386b9c --- /dev/null +++ b/repository/Zinc-GemStone-HTTP-Examples.package/ZnReadEvalPrintDelegate.class/instance/evaluate..st @@ -0,0 +1,18 @@ +*zinc-gemstone-http-examples +evaluate: string + "Protocol: private" + | output | + output := String streamContents: [ :out | + [ | result | + result := string evaluate. + out print: result; + cr ] + on: Error + do: [ :exception | + out nextPutAll: 'Error evaluating: ' , string printString; + cr; + print: exception; + cr; + nextPutAll: (GsProcess stackReportToLevel: 20) ]. + out cr ]. + ^ String lf join: output lines diff --git a/repository/Zinc-GemStone-HTTP-Examples.package/ZnReadEvalPrintDelegate.class/instance/handleRequest.gemServer..st b/repository/Zinc-GemStone-HTTP-Examples.package/ZnReadEvalPrintDelegate.class/instance/handleRequest.gemServer..st new file mode 100644 index 000000000..17b9b0316 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP-Examples.package/ZnReadEvalPrintDelegate.class/instance/handleRequest.gemServer..st @@ -0,0 +1,15 @@ +*zinc-gemstone-http-examples +handleRequest: request gemServer: gemServer + "Protocol: public" + "compatability with ZnGemServerManagingMultiThreadedServer" + + "To add a GemStone transaction, subclass and use something like the following: + + gemServer + gemServerTransaction: [ ^ self handleRequest: request ] + exceptionSet: ExceptionSet new + + Using `ExceptionSet new` means that exceptions handled up the stack. +" + + ^ self handleRequest: request \ No newline at end of file diff --git a/repository/Zinc-GemStone-HTTP-Examples.package/ZnReadEvalPrintDelegate.class/properties.json b/repository/Zinc-GemStone-HTTP-Examples.package/ZnReadEvalPrintDelegate.class/properties.json new file mode 100644 index 000000000..82557c51c --- /dev/null +++ b/repository/Zinc-GemStone-HTTP-Examples.package/ZnReadEvalPrintDelegate.class/properties.json @@ -0,0 +1,11 @@ +{ + "commentStamp" : "SvenVanCaekenberghe 12/8/2019 14:06", + "super" : "TestCase", + "category" : "Zinc-GemStone-HTTP-Examples", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "ZnReadEvalPrintDelegateTest", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Zinc-GemStone-HTTP-Examples.package/ZnStaticFileServerDelegateTest.extension/instance/withServerDo..st b/repository/Zinc-GemStone-HTTP-Examples.package/ZnStaticFileServerDelegateTest.extension/instance/withServerDo..st new file mode 100644 index 000000000..0d0432b2c --- /dev/null +++ b/repository/Zinc-GemStone-HTTP-Examples.package/ZnStaticFileServerDelegateTest.extension/instance/withServerDo..st @@ -0,0 +1,15 @@ +*zinc-gemstone-http-examples +withServerDo: block + "Protocol: private" + | server staticFileServerDelegate | + server := super withServerDo: block. + [ + (staticFileServerDelegate := ZnStaticFileServerDelegate new) + prefixFromString: 'local-files'; + directory: ZnFileSystemUtils defaultDirectory; + mimeTypeExpirations: ZnStaticFileServerDelegate defaultMimeTypeExpirations. + server delegate: staticFileServerDelegate. + server start. + self assert: server isRunning & server isListening. + block cull: server ] + ensure: [ server stop ] \ No newline at end of file diff --git a/repository/Zinc-GemStone-HTTP-Examples.package/ZnStaticFileServerDelegateTest.extension/properties.json b/repository/Zinc-GemStone-HTTP-Examples.package/ZnStaticFileServerDelegateTest.extension/properties.json new file mode 100644 index 000000000..c2831edb2 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP-Examples.package/ZnStaticFileServerDelegateTest.extension/properties.json @@ -0,0 +1,2 @@ +{ + "name" : "ZnStaticFileServerDelegateTest" } diff --git a/repository/Zinc-GemStone-HTTP-Examples.package/ZnTestRunnerDelegate.extension/class/startInServerOn..st b/repository/Zinc-GemStone-HTTP-Examples.package/ZnTestRunnerDelegate.extension/class/startInServerOn..st new file mode 100644 index 000000000..20beb4943 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP-Examples.package/ZnTestRunnerDelegate.extension/class/startInServerOn..st @@ -0,0 +1,12 @@ +*zinc-gemstone-http-examples +startInServerOn: port + "Protocol: public" + "Start a new server bound to port on the local network running a test runner web service" + + "self startInServerOn: 1701" + + ^ (ZnServer on: port) + bindingAddress: (GsSocket getHostAddressByName: 'localhost'); + delegate: self new; + start; + yourself \ No newline at end of file diff --git a/repository/Zinc-GemStone-HTTP-Examples.package/ZnTestRunnerDelegate.extension/instance/handleRequest.gemServer..st b/repository/Zinc-GemStone-HTTP-Examples.package/ZnTestRunnerDelegate.extension/instance/handleRequest.gemServer..st new file mode 100644 index 000000000..17b9b0316 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP-Examples.package/ZnTestRunnerDelegate.extension/instance/handleRequest.gemServer..st @@ -0,0 +1,15 @@ +*zinc-gemstone-http-examples +handleRequest: request gemServer: gemServer + "Protocol: public" + "compatability with ZnGemServerManagingMultiThreadedServer" + + "To add a GemStone transaction, subclass and use something like the following: + + gemServer + gemServerTransaction: [ ^ self handleRequest: request ] + exceptionSet: ExceptionSet new + + Using `ExceptionSet new` means that exceptions handled up the stack. +" + + ^ self handleRequest: request \ No newline at end of file diff --git a/repository/Zinc-GemStone-HTTP-Examples.package/ZnTestRunnerDelegate.extension/properties.json b/repository/Zinc-GemStone-HTTP-Examples.package/ZnTestRunnerDelegate.extension/properties.json new file mode 100644 index 000000000..be238d6a1 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP-Examples.package/ZnTestRunnerDelegate.extension/properties.json @@ -0,0 +1,2 @@ +{ + "name" : "ZnTestRunnerDelegate" } diff --git a/repository/Zinc-GemStone-HTTP-Examples.package/monticello.meta/categories.st b/repository/Zinc-GemStone-HTTP-Examples.package/monticello.meta/categories.st new file mode 100644 index 000000000..08d8733da --- /dev/null +++ b/repository/Zinc-GemStone-HTTP-Examples.package/monticello.meta/categories.st @@ -0,0 +1 @@ +self packageOrganizer ensurePackage: #'Zinc-GemStone-HTTP-Examples' withTags: #()! diff --git a/repository/Zodiac-Tests.package/monticello.meta/initializers.st b/repository/Zinc-GemStone-HTTP-Examples.package/monticello.meta/initializers.st similarity index 100% rename from repository/Zodiac-Tests.package/monticello.meta/initializers.st rename to repository/Zinc-GemStone-HTTP-Examples.package/monticello.meta/initializers.st diff --git a/repository/Zinc-GemStone-HTTP-Examples.package/monticello.meta/package b/repository/Zinc-GemStone-HTTP-Examples.package/monticello.meta/package new file mode 100644 index 000000000..2f7c58594 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP-Examples.package/monticello.meta/package @@ -0,0 +1 @@ +(name 'Zinc-GemStone-HTTP-Examples') \ No newline at end of file diff --git a/repository/Zinc-GemStone-HTTP-Examples.package/properties.json b/repository/Zinc-GemStone-HTTP-Examples.package/properties.json new file mode 100644 index 000000000..6f31cf5a2 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP-Examples.package/properties.json @@ -0,0 +1 @@ +{ } \ No newline at end of file diff --git a/repository/Zinc-GemStone-HTTP.package/.filetree b/repository/Zinc-GemStone-HTTP.package/.filetree new file mode 100644 index 000000000..57a679737 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/.filetree @@ -0,0 +1,5 @@ +{ + "separateMethodMetaAndSource" : false, + "noMethodMetaData" : true, + "useCypressPropertiesFile" : true +} \ No newline at end of file diff --git a/repository/Zinc-GemStone-HTTP.package/AnsiReadStream.extension/instance/isBinary.st b/repository/Zinc-GemStone-HTTP.package/AnsiReadStream.extension/instance/isBinary.st new file mode 100644 index 000000000..c55dc2c43 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/AnsiReadStream.extension/instance/isBinary.st @@ -0,0 +1,4 @@ +*zinc-gemstone-http +isBinary + "Return true if the receiver is a binary byte stream" + ^itsCollection class == ByteArray \ No newline at end of file diff --git a/repository/Zinc-HTTP.package/AnsiReadStream.extension/properties.json b/repository/Zinc-GemStone-HTTP.package/AnsiReadStream.extension/properties.json similarity index 100% rename from repository/Zinc-HTTP.package/AnsiReadStream.extension/properties.json rename to repository/Zinc-GemStone-HTTP.package/AnsiReadStream.extension/properties.json diff --git a/repository/Zinc-HTTP.package/Base64MimeConverter.extension/class/mimeEncode.multiLine..st b/repository/Zinc-GemStone-HTTP.package/Base64MimeConverter.extension/class/mimeEncode.multiLine..st similarity index 95% rename from repository/Zinc-HTTP.package/Base64MimeConverter.extension/class/mimeEncode.multiLine..st rename to repository/Zinc-GemStone-HTTP.package/Base64MimeConverter.extension/class/mimeEncode.multiLine..st index 39ec4b6bd..b48651299 100644 --- a/repository/Zinc-HTTP.package/Base64MimeConverter.extension/class/mimeEncode.multiLine..st +++ b/repository/Zinc-GemStone-HTTP.package/Base64MimeConverter.extension/class/mimeEncode.multiLine..st @@ -1,4 +1,4 @@ -*zinc-http +*zinc-gemstone-http mimeEncode: aStream multiLine: aBool "Return a ReadWriteStream of characters. The data of aStream is encoded as 65 innocuous characters. (See class comment). 3 bytes in aStream goes to 4 bytes in output." diff --git a/repository/Zinc-HTTP.package/Base64MimeConverter.extension/instance/mimeEncodeOneLine.st b/repository/Zinc-GemStone-HTTP.package/Base64MimeConverter.extension/instance/mimeEncodeOneLine.st similarity index 98% rename from repository/Zinc-HTTP.package/Base64MimeConverter.extension/instance/mimeEncodeOneLine.st rename to repository/Zinc-GemStone-HTTP.package/Base64MimeConverter.extension/instance/mimeEncodeOneLine.st index 90deccd73..a48843752 100644 --- a/repository/Zinc-HTTP.package/Base64MimeConverter.extension/instance/mimeEncodeOneLine.st +++ b/repository/Zinc-GemStone-HTTP.package/Base64MimeConverter.extension/instance/mimeEncodeOneLine.st @@ -1,4 +1,4 @@ -*zinc-http +*zinc-gemstone-http mimeEncodeOneLine "Convert from data to 6 bit characters." diff --git a/repository/Zinc-HTTP.package/Base64MimeConverter.extension/properties.json b/repository/Zinc-GemStone-HTTP.package/Base64MimeConverter.extension/properties.json similarity index 100% rename from repository/Zinc-HTTP.package/Base64MimeConverter.extension/properties.json rename to repository/Zinc-GemStone-HTTP.package/Base64MimeConverter.extension/properties.json diff --git a/repository/Zinc-GemStone-HTTP.package/BinaryOrTextFile.extension/instance/readInto.startingAt.count..st b/repository/Zinc-GemStone-HTTP.package/BinaryOrTextFile.extension/instance/readInto.startingAt.count..st new file mode 100644 index 000000000..c4f4b473b --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/BinaryOrTextFile.extension/instance/readInto.startingAt.count..st @@ -0,0 +1,10 @@ +*zinc-gemstone-http +readInto: aCollection startingAt: startIndex count: n + "Read n objects into the given collection. + Return number of elements that have been read." + + | obj | + 0 to: n - 1 do: [ :i | + (obj := self next) == nil ifTrue: [ ^ i ]. + aCollection at: startIndex + i put: obj ]. + ^ n \ No newline at end of file diff --git a/repository/Zinc-HTTP.package/BinaryOrTextFile.extension/properties.json b/repository/Zinc-GemStone-HTTP.package/BinaryOrTextFile.extension/properties.json similarity index 100% rename from repository/Zinc-HTTP.package/BinaryOrTextFile.extension/properties.json rename to repository/Zinc-GemStone-HTTP.package/BinaryOrTextFile.extension/properties.json diff --git a/repository/Zinc-HTTP.package/BlockClosure.extension/instance/forkAt.named..st b/repository/Zinc-GemStone-HTTP.package/BlockClosure.extension/instance/forkAt.named..st similarity index 85% rename from repository/Zinc-HTTP.package/BlockClosure.extension/instance/forkAt.named..st rename to repository/Zinc-GemStone-HTTP.package/BlockClosure.extension/instance/forkAt.named..st index c52efaf76..9d967e003 100644 --- a/repository/Zinc-HTTP.package/BlockClosure.extension/instance/forkAt.named..st +++ b/repository/Zinc-GemStone-HTTP.package/BlockClosure.extension/instance/forkAt.named..st @@ -1,4 +1,4 @@ -*zinc-http +*zinc-gemstone-http forkAt: priority named: aName "forks the receiver as a new process at the given priority" diff --git a/repository/Zinc-HTTP.package/BlockClosure.extension/properties.json b/repository/Zinc-GemStone-HTTP.package/BlockClosure.extension/properties.json similarity index 100% rename from repository/Zinc-HTTP.package/BlockClosure.extension/properties.json rename to repository/Zinc-GemStone-HTTP.package/BlockClosure.extension/properties.json diff --git a/repository/Zinc-GemStone-HTTP.package/ByteArray.extension/instance/base64Encoded.st b/repository/Zinc-GemStone-HTTP.package/ByteArray.extension/instance/base64Encoded.st new file mode 100644 index 000000000..156d55dbd --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/ByteArray.extension/instance/base64Encoded.st @@ -0,0 +1,11 @@ +*zinc-gemstone-http +base64Encoded + "Encode the receiver using Base64, returning a String. + Base64 encoding is a technique to represent binary data as ASCII text. + The inverse operation is String>>#base64Decoded" + + "(0 to: 255) asByteArray base64Encoded" + "(Integer primesUpTo: 255) asByteArray base64Encoded" + "'Hello World!' utf8Encoded base64Encoded" + + ^ ZnBase64Encoder new encode: self \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-GS24-Core.package/ByteArray.extension/properties.json b/repository/Zinc-GemStone-HTTP.package/ByteArray.extension/properties.json similarity index 100% rename from repository/Zinc-Character-Encoding-GS24-Core.package/ByteArray.extension/properties.json rename to repository/Zinc-GemStone-HTTP.package/ByteArray.extension/properties.json diff --git a/repository/Zinc-GemStone-HTTP.package/CharacterCollection.extension/instance/isDoubleByteString.st b/repository/Zinc-GemStone-HTTP.package/CharacterCollection.extension/instance/isDoubleByteString.st new file mode 100644 index 000000000..e27926cc2 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/CharacterCollection.extension/instance/isDoubleByteString.st @@ -0,0 +1,4 @@ +*zinc-gemstone-http +isDoubleByteString + + ^ false \ No newline at end of file diff --git a/repository/Zinc-GemStone-HTTP.package/CharacterCollection.extension/instance/isWideString.st b/repository/Zinc-GemStone-HTTP.package/CharacterCollection.extension/instance/isWideString.st new file mode 100644 index 000000000..3afbe269a --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/CharacterCollection.extension/instance/isWideString.st @@ -0,0 +1,4 @@ +*zinc-gemstone-http +isWideString + + ^ false \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/CharacterCollection.extension/properties.json b/repository/Zinc-GemStone-HTTP.package/CharacterCollection.extension/properties.json similarity index 100% rename from repository/Zinc-Character-Encoding-Core.package/CharacterCollection.extension/properties.json rename to repository/Zinc-GemStone-HTTP.package/CharacterCollection.extension/properties.json diff --git a/repository/Zinc-HTTP.package/Collection.extension/instance/printElementsOn..st b/repository/Zinc-GemStone-HTTP.package/Collection.extension/instance/printElementsOn..st similarity index 92% rename from repository/Zinc-HTTP.package/Collection.extension/instance/printElementsOn..st rename to repository/Zinc-GemStone-HTTP.package/Collection.extension/instance/printElementsOn..st index d0ce3cae0..c2c36d0f6 100644 --- a/repository/Zinc-HTTP.package/Collection.extension/instance/printElementsOn..st +++ b/repository/Zinc-GemStone-HTTP.package/Collection.extension/instance/printElementsOn..st @@ -1,4 +1,4 @@ -*zinc-http +*zinc-gemstone-http printElementsOn: aStream "The original code used #skip:, but some streams do not support that, and we don't really need it." diff --git a/repository/Zinc-GemStone-HTTP.package/Collection.extension/properties.json b/repository/Zinc-GemStone-HTTP.package/Collection.extension/properties.json new file mode 100644 index 000000000..93b0dc328 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/Collection.extension/properties.json @@ -0,0 +1,2 @@ +{ + "name" : "Collection" } diff --git a/repository/Zinc-GemStone-HTTP.package/DateAndTimeANSI.extension/instance/printHMSOn..st b/repository/Zinc-GemStone-HTTP.package/DateAndTimeANSI.extension/instance/printHMSOn..st new file mode 100644 index 000000000..3340b5671 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/DateAndTimeANSI.extension/instance/printHMSOn..st @@ -0,0 +1,9 @@ +*zinc-gemstone-http +printHMSOn: aStream + "Print just hh:mm:ss" + aStream + nextPutAll: (self hour asString padded: #left to: 2 with: $0); + nextPut: $:; + nextPutAll: (self minute asString padded: #left to: 2 with: $0); + nextPut: $:; + nextPutAll: (self second rounded asString padded: #left to: 2 with: $0). \ No newline at end of file diff --git a/repository/Zinc-HTTP.package/DateAndTimeANSI.extension/instance/printYMDOn..st b/repository/Zinc-GemStone-HTTP.package/DateAndTimeANSI.extension/instance/printYMDOn..st similarity index 88% rename from repository/Zinc-HTTP.package/DateAndTimeANSI.extension/instance/printYMDOn..st rename to repository/Zinc-GemStone-HTTP.package/DateAndTimeANSI.extension/instance/printYMDOn..st index 343249b80..bd1095b55 100644 --- a/repository/Zinc-HTTP.package/DateAndTimeANSI.extension/instance/printYMDOn..st +++ b/repository/Zinc-GemStone-HTTP.package/DateAndTimeANSI.extension/instance/printYMDOn..st @@ -1,4 +1,4 @@ -*zinc-http +*zinc-gemstone-http printYMDOn: aStream "Print just YYYY-MM-DD part. If the year is negative, prints out '-YYYY-MM-DD'." diff --git a/repository/Zinc-HTTP.package/DateAndTimeANSI.extension/instance/printYMDOn.withLeadingSpace..st b/repository/Zinc-GemStone-HTTP.package/DateAndTimeANSI.extension/instance/printYMDOn.withLeadingSpace..st similarity index 97% rename from repository/Zinc-HTTP.package/DateAndTimeANSI.extension/instance/printYMDOn.withLeadingSpace..st rename to repository/Zinc-GemStone-HTTP.package/DateAndTimeANSI.extension/instance/printYMDOn.withLeadingSpace..st index 41c4f84ab..7542d6c78 100644 --- a/repository/Zinc-HTTP.package/DateAndTimeANSI.extension/instance/printYMDOn.withLeadingSpace..st +++ b/repository/Zinc-GemStone-HTTP.package/DateAndTimeANSI.extension/instance/printYMDOn.withLeadingSpace..st @@ -1,4 +1,4 @@ -*zinc-http +*zinc-gemstone-http printYMDOn: aStream withLeadingSpace: printLeadingSpaceToo "Print just the year, month, and day on aStream. diff --git a/repository/Zinc-HTTP.package/DateAndTimeANSI.extension/properties.json b/repository/Zinc-GemStone-HTTP.package/DateAndTimeANSI.extension/properties.json similarity index 100% rename from repository/Zinc-HTTP.package/DateAndTimeANSI.extension/properties.json rename to repository/Zinc-GemStone-HTTP.package/DateAndTimeANSI.extension/properties.json diff --git a/repository/Zinc-GemStone-HTTP.package/DateTime.extension/instance/asTimeStamp.st b/repository/Zinc-GemStone-HTTP.package/DateTime.extension/instance/asTimeStamp.st new file mode 100644 index 000000000..aa16a4c74 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/DateTime.extension/instance/asTimeStamp.st @@ -0,0 +1,3 @@ +*zinc-gemstone-http +asTimeStamp + ^self \ No newline at end of file diff --git a/repository/Zinc-HTTP.package/DateTime.extension/properties.json b/repository/Zinc-GemStone-HTTP.package/DateTime.extension/properties.json similarity index 100% rename from repository/Zinc-HTTP.package/DateTime.extension/properties.json rename to repository/Zinc-GemStone-HTTP.package/DateTime.extension/properties.json diff --git a/repository/Zinc-HTTP.package/Dictionary.extension/instance/associationsSelect..st b/repository/Zinc-GemStone-HTTP.package/Dictionary.extension/instance/associationsSelect..st similarity index 94% rename from repository/Zinc-HTTP.package/Dictionary.extension/instance/associationsSelect..st rename to repository/Zinc-GemStone-HTTP.package/Dictionary.extension/instance/associationsSelect..st index 22aefd091..2ffc5d668 100644 --- a/repository/Zinc-HTTP.package/Dictionary.extension/instance/associationsSelect..st +++ b/repository/Zinc-GemStone-HTTP.package/Dictionary.extension/instance/associationsSelect..st @@ -1,4 +1,4 @@ -*zinc-http +*zinc-gemstone-http associationsSelect: aBlock "Evaluate aBlock with each of my associations as the argument. Collect into a new dictionary, only those associations for which aBlock evaluates diff --git a/repository/Zinc-GemStone-HTTP.package/Dictionary.extension/properties.json b/repository/Zinc-GemStone-HTTP.package/Dictionary.extension/properties.json new file mode 100644 index 000000000..cb1bf501d --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/Dictionary.extension/properties.json @@ -0,0 +1,2 @@ +{ + "name" : "Dictionary" } diff --git a/repository/Zinc-GemStone-HTTP.package/DirectoryEntry.extension/instance/fullName.st b/repository/Zinc-GemStone-HTTP.package/DirectoryEntry.extension/instance/fullName.st new file mode 100644 index 000000000..330aa1646 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/DirectoryEntry.extension/instance/fullName.st @@ -0,0 +1,3 @@ +*zinc-gemstone-http +fullName + ^self sourceDirectory fullNameFor: self name \ No newline at end of file diff --git a/repository/Zinc-HTTP.package/DirectoryEntry.extension/instance/modificationDateAndTime.st b/repository/Zinc-GemStone-HTTP.package/DirectoryEntry.extension/instance/modificationDateAndTime.st similarity index 86% rename from repository/Zinc-HTTP.package/DirectoryEntry.extension/instance/modificationDateAndTime.st rename to repository/Zinc-GemStone-HTTP.package/DirectoryEntry.extension/instance/modificationDateAndTime.st index 1ad760e0d..feaf63897 100644 --- a/repository/Zinc-HTTP.package/DirectoryEntry.extension/instance/modificationDateAndTime.st +++ b/repository/Zinc-GemStone-HTTP.package/DirectoryEntry.extension/instance/modificationDateAndTime.st @@ -1,4 +1,4 @@ -*zinc-http +*zinc-gemstone-http modificationDateAndTime ^DateAndTime date: modificationTime asDate time: modificationTime asTime offset: TimeZone current offset \ No newline at end of file diff --git a/repository/Zinc-HTTP.package/DirectoryEntry.extension/properties.json b/repository/Zinc-GemStone-HTTP.package/DirectoryEntry.extension/properties.json similarity index 100% rename from repository/Zinc-HTTP.package/DirectoryEntry.extension/properties.json rename to repository/Zinc-GemStone-HTTP.package/DirectoryEntry.extension/properties.json diff --git a/repository/Zinc-GemStone-HTTP.package/DoubleByteString.extension/instance/isDoubleByteString.st b/repository/Zinc-GemStone-HTTP.package/DoubleByteString.extension/instance/isDoubleByteString.st new file mode 100644 index 000000000..fe8490437 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/DoubleByteString.extension/instance/isDoubleByteString.st @@ -0,0 +1,4 @@ +*zinc-gemstone-http +isDoubleByteString + + ^ true \ No newline at end of file diff --git a/repository/Zinc-GemStone-HTTP.package/DoubleByteString.extension/properties.json b/repository/Zinc-GemStone-HTTP.package/DoubleByteString.extension/properties.json new file mode 100644 index 000000000..dbbfbb351 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/DoubleByteString.extension/properties.json @@ -0,0 +1,2 @@ +{ + "name" : "DoubleByteString" } diff --git a/repository/Zinc-GemStone-HTTP.package/Exception.extension/instance/defaultResumeValue.st b/repository/Zinc-GemStone-HTTP.package/Exception.extension/instance/defaultResumeValue.st new file mode 100644 index 000000000..3de0a2ae7 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/Exception.extension/instance/defaultResumeValue.st @@ -0,0 +1,5 @@ +*zinc-gemstone-http +defaultResumeValue + "Answer the value that by default should be returned if the exception is resumed" + + ^ nil \ No newline at end of file diff --git a/repository/Zinc-GemStone-HTTP.package/Exception.extension/instance/resume.st b/repository/Zinc-GemStone-HTTP.package/Exception.extension/instance/resume.st new file mode 100644 index 000000000..b3d21a85b --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/Exception.extension/instance/resume.st @@ -0,0 +1,5 @@ +*zinc-gemstone-http +resume + "Return from the message that signaled the receiver." + + self resume: self defaultResumeValue \ No newline at end of file diff --git a/repository/Zinc-GemStone-HTTP.package/Exception.extension/properties.json b/repository/Zinc-GemStone-HTTP.package/Exception.extension/properties.json new file mode 100644 index 000000000..6dcfd8423 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/Exception.extension/properties.json @@ -0,0 +1,2 @@ +{ + "name" : "Exception" } diff --git a/repository/Zinc-HTTP.package/FileDirectory.extension/instance/^slash.st b/repository/Zinc-GemStone-HTTP.package/FileDirectory.extension/instance/^slash.st similarity index 86% rename from repository/Zinc-HTTP.package/FileDirectory.extension/instance/^slash.st rename to repository/Zinc-GemStone-HTTP.package/FileDirectory.extension/instance/^slash.st index 66bd4d74e..2076d16bc 100644 --- a/repository/Zinc-HTTP.package/FileDirectory.extension/instance/^slash.st +++ b/repository/Zinc-GemStone-HTTP.package/FileDirectory.extension/instance/^slash.st @@ -1,4 +1,4 @@ -*zinc-http +*zinc-gemstone-http / aString "Answer a FileDirectory on a subdirectory named aString, of the receiver." ^ self class on: (self fullNameFor: aString) \ No newline at end of file diff --git a/repository/Zinc-HTTP.package/FileDirectory.extension/properties.json b/repository/Zinc-GemStone-HTTP.package/FileDirectory.extension/properties.json similarity index 100% rename from repository/Zinc-HTTP.package/FileDirectory.extension/properties.json rename to repository/Zinc-GemStone-HTTP.package/FileDirectory.extension/properties.json diff --git a/repository/Zinc-HTTP.package/FileStream.extension/class/detectFile.do..st b/repository/Zinc-GemStone-HTTP.package/FileStream.extension/class/detectFile.do..st similarity index 87% rename from repository/Zinc-HTTP.package/FileStream.extension/class/detectFile.do..st rename to repository/Zinc-GemStone-HTTP.package/FileStream.extension/class/detectFile.do..st index b1cb86c99..19a546de7 100644 --- a/repository/Zinc-HTTP.package/FileStream.extension/class/detectFile.do..st +++ b/repository/Zinc-GemStone-HTTP.package/FileStream.extension/class/detectFile.do..st @@ -1,4 +1,4 @@ -*zinc-http +*zinc-gemstone-http detectFile: aBlock do: anotherBlock ^aBlock value diff --git a/repository/Zinc-GemStone-HTTP.package/FileStream.extension/class/fileNamed.do..st b/repository/Zinc-GemStone-HTTP.package/FileStream.extension/class/fileNamed.do..st new file mode 100644 index 000000000..cfb36823c --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/FileStream.extension/class/fileNamed.do..st @@ -0,0 +1,5 @@ +*zinc-gemstone-http +fileNamed: fileName do: aBlock + "Returns the result of aBlock." + + ^ self detectFile: [ self write: fileName ] do: aBlock \ No newline at end of file diff --git a/repository/Zinc-GemStone-HTTP.package/FileStream.extension/class/newFileNamed.do..st b/repository/Zinc-GemStone-HTTP.package/FileStream.extension/class/newFileNamed.do..st new file mode 100644 index 000000000..a2d45ae9b --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/FileStream.extension/class/newFileNamed.do..st @@ -0,0 +1,5 @@ +*zinc-gemstone-http +newFileNamed: fileName do: aBlock + "Returns the result of aBlock." + + ^ self detectFile: [ self write: fileName ] do: aBlock \ No newline at end of file diff --git a/repository/Zinc-GemStone-HTTP.package/FileStream.extension/class/oldFileNamed.do..st b/repository/Zinc-GemStone-HTTP.package/FileStream.extension/class/oldFileNamed.do..st new file mode 100644 index 000000000..7f6b20ba1 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/FileStream.extension/class/oldFileNamed.do..st @@ -0,0 +1,5 @@ +*zinc-gemstone-http +oldFileNamed: fileName do: aBlock + "Returns the result of aBlock." + + ^ self detectFile: [ self read: fileName ] do: aBlock \ No newline at end of file diff --git a/repository/Zinc-GemStone-HTTP.package/FileStream.extension/class/stdout.st b/repository/Zinc-GemStone-HTTP.package/FileStream.extension/class/stdout.st new file mode 100644 index 000000000..a20c16276 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/FileStream.extension/class/stdout.st @@ -0,0 +1,3 @@ +*zinc-gemstone-http +stdout + ^ GsFile stdoutServer \ No newline at end of file diff --git a/repository/Zinc-HTTP.package/FileStream.extension/properties.json b/repository/Zinc-GemStone-HTTP.package/FileStream.extension/properties.json similarity index 100% rename from repository/Zinc-HTTP.package/FileStream.extension/properties.json rename to repository/Zinc-GemStone-HTTP.package/FileStream.extension/properties.json diff --git a/repository/Zinc-GemStone-HTTP.package/GsProcess.extension/instance/name.st b/repository/Zinc-GemStone-HTTP.package/GsProcess.extension/instance/name.st new file mode 100644 index 000000000..7f8a8371a --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/GsProcess.extension/instance/name.st @@ -0,0 +1,3 @@ +*zinc-gemstone-http +name + ^self label \ No newline at end of file diff --git a/repository/Zinc-HTTP.package/GsProcess.extension/properties.json b/repository/Zinc-GemStone-HTTP.package/GsProcess.extension/properties.json similarity index 100% rename from repository/Zinc-HTTP.package/GsProcess.extension/properties.json rename to repository/Zinc-GemStone-HTTP.package/GsProcess.extension/properties.json diff --git a/repository/Zinc-GemStone-HTTP.package/HTTPProgress.class/README.md b/repository/Zinc-GemStone-HTTP.package/HTTPProgress.class/README.md new file mode 100644 index 000000000..7df6f1fb5 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/HTTPProgress.class/README.md @@ -0,0 +1,9 @@ +I am HTTPProgress, a notification to show progress when using HTTP. + +I include + - total: The total size of the download/upload (if known) + - amount: The completed amount of the download/upload (if known) + +Use #total:, #amount: or #amountLeft: to set the appropriate byte counts to indicate progress. +Use #fraction or #percentage as a value that indicates progress. +Total and amount are optional and can be nil. Test using #isEmpty. diff --git a/repository/Zinc-GemStone-HTTP.package/HTTPProgress.class/class/signal.amount.total..st b/repository/Zinc-GemStone-HTTP.package/HTTPProgress.class/class/signal.amount.total..st new file mode 100644 index 000000000..765d19968 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/HTTPProgress.class/class/signal.amount.total..st @@ -0,0 +1,9 @@ +exceptioninstantiator +signal: signalerText amount: amount total: total + "Create and signal HTTPProgress with amount bytes transferred out of total. + Use an additional signalerText." + + ^ self new + amount: amount; + total: total; + signal: signalerText diff --git a/repository/Zinc-GemStone-HTTP.package/HTTPProgress.class/class/signalAmount.total..st b/repository/Zinc-GemStone-HTTP.package/HTTPProgress.class/class/signalAmount.total..st new file mode 100644 index 000000000..bd6c30301 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/HTTPProgress.class/class/signalAmount.total..st @@ -0,0 +1,8 @@ +exceptioninstantiator +signalAmount: amount total: total + "Create and signal HTTPProgress with amount bytes transferred out of total." + + ^ self new + amount: amount; + total: total; + signal \ No newline at end of file diff --git a/repository/Zinc-GemStone-HTTP.package/HTTPProgress.class/instance/amount..st b/repository/Zinc-GemStone-HTTP.package/HTTPProgress.class/instance/amount..st new file mode 100644 index 000000000..bae1a14a4 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/HTTPProgress.class/instance/amount..st @@ -0,0 +1,5 @@ +accessing +amount: byteCount + "Set the amount of bytes that has already been transferred." + + amount := byteCount \ No newline at end of file diff --git a/repository/Zinc-GemStone-HTTP.package/HTTPProgress.class/instance/amount.st b/repository/Zinc-GemStone-HTTP.package/HTTPProgress.class/instance/amount.st new file mode 100644 index 000000000..aa3758856 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/HTTPProgress.class/instance/amount.st @@ -0,0 +1,6 @@ +accessing +amount + "Answer the amount that has already been transferred. + Can be nil. Should be between 0 and total." + + ^ amount \ No newline at end of file diff --git a/repository/Zinc-GemStone-HTTP.package/HTTPProgress.class/instance/amountLeft..st b/repository/Zinc-GemStone-HTTP.package/HTTPProgress.class/instance/amountLeft..st new file mode 100644 index 000000000..aea4c72f5 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/HTTPProgress.class/instance/amountLeft..st @@ -0,0 +1,6 @@ +accessing +amountLeft: byteCount + "Set the amount that has not yet been transferred. + Can be nil. Should be between 0 and total." + + ^ total ifNotNil: [ amount := total - byteCount ] \ No newline at end of file diff --git a/repository/Zinc-GemStone-HTTP.package/HTTPProgress.class/instance/amountLeft.st b/repository/Zinc-GemStone-HTTP.package/HTTPProgress.class/instance/amountLeft.st new file mode 100644 index 000000000..403d7b2ea --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/HTTPProgress.class/instance/amountLeft.st @@ -0,0 +1,6 @@ +accessing +amountLeft + "Answer the amount that has not yet been transferred. + Can be nil. Should be between 0 and total." + + ^ self isEmpty ifFalse: [ total - amount ] \ No newline at end of file diff --git a/repository/Zinc-GemStone-HTTP.package/HTTPProgress.class/instance/beComplete.st b/repository/Zinc-GemStone-HTTP.package/HTTPProgress.class/instance/beComplete.st new file mode 100644 index 000000000..91fd3d5e3 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/HTTPProgress.class/instance/beComplete.st @@ -0,0 +1,5 @@ +accessing +beComplete + "Make me complete, i.e. indicate that all bytes were transferred." + + amount := total \ No newline at end of file diff --git a/repository/Zinc-GemStone-HTTP.package/HTTPProgress.class/instance/fraction.st b/repository/Zinc-GemStone-HTTP.package/HTTPProgress.class/instance/fraction.st new file mode 100644 index 000000000..41a471a1e --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/HTTPProgress.class/instance/fraction.st @@ -0,0 +1,6 @@ +accessing +fraction + "Answer the fraction of total that has already been transferred. + Can be nil. Should be between 0 and 1." + + ^ self isEmpty ifFalse: [ amount / total ] \ No newline at end of file diff --git a/repository/Zinc-GemStone-HTTP.package/HTTPProgress.class/instance/isComplete.st b/repository/Zinc-GemStone-HTTP.package/HTTPProgress.class/instance/isComplete.st new file mode 100644 index 000000000..acb3e4f9e --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/HTTPProgress.class/instance/isComplete.st @@ -0,0 +1,6 @@ +testing +isComplete + "Answer true when I am complete, i.e. all bytes were transferred. + When I am empty, I am also complete." + + ^ amount = total \ No newline at end of file diff --git a/repository/Zinc-GemStone-HTTP.package/HTTPProgress.class/instance/isEmpty.st b/repository/Zinc-GemStone-HTTP.package/HTTPProgress.class/instance/isEmpty.st new file mode 100644 index 000000000..55bf09f70 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/HTTPProgress.class/instance/isEmpty.st @@ -0,0 +1,5 @@ +testing +isEmpty + "Answer true if I do not contain a numerical progress indication." + + ^ amount isNil or: [ total isNil ] \ No newline at end of file diff --git a/repository/Zinc-GemStone-HTTP.package/HTTPProgress.class/instance/percentage.st b/repository/Zinc-GemStone-HTTP.package/HTTPProgress.class/instance/percentage.st new file mode 100644 index 000000000..d829b93ca --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/HTTPProgress.class/instance/percentage.st @@ -0,0 +1,6 @@ +accessing +percentage + "Answer the percentage of total that has already been transferred. + Can be nil. Should be between 0 and 100." + + ^ self isEmpty ifFalse: [ self fraction * 100 ] \ No newline at end of file diff --git a/repository/Zinc-GemStone-HTTP.package/HTTPProgress.class/instance/printOn..st b/repository/Zinc-GemStone-HTTP.package/HTTPProgress.class/instance/printOn..st new file mode 100644 index 000000000..40f5349e2 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/HTTPProgress.class/instance/printOn..st @@ -0,0 +1,8 @@ +printing +printOn: stream + "Print an extra progress percentage if available" + + super printOn: stream. + self isEmpty + ifFalse: [ + stream space; print: self percentage rounded; nextPut: $% ] diff --git a/repository/Zinc-GemStone-HTTP.package/HTTPProgress.class/instance/total..st b/repository/Zinc-GemStone-HTTP.package/HTTPProgress.class/instance/total..st new file mode 100644 index 000000000..2b8ffd35f --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/HTTPProgress.class/instance/total..st @@ -0,0 +1,5 @@ +accessing +total: byteCount + "Set the total byte count to transfer" + + total := byteCount \ No newline at end of file diff --git a/repository/Zinc-GemStone-HTTP.package/HTTPProgress.class/instance/total.st b/repository/Zinc-GemStone-HTTP.package/HTTPProgress.class/instance/total.st new file mode 100644 index 000000000..fce4fffea --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/HTTPProgress.class/instance/total.st @@ -0,0 +1,5 @@ +accessing +total + "Answer the total byte count to transfer. Can be nil." + + ^ total \ No newline at end of file diff --git a/repository/Zinc-GemStone-HTTP.package/HTTPProgress.class/properties.json b/repository/Zinc-GemStone-HTTP.package/HTTPProgress.class/properties.json new file mode 100644 index 000000000..79b55aceb --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/HTTPProgress.class/properties.json @@ -0,0 +1,15 @@ +{ + "category" : "Zinc-GemStone-HTTP-Notification", + "classinstvars" : [ + ], + "classvars" : [ + ], + "commentStamp" : "", + "instvars" : [ + "total", + "amount" ], + "name" : "HTTPProgress", + "pools" : [ + ], + "super" : "Notification", + "type" : "normal" } diff --git a/repository/Zinc-HTTP.package/Integer.extension/instance/print.on.prefix.length.padded..st b/repository/Zinc-GemStone-HTTP.package/Integer.extension/instance/print.on.prefix.length.padded..st similarity index 96% rename from repository/Zinc-HTTP.package/Integer.extension/instance/print.on.prefix.length.padded..st rename to repository/Zinc-GemStone-HTTP.package/Integer.extension/instance/print.on.prefix.length.padded..st index 5caadedc5..47e37375a 100644 --- a/repository/Zinc-HTTP.package/Integer.extension/instance/print.on.prefix.length.padded..st +++ b/repository/Zinc-GemStone-HTTP.package/Integer.extension/instance/print.on.prefix.length.padded..st @@ -1,4 +1,4 @@ -*zinc-http +*zinc-gemstone-http print: positiveNumberString on: aStream prefix: prefix length: minimum padded: zeroFlag | padLength | padLength := minimum - positiveNumberString size - prefix size. diff --git a/repository/Zinc-HTTP.package/Integer.extension/instance/printOn.base.length.padded..st b/repository/Zinc-GemStone-HTTP.package/Integer.extension/instance/printOn.base.length.padded..st similarity index 92% rename from repository/Zinc-HTTP.package/Integer.extension/instance/printOn.base.length.padded..st rename to repository/Zinc-GemStone-HTTP.package/Integer.extension/instance/printOn.base.length.padded..st index a412f75c1..0212fc50e 100644 --- a/repository/Zinc-HTTP.package/Integer.extension/instance/printOn.base.length.padded..st +++ b/repository/Zinc-GemStone-HTTP.package/Integer.extension/instance/printOn.base.length.padded..st @@ -1,4 +1,4 @@ -*zinc-http +*zinc-gemstone-http printOn: aStream base: base length: minimum padded: zeroFlag | prefix | prefix := self negative ifTrue: ['-'] ifFalse: [String new]. diff --git a/repository/Zinc-HTTP.package/Integer.extension/instance/printStringBase.length.padded..st b/repository/Zinc-GemStone-HTTP.package/Integer.extension/instance/printStringBase.length.padded..st similarity index 87% rename from repository/Zinc-HTTP.package/Integer.extension/instance/printStringBase.length.padded..st rename to repository/Zinc-GemStone-HTTP.package/Integer.extension/instance/printStringBase.length.padded..st index 33d4123a1..443eb36aa 100644 --- a/repository/Zinc-HTTP.package/Integer.extension/instance/printStringBase.length.padded..st +++ b/repository/Zinc-GemStone-HTTP.package/Integer.extension/instance/printStringBase.length.padded..st @@ -1,3 +1,3 @@ -*zinc-http +*zinc-gemstone-http printStringBase: base length: minimum padded: zeroFlag ^String streamContents: [:s| self printOn: s base: base length: minimum padded: zeroFlag] \ No newline at end of file diff --git a/repository/Zinc-HTTP.package/Integer.extension/instance/printStringLength.padded..st b/repository/Zinc-GemStone-HTTP.package/Integer.extension/instance/printStringLength.padded..st similarity index 83% rename from repository/Zinc-HTTP.package/Integer.extension/instance/printStringLength.padded..st rename to repository/Zinc-GemStone-HTTP.package/Integer.extension/instance/printStringLength.padded..st index eda6fa3cc..e30ec0b43 100644 --- a/repository/Zinc-HTTP.package/Integer.extension/instance/printStringLength.padded..st +++ b/repository/Zinc-GemStone-HTTP.package/Integer.extension/instance/printStringLength.padded..st @@ -1,3 +1,3 @@ -*zinc-http +*zinc-gemstone-http printStringLength: minimal padded: zeroFlag ^self printStringBase: 10 length: minimal padded: zeroFlag \ No newline at end of file diff --git a/repository/Zinc-GemStone-HTTP.package/Integer.extension/properties.json b/repository/Zinc-GemStone-HTTP.package/Integer.extension/properties.json new file mode 100644 index 000000000..d27420bea --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/Integer.extension/properties.json @@ -0,0 +1,2 @@ +{ + "name" : "Integer" } diff --git a/repository/Zinc-Resource-Meta-Tests.package/ZnMultiValueDictionaryTests.class/README.md b/repository/Zinc-GemStone-HTTP.package/KeyNotFound.class/README.md similarity index 100% rename from repository/Zinc-Resource-Meta-Tests.package/ZnMultiValueDictionaryTests.class/README.md rename to repository/Zinc-GemStone-HTTP.package/KeyNotFound.class/README.md diff --git a/repository/Zinc-GemStone-HTTP.package/KeyNotFound.class/instance/key..st b/repository/Zinc-GemStone-HTTP.package/KeyNotFound.class/instance/key..st new file mode 100644 index 000000000..904ea5c43 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/KeyNotFound.class/instance/key..st @@ -0,0 +1,3 @@ +accessing +key: aKey + self object: aKey \ No newline at end of file diff --git a/repository/Zinc-GemStone-HTTP.package/KeyNotFound.class/instance/key.st b/repository/Zinc-GemStone-HTTP.package/KeyNotFound.class/instance/key.st new file mode 100644 index 000000000..d3d535466 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/KeyNotFound.class/instance/key.st @@ -0,0 +1,3 @@ +accessing +key + ^ self object \ No newline at end of file diff --git a/repository/Zinc-GemStone-HTTP.package/KeyNotFound.class/instance/standardMessageText.st b/repository/Zinc-GemStone-HTTP.package/KeyNotFound.class/instance/standardMessageText.st new file mode 100644 index 000000000..19119e83d --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/KeyNotFound.class/instance/standardMessageText.st @@ -0,0 +1,9 @@ +private +standardMessageText + "Generate a standard textual description" + + ^ String streamContents: [ :stream | + stream << 'key '. + stream print: self object. + stream << ' not found in '. + stream print: self collection class ] \ No newline at end of file diff --git a/repository/Zinc-GemStone-HTTP.package/KeyNotFound.class/properties.json b/repository/Zinc-GemStone-HTTP.package/KeyNotFound.class/properties.json new file mode 100644 index 000000000..c1829b596 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/KeyNotFound.class/properties.json @@ -0,0 +1,14 @@ +{ + "category" : "Zinc-GemStone-HTTP", + "classinstvars" : [ + ], + "classvars" : [ + ], + "commentStamp" : "", + "instvars" : [ + ], + "name" : "KeyNotFound", + "pools" : [ + ], + "super" : "NotFound", + "type" : "normal" } diff --git a/repository/Zinc-GemStone-HTTP.package/MultiByteString.extension/instance/isWideString.st b/repository/Zinc-GemStone-HTTP.package/MultiByteString.extension/instance/isWideString.st new file mode 100644 index 000000000..82ab6ab4e --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/MultiByteString.extension/instance/isWideString.st @@ -0,0 +1,4 @@ +*zinc-gemstone-http +isWideString + + ^ true \ No newline at end of file diff --git a/repository/Zinc-GemStone-HTTP.package/MultiByteString.extension/properties.json b/repository/Zinc-GemStone-HTTP.package/MultiByteString.extension/properties.json new file mode 100644 index 000000000..274cdffb5 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/MultiByteString.extension/properties.json @@ -0,0 +1,2 @@ +{ + "name" : "MultiByteString" } diff --git a/repository/Zinc-Resource-Meta-Tests.package/ZnResourceMetaUtilsTests.class/README.md b/repository/Zinc-GemStone-HTTP.package/NotFound.class/README.md similarity index 100% rename from repository/Zinc-Resource-Meta-Tests.package/ZnResourceMetaUtilsTests.class/README.md rename to repository/Zinc-GemStone-HTTP.package/NotFound.class/README.md diff --git a/repository/Zinc-HTTP.package/NotFound.class/class/signalFor..st b/repository/Zinc-GemStone-HTTP.package/NotFound.class/class/signalFor..st similarity index 100% rename from repository/Zinc-HTTP.package/NotFound.class/class/signalFor..st rename to repository/Zinc-GemStone-HTTP.package/NotFound.class/class/signalFor..st diff --git a/repository/Zinc-GemStone-HTTP.package/NotFound.class/class/signalFor.in..st b/repository/Zinc-GemStone-HTTP.package/NotFound.class/class/signalFor.in..st new file mode 100644 index 000000000..15a2c3bff --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/NotFound.class/class/signalFor.in..st @@ -0,0 +1,8 @@ +instance creation +signalFor: anObject in: aCollection + "Create and signal a NotFound exception for anObject in aCollection." + + ^ self new + object: anObject; + collection: aCollection; + signal \ No newline at end of file diff --git a/repository/Zinc-GemStone-HTTP.package/NotFound.class/instance/collection..st b/repository/Zinc-GemStone-HTTP.package/NotFound.class/instance/collection..st new file mode 100644 index 000000000..ae6118254 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/NotFound.class/instance/collection..st @@ -0,0 +1,5 @@ +updating +collection: aCollection + "Set the collection where something is not found in" + + self signaler: aCollection \ No newline at end of file diff --git a/repository/Zinc-GemStone-HTTP.package/NotFound.class/instance/collection.st b/repository/Zinc-GemStone-HTTP.package/NotFound.class/instance/collection.st new file mode 100644 index 000000000..55fc600b5 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/NotFound.class/instance/collection.st @@ -0,0 +1,5 @@ +accessing +collection + "Return the collection where something is not found in" + + ^ self signaler \ No newline at end of file diff --git a/repository/Zinc-GemStone-HTTP.package/NotFound.class/instance/messageText.st b/repository/Zinc-GemStone-HTTP.package/NotFound.class/instance/messageText.st new file mode 100644 index 000000000..51c42827a --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/NotFound.class/instance/messageText.st @@ -0,0 +1,5 @@ +accessing +messageText + "Overwritten to initialiaze the message text to a standard text if it has not yet been set" + + ^ messageText ifNil: [ messageText := self standardMessageText ] \ No newline at end of file diff --git a/repository/Zinc-HTTP.package/NotFound.class/instance/object..st b/repository/Zinc-GemStone-HTTP.package/NotFound.class/instance/object..st similarity index 100% rename from repository/Zinc-HTTP.package/NotFound.class/instance/object..st rename to repository/Zinc-GemStone-HTTP.package/NotFound.class/instance/object..st diff --git a/repository/Zinc-HTTP.package/NotFound.class/instance/object.st b/repository/Zinc-GemStone-HTTP.package/NotFound.class/instance/object.st similarity index 100% rename from repository/Zinc-HTTP.package/NotFound.class/instance/object.st rename to repository/Zinc-GemStone-HTTP.package/NotFound.class/instance/object.st diff --git a/repository/Zinc-GemStone-HTTP.package/NotFound.class/instance/signaler..st b/repository/Zinc-GemStone-HTTP.package/NotFound.class/instance/signaler..st new file mode 100644 index 000000000..1e11dfd59 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/NotFound.class/instance/signaler..st @@ -0,0 +1,8 @@ +signaler +signaler: anObject + "Trying to mimic Pharo's Exception in Zinc's NotFound" + "Set the object that is the subject involving me. + This is set automatically to my #receiver during #signal + but could be overwritten when I am signaled" + + signaler := anObject \ No newline at end of file diff --git a/repository/Zinc-GemStone-HTTP.package/NotFound.class/instance/signaler.st b/repository/Zinc-GemStone-HTTP.package/NotFound.class/instance/signaler.st new file mode 100644 index 000000000..64e1ae10e --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/NotFound.class/instance/signaler.st @@ -0,0 +1,8 @@ +signaler +signaler + "Trying to mimic Pharo's Exception in Zinc's NotFound" + "Return the object that is the subject involving me. + This is set automatically to my #receiver during #signal + but could be overwritten when I am signaled" + + ^ signaler \ No newline at end of file diff --git a/repository/Zinc-GemStone-HTTP.package/NotFound.class/instance/standardMessageText.st b/repository/Zinc-GemStone-HTTP.package/NotFound.class/instance/standardMessageText.st new file mode 100644 index 000000000..16f591ac9 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/NotFound.class/instance/standardMessageText.st @@ -0,0 +1,8 @@ +private +standardMessageText + "Generate a standard textual description" + + ^ String streamContents: [ :stream | + stream print: self object. + stream << ' not found in '. + stream print: self collection class ] \ No newline at end of file diff --git a/repository/Zinc-GemStone-HTTP.package/NotFound.class/properties.json b/repository/Zinc-GemStone-HTTP.package/NotFound.class/properties.json new file mode 100644 index 000000000..70a7bf1a1 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/NotFound.class/properties.json @@ -0,0 +1,15 @@ +{ + "category" : "Zinc-GemStone-HTTP", + "classinstvars" : [ + ], + "classvars" : [ + ], + "commentStamp" : "", + "instvars" : [ + "object", + "signaler" ], + "name" : "NotFound", + "pools" : [ + ], + "super" : "Error", + "type" : "normal" } diff --git a/repository/Zinc-GemStone-HTTP.package/Object.extension/instance/crTrace..st b/repository/Zinc-GemStone-HTTP.package/Object.extension/instance/crTrace..st new file mode 100644 index 000000000..e6a834041 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/Object.extension/instance/crTrace..st @@ -0,0 +1,4 @@ +*zinc-gemstone-http +crTrace: aString + + Transcript cr; show: aString \ No newline at end of file diff --git a/repository/Zinc-HTTP.package/Object.extension/instance/deprecated.on.in..st b/repository/Zinc-GemStone-HTTP.package/Object.extension/instance/deprecated.on.in..st similarity index 90% rename from repository/Zinc-HTTP.package/Object.extension/instance/deprecated.on.in..st rename to repository/Zinc-GemStone-HTTP.package/Object.extension/instance/deprecated.on.in..st index f16208bfc..81720c235 100644 --- a/repository/Zinc-HTTP.package/Object.extension/instance/deprecated.on.in..st +++ b/repository/Zinc-GemStone-HTTP.package/Object.extension/instance/deprecated.on.in..st @@ -1,4 +1,4 @@ -*zinc-http +*zinc-gemstone-http deprecated: aMsg on: aDate in: aClass Transcript cr; nextPutAll: 'Deprecated: '; diff --git a/repository/Zinc-GemStone-HTTP.package/Object.extension/instance/isStreamingResponse.st b/repository/Zinc-GemStone-HTTP.package/Object.extension/instance/isStreamingResponse.st new file mode 100644 index 000000000..cb0ade838 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/Object.extension/instance/isStreamingResponse.st @@ -0,0 +1,3 @@ +*zinc-gemstone-http +isStreamingResponse + ^ false \ No newline at end of file diff --git a/repository/Zinc-HTTP.package/Object.extension/properties.json b/repository/Zinc-GemStone-HTTP.package/Object.extension/properties.json similarity index 100% rename from repository/Zinc-HTTP.package/Object.extension/properties.json rename to repository/Zinc-GemStone-HTTP.package/Object.extension/properties.json diff --git a/repository/Zinc-GemStone-HTTP.package/PositionableStream.extension/instance/next.putAll..st b/repository/Zinc-GemStone-HTTP.package/PositionableStream.extension/instance/next.putAll..st new file mode 100644 index 000000000..bd4475630 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/PositionableStream.extension/instance/next.putAll..st @@ -0,0 +1,4 @@ +*zinc-gemstone-http +next: anInteger putAll: aCollection + "Store the next anInteger elements from the given collection." + ^self next: anInteger putAll: aCollection startingAt: 1 \ No newline at end of file diff --git a/repository/Zinc-GemStone-HTTP.package/PositionableStream.extension/instance/next.putAll.startingAt..st b/repository/Zinc-GemStone-HTTP.package/PositionableStream.extension/instance/next.putAll.startingAt..st new file mode 100644 index 000000000..2a0789d85 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/PositionableStream.extension/instance/next.putAll.startingAt..st @@ -0,0 +1,6 @@ +*zinc-gemstone-http +next: anInteger putAll: aCollection startingAt: startIndex + "Store the next anInteger elements from the given collection." + (startIndex = 1 and:[anInteger = aCollection size]) + ifTrue:[^self nextPutAll: aCollection]. + ^self nextPutAll: (aCollection copyFrom: startIndex to: startIndex+anInteger-1) \ No newline at end of file diff --git a/repository/Zinc-GemStone-HTTP.package/PositionableStream.extension/instance/readInto.startingAt.count..st b/repository/Zinc-GemStone-HTTP.package/PositionableStream.extension/instance/readInto.startingAt.count..st new file mode 100644 index 000000000..c4f4b473b --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/PositionableStream.extension/instance/readInto.startingAt.count..st @@ -0,0 +1,10 @@ +*zinc-gemstone-http +readInto: aCollection startingAt: startIndex count: n + "Read n objects into the given collection. + Return number of elements that have been read." + + | obj | + 0 to: n - 1 do: [ :i | + (obj := self next) == nil ifTrue: [ ^ i ]. + aCollection at: startIndex + i put: obj ]. + ^ n \ No newline at end of file diff --git a/repository/Zinc-GemStone-HTTP.package/PositionableStream.extension/properties.json b/repository/Zinc-GemStone-HTTP.package/PositionableStream.extension/properties.json new file mode 100644 index 000000000..9e1697a61 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/PositionableStream.extension/properties.json @@ -0,0 +1,2 @@ +{ + "name" : "PositionableStream" } diff --git a/repository/Zinc-GemStone-HTTP.package/SequenceableCollection.extension/instance/allButFirstDo..st b/repository/Zinc-GemStone-HTTP.package/SequenceableCollection.extension/instance/allButFirstDo..st new file mode 100644 index 000000000..df9848be2 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/SequenceableCollection.extension/instance/allButFirstDo..st @@ -0,0 +1,6 @@ +*zinc-gemstone-http +allButFirstDo: aBlock + "Executes aBlock on each of the receiver's elements except for the first one" + + 2 to: self size do: + [:index | aBlock value: (self at: index)] \ No newline at end of file diff --git a/repository/Zinc-GemStone-HTTP.package/SequenceableCollection.extension/properties.json b/repository/Zinc-GemStone-HTTP.package/SequenceableCollection.extension/properties.json new file mode 100644 index 000000000..3b2523c36 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/SequenceableCollection.extension/properties.json @@ -0,0 +1,2 @@ +{ + "name" : "SequenceableCollection" } diff --git a/repository/Zinc-GemStone-HTTP.package/SmallInteger.extension/instance/decimalDigitLength.st b/repository/Zinc-GemStone-HTTP.package/SmallInteger.extension/instance/decimalDigitLength.st new file mode 100644 index 000000000..889ae88a4 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/SmallInteger.extension/instance/decimalDigitLength.st @@ -0,0 +1,38 @@ +*zinc-gemstone-http +decimalDigitLength + "Protocol: priting" + "Answer the number of digits printed out in base 10. + Note that this only works for positive SmallIntegers up to 64-bits." + "1 decimalDigitLength >>> 1" + "100000000 decimalDigitLength >>> 9" + "SmallInteger maxVal decimalDigitLength >>> 19" + + ^self < 10000 + ifTrue: + [self < 100 + ifTrue: + [self < 10 ifTrue: [1] ifFalse: [2]] + ifFalse: + [self < 1000 ifTrue: [3] ifFalse: [4]]] + ifFalse: + [self < 100000000 + ifTrue: + [self < 1000000 + ifTrue: [self < 100000 ifTrue: [5] ifFalse: [6]] + ifFalse: [self < 10000000 ifTrue: [7] ifFalse: [8]]] + ifFalse: + [self < 1000000000000 + ifTrue: + [self < 10000000000 + ifTrue: [self < 1000000000 ifTrue: [9] ifFalse: [10]] + ifFalse: [self < 100000000000 ifTrue: [11] ifFalse: [12]]] + ifFalse: + [self < 10000000000000000 + ifTrue: + [self < 100000000000000 + ifTrue: [self < 10000000000000 ifTrue: [13] ifFalse: [14]] + ifFalse: [self < 1000000000000000 ifTrue: [15] ifFalse: [16]]] + ifFalse: + [self < 1000000000000000000 + ifTrue: [self < 100000000000000000 ifTrue: [17] ifFalse: [18]] + ifFalse: [self < 10000000000000000000 ifTrue: [19] ifFalse: [20]]]]]] \ No newline at end of file diff --git a/repository/Zinc-GemStone-HTTP.package/SmallInteger.extension/properties.json b/repository/Zinc-GemStone-HTTP.package/SmallInteger.extension/properties.json new file mode 100644 index 000000000..d2d9ab4aa --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/SmallInteger.extension/properties.json @@ -0,0 +1,2 @@ +{ + "name" : "SmallInteger" } diff --git a/repository/Zinc-GemStone-HTTP.package/SmalltalkProxy.extension/instance/addToShutDownList..st b/repository/Zinc-GemStone-HTTP.package/SmalltalkProxy.extension/instance/addToShutDownList..st new file mode 100644 index 000000000..dd2cb8eab --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/SmalltalkProxy.extension/instance/addToShutDownList..st @@ -0,0 +1,6 @@ +*zinc-gemstone-http +addToShutDownList: anObject + "Protocol: system messages" + "Remove from 'shutdown'" + + SystemLogoutNotification subscribe: anObject name. diff --git a/repository/Zinc-GemStone-HTTP.package/SmalltalkProxy.extension/instance/addToStartUpList..st b/repository/Zinc-GemStone-HTTP.package/SmalltalkProxy.extension/instance/addToStartUpList..st new file mode 100644 index 000000000..43551148f --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/SmalltalkProxy.extension/instance/addToStartUpList..st @@ -0,0 +1,6 @@ +*zinc-gemstone-http +addToStartUpList: anObject + "Protocol: system messages" + "To 'start up' in GemStone" + + SystemLoginNotification subscribe: anObject name. diff --git a/repository/Zinc-GemStone-HTTP.package/SmalltalkProxy.extension/instance/at.ifPresent.ifAbsent.st b/repository/Zinc-GemStone-HTTP.package/SmalltalkProxy.extension/instance/at.ifPresent.ifAbsent.st new file mode 100644 index 000000000..94c64b22c --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/SmalltalkProxy.extension/instance/at.ifPresent.ifAbsent.st @@ -0,0 +1,15 @@ +*zinc-gemstone-http +at: aGlobalName ifPresent: aPresentBlock ifAbsent: anAbsentBlock + "Prococol: accessing" + | glob | + glob := GsSession currentSession symbolList objectNamed: aGlobalName. + glob ~~ nil + ifTrue: [ + aGlobalName isNil + ifTrue: [ ^ nil ]. + ^ aPresentBlock value: glob ] + ifFalse: [ aGlobalName isNil + ifTrue: [ ^ anAbsentBlock value ]. + ^ glob == nil + ifTrue: [ anAbsentBlock value ] + ifFalse: [ glob ] ] diff --git a/repository/Zinc-GemStone-HTTP.package/SmalltalkProxy.extension/instance/removeFromShutDownList..st b/repository/Zinc-GemStone-HTTP.package/SmalltalkProxy.extension/instance/removeFromShutDownList..st new file mode 100644 index 000000000..8536a3b67 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/SmalltalkProxy.extension/instance/removeFromShutDownList..st @@ -0,0 +1,5 @@ +*zinc-gemstone-http +removeFromShutDownList: anObject + "Removing from 'shutdown'" + + SystemLogoutNotification unsubscribe: anObject name. diff --git a/repository/Zinc-GemStone-HTTP.package/SmalltalkProxy.extension/instance/removeFromStartUpList..st b/repository/Zinc-GemStone-HTTP.package/SmalltalkProxy.extension/instance/removeFromStartUpList..st new file mode 100644 index 000000000..3e1d17c1c --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/SmalltalkProxy.extension/instance/removeFromStartUpList..st @@ -0,0 +1,6 @@ +*zinc-gemstone-http +removeFromStartUpList: anObject + "Protocol: system messages" + "Removing from 'startup' in GemStone" + + SystemLoginNotification unsubscribe: anObject name. diff --git a/repository/Zinc-GemStone-HTTP.package/SmalltalkProxy.extension/properties.json b/repository/Zinc-GemStone-HTTP.package/SmalltalkProxy.extension/properties.json new file mode 100644 index 000000000..56adbae94 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/SmalltalkProxy.extension/properties.json @@ -0,0 +1,2 @@ +{ + "name" : "SmalltalkProxy" } diff --git a/repository/Zinc-GemStone-HTTP.package/String.extension/instance/asMIMEType.st b/repository/Zinc-GemStone-HTTP.package/String.extension/instance/asMIMEType.st new file mode 100644 index 000000000..ea0705991 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/String.extension/instance/asMIMEType.st @@ -0,0 +1,3 @@ +*zinc-gemstone-http +asMIMEType + ^ self asZnMimeType \ No newline at end of file diff --git a/repository/Zinc-GemStone-HTTP.package/String.extension/instance/base64Decoded.st b/repository/Zinc-GemStone-HTTP.package/String.extension/instance/base64Decoded.st new file mode 100644 index 000000000..98424946a --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/String.extension/instance/base64Decoded.st @@ -0,0 +1,10 @@ +*zinc-gemstone-http +base64Decoded + "Decode the receiver assuming it was encoded using Base64, returning a ByteArray. + Base64 encoding is a technique to represent binary data as ASCII text. + The inverse operation is ByteArray>>#base64Encoded" + + "'AgMFBwsNERMXHR8lKSsvNTs9Q0dJT1NZYWVna21xf4OJi5WXnaOnrbO1v8HFx9Pf4+Xp7/H7' base64Decoded" + "'SGVsbG8gV29ybGQh' base64Decoded utf8Decoded" + + ^ ZnBase64Encoder new decode: self \ No newline at end of file diff --git a/repository/Zinc-GemStone-HTTP.package/String.extension/instance/decodeMimeHeader.st b/repository/Zinc-GemStone-HTTP.package/String.extension/instance/decodeMimeHeader.st new file mode 100644 index 000000000..afe85707f --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/String.extension/instance/decodeMimeHeader.st @@ -0,0 +1,46 @@ +*zinc-gemstone-http +decodeMimeHeader + "See RFC 2047, MIME Part Three: Message Header Extension for Non-ASCII + Text. Text containing non-ASCII characters is encoded by the sequence + =?character-set?encoding?encoded-text?= + Encoding is Q (quoted printable) or B (Base64), handled by + Base64MimeConverter / RFC2047MimeConverter. + + Thanks to Yokokawa-san, it works in m17n package. Try the following: + + '=?ISO-2022-JP?B?U1dJS0lQT1AvGyRCPUJDKyVpJXMlQRsoQi8=?= =?ISO-2022-JP?B?GyRCJVElRiUjJSobKEIoUGF0aW8p?=' decodeMimeHeader. +" + | input | + input := self readStream. + ^String streamContents: [ :output | | temp | + [ output nextPutAll: (input upTo: $=). + "ASCII Text" + input atEnd ] whileFalse: + [ (temp := input next) = $? + ifTrue: + [ | pos charset mimeEncoding mimeDecoder charsetStream | + charset := input upTo: $?. + (charset isNil or: [ charset isEmpty ]) ifTrue: [ charset := 'LATIN-1' ]. + mimeEncoding := (input upTo: $?) asUppercase. + temp := input upTo: $?. + "Skip final =" + input next. + pos := input position. + input skipSeparators. + "Delete spaces if followed by =" + input peek = $= ifFalse: [ input position: pos ]. + + charsetStream := String new writeStream. + mimeDecoder := mimeEncoding = 'B' + ifTrue: [ Base64MimeConverter new ] + ifFalse: [ RFC2047MimeConverter new ]. + mimeDecoder + mimeStream: temp readStream; + dataStream: charsetStream; + mimeDecode. + output nextPutAll: (charsetStream contents asByteArray decodeWith: charset). + ] + ifFalse: + [ output + nextPut: $=; + nextPut: temp ] ] ] \ No newline at end of file diff --git a/repository/Zinc-GemStone-HTTP.package/String.extension/instance/withoutQuoting.st b/repository/Zinc-GemStone-HTTP.package/String.extension/instance/withoutQuoting.st new file mode 100644 index 000000000..c19551e67 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/String.extension/instance/withoutQuoting.st @@ -0,0 +1,10 @@ +*zinc-gemstone-http +withoutQuoting + "remove the initial and final quote marks (single quote for string, or double quotes for comments), if present (and if matches nesting quotes). Have a look at testWithoutQuoting. If you want to remove single/double quotes not in first and last positions of the strings, have a look at copyWithout: $' " + + | quote | + self size < 2 ifTrue: [ ^ self ]. + quote := self first. + ^ (quote = self last and: [ quote = $' or: [ quote = $" ] ]) + ifTrue: [ self copyFrom: 2 to: self size - 1 ] + ifFalse: [ self ] \ No newline at end of file diff --git a/repository/Zinc-HTTP.package/String.extension/properties.json b/repository/Zinc-GemStone-HTTP.package/String.extension/properties.json similarity index 100% rename from repository/Zinc-HTTP.package/String.extension/properties.json rename to repository/Zinc-GemStone-HTTP.package/String.extension/properties.json diff --git a/repository/Zinc-HTTP.package/ZnHTTPSocketFacade.class/README.md b/repository/Zinc-GemStone-HTTP.package/SystemLogoutNotification.class/README.md similarity index 100% rename from repository/Zinc-HTTP.package/ZnHTTPSocketFacade.class/README.md rename to repository/Zinc-GemStone-HTTP.package/SystemLogoutNotification.class/README.md diff --git a/repository/Zinc-GemStone-HTTP.package/SystemLogoutNotification.class/class/initialize.st b/repository/Zinc-GemStone-HTTP.package/SystemLogoutNotification.class/class/initialize.st new file mode 100644 index 000000000..be11e53ce --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/SystemLogoutNotification.class/class/initialize.st @@ -0,0 +1,5 @@ +initialization +initialize + + self subscriptions. + diff --git a/repository/Zinc-GemStone-HTTP.package/SystemLogoutNotification.class/class/sessionEnd.st b/repository/Zinc-GemStone-HTTP.package/SystemLogoutNotification.class/class/sessionEnd.st new file mode 100644 index 000000000..e2976c1f0 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/SystemLogoutNotification.class/class/sessionEnd.st @@ -0,0 +1,8 @@ +notification +sessionEnd + self subscriptions + do: [ :objName | + | obj | + obj := GsSession currentSession symbolList objectNamed: objName. + obj ~~ nil + ifTrue: [ obj sessionEnd ] ] \ No newline at end of file diff --git a/repository/Zinc-GemStone-HTTP.package/SystemLogoutNotification.class/class/subscribe..st b/repository/Zinc-GemStone-HTTP.package/SystemLogoutNotification.class/class/subscribe..st new file mode 100644 index 000000000..6dbdf2b94 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/SystemLogoutNotification.class/class/subscribe..st @@ -0,0 +1,5 @@ +public +subscribe: anObjectName + "subscribe using the name of the object, 'System myUserProfile objectNamed:' used to look up the object in symbol dictionaries" + + self subscriptions add: anObjectName \ No newline at end of file diff --git a/repository/Zinc-GemStone-HTTP.package/SystemLogoutNotification.class/class/subscriptions.st b/repository/Zinc-GemStone-HTTP.package/SystemLogoutNotification.class/class/subscriptions.st new file mode 100644 index 000000000..78a18d758 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/SystemLogoutNotification.class/class/subscriptions.st @@ -0,0 +1,7 @@ +accessing +subscriptions + Subscriptions == nil + ifTrue: [ + Subscriptions := RcIdentityBag new. + Subscriptions objectSecurityPolicy: nil ]. + ^ Subscriptions diff --git a/repository/Zinc-GemStone-HTTP.package/SystemLogoutNotification.class/class/unsubscribe..st b/repository/Zinc-GemStone-HTTP.package/SystemLogoutNotification.class/class/unsubscribe..st new file mode 100644 index 000000000..b917bea45 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/SystemLogoutNotification.class/class/unsubscribe..st @@ -0,0 +1,5 @@ +public +unsubscribe: anObjectName + "unsubscribe using the name of the object, 'System myUserProfile objectNamed:' used to look up the object in symbol dictionaries" + + self subscriptions remove: anObjectName ifAbsent: [] diff --git a/repository/Zinc-GemStone-HTTP.package/SystemLogoutNotification.class/properties.json b/repository/Zinc-GemStone-HTTP.package/SystemLogoutNotification.class/properties.json new file mode 100644 index 000000000..f04615c7c --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/SystemLogoutNotification.class/properties.json @@ -0,0 +1,14 @@ +{ + "category" : "Zinc-GemStone-HTTP", + "classinstvars" : [ + ], + "classvars" : [ "Subscriptions" + ], + "commentStamp" : "", + "instvars" : [ + ], + "name" : "SystemLogoutNotification", + "pools" : [ + ], + "super" : "Object", + "type" : "normal" } diff --git a/repository/Zinc-GemStone-HTTP.package/TestAsserter.extension/class/logSkipping..st b/repository/Zinc-GemStone-HTTP.package/TestAsserter.extension/class/logSkipping..st new file mode 100644 index 000000000..cd1736bd8 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/TestAsserter.extension/class/logSkipping..st @@ -0,0 +1,4 @@ +*zinc-gemstone-http +logSkipping: aString + Transcript cr; show: aString. + self skippingLog cr; nextPutAll: aString; flush diff --git a/repository/Zinc-GemStone-HTTP.package/TestAsserter.extension/class/skippingLog.st b/repository/Zinc-GemStone-HTTP.package/TestAsserter.extension/class/skippingLog.st new file mode 100644 index 000000000..4c1654e5f --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/TestAsserter.extension/class/skippingLog.st @@ -0,0 +1,3 @@ +*zinc-gemstone-http +skippingLog + ^ SUnitNameResolver defaultLogDevice diff --git a/repository/Zinc-GemStone-HTTP.package/TestAsserter.extension/instance/skip..st b/repository/Zinc-GemStone-HTTP.package/TestAsserter.extension/instance/skip..st new file mode 100644 index 000000000..56cb2ed2c --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/TestAsserter.extension/instance/skip..st @@ -0,0 +1,4 @@ +*zinc-gemstone-http +skip: aString + "Skipping a test. Must specify a reason why thest test is skipped!" + self class logSkipping: 'Test is being skipped! A message from skipped test: ', aString diff --git a/repository/Zinc-GemStone-HTTP.package/TestAsserter.extension/properties.json b/repository/Zinc-GemStone-HTTP.package/TestAsserter.extension/properties.json new file mode 100644 index 000000000..10c0c4d07 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/TestAsserter.extension/properties.json @@ -0,0 +1,2 @@ +{ + "name" : "TestAsserter" } diff --git a/repository/Zinc-GemStone-HTTP.package/TranscriptProxy.extension/class/nextPut..st b/repository/Zinc-GemStone-HTTP.package/TranscriptProxy.extension/class/nextPut..st new file mode 100644 index 000000000..2f1a0b6b3 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/TranscriptProxy.extension/class/nextPut..st @@ -0,0 +1,3 @@ +*zinc-gemstone-http +nextPut: anObject + self show: anObject. \ No newline at end of file diff --git a/repository/Zinc-GemStone-HTTP.package/TranscriptProxy.extension/class/nextPutAll..st b/repository/Zinc-GemStone-HTTP.package/TranscriptProxy.extension/class/nextPutAll..st new file mode 100644 index 000000000..ea916955f --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/TranscriptProxy.extension/class/nextPutAll..st @@ -0,0 +1,3 @@ +*zinc-gemstone-http +nextPutAll: anObject + self show: anObject. \ No newline at end of file diff --git a/repository/Zinc-HTTP.package/TranscriptProxy.extension/properties.json b/repository/Zinc-GemStone-HTTP.package/TranscriptProxy.extension/properties.json similarity index 100% rename from repository/Zinc-HTTP.package/TranscriptProxy.extension/properties.json rename to repository/Zinc-GemStone-HTTP.package/TranscriptProxy.extension/properties.json diff --git a/repository/Zinc-GemStone-HTTP.package/ZnApplicationFormUrlEncodedEntity.extension/instance/writeRepresentationOn..st b/repository/Zinc-GemStone-HTTP.package/ZnApplicationFormUrlEncodedEntity.extension/instance/writeRepresentationOn..st new file mode 100644 index 000000000..14f118212 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/ZnApplicationFormUrlEncodedEntity.extension/instance/writeRepresentationOn..st @@ -0,0 +1,13 @@ +*zinc-gemstone-http +writeRepresentationOn: stream + "Protocol: writing" + self contentType charSet + ifNotNil: [:charSet| + ZnResourceMetaUtils + writeQueryFields: self fields + withEncoder: (ZnCharacterEncoderGS newForEncoding: charSet) + on: stream] + ifNil: [ + ZnResourceMetaUtils + writeQueryFields: self fields + on: stream ] diff --git a/repository/Zinc-GemStone-HTTP.package/ZnApplicationFormUrlEncodedEntity.extension/properties.json b/repository/Zinc-GemStone-HTTP.package/ZnApplicationFormUrlEncodedEntity.extension/properties.json new file mode 100644 index 000000000..eae08ee61 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/ZnApplicationFormUrlEncodedEntity.extension/properties.json @@ -0,0 +1,2 @@ +{ + "name" : "ZnApplicationFormUrlEncodedEntity" } diff --git a/repository/Zinc-GemStone-HTTP.package/ZnClient.extension/instance/retryExceptionSet.st b/repository/Zinc-GemStone-HTTP.package/ZnClient.extension/instance/retryExceptionSet.st new file mode 100644 index 000000000..445794d30 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/ZnClient.extension/instance/retryExceptionSet.st @@ -0,0 +1,4 @@ +*zinc-gemstone-http +retryExceptionSet + "Protocol: private" + ^ NetworkError, ZnParseError, ZnCharacterEncodingError, ZnUnknownScheme, ZnPortNotANumber, SpSocketError \ No newline at end of file diff --git a/repository/Zinc-GemStone-HTTP.package/ZnClient.extension/instance/setupTLSTo..st b/repository/Zinc-GemStone-HTTP.package/ZnClient.extension/instance/setupTLSTo..st new file mode 100644 index 000000000..741d6be8a --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/ZnClient.extension/instance/setupTLSTo..st @@ -0,0 +1,26 @@ +*zinc-gemstone-http +setupTLSTo: url + "Protocol: private" + (ZnNetworkingUtils shouldProxyUrl: url) + ifTrue: [ | originalRequest | + "http://www.ietf.org/rfc/rfc2817.txt (section 5)" + "https://en.wikipedia.org/wiki/HTTP_tunnel#HTTP_CONNECT_tunneling" + originalRequest := request copy. + request entity: nil. "to prevent #resetEntity from being called, resulting in #close of the shared entity" + self method: #CONNECT; writeRequest; readResponse. + response isSuccess ifFalse: [ self error: 'Failed to CONNECT to proxy for TLS/SSL' ]. + connection := ZnNetworkingUtils secureSocketStreamOn: connection socket. + request := originalRequest ]. + + "GemStone way to enable/disable certificate verification" + (ZnCurrentOptions at: #verifyCertificates) + ifTrue: [ self certificate ifNotNil: [ connection sslSession certificateName: self certificate ]. + connection sslSession secureSocket enableCertificateVerification ] + ifFalse: [ connection sslSession secureSocket disableCertificateVerification ]. + + [ connection sslSession serverName: url host ] + on: (ZnUtils exceptionSet: #( #SocketError #PrimitiveFailed )) + do: [ :error | connection sslSession error: error asString ]. + + "GemStone: In case of failing certification verification the signal is thrown within #connect" + connection connect diff --git a/repository/Zinc-GemStone-HTTP.package/ZnClient.extension/properties.json b/repository/Zinc-GemStone-HTTP.package/ZnClient.extension/properties.json new file mode 100644 index 000000000..b06d647f1 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/ZnClient.extension/properties.json @@ -0,0 +1,2 @@ +{ + "name" : "ZnClient" } diff --git a/repository/Zinc-HTTP.package/ZnConnectionTimeout.class/README.md b/repository/Zinc-GemStone-HTTP.package/ZnConnectionTimeout.class/README.md similarity index 100% rename from repository/Zinc-HTTP.package/ZnConnectionTimeout.class/README.md rename to repository/Zinc-GemStone-HTTP.package/ZnConnectionTimeout.class/README.md diff --git a/repository/Zinc-GemStone-HTTP.package/ZnConnectionTimeout.class/properties.json b/repository/Zinc-GemStone-HTTP.package/ZnConnectionTimeout.class/properties.json new file mode 100644 index 000000000..3c1a62425 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/ZnConnectionTimeout.class/properties.json @@ -0,0 +1,14 @@ +{ + "category" : "Zinc-GemStone-HTTP", + "classinstvars" : [ + ], + "classvars" : [ + ], + "commentStamp" : "SvenVanCaekenberghe 5/9/2012 20:54", + "instvars" : [ + ], + "name" : "ZnConnectionTimeout", + "pools" : [ + ], + "super" : "DynamicVariable", + "type" : "normal" } diff --git a/repository/Zinc-GemStone-HTTP.package/ZnConstants.extension/class/defaultMaximumEntitySize..st b/repository/Zinc-GemStone-HTTP.package/ZnConstants.extension/class/defaultMaximumEntitySize..st new file mode 100644 index 000000000..fe3063f15 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/ZnConstants.extension/class/defaultMaximumEntitySize..st @@ -0,0 +1,6 @@ +*zinc-gemstone-http +defaultMaximumEntitySize: integer + "Protocol: resource limits" + "Set the default maximum entity size to accept from a stream to integer bytes." + + ^ DefaultMaximumEntitySize := integer diff --git a/repository/Zinc-HTTP.package/ZnConstants.class/class/defaultMaximumEntitySize.st b/repository/Zinc-GemStone-HTTP.package/ZnConstants.extension/class/defaultMaximumEntitySize.st similarity index 83% rename from repository/Zinc-HTTP.package/ZnConstants.class/class/defaultMaximumEntitySize.st rename to repository/Zinc-GemStone-HTTP.package/ZnConstants.extension/class/defaultMaximumEntitySize.st index dc4dd9d57..cca51a97c 100644 --- a/repository/Zinc-HTTP.package/ZnConstants.class/class/defaultMaximumEntitySize.st +++ b/repository/Zinc-GemStone-HTTP.package/ZnConstants.extension/class/defaultMaximumEntitySize.st @@ -1,8 +1,9 @@ -resource limits +*zinc-gemstone-http defaultMaximumEntitySize + "Protocol: resource limits" "Return the default maximum entity size to accept from a stream. Used by ZnEntity and subclasses. Can be set using #defaultMaximumEntitySize: Default value is 16Mb. This affects both client and server code. This helps to protect us from malicious content." - ^ DefaultMaximumEntitySize ifNil: [ DefaultMaximumEntitySize := 16 * 1024 * 1024 ] \ No newline at end of file + ^ DefaultMaximumEntitySize ifNil: [ DefaultMaximumEntitySize := 16 * 1024 * 1024 ] diff --git a/repository/Zinc-GemStone-HTTP.package/ZnConstants.extension/class/frameworkMCVersion.st b/repository/Zinc-GemStone-HTTP.package/ZnConstants.extension/class/frameworkMCVersion.st new file mode 100644 index 000000000..02f06b3fe --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/ZnConstants.extension/class/frameworkMCVersion.st @@ -0,0 +1,4 @@ +*zinc-gemstone-http +frameworkMCVersion + "Protocol: accessing" + MCWorkingCopy managersForClass: self class do: [ :each | ^ each ancestors first name ] diff --git a/repository/Zinc-GemStone-HTTP.package/ZnConstants.extension/class/maximumEntitySize..st b/repository/Zinc-GemStone-HTTP.package/ZnConstants.extension/class/maximumEntitySize..st new file mode 100644 index 000000000..5c8ebab56 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/ZnConstants.extension/class/maximumEntitySize..st @@ -0,0 +1,6 @@ +*zinc-gemstone-http +maximumEntitySize: integer + "Protocol: resource limits" + "Set the maximum entity size to accept from a stream to integer bytes." + + ^ DefaultMaximumEntitySize := integer diff --git a/repository/Zinc-GemStone-HTTP.package/ZnConstants.extension/class/maximumEntitySize.st b/repository/Zinc-GemStone-HTTP.package/ZnConstants.extension/class/maximumEntitySize.st new file mode 100644 index 000000000..db2d84f31 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/ZnConstants.extension/class/maximumEntitySize.st @@ -0,0 +1,10 @@ +*zinc-gemstone-http +maximumEntitySize + "Protocol: resource limits" + "Return the maximum entity size to accept from a stream. + Used by ZnEntity and subclasses. Can be set using #maximumEntitySize: + This affects both client and server code. + This helps to protect us from malicious content." + + ^ ZnMaximumEntitySize value + ifNil: [ self defaultMaximumEntitySize ] diff --git a/repository/Zinc-GemStone-HTTP.package/ZnConstants.extension/class/maximumLineLength.st b/repository/Zinc-GemStone-HTTP.package/ZnConstants.extension/class/maximumLineLength.st new file mode 100644 index 000000000..04198ccfa --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/ZnConstants.extension/class/maximumLineLength.st @@ -0,0 +1,8 @@ +*zinc-gemstone-http +maximumLineLength + "Protocol: resource limits" + "Return the maximum line length to accept. + Used by ZnLineReader and thus for reading request/status lines as well as headers. + This helps to protect us from malicious content." + + ^ 8192 diff --git a/repository/Zinc-GemStone-HTTP.package/ZnConstants.extension/class/standardHtmlDocType.st b/repository/Zinc-GemStone-HTTP.package/ZnConstants.extension/class/standardHtmlDocType.st new file mode 100644 index 000000000..009129811 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/ZnConstants.extension/class/standardHtmlDocType.st @@ -0,0 +1,5 @@ +*zinc-gemstone-http +standardHtmlDocType + "Protocol: accessing" + ^ ' +' diff --git a/repository/Zinc-GemStone-HTTP.package/ZnConstants.extension/class/systemVersion.st b/repository/Zinc-GemStone-HTTP.package/ZnConstants.extension/class/systemVersion.st new file mode 100644 index 000000000..b32fb41ed --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/ZnConstants.extension/class/systemVersion.st @@ -0,0 +1,4 @@ +*zinc-gemstone-http +systemVersion + "Protocol: accessing" + ^ (System stoneVersionReport at: #nodeName), '/', (System stoneVersionReport at: 'gsVersion') \ No newline at end of file diff --git a/repository/Zinc-HTTP.package/ZnConstants.class/class/welcomePageHtml.st b/repository/Zinc-GemStone-HTTP.package/ZnConstants.extension/class/welcomePageHtml.st similarity index 95% rename from repository/Zinc-HTTP.package/ZnConstants.class/class/welcomePageHtml.st rename to repository/Zinc-GemStone-HTTP.package/ZnConstants.extension/class/welcomePageHtml.st index abbd8cb1e..b60b56256 100644 --- a/repository/Zinc-HTTP.package/ZnConstants.class/class/welcomePageHtml.st +++ b/repository/Zinc-GemStone-HTTP.package/ZnConstants.extension/class/welcomePageHtml.st @@ -1,5 +1,6 @@ -accessing +*zinc-gemstone-http welcomePageHtml + "Protocol: accessing" ^ ' @@ -43,4 +44,4 @@ a modern, open-source Smalltalk framework to deal with the HTTP networking proto

May the Source be with you!

-' \ No newline at end of file +' diff --git a/repository/Zinc-GemStone-HTTP.package/ZnConstants.extension/properties.json b/repository/Zinc-GemStone-HTTP.package/ZnConstants.extension/properties.json new file mode 100644 index 000000000..89e742afc --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/ZnConstants.extension/properties.json @@ -0,0 +1,3 @@ +{ + "name": "ZnConstants" +} \ No newline at end of file diff --git a/repository/Zinc-Resource-Meta-Tests.package/ZnUrlTests.class/README.md b/repository/Zinc-GemStone-HTTP.package/ZnDefaultGsTransactionalServerDelegate.class/README.md similarity index 100% rename from repository/Zinc-Resource-Meta-Tests.package/ZnUrlTests.class/README.md rename to repository/Zinc-GemStone-HTTP.package/ZnDefaultGsTransactionalServerDelegate.class/README.md diff --git a/repository/Zinc-HTTP.package/ZnDefaultGsTransactionalServerDelegate.class/instance/generateTransactionRequestString..st b/repository/Zinc-GemStone-HTTP.package/ZnDefaultGsTransactionalServerDelegate.class/instance/generateTransactionRequestString..st similarity index 100% rename from repository/Zinc-HTTP.package/ZnDefaultGsTransactionalServerDelegate.class/instance/generateTransactionRequestString..st rename to repository/Zinc-GemStone-HTTP.package/ZnDefaultGsTransactionalServerDelegate.class/instance/generateTransactionRequestString..st diff --git a/repository/Zinc-HTTP.package/ZnDefaultGsTransactionalServerDelegate.class/instance/initialize.st b/repository/Zinc-GemStone-HTTP.package/ZnDefaultGsTransactionalServerDelegate.class/instance/initialize.st similarity index 100% rename from repository/Zinc-HTTP.package/ZnDefaultGsTransactionalServerDelegate.class/instance/initialize.st rename to repository/Zinc-GemStone-HTTP.package/ZnDefaultGsTransactionalServerDelegate.class/instance/initialize.st diff --git a/repository/Zinc-HTTP.package/ZnDefaultGsTransactionalServerDelegate.class/instance/transactionRequest..st b/repository/Zinc-GemStone-HTTP.package/ZnDefaultGsTransactionalServerDelegate.class/instance/transactionRequest..st similarity index 100% rename from repository/Zinc-HTTP.package/ZnDefaultGsTransactionalServerDelegate.class/instance/transactionRequest..st rename to repository/Zinc-GemStone-HTTP.package/ZnDefaultGsTransactionalServerDelegate.class/instance/transactionRequest..st diff --git a/repository/Zinc-GemStone-HTTP.package/ZnDefaultGsTransactionalServerDelegate.class/properties.json b/repository/Zinc-GemStone-HTTP.package/ZnDefaultGsTransactionalServerDelegate.class/properties.json new file mode 100644 index 000000000..1432dd891 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/ZnDefaultGsTransactionalServerDelegate.class/properties.json @@ -0,0 +1,14 @@ +{ + "category" : "Zinc-GemStone-HTTP", + "classinstvars" : [ + ], + "classvars" : [ + ], + "commentStamp" : "", + "instvars" : [ + ], + "name" : "ZnDefaultGsTransactionalServerDelegate", + "pools" : [ + ], + "super" : "ZnDefaultServerDelegate", + "type" : "normal" } diff --git a/repository/Zinc-GemStone-HTTP.package/ZnDefaultServerDelegate.extension/instance/processes.st b/repository/Zinc-GemStone-HTTP.package/ZnDefaultServerDelegate.extension/instance/processes.st new file mode 100644 index 000000000..7bba059f6 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/ZnDefaultServerDelegate.extension/instance/processes.st @@ -0,0 +1,6 @@ +*zinc-gemstone-http +processes + "Protocol: private" + ^ (ProcessorScheduler scheduler allProcesses + reject: [ :each | each isTerminated or: [ each = Processor activeProcess ] ]) + sorted: [ :a :b | a priority >= b priority ] diff --git a/repository/Zinc-GemStone-HTTP.package/ZnDefaultServerDelegate.extension/instance/systemVersionInfo.st b/repository/Zinc-GemStone-HTTP.package/ZnDefaultServerDelegate.extension/instance/systemVersionInfo.st new file mode 100644 index 000000000..805dec850 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/ZnDefaultServerDelegate.extension/instance/systemVersionInfo.st @@ -0,0 +1,10 @@ +*zinc-gemstone-http +systemVersionInfo + "Protocol: private" + | versionReport | + versionReport := System stoneVersionReport. + ^ String streamContents: [ :stream | + stream + print: 'GemStone ', (versionReport at: 'gsRelease'), ' of ', (versionReport at: 'gsBuildDate'), ' build ', (versionReport at: 'gsBuildSerialNum'); + nextPutAll: ' - '; + nextPutAll: ZnConstants defaultServerString ] diff --git a/repository/Zinc-GemStone-HTTP.package/ZnDefaultServerDelegate.extension/instance/vmStats.st b/repository/Zinc-GemStone-HTTP.package/ZnDefaultServerDelegate.extension/instance/vmStats.st new file mode 100644 index 000000000..fa11556e2 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/ZnDefaultServerDelegate.extension/instance/vmStats.st @@ -0,0 +1,6 @@ +*zinc-gemstone-http +vmStats + "Protocol: private" + "augmentation needed" + + ^ SystemRepository fileSizeReport diff --git a/repository/Zinc-GemStone-HTTP.package/ZnDefaultServerDelegate.extension/properties.json b/repository/Zinc-GemStone-HTTP.package/ZnDefaultServerDelegate.extension/properties.json new file mode 100644 index 000000000..1e110a8d7 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/ZnDefaultServerDelegate.extension/properties.json @@ -0,0 +1,2 @@ +{ + "name" : "ZnDefaultServerDelegate" } diff --git a/repository/Zinc-GemStone-HTTP.package/ZnDigestAuthenticator.extension/class/md5Hash..st b/repository/Zinc-GemStone-HTTP.package/ZnDigestAuthenticator.extension/class/md5Hash..st new file mode 100644 index 000000000..4b94d7298 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/ZnDigestAuthenticator.extension/class/md5Hash..st @@ -0,0 +1,10 @@ +*zinc-gemstone-http +md5Hash: aString + "Protocol: accessing" + | hex hash | + hex := aString md5sum hex. + hash := hex asLowercase. + (hash beginsWith: '16r') + ifTrue: [ hash := hash allButFirst: 3 ]. + hash := hash padded: #'left' to: 32 with: $0. + ^ hash diff --git a/repository/Zinc-GemStone-HTTP.package/ZnDigestAuthenticator.extension/properties.json b/repository/Zinc-GemStone-HTTP.package/ZnDigestAuthenticator.extension/properties.json new file mode 100644 index 000000000..956c153c9 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/ZnDigestAuthenticator.extension/properties.json @@ -0,0 +1,3 @@ +{ + "name": "ZnDigestAuthenticator" +} \ No newline at end of file diff --git a/repository/Zinc-GemStone-HTTP.package/ZnDispatcherDelegate.extension/instance/handleRequest.gemServer..st b/repository/Zinc-GemStone-HTTP.package/ZnDispatcherDelegate.extension/instance/handleRequest.gemServer..st new file mode 100644 index 000000000..80f039663 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/ZnDispatcherDelegate.extension/instance/handleRequest.gemServer..st @@ -0,0 +1,15 @@ +*zinc-gemstone-http +handleRequest: request gemServer: gemServer + "Protocol: public" + "compatability with ZnGemServerManagingMultiThreadedServer" + + "To add a GemStone transaction, subclass and use something like the following: + + gemServer + gemServerTransaction: [ ^ self handleRequest: request ] + exceptionSet: ExceptionSet new + + Using `ExceptionSet new` means that exceptions handled up the stack. +" + + ^ self handleRequest: request diff --git a/repository/Zinc-GemStone-HTTP.package/ZnDispatcherDelegate.extension/properties.json b/repository/Zinc-GemStone-HTTP.package/ZnDispatcherDelegate.extension/properties.json new file mode 100644 index 000000000..c670898a6 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/ZnDispatcherDelegate.extension/properties.json @@ -0,0 +1,3 @@ +{ + "name": "ZnDispatcherDelegate" +} \ No newline at end of file diff --git a/repository/Zinc-GemStone-HTTP.package/ZnFileSystemUtils.extension/class/fileSizeFor..st b/repository/Zinc-GemStone-HTTP.package/ZnFileSystemUtils.extension/class/fileSizeFor..st new file mode 100644 index 000000000..2eefb9aa8 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/ZnFileSystemUtils.extension/class/fileSizeFor..st @@ -0,0 +1,4 @@ +*zinc-gemstone-http +fileSizeFor: fileName + "Protocol: queries" + ^ fileName asFileReference size \ No newline at end of file diff --git a/repository/Zinc-GemStone-HTTP.package/ZnFileSystemUtils.extension/properties.json b/repository/Zinc-GemStone-HTTP.package/ZnFileSystemUtils.extension/properties.json new file mode 100644 index 000000000..43251bd5a --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/ZnFileSystemUtils.extension/properties.json @@ -0,0 +1,3 @@ +{ + "name": "ZnFileSystemUtils" +} \ No newline at end of file diff --git a/repository/Zinc-GemStone-HTTP.package/ZnHTTPSocketFacade.class/README.md b/repository/Zinc-GemStone-HTTP.package/ZnHTTPSocketFacade.class/README.md new file mode 100644 index 000000000..f3808d7f8 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/ZnHTTPSocketFacade.class/README.md @@ -0,0 +1,10 @@ +I am ZnHTTPSocketFacade. + +On my class side I implement all necessary replacement methods of HTTPSocket. + +The interface (signature and semantics) of this API is defined by HTTPSocket. + +Overwriting these HTTPSocket methods with mine will effectively redirect all +HTTP client access in this Smalltalk image through Zinc HTTP Components. + +Part of Zinc HTTP Components. \ No newline at end of file diff --git a/repository/Zinc-HTTP.package/ZnHTTPSocketFacade.class/class/client.st b/repository/Zinc-GemStone-HTTP.package/ZnHTTPSocketFacade.class/class/client.st similarity index 100% rename from repository/Zinc-HTTP.package/ZnHTTPSocketFacade.class/class/client.st rename to repository/Zinc-GemStone-HTTP.package/ZnHTTPSocketFacade.class/class/client.st diff --git a/repository/Zinc-HTTP.package/ZnHTTPSocketFacade.class/class/constructMultiPartFormDataEntity..st b/repository/Zinc-GemStone-HTTP.package/ZnHTTPSocketFacade.class/class/constructMultiPartFormDataEntity..st similarity index 100% rename from repository/Zinc-HTTP.package/ZnHTTPSocketFacade.class/class/constructMultiPartFormDataEntity..st rename to repository/Zinc-GemStone-HTTP.package/ZnHTTPSocketFacade.class/class/constructMultiPartFormDataEntity..st diff --git a/repository/Zinc-HTTP.package/ZnHTTPSocketFacade.class/class/execute.on..st b/repository/Zinc-GemStone-HTTP.package/ZnHTTPSocketFacade.class/class/execute.on..st similarity index 100% rename from repository/Zinc-HTTP.package/ZnHTTPSocketFacade.class/class/execute.on..st rename to repository/Zinc-GemStone-HTTP.package/ZnHTTPSocketFacade.class/class/execute.on..st diff --git a/repository/Zinc-HTTP.package/ZnHTTPSocketFacade.class/class/extendHeaders.with..st b/repository/Zinc-GemStone-HTTP.package/ZnHTTPSocketFacade.class/class/extendHeaders.with..st similarity index 100% rename from repository/Zinc-HTTP.package/ZnHTTPSocketFacade.class/class/extendHeaders.with..st rename to repository/Zinc-GemStone-HTTP.package/ZnHTTPSocketFacade.class/class/extendHeaders.with..st diff --git a/repository/Zinc-HTTP.package/ZnHTTPSocketFacade.class/class/extendUrl.withArguments..st b/repository/Zinc-GemStone-HTTP.package/ZnHTTPSocketFacade.class/class/extendUrl.withArguments..st similarity index 100% rename from repository/Zinc-HTTP.package/ZnHTTPSocketFacade.class/class/extendUrl.withArguments..st rename to repository/Zinc-GemStone-HTTP.package/ZnHTTPSocketFacade.class/class/extendUrl.withArguments..st diff --git a/repository/Zinc-HTTP.package/ZnHTTPSocketFacade.class/class/httpGet..st b/repository/Zinc-GemStone-HTTP.package/ZnHTTPSocketFacade.class/class/httpGet..st similarity index 100% rename from repository/Zinc-HTTP.package/ZnHTTPSocketFacade.class/class/httpGet..st rename to repository/Zinc-GemStone-HTTP.package/ZnHTTPSocketFacade.class/class/httpGet..st diff --git a/repository/Zinc-HTTP.package/ZnHTTPSocketFacade.class/class/httpGet.accept..st b/repository/Zinc-GemStone-HTTP.package/ZnHTTPSocketFacade.class/class/httpGet.accept..st similarity index 100% rename from repository/Zinc-HTTP.package/ZnHTTPSocketFacade.class/class/httpGet.accept..st rename to repository/Zinc-GemStone-HTTP.package/ZnHTTPSocketFacade.class/class/httpGet.accept..st diff --git a/repository/Zinc-HTTP.package/ZnHTTPSocketFacade.class/class/httpGet.args.accept..st b/repository/Zinc-GemStone-HTTP.package/ZnHTTPSocketFacade.class/class/httpGet.args.accept..st similarity index 100% rename from repository/Zinc-HTTP.package/ZnHTTPSocketFacade.class/class/httpGet.args.accept..st rename to repository/Zinc-GemStone-HTTP.package/ZnHTTPSocketFacade.class/class/httpGet.args.accept..st diff --git a/repository/Zinc-HTTP.package/ZnHTTPSocketFacade.class/class/httpGet.args.accept.request..st b/repository/Zinc-GemStone-HTTP.package/ZnHTTPSocketFacade.class/class/httpGet.args.accept.request..st similarity index 100% rename from repository/Zinc-HTTP.package/ZnHTTPSocketFacade.class/class/httpGet.args.accept.request..st rename to repository/Zinc-GemStone-HTTP.package/ZnHTTPSocketFacade.class/class/httpGet.args.accept.request..st diff --git a/repository/Zinc-HTTP.package/ZnHTTPSocketFacade.class/class/httpGet.args.user.passwd..st b/repository/Zinc-GemStone-HTTP.package/ZnHTTPSocketFacade.class/class/httpGet.args.user.passwd..st similarity index 100% rename from repository/Zinc-HTTP.package/ZnHTTPSocketFacade.class/class/httpGet.args.user.passwd..st rename to repository/Zinc-GemStone-HTTP.package/ZnHTTPSocketFacade.class/class/httpGet.args.user.passwd..st diff --git a/repository/Zinc-HTTP.package/ZnHTTPSocketFacade.class/class/httpGetDocument..st b/repository/Zinc-GemStone-HTTP.package/ZnHTTPSocketFacade.class/class/httpGetDocument..st similarity index 100% rename from repository/Zinc-HTTP.package/ZnHTTPSocketFacade.class/class/httpGetDocument..st rename to repository/Zinc-GemStone-HTTP.package/ZnHTTPSocketFacade.class/class/httpGetDocument..st diff --git a/repository/Zinc-HTTP.package/ZnHTTPSocketFacade.class/class/httpGetDocument.accept..st b/repository/Zinc-GemStone-HTTP.package/ZnHTTPSocketFacade.class/class/httpGetDocument.accept..st similarity index 100% rename from repository/Zinc-HTTP.package/ZnHTTPSocketFacade.class/class/httpGetDocument.accept..st rename to repository/Zinc-GemStone-HTTP.package/ZnHTTPSocketFacade.class/class/httpGetDocument.accept..st diff --git a/repository/Zinc-HTTP.package/ZnHTTPSocketFacade.class/class/httpGetDocument.args..st b/repository/Zinc-GemStone-HTTP.package/ZnHTTPSocketFacade.class/class/httpGetDocument.args..st similarity index 100% rename from repository/Zinc-HTTP.package/ZnHTTPSocketFacade.class/class/httpGetDocument.args..st rename to repository/Zinc-GemStone-HTTP.package/ZnHTTPSocketFacade.class/class/httpGetDocument.args..st diff --git a/repository/Zinc-HTTP.package/ZnHTTPSocketFacade.class/class/httpGetDocument.args.accept..st b/repository/Zinc-GemStone-HTTP.package/ZnHTTPSocketFacade.class/class/httpGetDocument.args.accept..st similarity index 100% rename from repository/Zinc-HTTP.package/ZnHTTPSocketFacade.class/class/httpGetDocument.args.accept..st rename to repository/Zinc-GemStone-HTTP.package/ZnHTTPSocketFacade.class/class/httpGetDocument.args.accept..st diff --git a/repository/Zinc-HTTP.package/ZnHTTPSocketFacade.class/class/httpGetDocument.args.accept.request..st b/repository/Zinc-GemStone-HTTP.package/ZnHTTPSocketFacade.class/class/httpGetDocument.args.accept.request..st similarity index 100% rename from repository/Zinc-HTTP.package/ZnHTTPSocketFacade.class/class/httpGetDocument.args.accept.request..st rename to repository/Zinc-GemStone-HTTP.package/ZnHTTPSocketFacade.class/class/httpGetDocument.args.accept.request..st diff --git a/repository/Zinc-HTTP.package/ZnHTTPSocketFacade.class/class/httpPost.args.accept..st b/repository/Zinc-GemStone-HTTP.package/ZnHTTPSocketFacade.class/class/httpPost.args.accept..st similarity index 100% rename from repository/Zinc-HTTP.package/ZnHTTPSocketFacade.class/class/httpPost.args.accept..st rename to repository/Zinc-GemStone-HTTP.package/ZnHTTPSocketFacade.class/class/httpPost.args.accept..st diff --git a/repository/Zinc-HTTP.package/ZnHTTPSocketFacade.class/class/httpPost.args.user.passwd..st b/repository/Zinc-GemStone-HTTP.package/ZnHTTPSocketFacade.class/class/httpPost.args.user.passwd..st similarity index 100% rename from repository/Zinc-HTTP.package/ZnHTTPSocketFacade.class/class/httpPost.args.user.passwd..st rename to repository/Zinc-GemStone-HTTP.package/ZnHTTPSocketFacade.class/class/httpPost.args.user.passwd..st diff --git a/repository/Zinc-HTTP.package/ZnHTTPSocketFacade.class/class/httpPostDocument.args..st b/repository/Zinc-GemStone-HTTP.package/ZnHTTPSocketFacade.class/class/httpPostDocument.args..st similarity index 100% rename from repository/Zinc-HTTP.package/ZnHTTPSocketFacade.class/class/httpPostDocument.args..st rename to repository/Zinc-GemStone-HTTP.package/ZnHTTPSocketFacade.class/class/httpPostDocument.args..st diff --git a/repository/Zinc-HTTP.package/ZnHTTPSocketFacade.class/class/httpPostDocument.args.accept..st b/repository/Zinc-GemStone-HTTP.package/ZnHTTPSocketFacade.class/class/httpPostDocument.args.accept..st similarity index 100% rename from repository/Zinc-HTTP.package/ZnHTTPSocketFacade.class/class/httpPostDocument.args.accept..st rename to repository/Zinc-GemStone-HTTP.package/ZnHTTPSocketFacade.class/class/httpPostDocument.args.accept..st diff --git a/repository/Zinc-HTTP.package/ZnHTTPSocketFacade.class/class/httpPostDocument.args.accept.request..st b/repository/Zinc-GemStone-HTTP.package/ZnHTTPSocketFacade.class/class/httpPostDocument.args.accept.request..st similarity index 100% rename from repository/Zinc-HTTP.package/ZnHTTPSocketFacade.class/class/httpPostDocument.args.accept.request..st rename to repository/Zinc-GemStone-HTTP.package/ZnHTTPSocketFacade.class/class/httpPostDocument.args.accept.request..st diff --git a/repository/Zinc-HTTP.package/ZnHTTPSocketFacade.class/class/httpPostMultipart.args.accept.request..st b/repository/Zinc-GemStone-HTTP.package/ZnHTTPSocketFacade.class/class/httpPostMultipart.args.accept.request..st similarity index 100% rename from repository/Zinc-HTTP.package/ZnHTTPSocketFacade.class/class/httpPostMultipart.args.accept.request..st rename to repository/Zinc-GemStone-HTTP.package/ZnHTTPSocketFacade.class/class/httpPostMultipart.args.accept.request..st diff --git a/repository/Zinc-HTTP.package/ZnHTTPSocketFacade.class/class/httpPut.to.user.passwd..st b/repository/Zinc-GemStone-HTTP.package/ZnHTTPSocketFacade.class/class/httpPut.to.user.passwd..st similarity index 100% rename from repository/Zinc-HTTP.package/ZnHTTPSocketFacade.class/class/httpPut.to.user.passwd..st rename to repository/Zinc-GemStone-HTTP.package/ZnHTTPSocketFacade.class/class/httpPut.to.user.passwd..st diff --git a/repository/Zinc-HTTP.package/ZnHTTPSocketFacade.class/class/mimeDocumentOrErrorStringFrom.uri..st b/repository/Zinc-GemStone-HTTP.package/ZnHTTPSocketFacade.class/class/mimeDocumentOrErrorStringFrom.uri..st similarity index 100% rename from repository/Zinc-HTTP.package/ZnHTTPSocketFacade.class/class/mimeDocumentOrErrorStringFrom.uri..st rename to repository/Zinc-GemStone-HTTP.package/ZnHTTPSocketFacade.class/class/mimeDocumentOrErrorStringFrom.uri..st diff --git a/repository/Zinc-HTTP.package/ZnHTTPSocketFacade.class/class/streamOrErrorStringFrom.uri..st b/repository/Zinc-GemStone-HTTP.package/ZnHTTPSocketFacade.class/class/streamOrErrorStringFrom.uri..st similarity index 100% rename from repository/Zinc-HTTP.package/ZnHTTPSocketFacade.class/class/streamOrErrorStringFrom.uri..st rename to repository/Zinc-GemStone-HTTP.package/ZnHTTPSocketFacade.class/class/streamOrErrorStringFrom.uri..st diff --git a/repository/Zinc-GemStone-HTTP.package/ZnHTTPSocketFacade.class/properties.json b/repository/Zinc-GemStone-HTTP.package/ZnHTTPSocketFacade.class/properties.json new file mode 100644 index 000000000..09b011864 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/ZnHTTPSocketFacade.class/properties.json @@ -0,0 +1,14 @@ +{ + "category" : "Zinc-GemStone-HTTP", + "classinstvars" : [ + ], + "classvars" : [ + ], + "commentStamp" : "", + "instvars" : [ + ], + "name" : "ZnHTTPSocketFacade", + "pools" : [ + ], + "super" : "Object", + "type" : "normal" } diff --git a/repository/Zinc-GemStone-HTTP.package/ZnLimitedReadStream.extension/instance/binary.st b/repository/Zinc-GemStone-HTTP.package/ZnLimitedReadStream.extension/instance/binary.st new file mode 100644 index 000000000..031658783 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/ZnLimitedReadStream.extension/instance/binary.st @@ -0,0 +1,4 @@ +*zinc-gemstone-http +binary + "Needed by InflateStream" + stream binary \ No newline at end of file diff --git a/repository/Zinc-GemStone-HTTP.package/ZnLimitedReadStream.extension/instance/collectionSpecies.st b/repository/Zinc-GemStone-HTTP.package/ZnLimitedReadStream.extension/instance/collectionSpecies.st new file mode 100644 index 000000000..784964e34 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/ZnLimitedReadStream.extension/instance/collectionSpecies.st @@ -0,0 +1,8 @@ +*zinc-gemstone-http +collectionSpecies + "Protocol: accessing" + "Delegate to our wrapped stream if possible." + + ^ (stream respondsTo: #collectionSpecies) + ifTrue: [ stream collectionSpecies ] + ifFalse: [ stream isBinary ifTrue: [ ByteArray ] ifFalse: [ String ] ] diff --git a/repository/Zinc-GemStone-HTTP.package/ZnLimitedReadStream.extension/properties.json b/repository/Zinc-GemStone-HTTP.package/ZnLimitedReadStream.extension/properties.json new file mode 100644 index 000000000..928546dcd --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/ZnLimitedReadStream.extension/properties.json @@ -0,0 +1,3 @@ +{ + "name": "ZnLimitedReadStream" +} \ No newline at end of file diff --git a/repository/Zinc-GemStone-HTTP.package/ZnLogEvent.extension/README.md b/repository/Zinc-GemStone-HTTP.package/ZnLogEvent.extension/README.md new file mode 100644 index 000000000..c508864f1 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/ZnLogEvent.extension/README.md @@ -0,0 +1,6 @@ +I am ZnLogEvent, an Announcement sent by an HTTP server or client containing logging information. + +A log event has a TimeStamp, a Process ID, a category and a message. +The following categories are used: #info (I), #debug (D) and #transaction (T). + +Part of Zinc HTTP Components. \ No newline at end of file diff --git a/repository/Zinc-GemStone-HTTP.package/ZnLogEvent.extension/class/announcer.st b/repository/Zinc-GemStone-HTTP.package/ZnLogEvent.extension/class/announcer.st new file mode 100644 index 000000000..485af3a18 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/ZnLogEvent.extension/class/announcer.st @@ -0,0 +1,4 @@ +*zinc-gemstone-http +announcer + "Protocol: accessing" + ^ LogEventAnnouncer ifNil: [ LogEventAnnouncer := Announcer new ] diff --git a/repository/Zinc-GemStone-HTTP.package/ZnLogEvent.extension/class/initialize.st b/repository/Zinc-GemStone-HTTP.package/ZnLogEvent.extension/class/initialize.st new file mode 100644 index 000000000..b91d65d91 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/ZnLogEvent.extension/class/initialize.st @@ -0,0 +1,8 @@ +*zinc-gemstone-http +initialize + "Protocol: class initialization" + self startUp. + self environment + at: #'SessionManager' + ifPresent: [ :manager | manager default registerNetworkClassNamed: self name ] + ifAbsent: [ Smalltalk addToStartUpList: self ] diff --git a/repository/Zinc-GemStone-HTTP.package/ZnLogEvent.extension/class/logToTranscript.st b/repository/Zinc-GemStone-HTTP.package/ZnLogEvent.extension/class/logToTranscript.st new file mode 100644 index 000000000..963612609 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/ZnLogEvent.extension/class/logToTranscript.st @@ -0,0 +1,9 @@ +*zinc-gemstone-http +logToTranscript + "Protocol: convenience" + self stopLoggingToTranscript. + + ^ self announcer + on: ZnLogEvent + do: [ :event | self crTrace: event ] + for: self diff --git a/repository/Zinc-GemStone-HTTP.package/ZnLogEvent.extension/class/nextId.st b/repository/Zinc-GemStone-HTTP.package/ZnLogEvent.extension/class/nextId.st new file mode 100644 index 000000000..958c52c2a --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/ZnLogEvent.extension/class/nextId.st @@ -0,0 +1,7 @@ +*zinc-gemstone-http +nextId + "Protocol: accessing" + "This should be thread safe because SmallInteger + arithmetic primitives cannot be interrupted" + + ^ IdCounter := IdCounter + 1 diff --git a/repository/Zinc-GemStone-HTTP.package/ZnLogEvent.extension/class/open.st b/repository/Zinc-GemStone-HTTP.package/ZnLogEvent.extension/class/open.st new file mode 100644 index 000000000..b14add1c0 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/ZnLogEvent.extension/class/open.st @@ -0,0 +1,4 @@ +*zinc-gemstone-http +open + "Protocol: convenience" + ^ self announcer inspect diff --git a/repository/Zinc-GemStone-HTTP.package/ZnLogEvent.extension/class/printAddress.on..st b/repository/Zinc-GemStone-HTTP.package/ZnLogEvent.extension/class/printAddress.on..st new file mode 100644 index 000000000..329f63fa0 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/ZnLogEvent.extension/class/printAddress.on..st @@ -0,0 +1,7 @@ +*zinc-gemstone-http +printAddress: address on: stream + "Protocol: utilities" + "Try printing address as a IPv4 dotted address to stream. + If that fails, just print address as an object to stream." + + [ address asSocketAddress printOn: stream ] on: Error do: [ stream print: address ] diff --git a/repository/Zinc-GemStone-HTTP.package/ZnLogEvent.extension/class/sessionEnd.st b/repository/Zinc-GemStone-HTTP.package/ZnLogEvent.extension/class/sessionEnd.st new file mode 100644 index 000000000..86760654b --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/ZnLogEvent.extension/class/sessionEnd.st @@ -0,0 +1,5 @@ +*zinc-gemstone-http +sessionEnd + "Logging end" + + self stopLoggingToTranscript \ No newline at end of file diff --git a/repository/Zinc-GemStone-HTTP.package/ZnLogEvent.extension/class/sessionStart.st b/repository/Zinc-GemStone-HTTP.package/ZnLogEvent.extension/class/sessionStart.st new file mode 100644 index 000000000..c0704b3fb --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/ZnLogEvent.extension/class/sessionStart.st @@ -0,0 +1,4 @@ +*zinc-gemstone-http +sessionStart + "Logging start" + ^ self logToTranscript \ No newline at end of file diff --git a/repository/Zinc-GemStone-HTTP.package/ZnLogEvent.extension/class/startUp.st b/repository/Zinc-GemStone-HTTP.package/ZnLogEvent.extension/class/startUp.st new file mode 100644 index 000000000..7b63cd29d --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/ZnLogEvent.extension/class/startUp.st @@ -0,0 +1,6 @@ +*zinc-gemstone-http +startUp + "Protocol: system startup" + "Reset the id counter" + + IdCounter := 0 diff --git a/repository/Zinc-GemStone-HTTP.package/ZnLogEvent.extension/class/stopLoggingToTranscript.st b/repository/Zinc-GemStone-HTTP.package/ZnLogEvent.extension/class/stopLoggingToTranscript.st new file mode 100644 index 000000000..cfad3250e --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/ZnLogEvent.extension/class/stopLoggingToTranscript.st @@ -0,0 +1,4 @@ +*zinc-gemstone-http +stopLoggingToTranscript + "Protocol: convenience" + self announcer unsubscribe: self diff --git a/repository/Zinc-GemStone-HTTP.package/ZnLogEvent.extension/instance/announcer.st b/repository/Zinc-GemStone-HTTP.package/ZnLogEvent.extension/instance/announcer.st new file mode 100644 index 000000000..741d8a2e5 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/ZnLogEvent.extension/instance/announcer.st @@ -0,0 +1,4 @@ +*zinc-gemstone-http +announcer + "Protocol: accessing" + ^ self class announcer diff --git a/repository/Zinc-GemStone-HTTP.package/ZnLogEvent.extension/instance/emit.st b/repository/Zinc-GemStone-HTTP.package/ZnLogEvent.extension/instance/emit.st new file mode 100644 index 000000000..28b93575f --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/ZnLogEvent.extension/instance/emit.st @@ -0,0 +1,4 @@ +*zinc-gemstone-http +emit + "Protocol: actions" + self announcer announce: self diff --git a/repository/Zinc-GemStone-HTTP.package/ZnLogEvent.extension/instance/id.st b/repository/Zinc-GemStone-HTTP.package/ZnLogEvent.extension/instance/id.st new file mode 100644 index 000000000..cf5379426 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/ZnLogEvent.extension/instance/id.st @@ -0,0 +1,6 @@ +*zinc-gemstone-http +id + "Protocol: accessing" + "Return my numerical id or sequence number, unique in this image session." + + ^ id diff --git a/repository/Zinc-GemStone-HTTP.package/ZnLogEvent.extension/instance/initialize.st b/repository/Zinc-GemStone-HTTP.package/ZnLogEvent.extension/instance/initialize.st new file mode 100644 index 000000000..951f6de12 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/ZnLogEvent.extension/instance/initialize.st @@ -0,0 +1,7 @@ +*zinc-gemstone-http +initialize + "Protocol: initialization" + super initialize. + timestamp := DateAndTime now. + id := self nextId. + processId := ZnUtils currentProcessID diff --git a/repository/Zinc-GemStone-HTTP.package/ZnLogEvent.extension/instance/nextId.st b/repository/Zinc-GemStone-HTTP.package/ZnLogEvent.extension/instance/nextId.st new file mode 100644 index 000000000..1952551f5 --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/ZnLogEvent.extension/instance/nextId.st @@ -0,0 +1,4 @@ +*zinc-gemstone-http +nextId + "Protocol: accessing" + ^ self class nextId diff --git a/repository/Zinc-GemStone-HTTP.package/ZnLogEvent.extension/instance/printContentsOn..st b/repository/Zinc-GemStone-HTTP.package/ZnLogEvent.extension/instance/printContentsOn..st new file mode 100644 index 000000000..389ec5a7e --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/ZnLogEvent.extension/instance/printContentsOn..st @@ -0,0 +1,4 @@ +*zinc-gemstone-http +printContentsOn: stream + "Protocol: printing" + "Subclasses should implement this to add output" diff --git a/repository/Zinc-GemStone-HTTP.package/ZnLogEvent.extension/instance/printHeaderOn..st b/repository/Zinc-GemStone-HTTP.package/ZnLogEvent.extension/instance/printHeaderOn..st new file mode 100644 index 000000000..afa49eafd --- /dev/null +++ b/repository/Zinc-GemStone-HTTP.package/ZnLogEvent.extension/instance/printHeaderOn..st @@ -0,0 +1,12 @@ +*zinc-gemstone-http +printHeaderOn: stream + "Protocol: printing" + "Print my generic context part,