Skip to content

Commit

Permalink
Fix CRLF
Browse files Browse the repository at this point in the history
  • Loading branch information
rjsmith committed May 11, 2011
1 parent 810a588 commit e4033f9
Show file tree
Hide file tree
Showing 30 changed files with 2,725 additions and 2,724 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ lib/
obj/
all_objs
vc90.pdb
hxzmq.hxproj
28 changes: 14 additions & 14 deletions INSTALL.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
hxzmq Installation Instructions
===============================

## haxelib Installation

To be able to just use hxzmq to build 0MQ messaging into new haXe applications, without modifying the or re-building hxzmq from source, you need:

1. Install the current hxzmq package using the haXe haxelib tool
haxelib install hxzmq
2. To build your application including the hxzmq project, include the hxzmq library in your hxml haXe compilation file:
-lib hxzmq
3. To run your target executable, your system will need to reach the hxzmq.ndll library file and the libzmq.dll 0MQ library file. Add paths to both to your PATH environment variable, or copy both files into the same folder as your newly-minted haXe executable (e.g. either a neko .n or cpp executable).


hxzmq Installation Instructions
===============================

## haxelib Installation

To be able to just use hxzmq to build 0MQ messaging into new haXe applications, without modifying the or re-building hxzmq from source, you need:

1. Install the current hxzmq package using the haXe haxelib tool
haxelib install hxzmq
2. To build your application including the hxzmq project, include the hxzmq library in your hxml haXe compilation file:
-lib hxzmq
3. To run your target executable, your system will need to reach the hxzmq.ndll library file and the libzmq.dll 0MQ library file. Add paths to both to your PATH environment variable, or copy both files into the same folder as your newly-minted haXe executable (e.g. either a neko .n or cpp executable).


50 changes: 25 additions & 25 deletions build.bat
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
echo "** Build hxzmq.ndll on Windows:"
haxelib run hxcpp build.xml

echo "** Build Haxe Unit Tests:"
cd test
haxe buildWindows.hxml

echo "** Build Haxe ZeroMQ Guide programs:"
cd ../guide
haxe buildWindows.hxml

echo "** Copy hxzmq.ndll:"
cd ..
copy /Y out\ndll\Windows\hxzmq.ndll test\out-cpp\Windows
copy /Y out\ndll\Windows\hxzmq.ndll test\out-neko\Windows
copy /Y out\ndll\Windows\hxzmq.ndll guide\out-cpp\Windows
copy /Y out\ndll\Windows\hxzmq.ndll guide\out-neko\Windows


rem echo "** Run CPP unit tests:"
rem cd test/out-cpp/Windows
rem TestAll-debug.exe

rem echo "** Run Neko unit tests:"
rem cd test/out-neko/Windows
echo "** Build hxzmq.ndll on Windows:"
haxelib run hxcpp build.xml

echo "** Build Haxe Unit Tests:"
cd test
haxe buildWindows.hxml

echo "** Build Haxe ZeroMQ Guide programs:"
cd ../guide
haxe buildWindows.hxml

echo "** Copy hxzmq.ndll:"
cd ..
copy /Y out\ndll\Windows\hxzmq.ndll test\out-cpp\Windows
copy /Y out\ndll\Windows\hxzmq.ndll test\out-neko\Windows
copy /Y out\ndll\Windows\hxzmq.ndll guide\out-cpp\Windows
copy /Y out\ndll\Windows\hxzmq.ndll guide\out-neko\Windows


rem echo "** Run CPP unit tests:"
rem cd test/out-cpp/Windows
rem TestAll-debug.exe

rem echo "** Run Neko unit tests:"
rem cd test/out-neko/Windows
rem neko TestAll.n
16 changes: 8 additions & 8 deletions haxelib.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8" ?>
<project name="hxzmq" url="http://github.com/rjsmith/hxzmq" licence="LGPL">
<depends name="hxcpp"/>
<user name="rjsmith"/>
<tag v="cpp"/>
<tag v="neko"/>
<description>Haxe language binding for the ZeroMQ socket library</description>
<version name="1.0.0">Initial upload, compatable with libzmq 2.1.6+</version>
<?xml version="1.0" encoding="utf-8" ?>
<project name="hxzmq" url="http://github.com/rjsmith/hxzmq" licence="LGPL">
<depends name="hxcpp"/>
<user name="rjsmith"/>
<tag v="cpp"/>
<tag v="neko"/>
<description>Haxe language binding for the ZeroMQ socket library</description>
<version name="1.0.0">Initial upload, compatable with libzmq 2.1.6+</version>
</project>
112 changes: 56 additions & 56 deletions org/zeromq/ZMQException.hx
Original file line number Diff line number Diff line change
@@ -1,57 +1,57 @@
/**
* (c) 2011 Richard J Smith
*
* This file is part of hxzmq
*
* hxzmq is free software; you can redistribute it and/or modify it under
* the terms of the Lesser GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* hxzmq is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* Lesser GNU General Public License for more details.
*
* You should have received a copy of the Lesser GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

package org.zeromq;

import org.zeromq.ZMQ;

/**
* Encapsulates ZMQ Errors
* Provides the ZMQ - specified errno and a human - readable description
*/
class ZMQException {

public var err(default, null):ErrorType;

public var errNo(default,null):Int;

public function new(e:ErrorType) {
this.err = e;
this.errNo = ZMQ.errorTypeToErrNo(err);
}

/**
* Returns ZMQ - specified human-readable error description
* @return
*/
public function str():String {
return ZMQ.strError(errNo);
}

public function toString():String {
var b:StringBuf = new StringBuf();

b.add("errNo:" + errNo + ", str:" + str());

return b.toString();
}

//private static var _hx_zmq_strerror = neko.Lib.load("hxzmq", "hx_zmq_strerror", 1);

/**
* (c) 2011 Richard J Smith
*
* This file is part of hxzmq
*
* hxzmq is free software; you can redistribute it and/or modify it under
* the terms of the Lesser GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* hxzmq is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* Lesser GNU General Public License for more details.
*
* You should have received a copy of the Lesser GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

package org.zeromq;

import org.zeromq.ZMQ;

/**
* Encapsulates ZMQ Errors
* Provides the ZMQ - specified errno and a human - readable description
*/
class ZMQException {

public var err(default, null):ErrorType;

public var errNo(default,null):Int;

public function new(e:ErrorType) {
this.err = e;
this.errNo = ZMQ.errorTypeToErrNo(err);
}

/**
* Returns ZMQ - specified human-readable error description
* @return
*/
public function str():String {
return ZMQ.strError(errNo);
}

public function toString():String {
var b:StringBuf = new StringBuf();

b.add("errNo:" + errNo + ", str:" + str());

return b.toString();
}

//private static var _hx_zmq_strerror = neko.Lib.load("hxzmq", "hx_zmq_strerror", 1);

}
Loading

0 comments on commit e4033f9

Please sign in to comment.