File tree 22 files changed +81
-40
lines changed
22 files changed +81
-40
lines changed Original file line number Diff line number Diff line change 1
- Copyright (c) 2015 John Kerl
1
+ Copyright (c) 2015- John Kerl
2
2
3
3
All rights reserved.
4
4
Original file line number Diff line number Diff line change
1
+ // ================================================================
2
+ // Argument-parsing library, with non-getopt semantics.
3
+ // ================================================================
4
+
1
5
#ifndef ARGPARSE_H
2
6
#define ARGPARSE_H
3
7
#include "containers/slls.h"
Original file line number Diff line number Diff line change
1
+ // ================================================================
2
+ // Miller command-line parsing
3
+ // ================================================================
4
+
1
5
#ifndef MLRCLI_H
2
6
#define MLRCLI_H
3
7
Original file line number Diff line number Diff line change
1
+ // ================================================================
2
+ // Retains field names from CSV header lines across record reads.
3
+ // See also c/README.md.
4
+ // ================================================================
5
+
1
6
#ifndef HEADER_KEEPER_H
2
7
#define HEADER_KEEPER_H
3
8
4
9
#include "containers/slls.h"
5
10
6
- // xxx cmt w/ xref
7
-
8
11
typedef struct _header_keeper_t {
9
12
char * line ;
10
13
slls_t * pkeys ;
Original file line number Diff line number Diff line change 1
- #ifndef HSS_H
2
- #define HSS_H
3
-
4
1
// ================================================================
5
2
// Array-only (open addressing) string-valued hash set with linear probing for
6
3
// collisions.
13
10
// * http://docs.oracle.com/javase/6/docs/api/java/util/Map.html
14
11
// ================================================================
15
12
13
+ #ifndef HSS_H
14
+ #define HSS_H
15
+
16
16
// ----------------------------------------------------------------
17
17
typedef struct _hsse_t {
18
18
char * key ;
@@ -28,6 +28,7 @@ typedef struct _hss_t {
28
28
hsse_t * array ;
29
29
} hss_t ;
30
30
31
+ // ----------------------------------------------------------------
31
32
hss_t * hss_alloc ();
32
33
void hss_free (hss_t * pset );
33
34
void hss_add (hss_t * pset , char * key );
Original file line number Diff line number Diff line change
1
+ // ================================================================
2
+ // Data structures for mlr join
3
+ // ================================================================
4
+
1
5
#ifndef JOIN_BUCKET_KEEPER_H
2
6
#define JOIN_BUCKET_KEEPER_H
3
7
Original file line number Diff line number Diff line change 1
- #ifndef LHMS2V_H
2
- #define LHMS2V_H
3
-
4
- #include "containers/slls.h"
5
-
6
1
// ================================================================
7
2
// Array-only (open addressing) string-pair-to-void-star linked hash map with
8
3
// linear probing for collisions.
18
13
// * http://docs.oracle.com/javase/6/docs/api/java/util/Map.html
19
14
// ================================================================
20
15
16
+ #ifndef LHMS2V_H
17
+ #define LHMS2V_H
18
+
21
19
// ----------------------------------------------------------------
22
20
typedef struct _lhms2ve_t {
23
21
int ideal_index ;
Original file line number Diff line number Diff line change 1
- #ifndef LHMSI_H
2
- #define LHMSI_H
3
-
4
- #include "containers/sllv.h"
5
-
6
1
// ================================================================
7
2
// Array-only (open addressing) string-to-int linked hash map with linear
8
3
// probing for collisions.
18
13
// * http://docs.oracle.com/javase/6/docs/api/java/util/Map.html
19
14
// ================================================================
20
15
16
+ #ifndef LHMSI_H
17
+ #define LHMSI_H
18
+
21
19
// ----------------------------------------------------------------
22
20
typedef struct _lhmsie_t {
23
21
int ideal_index ;
Original file line number Diff line number Diff line change 1
- #ifndef LHMSLV_H
2
- #define LHMSLV_H
3
-
4
- #include "containers/slls.h"
5
-
6
1
// ================================================================
7
2
// Array-only (open addressing) string-list-to-void-star linked hash map with
8
3
// linear probing for collisions.
18
13
// * http://docs.oracle.com/javase/6/docs/api/java/util/Map.html
19
14
// ================================================================
20
15
16
+ #ifndef LHMSLV_H
17
+ #define LHMSLV_H
18
+
19
+ #include "containers/slls.h"
20
+
21
21
// ----------------------------------------------------------------
22
22
typedef struct _lhmslve_t {
23
23
int ideal_index ;
Original file line number Diff line number Diff line change 1
- #ifndef LHMSS_H
2
- #define LHMSS_H
3
-
4
- #include "containers/sllv.h"
5
-
6
1
// ================================================================
7
2
// Array-only (open addressing) string-to-string linked hash map with linear
8
3
// probing for collisions.
18
13
// * http://docs.oracle.com/javase/6/docs/api/java/util/Map.html
19
14
// ================================================================
20
15
16
+ #ifndef LHMSS_H
17
+ #define LHMSS_H
18
+
19
+ #include "containers/sllv.h"
20
+
21
21
// ----------------------------------------------------------------
22
22
typedef struct _lhmsse_t {
23
23
int ideal_index ;
Original file line number Diff line number Diff line change 1
- #ifndef LHMSV_H
2
- #define LHMSV_H
3
-
4
- #include "containers/sllv.h"
5
-
6
1
// ================================================================
7
2
// Array-only (open addressing) string-to-void linked hash map with linear
8
3
// probing for collisions.
18
13
// * http://docs.oracle.com/javase/6/docs/api/java/util/Map.html
19
14
// ================================================================
20
15
16
+ #ifndef LHMSV_H
17
+ #define LHMSV_H
18
+
19
+ #include "containers/sllv.h"
20
+
21
21
// ----------------------------------------------------------------
22
22
typedef struct _lhmsve_t {
23
23
int ideal_index ;
Original file line number Diff line number Diff line change
1
+ // ================================================================
1
2
// Functions involving more than one container type
3
+ // ================================================================
4
+
2
5
#ifndef MIXUTIL_H
3
6
#define MIXUTIL_H
4
7
#include "containers/lrec.h"
Original file line number Diff line number Diff line change 1
- #ifndef MLR_DSL_AST_H
2
- #define MLR_DSL_AST_H
3
- #include "sllv.h"
4
-
5
1
// ================================================================
6
2
// Miller abstract syntax tree for put and filter.
7
3
// ================================================================
8
4
5
+ #ifndef MLR_DSL_AST_H
6
+ #define MLR_DSL_AST_H
7
+ #include "sllv.h"
8
+
9
9
#define MLR_DSL_AST_NODE_TYPE_LITERAL 0xaaaa
10
10
#define MLR_DSL_AST_NODE_TYPE_FIELD_NAME 0xbbbb
11
11
#define MLR_DSL_AST_NODE_TYPE_FUNCTION_NAME 0xcccc
Original file line number Diff line number Diff line change
1
+ // ================================================================
2
+ // For mlr stats1 percentiles
3
+ // ================================================================
4
+
1
5
#ifndef PERCENTILE_KEEPER_H
2
6
#define PERCENTILE_KEEPER_H
3
7
#include "containers/lrec.h"
4
8
5
- // For mlr stats1 percentiles
6
-
7
9
typedef struct _percentile_keeper_t {
8
10
double * data ;
9
11
int size ;
Original file line number Diff line number Diff line change
1
+ // ================================================================
1
2
// Singly linked list of string, with tail for append.
3
+ // ================================================================
4
+
2
5
#ifndef SLLS_H
3
6
#define SLLS_H
4
7
Original file line number Diff line number Diff line change
1
+ // ================================================================
1
2
// Singly-linked list of void-star, with tail for append.
3
+ // ================================================================
4
+
2
5
#ifndef SLLV_H
3
6
#define SLLV_H
4
7
Original file line number Diff line number Diff line change
1
+ // ================================================================
2
+ // Data structure for mlr top: just a decorated array.
3
+ // ================================================================
4
+
1
5
#ifndef TOP_KEEPER_H
2
6
#define TOP_KEEPER_H
3
7
#include "containers/lrec.h"
Original file line number Diff line number Diff line change
1
+ // ================================================================
2
+ // Abstraction layer for mmapped file-read logic.
3
+ // ================================================================
4
+
1
5
#ifndef FILE_READER_MMAP_H
2
6
#define FILE_READER_MMAP_H
3
7
Original file line number Diff line number Diff line change
1
+ // ================================================================
2
+ // Abstraction layer for stdio file-read logic.
3
+ // ================================================================
4
+
1
5
#ifndef FILE_READER_STDIO_H
2
6
#define FILE_READER_STDIO_H
3
7
Original file line number Diff line number Diff line change
1
+ // ================================================================
1
2
// http://www.jera.com/techinfo/jtns/jtn002.html
2
3
// MinUnit license:
3
4
// "You may use the code in this tech note for any purpose, with the understanding that it comes with NO WARRANTY."
5
+ // ================================================================
4
6
5
7
#ifndef MINUNIT_H
6
8
#define MINUNIT_H
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ void mlr_get_real_symmetric_eigensystem(
9
9
double eigenvector_2 [2 ]); // Output: corresponding to less-dominant eigenvalue
10
10
11
11
double qnorm (double x );
12
+
12
13
double invqnorm (double x );
13
14
14
15
#endif // MLRMATH_H
Original file line number Diff line number Diff line change @@ -14,9 +14,6 @@ TOP OF LIST
14
14
15
15
* doc w/ very specific examples of sed/grep/etc preprocessing to structurize semi-structured data (e.g. logs)
16
16
17
- !! join: cleanup of xxx cmts
18
-
19
- !! mmap cleanup, especially csv
20
17
! doc stats1/stats2 accums via then-statements ...
21
18
22
19
!! update t1.rb including numeric sort; fix appropriateness of -t=
@@ -123,6 +120,12 @@ UT/REG
123
120
* mmap/stdio UTs; run all cases with --mmap and again with --no-mmap
124
121
* all __X_MAIN__ instances -> UT code (effectively all-but-dead code at present)
125
122
123
+ ================================================================
124
+ HYGIENE
125
+
126
+ !! join: cleanup of xxx cmts
127
+ !! mmap cleanup, especially csv
128
+
126
129
================================================================
127
130
HARDER HYGIENE
128
131
* eliminate compiler warnings for lemon & its autogenerated code
You can’t perform that action at this time.
0 commit comments