~ubuntu-branches/ubuntu/raring/voxbo/raring

« back to all changes in this revision

Viewing changes to dbutil/showUsers.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Michael Hanke
  • Date: 2010-06-06 11:33:11 UTC
  • Revision ID: james.westby@ubuntu.com-20100606113311-v3c13imdkkd5n7ae
Tags: upstream-1.8.5~svn1172
ImportĀ upstreamĀ versionĀ 1.8.5~svn1172

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/******************************************************************************
 
2
 * Print out all records in user table
 
3
 ******************************************************************************/
 
4
using namespace std;
 
5
 
 
6
#include "db_util.h"
 
7
#include "bdb_tab.h"
 
8
#include <iostream>
 
9
#include <cstdlib>
 
10
 
 
11
/* Main function */
 
12
int main(int argc, char* argv[])
 
13
{
 
14
  if (argc > 2) {
 
15
    printf("Usage: showUsers <bdb_filename>\n");
 
16
    printf("Default user db file is: ../env/user.db");
 
17
    return 0;
 
18
  }
 
19
 
 
20
  string dbFile;
 
21
  if (argc == 1)
 
22
    dbFile = "../env/user.db";
 
23
  else
 
24
    dbFile = argv[1];
 
25
 
 
26
  showEnvDB<userRec>(dbFile);
 
27
 
 
28
  return 0;
 
29
}
 
30