BSD 4_4_Lite1 release
[unix-history] / usr / src / contrib / mh-6.8.3a / conf / doc / mh-hack.rf
CommitLineData
ad787160
C
1.\" @(MHWARNING)
2.\" @(#)$Id: mh-hack.rf,v 1.6 1992/05/12 22:23:34 jromine Exp $
3.SC MH-HACK 8
29a3a89d 4.NA
ad787160 5mh-hack \- how to hack MH
29a3a89d
C
6.SY
7big hack attack
8.DE
9This is a description of how one can modify the \fIMH\fR system.
10The \fIMH\fR distribution has a lot of complex inter\-relations,
11so before you go modifying any code, you should read this and
12understand what is going on.
13
14.in +.5i
15.ti -.5i
16\fBADDING A NEW PROGRAM\fR
17.br
18Suppose you want to create a new \fIMH\fR command called
19\*(lqpickle\*(rq.
20First, create and edit \*(lqpickle.c\*(rq in the \fBuip/\fR directory.
21Next edit \fBconf/makefiles/uip\fR to include \*(lqpickle\*(rq.
22This file has directions at the end of it which explain how it should
23be modified.
24Next, update any documentation (described below).
25At this point you can re\-configure \fIMH\fR.
26See \fImh\-gen(8)\fR for instructions on how to do this
27(basically, you want \*(lqmhconfig MH\*(rq).
28
29.ti -.5i
30\fBADDING A NEW SUBROUTINE\fR
31.br
32Suppose you want to create a new \fIMH\fR routine called
33\*(lqpickle\*(rq.
34First, create and edit \*(lqpickle.c\*(rq in the \fBsbr/\fR directory.
35Next edit \fBconf/makefiles/sbr\fR to include \*(lqpickle\*(rq.
36This file has directions at the end of it which explain how it should
37be modified.
38You should modify \fBconfig/mh.h\fR to define \*(lqpickle ();\*(rq.
39Similarly, \fBsbr/llib\-lsbr\fR should be modified for \fIlint\fR.
40At this point you can re\-configure \fIMH\fR.
41
42.ti -.5i
43\fBUPDATING DOCUMENTATION\fR
44.br
45Edit whatever files you want in \fBconf/doc/\fR.
46When documenting a new program, such as \*(lqpickle\*(rq,
47you should create a manual page with the name \*(lqpickle.rf\*(rq.
48The file \fBconf/doc/template\fR has a manual page template that you
49can use.
50If you are documenting a new program, then you should also update three
51other files:
52The file \fBconf/doc/mh.rf\fR should be modified to include the
53\*(lq\&.NA\*(rq section from \*(lqpickle.rf\*(rq.
54The file \fBconf/doc/mh\-chart.rf\fR should be modified to include
55the \*(lq\&.SY\*(rq section from \*(lqpickle.rf\*(rq.
56Finally, the file \fBconf/doc/MH.rf\fR should be modified to include a
57\*(lq\&.so pickle.me\*(rq.
58Naturally, none of these changes will be reflected in the configuration
59until you actually run \fImhconfig\fR.
60.in -.5i
61.Fi
62Too numerous to mention. Honest.
63.Sa
64mh\-gen(8)
65.Bu
66Hacking is an art, but most programmers are butchers, not artists.
67.En