]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gdb/tui/tui-out.c
Switch the license of all .c files to GPLv3.
[thirdparty/binutils-gdb.git] / gdb / tui / tui-out.c
index 2a34473b8f964abfc42b7492aefc11ef3d92523b..9e534c6da831ebfba8a4a0943ede7f24c2f5b21e 100644 (file)
@@ -10,7 +10,7 @@
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
+   the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
 
    This program is distributed in the hope that it will be useful,
@@ -19,9 +19,7 @@
    GNU General Public License for more details.
 
    You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor,
-   Boston, MA 02110-1301, USA.  */
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "defs.h"
 #include "ui-out.h"
@@ -40,33 +38,46 @@ typedef struct ui_out_data tui_out_data;
 
 /* These are the CLI output functions.  */
 
-static void tui_table_begin (struct ui_out *uiout, int nbrofcols,
-                            int nr_rows, const char *tblid);
+static void tui_table_begin (struct ui_out *uiout, 
+                            int nbrofcols, int nr_rows, 
+                            const char *tblid);
 static void tui_table_body (struct ui_out *uiout);
 static void tui_table_end (struct ui_out *uiout);
-static void tui_table_header (struct ui_out *uiout, int width,
-                             enum ui_align alig, const char *col_name,
+static void tui_table_header (struct ui_out *uiout, 
+                             int width, enum ui_align alig, 
+                             const char *col_name,
                              const char *colhdr);
-static void tui_begin (struct ui_out *uiout, enum ui_out_type type,
+static void tui_begin (struct ui_out *uiout, 
+                      enum ui_out_type type,
                       int level, const char *lstid);
-static void tui_end (struct ui_out *uiout, enum ui_out_type type, int level);
-static void tui_field_int (struct ui_out *uiout, int fldno, int width,
-                          enum ui_align alig, const char *fldname, int value);
-static void tui_field_skip (struct ui_out *uiout, int fldno, int width,
-                           enum ui_align alig, const char *fldname);
-static void tui_field_string (struct ui_out *uiout, int fldno, int width,
-                             enum ui_align alig, const char *fldname,
+static void tui_end (struct ui_out *uiout, 
+                    enum ui_out_type type, int level);
+static void tui_field_int (struct ui_out *uiout, 
+                          int fldno, int width,
+                          enum ui_align alig, 
+                          const char *fldname, int value);
+static void tui_field_skip (struct ui_out *uiout, 
+                           int fldno, int width,
+                           enum ui_align alig, 
+                           const char *fldname);
+static void tui_field_string (struct ui_out *uiout, 
+                             int fldno, int width,
+                             enum ui_align alig, 
+                             const char *fldname,
                              const char *string);
 static void tui_field_fmt (struct ui_out *uiout, int fldno,
                           int width, enum ui_align align,
-                          const char *fldname, const char *format,
-                          va_list args) ATTR_FORMAT (printf, 6, 0);
+                          const char *fldname, 
+                          const char *format,
+                          va_list args) 
+     ATTR_FORMAT (printf, 6, 0);
 static void tui_spaces (struct ui_out *uiout, int numspaces);
 static void tui_text (struct ui_out *uiout, const char *string);
 static void tui_message (struct ui_out *uiout, int verbosity,
                         const char *format, va_list args)
      ATTR_FORMAT (printf, 3, 0);
-static void tui_wrap_hint (struct ui_out *uiout, char *identstring);
+static void tui_wrap_hint (struct ui_out *uiout, 
+                          char *identstring);
 static void tui_flush (struct ui_out *uiout);
 
 /* This is the CLI ui-out implementation functions vector.  */
@@ -74,8 +85,7 @@ static void tui_flush (struct ui_out *uiout);
 /* FIXME: This can be initialized dynamically after default is set to
    handle initial output in main.c.  */
 
-static struct ui_out_impl tui_ui_out_impl =
-{
+static struct ui_out_impl tui_ui_out_impl = {
   tui_table_begin,
   tui_table_body,
   tui_table_end,
@@ -101,9 +111,11 @@ extern void _initialize_tui_out (void);
 
 static void field_separator (void);
 
-static void out_field_fmt (struct ui_out *uiout, int fldno,
+static void out_field_fmt (struct ui_out *uiout, 
+                          int fldno,
                           const char *fldname,
-                          const char *format,...) ATTR_FORMAT (printf, 4, 5);
+                          const char *format,...) 
+     ATTR_FORMAT (printf, 4, 5);
 
 /* local variables */
 
@@ -112,7 +124,8 @@ static void out_field_fmt (struct ui_out *uiout, int fldno,
 /* Mark beginning of a table.  */
 
 void
-tui_table_begin (struct ui_out *uiout, int nbrofcols,
+tui_table_begin (struct ui_out *uiout, 
+                int nbrofcols,
                 int nr_rows,
                 const char *tblid)
 {
@@ -149,7 +162,9 @@ tui_table_end (struct ui_out *uiout)
 /* Specify table header.  */
 
 void
-tui_table_header (struct ui_out *uiout, int width, enum ui_align alignment,
+tui_table_header (struct ui_out *uiout, 
+                 int width, 
+                 enum ui_align alignment,
                  const char *col_name,
                  const char *colhdr)
 {
@@ -187,9 +202,11 @@ tui_end (struct ui_out *uiout,
 /* Output an int field.  */
 
 void
-tui_field_int (struct ui_out *uiout, int fldno, int width,
+tui_field_int (struct ui_out *uiout, 
+              int fldno, int width,
               enum ui_align alignment,
-              const char *fldname, int value)
+              const char *fldname, 
+              int value)
 {
   char buffer[20];     /* FIXME: how many chars long a %d can become?  */
 
@@ -212,7 +229,8 @@ tui_field_int (struct ui_out *uiout, int fldno, int width,
 /* Used to ommit a field.  */
 
 void
-tui_field_skip (struct ui_out *uiout, int fldno, int width,
+tui_field_skip (struct ui_out *uiout, 
+               int fldno, int width,
                enum ui_align alignment,
                const char *fldname)
 {
@@ -227,8 +245,7 @@ tui_field_skip (struct ui_out *uiout, int fldno, int width,
 
 void
 tui_field_string (struct ui_out *uiout,
-                 int fldno,
-                 int width,
+                 int fldno, int width,
                  enum ui_align align,
                  const char *fldname,
                  const char *string)
@@ -336,8 +353,10 @@ tui_text (struct ui_out *uiout, const char *string)
 }
 
 void
-tui_message (struct ui_out *uiout, int verbosity,
-            const char *format, va_list args)
+tui_message (struct ui_out *uiout, 
+            int verbosity,
+            const char *format, 
+            va_list args)
 {
   tui_out_data *data = ui_out_data (uiout);
   if (data->suppress_output)
@@ -369,7 +388,8 @@ tui_flush (struct ui_out *uiout)
 
 /* VARARGS */
 static void
-out_field_fmt (struct ui_out *uiout, int fldno,
+out_field_fmt (struct ui_out *uiout, 
+              int fldno,
               const char *fldname,
               const char *format,...)
 {