sl@0: /*
sl@0: * Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0: * All rights reserved.
sl@0: * This component and the accompanying materials are made available
sl@0: * under the terms of "Eclipse Public License v1.0"
sl@0: * which accompanies this distribution, and is available
sl@0: * at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0: *
sl@0: * Initial Contributors:
sl@0: * Nokia Corporation - initial contribution.
sl@0: *
sl@0: * Contributors:
sl@0: *
sl@0: * Description: 
sl@0: * Header PDRTRAN.CPP
sl@0: *
sl@0: */
sl@0: 
sl@0: 
sl@0: #include "PDRREADR.H"
sl@0: 
sl@0: bool OutputUnicode = false;
sl@0: 
sl@0: // Input and output filenames entered in command line
sl@0: int main(int argc, char *argv[])  
sl@0: 	{
sl@0: 	cout << "\nPDRTRAN V";
sl@0: 	cout << KPdrtranVersion << "\n";
sl@0: 	cout << "Copyright (c) 1998-2004 Symbian Software Ltd.\n";
sl@0: 
sl@0: 	if(argc!=3)
sl@0: 		{
sl@0: 		cout << "Usage:	PDRTRAN srcfile [srcfile2 ..] destfile\n";
sl@0: 		cout << "where srcfile is the file containing printer models,\n";
sl@0: 		cout << "typeface information and character width tables, and\n";
sl@0: 		cout << "destfile is the pdr store file.\n";
sl@0: 		return -1;
sl@0: 		}
sl@0: 	
sl@0: 	PdrReader reader;
sl@0: 
sl@0: 	for (int i = 1; i < argc - 1; i++)
sl@0: 		{
sl@0: 		if (!reader.Read(argv[i]))
sl@0: 			{
sl@0: 			cerr << "Problem encountered in file " << argv[i] << "\n";
sl@0: 			return -1;
sl@0: 			}
sl@0: 		}
sl@0: 	if (!reader.Store(argv[argc - 1]))
sl@0: 		{
sl@0: 		cerr << "Problem writing pdr file " << argv[argc - 1] << "\n";
sl@0: 		return -1;
sl@0: 		}
sl@0: 	cout << argv[argc-1] << " created\n";
sl@0: 	return 0;
sl@0: 	}