Skip to content

Commit

Permalink
Merge branch 'master' of git://github.com/djnym/erlang_protobuffs
Browse files Browse the repository at this point in the history
  • Loading branch information
ngerakines committed Dec 9, 2009
2 parents c7631e3 + 88e9189 commit 58ff962
Show file tree
Hide file tree
Showing 48 changed files with 585 additions and 390 deletions.
53 changes: 52 additions & 1 deletion .gitignore
@@ -1,3 +1,54 @@
ebin
*.beam
*~
*~
Makefile
Makefile.am
Makefile.in
Makefile.otp
ac-init.generated
aclocal.m4
autom4te.cache/
build
config.log
config.status
configure
configure.ac
create-package
doc/.run_edoc
doc/Makefile
doc/Makefile.am
doc/Makefile.in
doc/edoc-info
doc/erlang.png
doc/index.html
doc/modules-frame.html
doc/overview-summary.html
doc/packages-frame.html
doc/pokemon_pb.html
doc/protobuffs.html
doc/protobuffs_compile.html
doc/protobuffs_parser.html
doc/stylesheet.css
fw
fw-pkgin/.post-install.script_ok
fw-pkgin/.post-remove.script_ok
fw-pkgin/.pre-install.script_ok
fw-pkgin/.pre-remove.script_ok
fw-pkgin/.start.script_ok
fw-pkgin/.stop.script_ok
fw-pkgin/Makefile
fw-pkgin/Makefile.am
fw-pkgin/Makefile.in
install-sh
missing
src/Makefile
src/Makefile.am
src/Makefile.in
src/erlangprotobuffs.app
src/fw-erl-app-template.app
src/fw-erl-app-template.app.in
tests/Makefile
tests/Makefile.am
tests/Makefile.in
tests/otp-test-wrapper.sh

3 changes: 3 additions & 0 deletions AUTHORS
@@ -0,0 +1,3 @@
Nick Gerakines
Jacob Vorreuter
erlrc integration by Cliff Moon
7 changes: 7 additions & 0 deletions ChangeLog
@@ -0,0 +1,7 @@
* Thu Dec 03 2009 Anthony Molinaro <anthony.molinaro@openx.org> 0.0.1
- Fixed path for unit tests
- Have .gitignore ignore all generated files
- Fixed bool type, they were being improperly left as 0 and 1 instead of using
the true and false atoms
- Nested types should now work according to spec (as much as there is one)

30 changes: 0 additions & 30 deletions Makefile

This file was deleted.

1 change: 1 addition & 0 deletions Makefile.am.local
@@ -0,0 +1 @@
# put whatever (auto)make commands here, they will be included from Makefile.am
17 changes: 17 additions & 0 deletions bootstrap
@@ -0,0 +1,17 @@
#! /bin/sh

if test -d fw/bin
then
PATH="`pwd`/fw/bin:$PATH"
export PATH
fi

fwb=`which fw-bootstrap`

if test -z "$fwb"
then
echo "bootstrap: fatal: fw-bootstrap not installed or not in PATH" 1>&2
exit 1
fi

"$fwb" --fw_version "0.1.31" --name erlang-protobuffs --revision none --template erlang "$@"
2 changes: 2 additions & 0 deletions configure.ac.local
@@ -0,0 +1,2 @@
dnl -- include additional autoconf commands here
dnl -- do not include AC_OUTPUT, this is called for you
1 change: 1 addition & 0 deletions doc/Makefile.am.local
@@ -0,0 +1 @@
# put whatever (auto)make commands here, they will be included from Makefile.am
File renamed without changes.
16 changes: 0 additions & 16 deletions ebin/erlang_protobuffs.app.in

This file was deleted.

1 change: 1 addition & 0 deletions fw-pkgin/Makefile.am.local
@@ -0,0 +1 @@
# put whatever (auto)make commands here, they will be included from Makefile.am
55 changes: 55 additions & 0 deletions fw-pkgin/config
@@ -0,0 +1,55 @@
# The FW_PACKAGE_MAINTAINER field is populated with the
# environment variable FW_PACKAGE_DEFAULT_MAINTAINER if non-empty

FW_PACKAGE_NAME="erlangprotobuffs"
FW_PACKAGE_VERSION="0.0.1"
FW_PACKAGE_MAINTAINER="cliff <cliff@cliffs-macbook-pro-15.local>"
FW_PACKAGE_SHORT_DESCRIPTION="Google protobuffs implementation for Erlang."
FW_PACKAGE_DESCRIPTION=`cat README.markdown`
FW_PACKAGE_ARCHITECTURE_DEPENDENT="0"

