equal
deleted
inserted
replaced
|
1 /* |
|
2 * Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * Header PDRTRAN.CPP |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #include "PDRREADR.H" |
|
21 |
|
22 bool OutputUnicode = false; |
|
23 |
|
24 // Input and output filenames entered in command line |
|
25 int main(int argc, char *argv[]) |
|
26 { |
|
27 cout << "\nPDRTRAN V"; |
|
28 cout << KPdrtranVersion << "\n"; |
|
29 cout << "Copyright (c) 1998-2004 Symbian Software Ltd.\n"; |
|
30 |
|
31 if(argc!=3) |
|
32 { |
|
33 cout << "Usage: PDRTRAN srcfile [srcfile2 ..] destfile\n"; |
|
34 cout << "where srcfile is the file containing printer models,\n"; |
|
35 cout << "typeface information and character width tables, and\n"; |
|
36 cout << "destfile is the pdr store file.\n"; |
|
37 return -1; |
|
38 } |
|
39 |
|
40 PdrReader reader; |
|
41 |
|
42 for (int i = 1; i < argc - 1; i++) |
|
43 { |
|
44 if (!reader.Read(argv[i])) |
|
45 { |
|
46 cerr << "Problem encountered in file " << argv[i] << "\n"; |
|
47 return -1; |
|
48 } |
|
49 } |
|
50 if (!reader.Store(argv[argc - 1])) |
|
51 { |
|
52 cerr << "Problem writing pdr file " << argv[argc - 1] << "\n"; |
|
53 return -1; |
|
54 } |
|
55 cout << argv[argc-1] << " created\n"; |
|
56 return 0; |
|
57 } |