News for scm_call_N and scm_apply_N.
[bpt/guile.git] / HACKING
diff --git a/HACKING b/HACKING
index 17f3fd7..f3d60a8 100644 (file)
--- a/HACKING
+++ b/HACKING
@@ -1,3 +1,33 @@
+Guile Hacking Guide
+Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001 Free software Foundation, Inc.
+
+   Permission is granted to anyone to make or distribute verbatim copies
+   of this document as received, in any medium, provided that the
+   copyright notice and permission notice are preserved,
+   and that the distributor grants the recipient permission
+   for further redistribution as permitted by this notice.
+
+   Permission is granted to distribute modified versions
+   of this document, or of portions of it,
+   under the above conditions, provided also that they
+   carry prominent notices stating who last changed them,
+   and that any new or changed statements about the activities
+   of the Free Software Foundation are approved by the Foundation.
+
+
+What to Hack =========================================================
+
+You can hack whatever you want, thank GNU.
+
+However, to see what others have indicated as their interest (and avoid
+potential wasteful duplication of effort), see devel/tasks.text.  Note
+that this file is available only from CVS checkout and not distributed
+w/ Guile releases.
+
+It's also a good idea to join the guile-devel@gnu.org mailing list.
+See http://www.gnu.org/software/guile/mail/mail.html for more info.
+
+
 Hacking It Yourself ==================================================
 
 As distributed, Guile needs only an ANSI C compiler and a Unix system
@@ -7,12 +37,12 @@ you want to make changes to the system (which we encourage!) you will
 find it helpful to have the tools we use to develop Guile.  They
 are the following:
 
-Autoconf 2.13 --- a system for automatically generating `configure'
+Autoconf 2.50 --- a system for automatically generating `configure'
        scripts from templates which list the non-portable features a
        program would like to use.  Available in
        "ftp://ftp.gnu.org/pub/gnu/autoconf"
 
-Automake 1.4 --- a system for automatically generating Makefiles that
+Automake 1.4-p2 --- a system for automatically generating Makefiles that
        conform to the (rather Byzantine) GNU coding standards.  The
        nice thing is that it takes care of hairy targets like 'make
        dist' and 'make distclean', and automatically generates
@@ -23,13 +53,15 @@ Automake 1.4 --- a system for automatically generating Makefiles that
        `guile.m4' from the top directory of the Guile core disty to
        `/usr/local/share/aclocal.
 
-libtool 1.3.5 --- a system for managing the zillion hairy options needed
+libtool 1.4 --- a system for managing the zillion hairy options needed
        on various systems to produce shared libraries.  Available in
        "ftp://ftp.gnu.org/pub/gnu/libtool"
 
+flex 2.5.4 --- a tokenizer generator.  earlier versions will most
+        probably work too.
+
 You are lost in a little maze of automatically generated files, all
 different.
-> 
 
 
 Contributing Your Changes ============================================
@@ -168,18 +200,28 @@ When deprecating a definition, always follow this procedure:
 
 1. Mark the definition using
 
-#if (SCM_DEBUG_DEPRECATED == 0)
-...
-#endif
+   #if (SCM_DEBUG_DEPRECATED == 0)
+   ...
+   #endif
+
+   or, for Scheme code, wrap it using
+
+   (begin-deprecated
+      ...)
 
-2. Write a comment at the definition explaining how a programmer
-can manage without the deprecated definition.
+2. Make the deprecated code issue a warning when it is used, by using
+   scm_c_issue_deprecation_warning (in C) or issue-deprecation-warning
+   (in Scheme).
 
-3. Add an entry that the definition has been deprecated in NEWS
+3. Write a comment at the definition explaining how a programmer can
+   manage without the deprecated definition.
 
