Bug #510

GMT API: -B+t"Multi Word Title" not working

Added by Eduardo almost 4 years ago. Updated almost 4 years ago.

Status:ClosedStart date:2014-02-11
Priority:NormalDue date:
Assignee:Paul% Done:

100%

Category:-
Target version:Candidate for next bugfix release
Affected version:5.x-svn Platform:Linux

Description

This work


sprintf(args,"%s %s","-Rg -JH6i -B+tTitle -Bg30", "->ex01.ps");
ierr=GMT_Call_Module(API,"psbasemap",GMT_MODULE_CMD,args);

This doesn't work


sprintf(args,"%s %s","-Rg -JH6i -B+t\"Multi Word Title\" -Bg30", "->ex01.ps");
ierr=GMT_Call_Module(API,"psbasemap",GMT_MODULE_CMD,args);

The error message varies with the GMT command.

Examples attached.

example_01a.c Magnifier (944 Bytes) Eduardo, 2014-02-11 13:34

example_01b.c Magnifier (959 Bytes) Eduardo, 2014-02-11 13:34

Associated revisions

Revision 12889
Added by Paul almost 4 years ago

Undo bad API change, address issue #510

History

#1 Updated by Paul almost 4 years ago

  • Status changed from New to In Progress
  • Assignee set to Paul

Thanks, I see the problem, it is in GMT_Create_Options which tries to split the full string args into words, not noticing the quotes etc. Will be working on a fix for this.

#2 Updated by Paul almost 4 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 0 to 100

Try r12889. Also needed to remove double quotes as shell does.

#3 Updated by Eduardo almost 4 years ago

It works for me! Thanks!

#4 Updated by Paul almost 4 years ago

  • Status changed from Resolved to Closed

Closing this issue for now.

Also available in: Atom PDF