chinwag 0.1.5 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
data/ext/chinwag/seuss.h CHANGED
@@ -1,5 +1,5 @@
1
- #ifndef __SEUSS_2GYTCD1U_H
2
- #define __SEUSS_2GYTCD1U_H
1
+ #ifndef __SEUSS_NSO4YYCI_H
2
+ #define __SEUSS_NSO4YYCI_H
3
3
 
4
4
  #include "chinwag.h"
5
5
 
@@ -1,6 +1,7 @@
1
1
  #include "tokenize.h"
2
2
 
3
- U32 stringify_file(char** buffer, FILE* fp)
3
+ U32 stringify_file
4
+ (char** buffer, FILE* fp)
4
5
  {
5
6
  // setup
6
7
  U64 sz = 0;
@@ -22,11 +23,12 @@ U32 stringify_file(char** buffer, FILE* fp)
22
23
  return sz;
23
24
  }
24
25
 
25
- dict_t tokenize(const char* const buffer, const char* delimiters)
26
+ cwdict_t tokenize
27
+ (const char* const buffer, const char* delimiters)
26
28
  {
27
29
  char* tok;
28
30
  char* mutable_buffer = (char*)malloc(strlen(buffer) + 1 * sizeof(char));
29
- dict_t dict = open_dict();
31
+ cwdict_t dict = cwdict_open();
30
32
 
31
33
  // get mutable copy of buffer; a bit slower, but allows for const-ness
32
34
  strcpy(mutable_buffer, buffer);
@@ -37,7 +39,7 @@ dict_t tokenize(const char* const buffer, const char* delimiters)
37
39
  while(tok != NULL)
38
40
  {
39
41
  // add tok to dict
40
- dict = place_word_in_dict_strict(dict, tok);
42
+ dict = cwdict_place_word_strict(dict, tok);
41
43
 
42
44
  // get new tok (if any)
43
45
  tok = strtok(NULL, delimiters);
@@ -47,7 +49,7 @@ dict_t tokenize(const char* const buffer, const char* delimiters)
47
49
  free(mutable_buffer);
48
50
 
49
51
  // clean up dict
50
- dict = prune_dict(dict, true);
52
+ dict = cwdict_prune(dict, true);
51
53
 
52
54
  return dict;
53
55
  }
@@ -3,7 +3,10 @@
3
3
 
4
4
  #include "chinwag.h"
5
5
 
6
- U32 stringify_file(char** buffer, FILE* fp);
7
- dict_t tokenize(const char* const buffer, const char* delimiters);
6
+ U32 stringify_file
7
+ (char** buffer, FILE* fp);
8
+
9
+ cwdict_t tokenize
10
+ (const char* const buffer, const char* delimiters);
8
11
 
9
12
  #endif
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chinwag
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Calo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-15 00:00:00.000000000 Z
11
+ date: 2015-01-04 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A text-synthesis library, for use in layout testing (and more). It houses
14
14
  flexible methods for generation, and a dictionary class (CWDict) allowing adequate