Skip to content

Commit 70a0c35

Browse files
committedAug 15, 2015
neaten
1 parent e0cbe18 commit 70a0c35

22 files changed

+81
-40
lines changed
 

‎LICENSE.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2015 John Kerl
1+
Copyright (c) 2015- John Kerl
22

33
All rights reserved.
44

‎c/cli/argparse.h

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// ================================================================
2+
// Argument-parsing library, with non-getopt semantics.
3+
// ================================================================
4+
15
#ifndef ARGPARSE_H
26
#define ARGPARSE_H
37
#include "containers/slls.h"

‎c/cli/mlrcli.h

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// ================================================================
2+
// Miller command-line parsing
3+
// ================================================================
4+
15
#ifndef MLRCLI_H
26
#define MLRCLI_H
37

‎c/containers/header_keeper.h

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1+
// ================================================================
2+
// Retains field names from CSV header lines across record reads.
3+
// See also c/README.md.
4+
// ================================================================
5+
16
#ifndef HEADER_KEEPER_H
27
#define HEADER_KEEPER_H
38

49
#include "containers/slls.h"
510

6-
// xxx cmt w/ xref
7-
811
typedef struct _header_keeper_t {
912
char* line;
1013
slls_t* pkeys;

‎c/containers/hss.h

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
#ifndef HSS_H
2-
#define HSS_H
3-
41
// ================================================================
52
// Array-only (open addressing) string-valued hash set with linear probing for
63
// collisions.
@@ -13,6 +10,9 @@
1310
// * http://docs.oracle.com/javase/6/docs/api/java/util/Map.html
1411
// ================================================================
1512

13+
#ifndef HSS_H
14+
#define HSS_H
15+
1616
// ----------------------------------------------------------------
1717
typedef struct _hsse_t {
1818
char* key;
@@ -28,6 +28,7 @@ typedef struct _hss_t {
2828
hsse_t* array;
2929
} hss_t;
3030

31+
// ----------------------------------------------------------------
3132
hss_t* hss_alloc();
3233
void hss_free(hss_t* pset);
3334
void hss_add(hss_t* pset, char* key);

‎c/containers/join_bucket_keeper.h

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// ================================================================
2+
// Data structures for mlr join
3+
// ================================================================
4+
15
#ifndef JOIN_BUCKET_KEEPER_H
26
#define JOIN_BUCKET_KEEPER_H
37

‎c/containers/lhms2v.h

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
#ifndef LHMS2V_H
2-
#define LHMS2V_H
3-
4-
#include "containers/slls.h"
5-
61
// ================================================================
72
// Array-only (open addressing) string-pair-to-void-star linked hash map with
83
// linear probing for collisions.
@@ -18,6 +13,9 @@
1813
// * http://docs.oracle.com/javase/6/docs/api/java/util/Map.html
1914
// ================================================================
2015

16+
#ifndef LHMS2V_H
17+
#define LHMS2V_H
18+
2119
// ----------------------------------------------------------------
2220
typedef struct _lhms2ve_t {
2321
int ideal_index;

‎c/containers/lhmsi.h

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
#ifndef LHMSI_H
2-
#define LHMSI_H
3-
4-
#include "containers/sllv.h"
5-
61
// ================================================================
72
// Array-only (open addressing) string-to-int linked hash map with linear
83
// probing for collisions.
@@ -18,6 +13,9 @@
1813
// * http://docs.oracle.com/javase/6/docs/api/java/util/Map.html
1914
// ================================================================
2015

16+
#ifndef LHMSI_H
17+
#define LHMSI_H
18+
2119
// ----------------------------------------------------------------
2220
typedef struct _lhmsie_t {
2321
int ideal_index;

‎c/containers/lhmslv.h

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
#ifndef LHMSLV_H
2-
#define LHMSLV_H
3-
4-
#include "containers/slls.h"
5-
61
// ================================================================
72
// Array-only (open addressing) string-list-to-void-star linked hash map with
83
// linear probing for collisions.
@@ -18,6 +13,11 @@
1813
// * http://docs.oracle.com/javase/6/docs/api/java/util/Map.html
1914
// ================================================================
2015

16+
#ifndef LHMSLV_H
17+
#define LHMSLV_H
18+
19+
#include "containers/slls.h"
20+
2121
// ----------------------------------------------------------------
2222
typedef struct _lhmslve_t {
2323
int ideal_index;

‎c/containers/lhmss.h

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
#ifndef LHMSS_H
2-
#define LHMSS_H
3-
4-
#include "containers/sllv.h"
5-
61
// ================================================================
72
// Array-only (open addressing) string-to-string linked hash map with linear
83
// probing for collisions.
@@ -18,6 +13,11 @@
1813
// * http://docs.oracle.com/javase/6/docs/api/java/util/Map.html
1914
// ================================================================
2015

16+
#ifndef LHMSS_H
17+
#define LHMSS_H
18+
19+
#include "containers/sllv.h"
20+
2121
// ----------------------------------------------------------------
2222
typedef struct _lhmsse_t {
2323
int ideal_index;

‎c/containers/lhmsv.h

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
#ifndef LHMSV_H
2-
#define LHMSV_H
3-
4-
#include "containers/sllv.h"
5-
61
// ================================================================
72
// Array-only (open addressing) string-to-void linked hash map with linear
83
// probing for collisions.
@@ -18,6 +13,11 @@
1813
// * http://docs.oracle.com/javase/6/docs/api/java/util/Map.html
1914
// ================================================================
2015

16+
#ifndef LHMSV_H
17+
#define LHMSV_H
18+
19+
#include "containers/sllv.h"
20+
2121
// ----------------------------------------------------------------
2222
typedef struct _lhmsve_t {
2323
int ideal_index;

‎c/containers/mixutil.h

+3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1+
// ================================================================
12
// Functions involving more than one container type
3+
// ================================================================
4+
25
#ifndef MIXUTIL_H
36
#define MIXUTIL_H
47
#include "containers/lrec.h"

‎c/containers/mlr_dsl_ast.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
#ifndef MLR_DSL_AST_H
2-
#define MLR_DSL_AST_H
3-
#include "sllv.h"
4-
51
// ================================================================
62
// Miller abstract syntax tree for put and filter.
73
// ================================================================
84

5+
#ifndef MLR_DSL_AST_H
6+
#define MLR_DSL_AST_H
7+
#include "sllv.h"
8+
99
#define MLR_DSL_AST_NODE_TYPE_LITERAL 0xaaaa
1010
#define MLR_DSL_AST_NODE_TYPE_FIELD_NAME 0xbbbb
1111
#define MLR_DSL_AST_NODE_TYPE_FUNCTION_NAME 0xcccc

‎c/containers/percentile_keeper.h

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1+
// ================================================================
2+
// For mlr stats1 percentiles
3+
// ================================================================
4+
15
#ifndef PERCENTILE_KEEPER_H
26
#define PERCENTILE_KEEPER_H
37
#include "containers/lrec.h"
48

5-
// For mlr stats1 percentiles
6-
79
typedef struct _percentile_keeper_t {
810
double* data;
911
int size;

‎c/containers/slls.h

+3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1+
// ================================================================
12
// Singly linked list of string, with tail for append.
3+
// ================================================================
4+
25
#ifndef SLLS_H
36
#define SLLS_H
47

‎c/containers/sllv.h

+3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1+
// ================================================================
12
// Singly-linked list of void-star, with tail for append.
3+
// ================================================================
4+
25
#ifndef SLLV_H
36
#define SLLV_H
47

‎c/containers/top_keeper.h

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// ================================================================
2+
// Data structure for mlr top: just a decorated array.
3+
// ================================================================
4+
15
#ifndef TOP_KEEPER_H
26
#define TOP_KEEPER_H
37
#include "containers/lrec.h"

‎c/input/file_reader_mmap.h

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// ================================================================
2+
// Abstraction layer for mmapped file-read logic.
3+
// ================================================================
4+
15
#ifndef FILE_READER_MMAP_H
26
#define FILE_READER_MMAP_H
37

‎c/input/file_reader_stdio.h

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// ================================================================
2+
// Abstraction layer for stdio file-read logic.
3+
// ================================================================
4+
15
#ifndef FILE_READER_STDIO_H
26
#define FILE_READER_STDIO_H
37

‎c/lib/minunit.h

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
// ================================================================
12
// http://www.jera.com/techinfo/jtns/jtn002.html
23
// MinUnit license:
34
// "You may use the code in this tech note for any purpose, with the understanding that it comes with NO WARRANTY."
5+
// ================================================================
46

57
#ifndef MINUNIT_H
68
#define MINUNIT_H

‎c/lib/mlrmath.h

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ void mlr_get_real_symmetric_eigensystem(
99
double eigenvector_2[2]); // Output: corresponding to less-dominant eigenvalue
1010

1111
double qnorm(double x);
12+
1213
double invqnorm(double x);
1314

1415
#endif // MLRMATH_H

‎c/todo.txt

+6-3
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@ TOP OF LIST
1414

1515
* doc w/ very specific examples of sed/grep/etc preprocessing to structurize semi-structured data (e.g. logs)
1616

17-
!! join: cleanup of xxx cmts
18-
19-
!! mmap cleanup, especially csv
2017
! doc stats1/stats2 accums via then-statements ...
2118

2219
!! update t1.rb including numeric sort; fix appropriateness of -t=
@@ -123,6 +120,12 @@ UT/REG
123120
* mmap/stdio UTs; run all cases with --mmap and again with --no-mmap
124121
* all __X_MAIN__ instances -> UT code (effectively all-but-dead code at present)
125122

123+
================================================================
124+
HYGIENE
125+
126+
!! join: cleanup of xxx cmts
127+
!! mmap cleanup, especially csv
128+
126129
================================================================
127130
HARDER HYGIENE
128131
* eliminate compiler warnings for lemon & its autogenerated code

0 commit comments

Comments
 (0)
Please sign in to comment.