// $Revision: 1.5 $ // SetupMain.C // Copyright (C) 1994, 1995 Taligent, Inc. All rights reserved. #ifndef TaligentSamples_STOCKSERVER #include "StockServer.h" #endif #ifndef Taligent_FILESYSTEMINTERFACE #include #endif #ifndef Taligent_MULTIPLEROOTLOCATOR #include #endif main(int argc, char* argv[]) { // argv[1] is the stock name. // argv[2] is the source data file name. int errorCode = 0; try { const bool kCreate = true; TPathName serverDataPath; TUnixPathNameParser pathParser; pathParser.HostSpecificToPathName("RuntimeEnv/Data/StockServerDATA", serverDataPath); TDirectory directory = TMultipleRootLocator(serverDataPath).GetWritableDirectory(!kCreate); TStockServer server; server.AddStockData(argv[1], directory, argv[2]); } catch (...) { errorCode = 1; } return errorCode; }