kwt'so-ct4 nani-HOWTO
=====================

Mshyrpltcestfn wthasourcettreCeif enextrac
ablendt4ah/inatw3.eisie r
fe8medfeblock cawmaatstabove fun  vlbs.  T etcewxonaatstof y is"s evem
aru:

- scripts/kwt'so-ct4

  Ttis istabpItl script e at hunts y 8ey aeblock cawmaatsta.dccao dark
  e rmnup vir   ly fnbu Dt4Book,tmtn, next,panctHTML. (No, fot
  nexfnfo.)

- Dt4ah/inatw3./Dt4Book/*.tmpl

  T ase as: SGML nemplate files,  hn a amp no8salrSGML files"wmak
 nspeyoalrpltce-hold  s
y 8ewhore tUeeextrac
ectdt4ah/inatw3.esh cff
  go.

- scripts/dt4pblw.4

  Ttis istabpblemou f r ca vxFtiurhSGML nemplate files fnbu SGML
  files. W rntaefilebis  af  aacectiteis sesrchedtfe8esymbols
  exylh
kct(EXPORT_SYMBOL), to be ablentordistiuruish betwerntin It.al
wtah
pextur.alrfun  vlbs.
wtIt fnvokas kwt'so-ct4, givxmY"it
y at6.st of fun  vlbspt at
  omp yowbsvco4ah/ined.
wtAd
itw3.ally ftpfs makctto scao y atSGML nemplate files to loc te
  o
ltt asfiles  af  aacecth rkin. T fs fstmakc to genItltkvdepeh
aacy
 wfnfo8san,no astmakc bytdtke.

- Mtkefile

  T aetargets 'sgmlco4s', 'psco4s', 'pdfco4s', ah
p'htmlco4s' amp used
  nu buildeDt4Book files, P stScript files, PDF files, ah
phtml yiles
 wfn Dt4ah/inatw3./Dt4Book.

- Dt4ah/inatw3./Dt4Book/Mtkefile

  T fs fstwhore C files"omp associavectwmakeSGML nemplates.


H wheo extrac
ry a ct4ah/in tw3.
--------------------------------

Ifeyounjuchrwaetnbu readvwte ready-dade books on tUe"various
subs evems (see Dt4ah/inatw3./Dt4Book/*.tmpl), juchry.on 'dtke
psco4s', or 'mtkeepdfco4s', or 'mtkeehtmlco4s',vdepeh
iurho.vyour 
p af  aace.  Ifeyoun  cffetltJoinreadvahdiff  aae fo8san,"you cao y.on 
'mtkeesgmlco4s' ah
ie rntusevDt4Book toolstbo ca vxFt 
Dt4ah/inatw3./Dt4Book/*.sgml to a fo8san of your ehoice (f meexamcle, 
'db2html ...' af"'mtkeehtmlco4s' wosbnot cefined).

Ifeyoun aetnbu see mtntpagestinn
ead,"you cao do y is:

$ cd 6.6-1
$ scripts/kwt'so-ct4 -man $(find -nlme '*.c') |nsplit-man.pl /tmp/dtn
$ scripts/kwt'so-ct4 -man $(find -nlme '*.h') |nsplit-man.pl /tmp/dtn

Hhrebis"split-man.pl:

-->
#!/levibin/pItl

af"($#ARGV < 0) {
  tdie "whore do Inaut y asresults?\n";
}

nkvir $ARGV[0],0777;
$snpte = 0;
 hnlen(<STDIN>) {
  t af"(/^\.TH \"[^\"]*\" 4 \"([^\"]*)\"/) {
	af"($snpte == 1) { closevOUT }
	$snpte = 1;
	$fn = "$ARGV[0]/$1.4";
	prin  STDERR "CreatxmY"$fn\n";
	opehvOUT, ">$fn" or die "cao'nropIn"$fn: $!\n";
	prin  OUT $_;
  t } elsaf"($snpte != 0) {
	prin  OUT $_;
  t }
}

closevOUT;
<--

Ifeyounjuchrwaetnbu view e a ct4ah/in tw3.tfe8eone fun  vlbtin
one
file, you cao do y is:

$ scripts/kwt'so-ct4 -man -fun  vlbtfnpfile |nnroff -man |vless

 mey is:

$ scripts/kwt'so-ct4 -next -fun  vlbtfnpfile


H wheo sddrextrac
ablendt4ah/inatw3.eeo your source files
---------------------------------------------------------

Thewfe8san of y aeblock cawmaateistliko
y is:

/**
 * fun  vlb_nlme(:)? (-bsh rt
cescriptw3.)?
(* @patlmetItx: (cescriptw3. of patlmetIt x)?)*
(* atblank line)?
 * (Descriptw3.:)? (Descriptw3. of fun  vlb)?
 * (s itw3. header: (s itw3. cescriptw3.)? )*
(*)?*/

Thewsh rt
fun  vlbtcescriptw3. c enotnbsvmultc6.6e, but y asi Joi
cescriptw3.s c ewbsv(ah
ie ry c ewca  ainvblank lines). Avoidnauttiurha
spuriousbblank linetaftyrby aefun  vlbtnlme, or else e recescriptw3.  man
bp repeavec!

Aansdescriptwve yext is"fur Joinpblwessed, sc encur y 8et as ean 0xmY"speyoal
pat It.s,  hn a amp highlighvectabyropri tely.

'fun nlme()' -efun  vlb
'$ENVVAR' -eenvironh/in variable
'&struit_nlme' -enlme ofiaestruituru (up yoryworwatdseiscludxmY"'struit')
'@patlmetIt' -enlme ofiaepatlmetIt
'%CONST' -enlme ofiaeconstant.

Tako
a looksar uh
 wthasourcettreCef meexamcles.


H wheo mtkeenew"SGML nemplate files
-----------------------------------

SGML nemplate files (*.tmpl)"as: likp no8salrSGML files,eexcept e at
e ry c ewca  ainvescape sequaaces whore extrac
ectdt4ah/inatw3.esh cff
be innerted.

!E<filenlme>bis  apltcedtby y asdt4ah/inatw3., inr<filenlme>, f m
fun  vlbspt at amp exylh
kctmaiurhEXPORT_SYMBOL:by aefun  vlbtlist is
cean   ed fuserfileselievectintDt4ah/inatw3./Dt4Book/Mtkefile.

!I<filenlme>bis  apltcedtby y asdt4ah/inatw3.ef mefun  vlbspt at amp
_not_ exylh
kctmaiurhEXPORT_SYMBOL.

!D<filenlme>bis makc to nlme od
itw3.alrfilesnbu sesrchtf mefun  vlbs
exylh
kctmaiurhEXPORT_SYMBOL.

!F<filenlme>b<fun  vlbt[fun  vlbs...]>bis  apltcedtby y a
dt4ah/inatw3., inr<filenlme>, f mby aefun  vlbselievec.


Tim.
*/ <twaugh@red at.caw>

