File: load_cert.cpp

package info (click to toggle)
tqsllib 2.0-8
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 2,460 kB
  • ctags: 1,081
  • sloc: sh: 8,309; cpp: 7,980; xml: 4,068; makefile: 102
file content (40 lines) | stat: -rw-r--r-- 1,019 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/***************************************************************************
                          load_cert.cpp  -  description
                             -------------------
    begin                : Sat Dec 14 2002
    copyright            : (C) 2002 by ARRL
    author               : Jon Bloom
    email                : jbloom@arrl.org
    revision             : $Id: load_cert.cpp,v 1.7 2005/02/18 20:21:01 ke3z Exp $
 ***************************************************************************/

#ifdef HAVE_CONFIG_H
#include "sysconfig.h"
#endif

#include <cstdlib>
#include <iostream>
#include "tqsllib.h"

using namespace std;

int
cb(int, const char *msg, void *) {
	cout << msg << endl;
	return 0;
}

int
main(int argc, char *argv[]) {
	if (tqsl_init()) {
		cerr << tqsl_getErrorString() << endl;
		return EXIT_FAILURE;
	}
	for (int i = 1; i < argc; i++) {
		if (tqsl_importTQSLFile(argv[i], cb, 0)) {
			cerr << tqsl_getErrorString() << endl;
			return EXIT_FAILURE;
		}
	}
	return EXIT_SUCCESS;
}