~ultradvorka/hstr/hh

« back to all changes in this revision

Viewing changes to src/include/hstr_blacklist.h

  • Committer: Martin Dvorak
  • Date: 2015-04-28 06:56:59 UTC
  • Revision ID: git-v1:f82800ae5daab4850e0dfb87682b83b9a4bb6999
Minor favorites refactoring and blacklist skeleton.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 ============================================================================
 
3
 Name        : hstr_blacklist.h
 
4
 Author      : martin.dvorak@midforger.com
 
5
 Copyright   : Apache 2.0
 
6
 Description : Commands to be skipped from history.
 
7
 ============================================================================
 
8
 */
 
9
 
 
10
#ifndef HSTR_BLACKLIST_H_
 
11
#define HSTR_BLACKLIST_H_
 
12
 
 
13
#include <stdlib.h>
 
14
#include <stdbool.h>
 
15
#include "hashset.h"
 
16
 
 
17
#define ENV_VAR_USER "USER"
 
18
#define ENV_VAR_HOME "HOME"
 
19
 
 
20
#define FILE_HH_BLACKLIST ".hh_blacklist"
 
21
 
 
22
typedef struct {
 
23
    bool loaded;
 
24
    bool implicit;
 
25
    HashSet *set;
 
26
} Blacklist;
 
27
 
 
28
void blacklist_init(Blacklist *blacklist);
 
29
void blacklist_get(Blacklist *blacklist);
 
30
bool blacklist_in(Blacklist *blacklist, char *cmd);
 
31
void blacklist_destroy(Blacklist *blacklist);
 
32
 
 
33
#endif