Move src/cmap.cxx to util/cmap.cxx (utilities folder)

Regenerated src/fl_cmap.h with less spaces, updated copyright year.
Only whitespace and comments are changed in this file.

Note that src/cmap.cxx is not compiled to build the FLTK libs,
it's only used to generate src/fl_cmap.h.
This commit is contained in:
Albrecht Schlosser
2022-03-27 17:03:25 +02:00
parent dc8c4b5676
commit b037472649
3 changed files with 271 additions and 263 deletions
+259 -258
View File
File diff suppressed because it is too large Load Diff
+6
View File
@@ -0,0 +1,6 @@
Utility programs used to build the FLTK library.
Contents:
cmap.cxx generate src/fl_cmap.h
+6 -5
View File
@@ -1,7 +1,7 @@
// //
// Colormap generation program for the Fast Light Tool Kit (FLTK). // Colormap generation program for the Fast Light Tool Kit (FLTK).
// //
// Copyright 1998-2020 by Bill Spitzak and others. // Copyright 1998-2022 by Bill Spitzak and others.
// //
// This library is free software. Distribution and use rights are outlined in // This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this // the file "COPYING" which should have been included with this file. If this
@@ -15,12 +15,12 @@
// //
// //
// This program produces the contents of "fl_cmap.h" as stdout // This program produces the contents of "fl_cmap.h" on stdout
// //
// Compile, link, run and delete the program 'cmap' (for instance on a // Compile, link, run and delete the program 'cmap' (for instance on a
// Linux system) to generate fl_cmap.h: // Linux system) to generate fl_cmap.h:
// //
// $ gcc -o cmap cmap.cxx -lm && ./cmap > fl_cmap.h && rm -f ./cmap // gcc -o cmap cmap.cxx -lm && ./cmap > ../src/fl_cmap.h && rm -f ./cmap
#include <stdio.h> #include <stdio.h>
#include <math.h> #include <math.h>
@@ -162,7 +162,8 @@ int main() {
printf("//\n"); printf("//\n");
printf("// DO NOT EDIT THIS FILE !\n"); printf("// DO NOT EDIT THIS FILE !\n");
printf("//\n"); printf("//\n");
printf("// This file must be created with \"src/cmap.cxx\".\n"); printf("// This file must be generated by \"util/cmap.cxx\".\n");
printf("// See instructions in this file.\n");
printf("//\n"); printf("//\n");
printf("// Copyright 1998-%d by Bill Spitzak and others.\n", year); printf("// Copyright 1998-%d by Bill Spitzak and others.\n", year);
printf("//\n"); printf("//\n");
@@ -180,7 +181,7 @@ int main() {
// write color map values // write color map values
for (i = 0; i < 256; i++) { for (i = 0; i < 256; i++) {
printf("\t0x%02x%02x%02x00", cmap[i][0], cmap[i][1], cmap[i][2]); printf(" 0x%02x%02x%02x00", cmap[i][0], cmap[i][1], cmap[i][2]);
if (i < 255) if (i < 255)
printf(", // %3d\n", i); printf(", // %3d\n", i);
else else