Changeset 38 for trunk/gui/shared/PrManUtl.VRS
- Timestamp:
- May 8, 2013, 5:56:26 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/shared/PrManUtl.VRS
r33 r38 491 491 CALL VRSetIni 'PM_SPOOLER_DD', driver'.'model, driver'.DRV;;;'||'00'x, 'SYSTEM' 492 492 END 493 RETURN ok 494 495 /*:VRX DeletePrintDriver 496 */ 497 /* Removes (that is to say, de-registers with the spooler) a PM printer 498 * device driver/model. 499 * 500 * driver - The name of the printerpak driver (without path or extension) 501 * model - The printer make/model name used by the driver 502 * 503 * Returns: 0 on success, 1 on error 504 */ 505 DeletePrintDriver: PROCEDURE EXPOSE globals. 506 PARSE ARG driver, model 507 508 ok = VRDelIni('PM_SPOOLER_DD', driver'.'model, 'SYSTEM') 493 509 RETURN ok 494 510 … … 807 823 RETURN success 808 824 825 /*:VRX StringTokenize 826 */ 827 StringTokenize: 828 PARSE ARG string, separator, __stem 829 CALL __StringTokenize string, separator, __stem 830 DROP __stem 831 RETURN 832 833 /*:VRX __StringTokenize 834 */ 835 __StringTokenize: PROCEDURE EXPOSE (__stem) 836 PARSE ARG string, separator, tokens 837 838 /* Note: this differs slightly from my usual implementation in that 839 * each token is STRIPped of leading and trailing spaces. 840 */ 841 842 IF ( string = '') THEN RETURN string 843 IF ( separator = '') THEN separator = ' ' 844 845 i = 0 846 CALL VALUE tokens || '0', i 847 DO WHILE LENGTH( string ) > 0 848 x = 1 849 y = POS( separator, string, x ) 850 IF y > 0 THEN DO 851 current = SUBSTR( string, 1, y-1 ) 852 x = y + 1 853 i = i + 1 854 CALL VALUE tokens || 'i', STRIP( current ) 855 END 856 ELSE DO 857 current = STRIP( string, 'B', separator ) 858 i = i + 1 859 CALL VALUE tokens || 'i', STRIP( current ) 860 x = LENGTH( string ) + 1 861 END 862 string = SUBSTR( string, x ) 863 END 864 CALL VALUE tokens || '0', i 865 866 RETURN 867
Note:
See TracChangeset
for help on using the changeset viewer.