Author: greg.ercolano
Date: 2010-12-02 18:34:29 -0800 (Thu, 02 Dec 2010)
New Revision: 573
Log:
    Mods to the CMP as per fltk.development thread on 12/02/2010
    subject: "[RFC] CMP Modifications". 3 votes (Greg,Ian,Manolo).



Modified:
   trunk/cmp.php

Modified: trunk/cmp.php
===================================================================
--- trunk/cmp.php       2010-11-15 22:14:30 UTC (rev 572)
+++ trunk/cmp.php       2010-12-03 02:34:29 UTC (rev 573)
@@ -728,12 +728,38 @@
     int
     function(int arg) {
       if (arg != 10) {
-       printf("arg = %d\n", arg);
-       return (0);
+        printf("arg = %d\n", arg);
+        return (0);
       } else {
-       return 1;
+        return 1;
       }
     }
+
+    int function2(int arg) {
+      for (int i=0; i<arg; i++) {
+        stuff(i);
+      }
+      while (something) {
+        stuff();
+      }
+      switch (arg) {
+        case 0:
+          break;
+        case 1: {
+          int var;
+          var += stuff(var);
+          break;
+        }
+        case 2:
+          stuff();
+          /* FALLTHROUGH */
+        case 3: simple_stuff1(); break;
+        case 4: simple_stuff2(); break;
+        default:
+          break;
+      }
+      return (0);
+    }
 </pre>
 
 <p>All curley braces must open on the same line as the
@@ -809,22 +835,22 @@
 
 <pre>
     /**
-     * The Foo class implements the Foo widget for FLTK.
-     *
-     * This description text appears in the documentation for
-     * the class and may include HTML tags as desired.
-     */
+      The Foo class implements the Foo widget for FLTK.
+     
+      This description text appears in the documentation for
+      the class and may include HTML tags as desired.
+    */
 
     class FL_EXPORT Foo : public Widget {
       int private_data_;
 
     public:
 
-     /**
-      * Creates a Foo widget with the given position and label.
-      *
-      * This description text appears in the documentation for the
-      * method.
+      /**
+        Creates a Foo widget with the given position and label.
+      
+        This description text appears in the documentation for the
+        method.
       */
       Foo(int X, int Y, int W, int H, const char *L = 0);
     };
@@ -864,12 +890,11 @@
 like the following:
 
 <pre>
-    /**
-     * A brief description of the class/structure.
-     *
-     * A complete description of the class/structure.
+     /**
+       A brief description of the class/structure.
+      
+       A complete description of the class/structure.
      */
-
      class MyClass {
      };
 </pre>
@@ -880,12 +905,11 @@
 following:
 
 <pre>
-    /**
-     * A brief description of the enumeration.
-     *
-     * A complete description of the enumeration.
+     /**
+       A brief description of the enumeration.
+      
+       A complete description of the enumeration.
      */
-
      enum MyEnum {
        ...
      };
@@ -913,27 +937,26 @@
 like the following:
 
 <pre>
-    /**
-     * A brief description of the function/method.
-     *
-     * A complete description of the function/method.
-     *
-     * @param a What "a" is.
-     * @param b What "b" is.
-     * @return What this function/method returns.
-     * @see YourFunction()
+     /**
+       A brief description of the function/method.
+      
+       A complete description of the function/method.
+      
+       \param a What "a" is.
+       \param b What "b" is.
+       \return What this function/method returns.
+       \see YourFunction()
      */
-
      int my_function(int a, float b) {
        ...
      }
 </pre>
 
-<p>Each parameter is documented using <code>@param</code>
+<p>Each parameter is documented using <code>\param</code>
 comments. The return value is documenting using the
-<code>@return</code> comment; omit the return value comment if
+<code>\return</code> comment; omit the return value comment if
 the function/method does not return a value or is a constructor.
-The <code>@see</code> comments refer to other, related
+The <code>\see</code> comments refer to other, related
 functions/methods.
 
 <p>Function/method documentation must be placed next to the
@@ -946,19 +969,19 @@
 comment form as follows:
 
 <pre>
-    /**
-     * A brief description of the member/variable.
-     *
-     * A complete description of the member/variable.
+     /**
+       A brief description of the member/variable.
+     
+       A complete description of the member/variable.
      */
-
      int my_variable_;
 </pre>
 
 <p>or in the preferred form as in-line comments as follows:
 
 <pre>
-     int my_variable_; /**< A brief description of the member/variable. */
+     int my_variable1_;   /**< A brief description of the member/variable. */
+     int my_variable2_;   ///< A brief description of member/variable
 </pre>
 
 <h2>Methodology, Algorithms, Etc.</h2>

_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit

Reply via email to