home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: Science / Science.zip / goat006.zip / SRC.ZIP / goatsrc / SubProcs / buildocrparam next >
Text File  |  2002-05-16  |  1KB  |  48 lines

  1. /* build gocr command parameters */
  2. ocrparameters=''
  3. modeoptions=0
  4. verboseoptions=0
  5. numoption=0
  6. if curocrval.1 > 0 then
  7.   ocrparameters =' -s '||curocrval.1
  8. /* this IF was taken out because GOCR says 160 is default but actually 0 is */
  9. /* now we just pass everything and let GOCR figure the crap out */
  10. /* if curocrval.2 <> 160 then */
  11.   ocrparameters = ocrparameters||' -l '||curocrval.2
  12. if curocrval.3 <> 10 then
  13.   ocrparameters = ocrparameters||' -d '||curocrval.3
  14. if curocrval.4 = 1 then
  15.   modeoptions = 2
  16. if curocrval.5 = 1 then
  17.   modeoptions=modeoptions+4
  18. if curocrval.6 = 0 then
  19.   modeoptions=modeoptions+8
  20. if curocrval.7 = 0 then
  21.   modeoptions=modeoptions+16
  22. if curocrval.8 = 0 then
  23.   modeoptions=modeoptions+32
  24. if curocrval.9 = 1 then
  25.   modeoptions=modeoptions+64
  26. if curocrval.10=1 then
  27.   numoption=1
  28. /*  if curocrval.11 = 1 then
  29.   modeoptions=modeoptions+130 */
  30. if curocrval.11 = 1 then
  31.   verboseoptions = 1
  32. if curocrval.12 = 1 then
  33.   verboseoptions=modeoptions+2
  34. if curocrval.13 = 1 then
  35.   verboseoptions=modeoptions+4
  36. if curocrval.14 = 1 then
  37.   verboseoptions=modeoptions+8
  38. if curocrval.15 = 1 then
  39.   verboseoptions=modeoptions+16
  40. if curocrval.16 = 1 then
  41.   verboseoptions=modeoptions+32
  42. if modeoptions > 0
  43.   then ocrparameters=ocrparameters||' -m '||modeoptions
  44. if verboseoptions > 0
  45.   then ocrparameters=ocrparameters||' -v '||verboseoptions
  46. if numoptions >0
  47.   then ocrparameters=ocrparameters||' -n '||numoption
  48.