Permalink
Browse files

Merge branch 'master' of git://github.com/djnym/erlang_protobuffs

  • Loading branch information...
ngerakines committed Dec 9, 2009
2 parents c7631e3 + 88e9189 commit 58ff962da74fdfa4d533376892da6bc18226c8eb
Showing with 585 additions and 390 deletions.
  1. +52 −1 .gitignore
  2. +3 −0 AUTHORS
  3. +7 −0 ChangeLog
  4. +0 −30 Makefile
  5. +1 −0 Makefile.am.local
  6. +17 −0 bootstrap
  7. +2 −0 configure.ac.local
  8. +1 −0 doc/Makefile.am.local
  9. 0 {src → doc}/overview.edoc
  10. +0 −16 ebin/erlang_protobuffs.app.in
  11. +1 −0 fw-pkgin/Makefile.am.local
  12. +55 −0 fw-pkgin/config
  13. +9 −0 fw-pkgin/post-install
  14. +9 −0 fw-pkgin/post-remove
  15. +9 −0 fw-pkgin/pre-install
  16. +9 −0 fw-pkgin/pre-remove
  17. +10 −0 fw-pkgin/start
  18. +10 −0 fw-pkgin/stop
  19. +0 −9 src/Makefile
  20. +14 −0 src/Makefile.am.local
  21. +5 −0 src/protobuffs.erl
  22. +120 −31 src/protobuffs_compile.erl
  23. +0 −12 t/Makefile
  24. +0 −276 t/protobuffs_eqc.erl
  25. +5 −0 tests/.gitignore
  26. +2 −0 tests/Makefile.am.local
  27. 0 {t → tests}/empty.proto
  28. 0 {t → tests}/hasdefault.proto
  29. +18 −0 tests/nested1.proto
  30. +19 −0 tests/nested2.proto
  31. +15 −0 tests/nested3.proto
  32. +15 −0 tests/nested4.proto
  33. +9 −0 tests/nested5.proto
  34. +1 −1 {t → tests}/protobuffs_t_001.t
  35. +1 −1 {t → tests}/protobuffs_t_002.t
  36. +5 −3 {t → tests}/protobuffs_t_003.t
  37. +2 −2 {t → tests}/protobuffs_t_005.t
  38. +2 −2 {t → tests}/protobuffs_t_006.t
  39. +2 −2 {t → tests}/protobuffs_t_007.t
  40. +2 −2 {t → tests}/protobuffs_t_008.t
  41. +2 −2 {t → tests}/protobuffs_t_009.t
  42. +30 −0 tests/protobuffs_t_010.t
  43. +37 −0 tests/protobuffs_t_011.t
  44. +51 −0 tests/protobuffs_t_012.t
  45. +30 −0 tests/protobuffs_t_013.t
  46. 0 {t → tests}/repeater.proto
  47. +3 −0 tests/runtests.sh
  48. 0 {t → tests}/simple.proto
View
@@ -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
+
View
@@ -0,0 +1,3 @@
+Nick Gerakines
+Jacob Vorreuter
+erlrc integration by Cliff Moon
View
@@ -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)
+
View
@@ -1,30 +0,0 @@
-LIBDIR=`erl -eval 'io:format("~s~n", [code:lib_dir()])' -s init stop -noshell`
-VERSION=0.3.0
-PKGNAME=erlang_protobuffs
-
-all: app
- mkdir -p ebin/
- (cd src;$(MAKE))
-
-app:
- sh ebin/$(PKGNAME).app.in $(VERSION)
-
-test: all
- prove t/*.t
-
-test-eqc: all
- (cd t;$(MAKE))
-
-clean:
- (cd src;$(MAKE) clean)
- (cd t; $(MAKE) clean)
- rm -rf erl_crash.dump *.beam *.hrl ebin/*.app
-
-package: clean
- @mkdir $(PKGNAME)-$(VERSION)/ && cp -rf ebin Makefile README.markdown scripts src support t $(PKGNAME)-$(VERSION)
- @COPYFILE_DISABLE=true tar zcf $(PKGNAME)-$(VERSION).tgz $(PKGNAME)-$(VERSION)
- @rm -rf $(PKGNAME)-$(VERSION)/
-
-install:
- mkdir -p $(prefix)/$(LIBDIR)/$(PKGNAME)-$(VERSION)/ebin
- for i in ebin/*.beam ebin/*.app; do install $$i $(prefix)/$(LIBDIR)/$(PKGNAME)-$(VERSION)/$$i ; done
View
@@ -0,0 +1 @@
+# put whatever (auto)make commands here, they will be included from Makefile.am
View
@@ -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 "$@"
View
@@ -0,0 +1,2 @@
+dnl -- include additional autoconf commands here
+dnl -- do not include AC_OUTPUT, this is called for you
View
@@ -0,0 +1 @@
+# put whatever (auto)make commands here, they will be included from Makefile.am
File renamed without changes.
@@ -1,16 +0,0 @@
-#!/bin/bash
-
-VERSION=${1}
-MODULES=`ls -1 src/*.erl | awk -F[/.] '{ print "\t\t" $2 }' | sed '$q;s/$/,/g'`
-
-cat > ebin/erlang_protobuffs.app << EOF
-{application, erlang_protobuffs, [
- {description, "Google protobuffs implementation for Erlang."},
- {vsn, "${VERSION}"},
- {modules, [
-${MODULES}
- ]},
- {registered, []},
- {applications, [kernel, stdlib, sasl, crypto, log_roller, stateless_server]}
-]}.
-EOF
@@ -0,0 +1 @@
+# put whatever (auto)make commands here, they will be included from Makefile.am
View
@@ -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=""
View
@@ -0,0 +1,9 @@
+#! /bin/sh
+
+#---------------------------------------------------------------------
+# post-install
+#
+# Executed after the package is installed.
+#---------------------------------------------------------------------
+
+exit 0
View
@@ -0,0 +1,9 @@
+#! /bin/sh
+
+#---------------------------------------------------------------------
+# post-remove
+#
+# Executed after the package is removed.
+#---------------------------------------------------------------------
+
+exit 0
View
@@ -0,0 +1,9 @@
+#! /bin/sh
+
+#---------------------------------------------------------------------
+# pre-install
+#
+# Executed before the package is installed.
+#---------------------------------------------------------------------
+
+exit 0
View
@@ -0,0 +1,9 @@
+#! /bin/sh
+
+#---------------------------------------------------------------------
+# pre-remove
+#
+# Executed before the package is removed.
+#---------------------------------------------------------------------
+
+exit 0
View
@@ -0,0 +1,10 @@
+#! /bin/sh
+
+#---------------------------------------------------------------------
+# start
+#
+# Executed when the package (service) is started up.
+# Not supported by all package formats.
+#---------------------------------------------------------------------
+
+exit 0
View
@@ -0,0 +1,10 @@
+#! /bin/sh
+
+#---------------------------------------------------------------------
+# start
+#
+# Executed when the package (service) is shut down.
+# Not supported by all package formats.
+#---------------------------------------------------------------------
+
+exit 0
View
@@ -1,9 +0,0 @@
-include ../support/include.mk
-
-all: $(EBIN_FILES)
-
-debug:
- $(MAKE) DEBUG=-DDEBUG
-
-clean:
- rm -rf $(EBIN_FILES) erl_crash.dump
View
@@ -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
View
@@ -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.
Oops, something went wrong.

0 comments on commit 58ff962

Please sign in to comment.