qm*.cmd: query functions for Mercury source files