home *** CD-ROM | disk | FTP | other *** search
- * ------------------------------------------------------------------------
- * Module......: XPDOS.PRG
- * Title.......: DOS part of the Expand Library Demonstration Program
- * Author......: Pepijn Smits.
- * Date........: July/August 1992
- * Copyright...: (c)1992 by Softwarebureau Pepijn Smits
- * Notes.......: Clipper 5.01 Demo of the Expand Library
- * Some general DOS functions
- * See XPDEMO.RMK For Compile and Link instructions.
- * ------------------------------------------------------------------------
-
- Function DOSmessage()
- XPbrowse(' List of known ~DOS~ Messages ',;
- ' Dec: Hex: Meaning:',;
- {|i|if(i=0,97,Str(i-1,4)+' '+XPhexByte(i-1)+'h '+XPdosMsg(i-1))})
- Return (NIL)
-
- Function EnvList()
- XPbrowse(' Environment strings ',;
- ' Nr: Environment String:',;
- {|i|if(i=0,XPenvCount(),Str(i,4)+' '+XPenvStr(i))})
- Return (NIL)
-
- Function DOSinfo()
-
- XPalert('~DOS~ Information',;
- PadR("DOS version : ~" + XPdosVersion(),60)+";"+;
- PadR("My name is .. : ~" + XPmyname(),60)+";"+;
- PadR("Command-Line : ~" + XPcommandLine(),60)+";"+;
- PadR("Keyboard code : ~" + if(Len(XPkeybCode())=0,'US (Standard)',XPkeybCode()),60)+";"+;
- PadR("Mouse Installed? : ~" + if(XPmouseThere(),'Yes.','No. '),60)+";"+;
- PadR("PRINT installed? : ~" + if(XPprintThere(),'Yes.','No. '),60)+";"+;
- PadR("Append's Path : ~" + if(XPappendThere(),XPappendPath(),'(Not Installed)'),60)+";"+;
- PadR("Env. Strings : ~" + nTrim(XPenvCount())+' strings',60) +";"+;
- PadR("Env. Used/Total : ~" + nTrim(XPenvUsed())+"/"+nTrim(XPenvSize())+' bytes',60) +";"+;
- PadR("Current Country : ~" + nTrim(XPcountry()),60) )
-
- Return (NIL)
-
- Function CountryInfo()
- Local a := {}
- Local i,CurrCountry := XPcountry(i)
- if (!XPnlsFunc())
- XPalert('Country Info',;
- ';~NLSFUNC~ is not installed, therefore the information can;'+;
- 'only be displayed for the ~current~ country:;'+;
- 'Load ~NLSFUNC~ (>~[~LOADHI~]~NLSFUNC at the DOS prompt);'+;
- 'if you want the complete list of supported countries;;'+;
- PadR("Current Country : ~" + nTrim(XPcountry()),60)+';'+;
- PadR("Date format : ~" + XPdateFormat(),60)+';'+;
- PadR("Time format : ~" + StrTran(Time(),':',XPtimeSep()),60)+';'+;
- PadR("24 hour clock? : ~" + if(XPtime24(),'Yes','No '),60)+';'+;
- PadR("Currency string : ~" + XPcurrency(325231.2345),60) )
- else
-
- XPpop('~Country~ Info',' Retrieving Country Information;Please wait..')
-
- for i := 1 to 1000
- if XPcountry(i)=i
- aAdd(a,if(i=CurrCountry,' √',' ')+Str(i,5)+' '+XPdateFormat()+;
- ' '+StrTran(Time(),':',XPtimeSep())+;
- ' '+if(!XPtime24(),'Yes','No ')+;
- ' '+PadR(XPcurrency(325231.2345),18)+;
- ' '+PadR(XPthousendSep(),4)+;
- ' '+PadR(XPdataSep(),4)+;
- ' '+PadR(XPdecimalSep(),4) )
- end
- next
- XPmsg(' ~Country~ interface │ ~Enter~-Select country as Current, ~Esc~-Stop')
- i := XPbrowse(' ~Country~ List ',;
- ' Country: Dateform: Timeform: AM/PM: Currency form: 1000 Data Dec Seperators',;
- a)
- if i = 0
- XPcountry(CurrCountry)
- else
- XPcountry(Val(SubStr(a[i],4)))
- end
- end
- Return (NIL)
-
- Function PRINTtest
- Local x,n
- /* Just a simple q&d way of testing the PRINT interface */
- if XPprintThere()
- x := 1
- While x <> 0
- MenuColor()
- x := XPalert('~PRINT~ Interface','Please select the desired option',;
- {'~S~tatus','~L~ist queue','Submit ~F~ile','~C~ancel File','Cancel ~A~ll'})
- XPprintStop() // Stop printing...
- do case
- case x = 1
- XPalert('~PRINT~ status',;
- "Number of Files in PrintQueue...."+str(XPprintCount())+";"+;
- "Errors on last character........."+str(XPprintError()))
- case x = 2
- if Len(XPaPrint())>0
- XPmsg('~PRINT~ interface │ The files in the PRINT queue')
- XPbrowse(' ~PRINT~ interface','Files in the PRINT queue',XPaPrint())
- else
- XPalert('~PRINT~ Interface','There are no file in the ~PRINT~ queue..')
- end
- case x = 3
- XPsubmitFile(XPqualify(Prompt('Submit File','Enter file to submit to Print','')))
- case x = 4
- n := XPqualify(Prompt('Cancel File','Enter file to be cancelled from queue',''))
- XPcancelFile(n)
- case x = 5
- if XPask('Cancel','Cancel ~ALL~ files from the queue?')
- XPcancelAll()
- end
- endcase
- XPprintResume() // Resume printing..
- end
- else
- XPalert('~PRINT~ interface',"Sorry, ~PRINT~ is not installed;Therefore, no demo can be done")
- end
- Return (NIL)
-