# Dependency information. The native syntax corresponds to Debian,
# http://www.debian.org/doc/debian-policy/ch-relationships.html
# Section 7.1 "Syntax of Relationship Fields"
#
# For other packaging systems, the syntax is translated for you.

FW_PACKAGE_DEPENDS=""
FW_PACKAGE_CONFLICTS=""
FW_PACKAGE_PROVIDES=""
FW_PACKAGE_REPLACES=""
FW_PACKAGE_SUGGESTS=""

FW_PACKAGE_BUILD_DEPENDS=""
FW_PACKAGE_BUILD_CONFLICTS=""
# uncomment and set manually for native hipe compilation
# ERLCFLAGS="-smp +native +\"{hipe,[o2,verbose]}\""

# uncomment and set manually if autodetection of modules is incorrect
# FW_ERL_APP_MODULES=""

# uncomment and set manually if autodetection of registered processes is incorrect
# FW_ERL_APP_REGISTERED=""

# uncomment and set manually if autodetection of start module is incorrect
# FW_ERL_APP_START_MODULE=""

# uncomment to define start args to the start module. should be an erlang
# expression which evaluates to a list.
# FW_ERL_APP_START_ARGS="[]"

# uncomment if the module line being generated is incorrect and you want
# to override it.
# FW_ERL_APP_MOD_LINE="{ mod, { $FW_ERL_APP_START_MODULE, $FW_ERL_APP_START_ARGS } },"

# uncomment to define the application environment variables. should be an
# erlang expression which evaluates to a list.
# FW_ERL_APP_ENVIRONMENT="[]"

# uncomment to indicate additional OTP applications (besides kernel and stdlib)
# that this application depends upon, comma-separated
# FW_ERL_PREREQ_APPLICATIONS_EXTRA=""

# uncomment to add arbitrary extra content to the app file, e.g., an
# included application directive.
# FW_ERL_APP_EXTRA=""
9 changes: 9 additions & 0 deletions fw-pkgin/post-install
@@ -0,0 +1,9 @@
#! /bin/sh

#---------------------------------------------------------------------
# post-install
#
# Executed after the package is installed.
#---------------------------------------------------------------------

exit 0
9 changes: 9 additions & 0 deletions fw-pkgin/post-remove
@@ -0,0 +1,9 @@
#! /bin/sh

#---------------------------------------------------------------------
# post-remove
#
# Executed after the package is removed.
#---------------------------------------------------------------------

exit 0
9 changes: 9 additions & 0 deletions fw-pkgin/pre-install
@@ -0,0 +1,9 @@
#! /bin/sh

#---------------------------------------------------------------------
# pre-install
#
# Executed before the package is installed.
#---------------------------------------------------------------------

exit 0
9 changes: 9 additions & 0 deletions fw-pkgin/pre-remove
@@ -0,0 +1,9 @@
#! /bin/sh

#---------------------------------------------------------------------
# pre-remove
#
# Executed before the package is removed.
#---------------------------------------------------------------------

exit 0
10 changes: 10 additions & 0 deletions fw-pkgin/start
@@ -0,0 +1,10 @@
#! /bin/sh

#---------------------------------------------------------------------
# start
#
# Executed when the package (service) is started up.
# Not supported by all package formats.
#---------------------------------------------------------------------

exit 0
10 changes: 10 additions & 0 deletions fw-pkgin/stop
@@ -0,0 +1,10 @@
#! /bin/sh

#---------------------------------------------------------------------
# start
#
# Executed when the package (service) is shut down.
# Not supported by all package formats.
#---------------------------------------------------------------------

exit 0
9 changes: 0 additions & 9 deletions src/Makefile

This file was deleted.

14 changes: 14 additions & 0 deletions src/Makefile.am.local
@@ -0,0 +1,14 @@
# put whatever (auto)make commands here, they will be included from Makefile.am

dist_erlappsrc_DATA = \
$(wildcard *.erl)

dist_erlappinclude_DATA = \
$(wildcard *.hrl)

erlappebin_SCRIPTS = \
@FW_PACKAGE_NAME@.app \
$(patsubst %.erl, %.beam, $(dist_erlappsrc_DATA))

# check_DATA = \
# .dialyzer_ok
5 changes: 5 additions & 0 deletions src/protobuffs.erl
Expand Up @@ -149,6 +149,11 @@ typecast(Value, SignedType) when SignedType =:= int32; SignedType =:= int64 ->
end;
typecast(Value, SignedType) when SignedType =:= sint32; SignedType =:= sint64 ->
(Value bsr 1) bxor (-(Value band 1));
typecast(Value, Type) when Type =:= bool ->
case Value of
1 -> true;
_ -> false
end;
typecast(Value, _) ->
Value.

Expand Down

0 comments on commit 58ff962

Please sign in to comment.