GithubHelp home page GithubHelp logo

node-ctype's People

Contributors

benblair avatar evanlucas avatar jonathanong avatar nschonni avatar rmustacc avatar terinjokes avatar twhiteman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

node-ctype's Issues

Release 0.5.0

Release a new minor version with updated npm engines.

error in setEndian logic

Definition (endian != 'big' || endian != 'little') will always return true. I suppose there should be logical and (&&):

if (endian != 'big' && endian != 'little')
throw (new Error('invalid endian type, must be big or ' +
' little'));

Default to node ctio builtins

Node >= v0.6 has support for a majority of the builtins like readuint8, readuint16, readuint32, etc. We should default to using the ones it has support for, but allow an option for defaulting to the built in ones.

CLA?

Robert:

Fun question for your legal team. :)

I've noticed that the license includes copyright held by Joyent. Do we need to get a CLA done for contributions to this repo? If yes, would that be the same CLA as for the main NodeJS project, or would we need to fill out another?

Want alternate default char behavior

Currently when encountering a char node-ctype defaults to treating this is the equivalent of a one byte char array. This turns out to be inconvenient in several scenarios when interacting with various C structs. By default, a node-ctype will retain its default behavior, but there is now a new option for how to treat these at construction time. It can either be treated as a uint8_t or an int8_t.

when writeData buffer error

I've write a socket client like this:

var usr = "abcdef";
var pwd = "43402F0AB71E1E17094FDAF3CBDD7FEF";

var OP_USERLOGIN_Q = 0x10658;

op_userlogon_q =
    [
        { CommandID : { type : 'int32_t' }},
        { SequenceID : { type : 'int32_t'}},
        { userid : { type : 'char[6]'}},
        { IsFirst : { type : 'int32_t'}},
        { username : { type : 'char[6]'}},
        { password : { type : 'char[32]'}}
    ];

nClient.Main = function()
{
    var ph = new Ctype.Parser({endian : 'little'});//, pd = new Ctype.Parser({endian : 'little'});
    bfh = new Buffer(10),bfd = new Buffer(35),bfs = new Buffer('*'),bfu = new Buffer(usr),bfp = new Buffer(pwd);

    ph.writeData(op_userlogon_q,bfd,0,[OP_USERLOGIN_Q,0,bfu,1,bfu,bfp]);
    bfh = bfh.concat([bfh,bfd]);
}

in struct op_userlogon_q i have to write the usernam of usr and password md5 hash for login,but when writeData throw a error , can tell me why and how?

Add support for CTF JSON data

node-ctype should be able to understand the CTF JSON data as defined in the ctf2json tool specification. node-ctype will parse the data and return a new CType Parser from it.

Need license

Missing license information should be uploaded

Add Javascript lint profile

node-ctype is being checked by javascriptlint. We should commit the configuration file that we use for it. As a part of this ticket, we'll fix any outstanding lint issues.

want changelog

There should be a version changelog that describes the set of tickets fixed in each version release.

Clarify use of CDDL in tools/jsstyle

the LICENSE file seems MIT allright, but it also states that tools/jsstyle brings its own license. This license is not reflected in package.json's "licenses" tag.

From my reading, it is CDDL-1.0 with copyrights

  • 2008 Sun Microsystems, Inc.
  • 2011 Joyent, Inc.

this should be reflected in package.json so automated tools correctly compile licenses for an upstream software package.

probably, the package should even include the license text itself (at least, the references in tools/jsstyle are not helpful)

alternatively, is tools/jsstyle even used? i couldnt find any references. it might be the easy option to remove the file altogether

(sorry for submitting an empty ticket first. "i slipped on my mouse")

Release v0.3.0

Release CTYPE-26. This represents new functionality; however, all pre-existing functionality will be honored.

Integrate jsstyle

We've always worked to be jsstyle clean. Now that Dave Pacheco has uploaded it, we're going to integrate it into the repo. As a part of this work, we'll be updating the license file to appropriately describe that jsstyle is not licensed under the MIT license and we'll be fixing small issues along the way.

want additional entry point for write

The current entry point for writing out a structure isn't very desirable. Currently one uses the same structure for either both reading and writing data, but you have to also add in the "value" field for the written struct. What would be more convenient is to have a method that took the same struct without the value arg, and then had an additional argument which was an array of values.

The prototype would look something like this:
void CTypeParser.writeDataValues(, values, buffer, offset);

Pull in ctio updates from node/master

As a part of some of the work done on node, there have been several improvements made to the ctio functions. These should be pulled back into node-ctype.

Release v0.2.0

Also add support for v0.5, but note we still use our internal implementation for now.

Missing from NPM registry

Currently this project is not present on the npm registry, it'd be terrific if it were. If you want, I can contribute back a basic package.json file that you can use to publish this project to npm's registry.

int16_t calls wrong read function

The type definition for a 16 bit integer uses the 8 bit signed read instead of the 16 bit. Thus reading some values will always be incorrect.

Add "licenses" to package.json

Specifying your license in package.json makes it a lot easier for your users to find and comply with GNU Affero licenses.

Also giving licenses (an array of objects with type and url keys) helps users whose legal departments request both the license name and the text. See this example from async:

  "licenses": [{
    "type": "MIT",
    "url": "https://github.com/caolan/async/raw/master/LICENSE"
  }]

Though licenses isn't specified in the npm package.json spec, it is supported by the NPM site, as you'll see if you check async's NPM page.

Thanks!

wsint64 with small numbers

Hi,

I think wsint64 has a bug with small positive numbers represented in 64bits. When the more significative 32 bits are all zeros vzposwill be false because value[0] * Number.POSITIVE_INFINITY is NaN, causing the number to be considered negative throwing value smaller than minimum allowed value error.

It seems to work fine with all other kinds of signed numbers.

I suggest a PR to fix this and to consider zero a positive number on that function. Do you agree?

Thanks,
Bruno

Fix nested structures

When working with nested structures there is a mismatch of internal naming. This makes it always consistent as value.

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.