-4. At the top of RELEASE, there is a list of releases with reminders
-about what to do at each release.  Add a reminder about the removal of
-the deprecated defintion at the appropriate release.
+4. Add an entry that the definition has been deprecated in NEWS and
+   explain what do do instead.
+
+5. At the top of RELEASE, there is a list of releases with reminders
+   about what to do at each release.  Add a reminder about the removal
+   of the deprecated defintion at the appropriate release.
 
 - When you make a user-visible change (i.e. one that should be
 documented, and appear in NEWS, put an asterisk in column zero of the
@@ -242,9 +284,44 @@ If you receive contributions you want to use from someone, let me know
 and I'll take care of the administrivia.  Put the contributions aside
 until we have the necessary papers.
 
+Once you accept a contribution, be sure to keep the files AUTHORS and
+THANKS uptodate.
+
 - When you make substantial changes to a file, add the current year to
 the list of years in the copyright notice at the top of the file.
 
+- When you get bug reports or patches from people, be sure to list
+them in THANKS.
+
+
+- Naming conventions.  We use certain naming conventions to structure
+  the considerable number of global identifiers.  All identifiers
+  should be either all lower case or all upper case.  Syllables are
+  separated by underscaores `_'.  All non-static identifiers should
+  start with scm_ or SCM_.  Then might follow zero or more one letter
+  syllables giving the category of the identifier.  The currently used
+  category identifiers are
+
+    t   - type name
+
+    c,C - something with a interface suited for C use.  This is used
+          to name functions that behave like Scheme primitives but
+          have a more C friendly calling convention.
+
+    i,I - internal to libguile.  It is global, but not considered part
+          of the libguile API.
+
+    f   - a SCM variable pointing to a Scheme function object.
+
+    F   - a bit mask for a flag.
+
+    m   - a macro transformer procedure
+
+    n,N - a count of something
+
+    s   - a constant C string
+
+    
 
 Helpful hints ========================================================
 
@@ -282,7 +359,7 @@ diff -r -u cvs-1.10/src/cvs.h cvs-1.10.ignore-hack/src/cvs.h
 --- cvs-1.10/src/cvs.h Mon Jul 27 04:54:11 1998
 +++ cvs-1.10.ignore-hack/src/cvs.h     Sun Jan 23 12:58:09 2000
 @@ -516,7 +516,7 @@
+
  extern int ign_name PROTO ((char *name));
  void ign_add PROTO((char *ign, int hold));
 -void ign_add_file PROTO((char *file, int hold));
@@ -322,27 +399,27 @@ diff -r -u cvs-1.10/src/ignore.c cvs-1.10.ignore-hack/src/ignore.c
      free (line);
 +    return 1;
  }
+
  /* Parse a line of space-separated wildcards and add them to the list. */
 @@ -375,6 +376,7 @@
      struct stat sb;
      char *file;
      char *xdir;
 +    char *cvsdotignore;
+
      /* Set SUBDIRS if we have subdirectory information in ENTRIES.  */
      if (entries == NULL)
 @@ -397,7 +399,10 @@
      if (dirp == NULL)
        return;
+
 -    ign_add_file (CVSDOTIGNORE, 1);
 +    cvsdotignore = getenv("CVSDOTIGNORE");
 +    if (cvsdotignore == NULL || !ign_add_file (cvsdotignore, 1))
 +      ign_add_file (CVSDOTIGNORE, 1);
 +
      wrap_add_file (CVSDOTWRAPPER, 1);
+
      while ((dp = readdir (dirp)) != NULL)
 === patch end ===
 
@@ -357,7 +434,7 @@ This one is for pcl-cvs-2.9.2, so that `i' adds to the local
  Can only be used in the *cvs* buffer."
    (save-window-excursion
 -    (set-buffer (find-file-noselect (expand-file-name ".cvsignore" dir)))
-+    (set-buffer (find-file-noselect 
++    (set-buffer (find-file-noselect
 +                (expand-file-name (or (getenv "CVSDOTIGNORE")
 +                                      ".cvsignore")
 +                                  dir)))