Commit 584bba0a authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

Change prompt from stdout to stderr

parent 039728b3
2006-11-?? Uwe Schulzweida <Uwe.Schulzweida@zmaw.de> 2006-11-?? Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* using CDI library version 1.0.3 * using CDI library version 1.0.3
* New operator: intntime [request: Michael Boettinger] * New operator: intntime [request: Michael Boettinger]
* New operator: mrotuvb [request: Helmuth Haak] * New operator: mrotuvb [request: Helmuth Haak]
* New operator: outputvector [request: Helmuth Haak] * New operator: outputvector [request: Helmuth Haak]
* inttime: extention for months and years [request: Holger Goettel] * inttime: extention for months and years [request: Holger Goettel]
......
...@@ -91,6 +91,7 @@ void *Outputgmt(void *argument) ...@@ -91,6 +91,7 @@ void *Outputgmt(void *argument)
operatorInputArg("increment"); operatorInputArg("increment");
operatorCheckArgc(1); operatorCheckArgc(1);
ninc = atoi(operatorArgv()[0]); ninc = atoi(operatorArgv()[0]);
if ( ninc < 1 ) cdoAbort("Increment must be greater than 0!");
} }
if ( operatorID == OUTPUTBOUNDS || operatorID == OUTPUTBOUNDSCPT ) if ( operatorID == OUTPUTBOUNDS || operatorID == OUTPUTBOUNDSCPT )
...@@ -226,6 +227,8 @@ void *Outputgmt(void *argument) ...@@ -226,6 +227,8 @@ void *Outputgmt(void *argument)
fprintf(stdout, "# Generated by CDO version %s\n", VERSION); fprintf(stdout, "# Generated by CDO version %s\n", VERSION);
fprintf(stdout, "#\n"); fprintf(stdout, "#\n");
fprintf(stdout, "# Operator = %s\n", cdoOperatorName(operatorID)); fprintf(stdout, "# Operator = %s\n", cdoOperatorName(operatorID));
if ( operatorID == OUTPUTVECTOR )
fprintf(stdout, "# Increment = %d\n", ninc);
fprintf(stdout, "#\n"); fprintf(stdout, "#\n");
fprintf(stdout, "# File = %s\n", cdoStreamName(0)); fprintf(stdout, "# File = %s\n", cdoStreamName(0));
fprintf(stdout, "# Date = %4.4d-%2.2d-%2.2d\n", year, month, day); fprintf(stdout, "# Date = %4.4d-%2.2d-%2.2d\n", year, month, day);
......
...@@ -487,9 +487,9 @@ static int operatorInqModID(char *operatorName) ...@@ -487,9 +487,9 @@ static int operatorInqModID(char *operatorName)
} }
} }
if ( error ) if ( error )
fprintf(stdout, "(not found)\n") ; fprintf(stderr, "(not found)\n") ;
else else
fprintf(stdout, "\n"); fprintf(stderr, "\n");
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
......
...@@ -647,7 +647,7 @@ void operatorInputArg(const char *enter) ...@@ -647,7 +647,7 @@ void operatorInputArg(const char *enter)
{ {
lreadline = 1; lreadline = 1;
if ( enter ) Message(processInqPrompt(), "Enter %s >", enter); if ( enter ) fprintf(stderr, "%-16s : Enter %s > ", processInqPrompt(), enter);
while ( lreadline ) while ( lreadline )
{ {
......
Supports Markdown
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