Skip to content

Commit

Permalink
utils: clang-format for coherent indentation and coding style
Browse files Browse the repository at this point in the history
  • Loading branch information
linuxmaniac committed Nov 11, 2023
1 parent 466f95a commit 8f08197
Show file tree
Hide file tree
Showing 27 changed files with 2,941 additions and 2,815 deletions.
915 changes: 453 additions & 462 deletions utils/db_berkeley/kambdb_recover.c

Large diffs are not rendered by default.

46 changes: 23 additions & 23 deletions utils/db_berkeley/kambdb_recover.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
* --------
* 2007-09-19 genesis (wiquan)
*/

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
Expand All @@ -51,7 +51,7 @@
#define METADATA_COLUMNS "METADATA_COLUMNS"

/*operations*/
enum
enum
{
INSERT,
UPDATE,
Expand All @@ -62,29 +62,29 @@ enum

typedef struct _lnode
{
char* p;
char *p;
struct _lnode *prev;
struct _lnode *next;
} lnode_t, *lnode_p;


typedef struct _column
{
char* name;
char* type;
char *name;
char *type;
int kflag;
} column_t, *column_p;


typedef struct _table
{
char* name;
column_p colp [MAX_NUM_COLS];
char *name;
column_p colp[MAX_NUM_COLS];
int ncols;
int nkeys;
int ro;
int logflags;
DB* db;
DB *db;
} table_t, *table_p;


Expand All @@ -97,24 +97,24 @@ typedef struct _tbl_cache


int usage(void);
DB* get_db(table_p tp);
int get_op(char* op, int len);
int delete(table_p tp, char* v, int len);
int insert(table_p tp, char* v, int len);
int _insert(DB* db, char* k, char* v, int klen, int vlen);
int update(table_p tp, char* v, int len);
int create(char* tn);
int _version(DB* db);
DB *get_db(table_p tp);
int get_op(char *op, int len);
int delete(table_p tp, char *v, int len);
int insert(table_p tp, char *v, int len);
int _insert(DB *db, char *k, char *v, int klen, int vlen);
int update(table_p tp, char *v, int len);
int create(char *tn);
int _version(DB *db);
int create_all(void);
int recover(char* tn);
int recover(char *tn);
int recover_all(int lastn);
lnode_p file_list(char* d, char* tn);
int compare (const void *a, const void *b);
int extract_key(table_p tp, char* key, char* data);
int load_schema(char* dir);
lnode_p file_list(char *d, char *tn);
int compare(const void *a, const void *b);
int extract_key(table_p tp, char *key, char *data);
int load_schema(char *dir);
tbl_cache_p get_table(char *s);
table_p create_table(char *_s);
int load_metadata_columns(table_p _tp, char* line);
int load_metadata_key(table_p _tp, char* line);
int load_metadata_columns(table_p _tp, char *line);
int load_metadata_key(table_p _tp, char *line);
int import_schema(table_p tp);
void cleanup(void);

0 comments on commit 8f08197

Please sign in to comment.