Commit e8ef128f authored by claes's avatar claes

-l language switch added

parent eb9d8412
...@@ -45,6 +45,7 @@ extern "C" { ...@@ -45,6 +45,7 @@ extern "C" {
#include "wb_vsel.h" #include "wb_vsel.h"
#include "co_msgwindow.h" #include "co_msgwindow.h"
#include "co_xhelp.h" #include "co_xhelp.h"
#include "co_lng.h"
#include "wb_wtt.h" #include "wb_wtt.h"
#include "wb_erep.h" #include "wb_erep.h"
...@@ -87,6 +88,11 @@ void pwr_wtt_close( void *wttctx); ...@@ -87,6 +88,11 @@ void pwr_wtt_close( void *wttctx);
void pwr_wtt_open_volume( void *wttctx, wb_eType type, char *filename, wow_eFileSelType file_type); void pwr_wtt_open_volume( void *wttctx, wb_eType type, char *filename, wow_eFileSelType file_type);
int pwr_time_to_exit( void *wttctx); int pwr_time_to_exit( void *wttctx);
static void usage()
{
printf("\nUsage: wb [-a] [-l language] [username] [password] [volume]\n");
}
void wttlist_add( pwr_tStatus *sts, Wtt *wtt, pwr_tVid vid) void wttlist_add( pwr_tStatus *sts, Wtt *wtt, pwr_tVid vid)
{ {
wttlist_iterator it = wttlist.find( vid); wttlist_iterator it = wttlist.find( vid);
...@@ -497,13 +503,21 @@ int main( int argc, char *argv[]) ...@@ -497,13 +503,21 @@ int main( int argc, char *argv[])
for ( i = 1; i < argc; i++) { for ( i = 1; i < argc; i++) {
if ( argv[i][0] == '-') { if ( argv[i][0] == '-') {
switch ( argv[i][1]) { switch ( argv[i][1]) {
case 'a': case 'a':
// Load all volumes // Load all volumes
sw_projectvolume = 0; sw_projectvolume = 0;
volumename_p = 0; volumename_p = 0;
break; break;
default: case 'l':
printf("Unknown argument: %s\n", argv[i]); if ( i+1 >= argc) {
usage();
exit(0);
}
Lng::set( argv[i+1]);
i++;
break;
default:
printf("Unknown argument: %s\n", argv[i]);
} }
} }
else { else {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment