projects
/
yazpp-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added zlint
[yazpp-moved-to-github.git]
/
zoom
/
zclient.cpp
diff --git
a/zoom/zclient.cpp
b/zoom/zclient.cpp
index
f401ab8
..
7938b0d
100644
(file)
--- a/
zoom/zclient.cpp
+++ b/
zoom/zclient.cpp
@@
-1,16
+1,16
@@
-// $Id: zclient.cpp,v 1.5 2002-11-30 22:33:21 mike Exp $
+// $Id: zclient.cpp,v 1.7 2003-07-02 10:25:13 adam Exp $
// Simple sample client
#include <stdlib.h> // for atoi()
// Simple sample client
#include <stdlib.h> // for atoi()
-#include <iostream.h>
+#include <iostream>
#include "zoom.h"
int main(int argc, char **argv)
{
if (argc != 5) {
#include "zoom.h"
int main(int argc, char **argv)
{
if (argc != 5) {
- cerr << "Usage: " <<
+ std::cerr << "Usage: " <<
argv[0] << " <host> <port> <dbname> <@prefix-search>\n";
return 1;
}
argv[0] << " <host> <port> <dbname> <@prefix-search>\n";
return 1;
}
@@
-25,21
+25,21
@@
int main(int argc, char **argv)
resultSet rs(conn, pq);
size_t n = rs.size();
resultSet rs(conn, pq);
size_t n = rs.size();
- cout << "found " << n << " records:\n";
+ std::cout << "found " << n << " records:\n";
for (size_t i = 0; i < n; i++) {
const record rec(rs, i);
for (size_t i = 0; i < n; i++) {
const record rec(rs, i);
- cout << "=== record " << i+1 <<
- " (record-syntax " << (string) rec.recsyn() << ")" <<
+ std::cout << "=== record " << i+1 <<
+ " (record-syntax " << (std::string) rec.recsyn() << ")" <<
" ===\n" << rec.render();
}
} catch(bib1Exception& err) {
" ===\n" << rec.render();
}
} catch(bib1Exception& err) {
- cerr << argv[0] << ": bib1Exception " <<
+ std::cerr << argv[0] << ": bib1Exception " <<
err.errmsg() << " (" << err.addinfo() << ")\n";
return 2;
err.errmsg() << " (" << err.addinfo() << ")\n";
return 2;
- } catch(exception& err) {
- cerr << argv[0] << ": exception " <<
+ } catch(ZOOM::exception& err) {
+ std::cerr << argv[0] << ": exception " <<
err.errmsg() << "\n";
return 3;
}
err.errmsg() << "\n";
return 3;
}