GithubHelp home page GithubHelp logo

skyformat99 / protobuf-c-text Goto Github PK

View Code? Open in Web Editor NEW

This project forked from protobuf-c/protobuf-c-text

0.0 1.0 0.0 1.78 MB

Protocol Buffers text format routines for C library

License: MIT License

Makefile 18.39% Shell 61.27% M4 6.74% C 13.60%

protobuf-c-text's Introduction

Build Status

Protobuf Text Format Support for C

Python, C++ and Java protobufs support text format but C protobufs did not. This is a project that fixed that. It is a supplement to the libprotobuf-c library in the protobuf-c project.

If you want to just get started using it, grab the code, run ./configure && make && sudo make install and then read the docs.

Contents

The protobuf-c-text/ directory has the code for the library. Tests are in t/.

Dependencies

The re2c parser is required to generate the lexer (parser.re).

Coverage needs the lcov tool.

Documentation needs the doxygen and graphviz tools.

Testing

The t/c-* programs use the BROKEN_MALLOC and BROKEN_MALLOC_SEGV environment vars to control when and how malloc will fail. The BROKEN_MALLOC var is set to the number of times for malloc to succeed until it fails. When the BROKEN_MALLOC_SEGV var is set the test program will segfault on the first failure. This is useful for tracking down errors.

Note that the error message will print out the gdb line and the run command you need to issue to reproduce the error.

Useful make Targets

Beyond the normal autotools make targets, the following useful targets exist:

  • coverage-html: If you ran ./configure --enable-gcov this will generate test code coverage reports along with marked up source files to show what is missing.
  • analyze: If clang is on your system the static analyzer from the llvm project will be run.
  • doxygen-doc: This will generate local versions of the docs available online. They'll be found in docs/html.

Maintainer Notes

make gh-pages notes:

The initial steps was done as follows. This should not need to be repeated but is documented here for future projects.

mkdir foo
git checkout --orphan gh-pages
GIT_INDEX_FILE=$PWD/.git/index.gh-pages git --work-tree foo status
touch foo/.nojekyll
GIT_INDEX_FILE=$PWD/.git/index.gh-pages git --work-tree foo add .nojekyll
GIT_INDEX_FILE=$PWD/.git/index.gh-pages git --work-tree foo commit -m 'Turn off Jekyll'
git checkout master
rm -rf foo

Subsequent updates are done like so (starting in master):

./configure --enable-gcov
make clean doxygen-doc coverage-html
GIT_INDEX_FILE=$PWD/.git/index.gh-pages git --work-tree $PWD/docs/html checkout gh-pages
GIT_INDEX_FILE=$PWD/.git/index.gh-pages git --work-tree $PWD/docs/html checkout .nojekyll
GIT_INDEX_FILE=$PWD/.git/index.gh-pages git --work-tree $PWD/docs/html checkout CNAME
GIT_INDEX_FILE=$PWD/.git/index.gh-pages git --work-tree $PWD/docs/html add .
GIT_INDEX_FILE=$PWD/.git/index.gh-pages git --work-tree $PWD/docs/html ls-files --deleted | GIT_INDEX_FILE=$PWD/.git/index.gh-pages xargs git --work-tree $PWD/docs/html rm
GIT_INDEX_FILE=$PWD/.git/index.gh-pages git --work-tree $PWD/docs/html commit -m "Update docs."
git checkout master
git push

Note that all references to files are done relative to the dir specified in --work-tree. Changing dir into that would make things easier, but the --work-tree flag still needs to be set as would GIT_INDEX_FILE.

Also for reference, github pages docs are quite handy.

protobuf-c-text's People

Contributors

andsve avatar lyda avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.