Merge remote-tracking branch 'origin/remove-dead-code' into integration_2026_w05 (!3831)

semi-manual remove of not used #define commands

As i was upset to see all these #define with no code under, i made a
global pass to remove the obvious cases semi-manual remove of not used
bodies

manual script, then a lot of manual review

    grep -IRs "#define" ../openair* ../common/* ../executables/ ../nfapi/ ../radio/ | \
        fgrep -v '(' | fgrep -v '//' |awk '{print $2}' | egrep -v "#define *$n"| \
            while read n ; do
              grep -IRs $n ../openair* ../common/* ../executables/ ../nfapi/ ../radio/  | grep -v "#define *$n" | grep -q $n || echo $n;
            done

will give a decent list of #define never used.  Then, I think we should
keep lists of # define when it comes from standards, even if the code
doesn't use it right now
This commit is contained in:
Robert Schmidt
2026-01-29 08:23:41 +01:00
172 changed files with 32 additions and 2467 deletions
-1
View File
@@ -38,7 +38,6 @@
#include <dlfcn.h>
#include "common/platform_types.h"
#define CONFIG_LOADCONFIG_MAIN
#include "config_load_configmodule.h"
#include "config_userapi.h"
#include "../utils/LOG/log.h"
-2
View File
@@ -12,8 +12,6 @@
# define NUMBER_OF_SRS_MAX 16
# define NUMBER_OF_SCH_STATS_MAX 16
#define MAX_MANAGED_ENB_PER_MOBILE 2
#define MAX_MANAGED_GNB_PER_MOBILE 2
# ifndef PHYSIM
# ifndef UE_EXPANSION
-11
View File
@@ -27,39 +27,30 @@
#ifdef LARGE_SCALE
#define NB_MODULES_MAX 128
#define NB_NODE_MAX 128
#else
#define NB_MODULES_MAX 32
#define NB_NODE_MAX 32
#endif
#define MAX_IP_PACKET_SIZE 10000 // 9000
#define MAX_MODULES NB_MODULES_MAX
#define MAX_NR_RRC_UE_CONTEXTS 64
#ifndef UE_EXPANSION
#ifdef LARGE_SCALE
#define MAX_MOBILES_PER_ENB 128
#define MAX_MOBILES_PER_ENB_NB_IoT 128
#define MAX_eNB 2
#define MAX_gNB 2
#else
#define MAX_MOBILES_PER_ENB 40
#define MAX_MOBILES_PER_ENB_NB_IoT 40
#define MAX_eNB 2
#define MAX_gNB 2
#endif
#else
#define MAX_MOBILES_PER_ENB 256
#define MAX_MOBILES_PER_ENB_NB_IoT 256
#define MAX_eNB 2
#define MAX_gNB 2
#endif
#define NUMBER_OF_NR_UCI_STATS_MAX 16
#define MAX_MANAGED_ENB_PER_MOBILE 2
#define MAX_MANAGED_GNB_PER_MOBILE 2
/// NB-IOT
#define NB_RB_MAX_NB_IOT (2 + 3) /* 2 from LTE_maxDRB_NB_r13 in LTE_asn_constant.h + 3 SRBs */
@@ -85,12 +76,10 @@
// RLC Entity
#define RLC_TX_MAXSIZE 10000000
#define RLC_RX_MAXSIZE 10000000
#define SEND_MRW_ON 240
#define MAX_ANT 8
// CBA constant
#define NUM_MAX_CBA_GROUP 4
#define printk printf
#define RETURNok (0)
#define RETURNerror (-1)
#define DEFAULT_NAS_PATH "PWD"
-2
View File
@@ -31,8 +31,6 @@
#define _GNU_SOURCE /* required for pthread_getname_np */
//#define LOG_TEST 1
#define COMPONENT_LOG
#define COMPONENT_LOG_IF
#include <ctype.h>
#define LOG_MAIN
#include "log.h"
-17
View File
@@ -302,22 +302,6 @@ void close_log_mem(void);
@param multiVec create new file or append to existing (useful for writing multiple vectors to same file. Just call the function multiple times with same file name and with this parameter set to 1)
*/
#define MATLAB_RAW (1U<<31)
#define MATLAB_SHORT 0
#define MATLAB_CSHORT 1
#define MATLAB_INT 2
#define MATLAB_CINT 3
#define MATLAB_INT8 4
#define MATLAB_CINT8 5
#define MATLAB_LLONG 6
#define MATLAB_DOUBLE 7
#define MATLAB_CDOUBLE 8
#define MATLAB_UINT8 9
#define MATLEB_EREN1 10
#define MATLEB_EREN2 11
#define MATLEB_EREN3 12
#define MATLAB_CSHORT_BRACKET1 13
#define MATLAB_CSHORT_BRACKET2 14
#define MATLAB_CSHORT_BRACKET3 15
int32_t write_file_matlab(const char *fname,
const char *vname,
@@ -333,7 +317,6 @@ int32_t write_file_matlab(const char *fname,
#define LOG_CONFIG_STRING_GLOBAL_LOG_LEVEL "global_log_level"
#define LOG_CONFIG_STRING_GLOBAL_LOG_ONLINE "global_log_online"
#define LOG_CONFIG_STRING_GLOBAL_LOG_INFILE "global_log_infile"
#define LOG_CONFIG_STRING_GLOBAL_LOG_OPTIONS "global_log_options"
#define LOG_CONFIG_LEVEL_FORMAT "%s_log_level"
-1
View File
@@ -14,7 +14,6 @@
/* T message IDs */
#include "T_IDs.h"
#define T_ACTIVE_STDOUT 2
/* known type - this is where you add new types */
#define T_INT(x) int, (x)
-1
View File
@@ -387,7 +387,6 @@ void sr(void *_d, event e)
#define MAC_NR_HARQID 0x06
#define MAC_NR_FRAME_SLOT_TAG 0x07
#define NR_FDD_RADIO 1
#define NR_TDD_RADIO 2
#define NR_DIRECTION_UPLINK 0
-1
View File
@@ -39,7 +39,6 @@
#include <dlfcn.h>
#include "openair1/PHY/defs_common.h"
#include "common/oai_version.h"
#define LOAD_MODULE_SHLIB_MAIN
#include "common/config/config_userapi.h"
#include "load_module_shlib.h"
-36
View File
@@ -866,7 +866,6 @@ void get_samplerate_and_bw(int mu,
int n_rb,
int8_t threequarter_fs,
double *sample_rate,
unsigned int *samples_per_frame,
double *tx_bw,
double *rx_bw) {
@@ -876,12 +875,10 @@ void get_samplerate_and_bw(int mu,
if (threequarter_fs) {
warn_higher_threequarter_fs(n_rb, mu);
*sample_rate=92.16e6;
*samples_per_frame = 921600;
*tx_bw = 50e6;
*rx_bw = 50e6;
} else {
*sample_rate=61.44e6;
*samples_per_frame = 614400;
*tx_bw = 50e6;
*rx_bw = 50e6;
}
@@ -890,10 +887,8 @@ void get_samplerate_and_bw(int mu,
case 188: // 35Mhz
if (threequarter_fs) {
*sample_rate = 46.08e6;
*samples_per_frame = 460800;
} else {
*sample_rate = 61.44e6;
*samples_per_frame = 614400;
}
*tx_bw = (n_rb == 242) ? 45e6 : 35e6;
*rx_bw = (n_rb == 242) ? 45e6 : 35e6;
@@ -901,13 +896,11 @@ void get_samplerate_and_bw(int mu,
case 216:
if (threequarter_fs) {
*sample_rate=46.08e6;
*samples_per_frame = 460800;
*tx_bw = 40e6;
*rx_bw = 40e6;
}
else {
*sample_rate=61.44e6;
*samples_per_frame = 614400;
*tx_bw = 40e6;
*rx_bw = 40e6;
}
@@ -919,7 +912,6 @@ void get_samplerate_and_bw(int mu,
}
else {
*sample_rate=30.72e6;
*samples_per_frame = 307200;
*tx_bw = 20e6;
*rx_bw = 20e6;
}
@@ -927,13 +919,11 @@ void get_samplerate_and_bw(int mu,
case 106:
if (threequarter_fs) {
*sample_rate=23.04e6;
*samples_per_frame = 230400;
*tx_bw = 20e6;
*rx_bw = 20e6;
}
else {
*sample_rate=30.72e6;
*samples_per_frame = 307200;
*tx_bw = 20e6;
*rx_bw = 20e6;
}
@@ -941,13 +931,11 @@ void get_samplerate_and_bw(int mu,
case 52:
if (threequarter_fs) {
*sample_rate=11.52e6;
*samples_per_frame = 115200;
*tx_bw = 10e6;
*rx_bw = 10e6;
}
else {
*sample_rate=15.36e6;
*samples_per_frame = 153600;
*tx_bw = 10e6;
*rx_bw = 10e6;
}
@@ -955,13 +943,11 @@ void get_samplerate_and_bw(int mu,
case 25:
if (threequarter_fs) {
*sample_rate=5.76e6;
*samples_per_frame = 57600;
*tx_bw = 5e6;
*rx_bw = 5e6;
}
else {
*sample_rate=7.68e6;
*samples_per_frame = 76800;
*tx_bw = 5e6;
*rx_bw = 5e6;
}
@@ -976,12 +962,10 @@ void get_samplerate_and_bw(int mu,
if (threequarter_fs) {
warn_higher_threequarter_fs(n_rb, mu);
*sample_rate=184.32e6;
*samples_per_frame = 1843200;
*tx_bw = 100e6;
*rx_bw = 100e6;
} else {
*sample_rate=122.88e6;
*samples_per_frame = 1228800;
*tx_bw = 100e6;
*rx_bw = 100e6;
}
@@ -989,12 +973,10 @@ void get_samplerate_and_bw(int mu,
case 217:
if (threequarter_fs) {
*sample_rate=92.16e6;
*samples_per_frame = 921600;
*tx_bw = 80e6;
*rx_bw = 80e6;
} else {
*sample_rate=122.88e6;
*samples_per_frame = 1228800;
*tx_bw = 80e6;
*rx_bw = 80e6;
}
@@ -1002,10 +984,8 @@ void get_samplerate_and_bw(int mu,
case 189:
if (threequarter_fs) {
*sample_rate = 92.16e6;
*samples_per_frame = 921600;
} else {
*sample_rate = 122.88e6;
*samples_per_frame = 1228800;
}
*tx_bw = 70e6;
*rx_bw = 70e6;
@@ -1016,7 +996,6 @@ void get_samplerate_and_bw(int mu,
}
else {
*sample_rate=61.44e6;
*samples_per_frame = 614400;
*tx_bw = 60e6;
*rx_bw = 60e6;
}
@@ -1029,7 +1008,6 @@ void get_samplerate_and_bw(int mu,
}
else {
*sample_rate=61.44e6;
*samples_per_frame = 614400;
*tx_bw = 50e6;
*rx_bw = 50e6;
}
@@ -1040,10 +1018,8 @@ void get_samplerate_and_bw(int mu,
case 92: // 35Mhz
if (threequarter_fs) {
*sample_rate = 46.08e6;
*samples_per_frame = 460800;
} else {
*sample_rate = 61.44e6;
*samples_per_frame = 614400;
}
*tx_bw = (n_rb == 119) ? 45e6 : 35e6;
*rx_bw = (n_rb == 119) ? 45e6 : 35e6;
@@ -1052,13 +1028,11 @@ void get_samplerate_and_bw(int mu,
case 106:
if (threequarter_fs) {
*sample_rate=46.08e6;
*samples_per_frame = 460800;
*tx_bw = 40e6;
*rx_bw = 40e6;
}
else {
*sample_rate=61.44e6;
*samples_per_frame = 614400;
*tx_bw = 40e6;
*rx_bw = 40e6;
}
@@ -1066,13 +1040,11 @@ void get_samplerate_and_bw(int mu,
case 51:
if (threequarter_fs) {
*sample_rate=23.04e6;
*samples_per_frame = 230400;
*tx_bw = 20e6;
*rx_bw = 20e6;
}
else {
*sample_rate=30.72e6;
*samples_per_frame = 307200;
*tx_bw = 20e6;
*rx_bw = 20e6;
}
@@ -1080,13 +1052,11 @@ void get_samplerate_and_bw(int mu,
case 24:
if (threequarter_fs) {
*sample_rate=11.52e6;
*samples_per_frame = 115200;
*tx_bw = 10e6;
*rx_bw = 10e6;
}
else {
*sample_rate=15.36e6;
*samples_per_frame = 153600;
*tx_bw = 10e6;
*rx_bw = 10e6;
}
@@ -1100,12 +1070,10 @@ void get_samplerate_and_bw(int mu,
case 128:
if (threequarter_fs) {
*sample_rate=184.32e6;
*samples_per_frame = 1843200;
*tx_bw = 200e6;
*rx_bw = 200e6;
} else {
*sample_rate = 245.76e6;
*samples_per_frame = 2457600;
*tx_bw = 200e6;
*rx_bw = 200e6;
}
@@ -1115,12 +1083,10 @@ void get_samplerate_and_bw(int mu,
case 64:
if (threequarter_fs) {
*sample_rate=92.16e6;
*samples_per_frame = 921600;
*tx_bw = 100e6;
*rx_bw = 100e6;
} else {
*sample_rate = 122.88e6;
*samples_per_frame = 1228800;
*tx_bw = 100e6;
*rx_bw = 100e6;
}
@@ -1129,12 +1095,10 @@ void get_samplerate_and_bw(int mu,
case 32:
if (threequarter_fs) {
*sample_rate=92.16e6;
*samples_per_frame = 921600;
*tx_bw = 50e6;
*rx_bw = 50e6;
} else {
*sample_rate=61.44e6;
*samples_per_frame = 614400;
*tx_bw = 50e6;
*rx_bw = 50e6;
}
-1
View File
@@ -317,7 +317,6 @@ void get_samplerate_and_bw(int mu,
int n_rb,
int8_t threequarter_fs,
double *sample_rate,
unsigned int *samples_per_frame,
double *tx_bw,
double *rx_bw);
uint32_t get_ssb_offset_to_pointA(uint32_t absoluteFrequencySSB,
-3
View File
@@ -4,9 +4,6 @@
#include "openair2/COMMON/pdcp_messages_def.h"
#include "openair2/COMMON/rrc_messages_def.h"
#include "openair2/COMMON/nas_messages_def.h"
#if ENABLE_RAL
#include "openair2/COMMON/ral_messages_def.h"
#endif
#include "openair2/COMMON/s1ap_messages_def.h"
#include "openair2/COMMON/x2ap_messages_def.h"
#include "openair2/COMMON/m2ap_messages_def.h"
@@ -222,9 +222,6 @@ typedef struct IttiMsgText_s {
#include <openair3/NAS/COMMON/API/NETWORK/nas_message.h>
#include <openair2/COMMON/nas_messages_types.h>
#if ENABLE_RAL
#include <ral_messages_types.h>
#endif
#include <openair2/COMMON/s1ap_messages_types.h>
#include <openair2/COMMON/x2ap_messages_types.h>
#include <openair2/COMMON/m2ap_messages_types.h>
-2
View File
@@ -32,9 +32,7 @@
#define TELNETSRV_H
#include <common/ran_context.h>
#define TELNETSRV_MODNAME "telnetsrv"
#define TELNET_PORT 9090
#define TELNET_MAX_MSGLENGTH 2048
#define TELNET_PROMPT_PREFIX "softmodem"
#define TELNET_MAXCMD 20
@@ -42,7 +42,6 @@
#define TELNET_MAXMEASURNAME_LEN 30
#define TELNET_MAXMEASURGROUPS 10
#define PRINT_CPUMEAS_STATE ((cpumeas(CPUMEAS_GETSTATE))?"enabled":"disabled")
typedef struct cpumeasurdef {
@@ -77,8 +76,6 @@ typedef struct mesurgroupdef {
} telnet_measurgroupdef_t;
#define MACSTATS_NAME(valptr) #valptr
#define LTEMAC_MEASURGROUP_NAME "ltemac"
#define PHYCPU_MEASURGROUP_NAME "phycpu"
#ifdef TELNETSRV_MEASURMENTS_MAIN
int measurcmd_show(char *buf, int debug, telnet_printfunc_t prnt);
@@ -41,8 +41,6 @@
#include "openair1/PHY/phy_extern.h"
#define TELNETVAR_PHYCC0 0
#define TELNETVAR_PHYCC1 1
telnetshell_vardef_t phy_vardef[] = {{"", 0, 0, NULL}};
@@ -48,7 +48,6 @@
#include <stdarg.h>
#include <dirent.h>
#define READCFG_DYNLOAD
#define TELNETSERVERCODE
#include "telnetsrv.h"
-5
View File
@@ -50,8 +50,6 @@ extern "C" {
# define malloc16(x) memalign(32,x+32)
#endif
#define free16(y,x) free(y)
#define bigmalloc malloc
#define bigmalloc16 malloc16
#define openair_free(y,x) free((y))
#define PAGE_SIZE 4096
@@ -101,12 +99,9 @@ static inline void *malloc_or_fail(size_t size)
#endif
#define free16(y,x) free(y)
#define bigmalloc malloc
#define bigmalloc16 malloc16
#define openair_free(y,x) free((y))
#define PAGE_SIZE 4096
#define PAGE_MASK 0xfffff000
#define virt_to_phys(x) (x)
// Converts an hexadecimal ASCII coded digit into its value. **
-2
View File
@@ -33,9 +33,7 @@
#ifndef WEBSRV_H
#define WEBSRV_H
#define WEBSRV_MODNAME "websrv"
#define WEBSRV_PORT 8090
/* websrv_params_t is an internal structure storing all the current parameters and */
/* global variables used by the web server */
-98
View File
@@ -35,7 +35,6 @@
#define FL_VERSION 1
#define FL_REVISION 2
#define FL_FIXLEVEL "3"
#define FL_INCLUDE_VERSION (FL_VERSION * 1000 + FL_REVISION)
#include <stdio.h>
@@ -194,15 +193,10 @@ typedef enum {
FL_CLASS_END /* sentinel */
} FL_CLASS;
#define FL_BEGIN_GROUP 10000
#define FL_END_GROUP 20000
#define FL_USER_CLASS_START 1001 /* min. user class value */
#define FL_USER_CLASS_END 9999 /* max. user class value */
/* Maximum border width (in pixel) */
#define FL_MAX_BW 10
/* How to display a form onto screen */
@@ -332,21 +326,11 @@ enum { FL_MBUTTON1 = 1, FL_MBUTTON2, FL_MBUTTON3, FL_MBUTTON4, FL_MBUTTON5 };
#define FL_SCROLLUP_MOUSE FL_MBUTTON4
#define FL_SCROLLDOWN_MOUSE FL_MBUTTON5
#define FL_LEFTMOUSE FL_LEFT_MOUSE
#define FL_MIDDLEMOUSE FL_MIDDLE_MOUSE
#define FL_RIGHTMOUSE FL_RIGHT_MOUSE
#define FL_SCROLLUPMOUSE FL_SCROLLUP_MOUSE
#define FL_SCROLLDOWNMOUSE FL_SCROLLDOWN_MOUSE
/* control when to return input, slider and dial etc. object. */
#define FL_RETURN_NONE 0U
#define FL_RETURN_CHANGED 1U
#define FL_RETURN_END 2U
#define FL_RETURN_END_CHANGED 4U
#define FL_RETURN_SELECTION 8U
#define FL_RETURN_DESELECTION 16U
#define FL_RETURN_TRIGGERED 1024U
#define FL_RETURN_ALWAYS (~FL_RETURN_END_CHANGED)
/* Some special color indices for FL private colormap. It does not matter
@@ -532,22 +516,13 @@ typedef enum {
} FL_PD_COL;
#define FL_BUILT_IN_COLS (FL_YELLOWGREEN + 1)
#define FL_INACTIVE_COL FL_INACTIVE
/* Some aliases for a number of colors */
#define FL_GRAY16 FL_RIGHT_BCOL
#define FL_GRAY35 FL_BOTTOM_BCOL
#define FL_GRAY80 FL_TOP_BCOL
#define FL_GRAY90 FL_LEFT_BCOL
#define FL_GRAY63 FL_COL1
#define FL_GRAY75 FL_MCOL
#define FL_LCOL FL_BLACK
#define FL_NoColor FL_NOCOLOR
/* An alias probably for an earlier typo */
#define FL_DOGERBLUE FL_DODGERBLUE
/* Events that a form reacts to */
@@ -609,9 +584,7 @@ typedef enum {
#define FL_ALT_MASK (1L << 25) /* alt + Key --> FL_ALT_MASK + key */
#define FL_CONTROL_MASK (1L << 26)
#define FL_SHIFT_MASK (1L << 27)
#define FL_ALT_VAL FL_ALT_MASK /* Don' use! */
#define MAX_SHORTCUTS 8
/* Pop-up menu item attributes. NOTE if more than 8, need to change
* choice and menu class where mode is kept by a single byte */
@@ -619,8 +592,6 @@ typedef enum {
enum { FL_PUP_NONE, FL_PUP_GREY = 1, FL_PUP_BOX = 2, FL_PUP_CHECK = 4, FL_PUP_RADIO = 8 };
#define FL_PUP_GRAY FL_PUP_GREY
#define FL_PUP_TOGGLE FL_PUP_BOX /* not used anymore */
#define FL_PUP_INACTIVE FL_PUP_GREY
/* Popup and menu entries */
@@ -633,7 +604,6 @@ typedef struct {
int mode; /* FL_PUP_GRAY, FL_PUP_CHECK etc */
} FL_PUP_ENTRY;
#define FL_MENU_ENTRY FL_PUP_ENTRY
/*******************************************************************
* FONTS
@@ -670,7 +640,6 @@ typedef enum {
FL_EMBOSSED_STYLE = (1 << 11)
} FL_TEXT_STYLE;
#define FL_FONT_STYLE FL_TEXT_STYLE
#define special_style(a) ((a) >= FL_SHADOW_STYLE && (a) <= (FL_EMBOSSED_STYLE + FL_MAXFONTS))
@@ -683,26 +652,16 @@ typedef enum {
#define FL_LARGE_SIZE 18
#define FL_HUGE_SIZE 24
#define FL_DEFAULT_SIZE FL_SMALL_SIZE
/* Defines for compatibility */
#define FL_TINY_FONT FL_TINY_SIZE
#define FL_SMALL_FONT FL_SMALL_SIZE
#define FL_NORMAL_FONT FL_NORMAL_SIZE
#define FL_MEDIUM_FONT FL_MEDIUM_SIZE
#define FL_LARGE_FONT FL_LARGE_SIZE
#define FL_HUGE_FONT FL_HUGE_SIZE
#define FL_NORMAL_FONT1 FL_SMALL_FONT
#define FL_NORMAL_FONT2 FL_NORMAL_FONT
#define FL_DEFAULT_FONT FL_SMALL_FONT
#define FL_BOUND_WIDTH (FL_Coord)1 /* Border width of boxes */
/* Definition of basic struct that holds an object */
#define FL_CLICK_TIMEOUT 400 /* double click interval */
typedef struct FL_FORM_ FL_FORM;
typedef struct FL_OBJECT_ FL_OBJECT;
@@ -969,7 +928,6 @@ FL_EXPORT FL_OBJECT *fl_get_focus_object(FL_FORM *form)
FL_EXPORT void fl_reset_focus_object(FL_OBJECT *ob){};
#define fl_set_object_focus fl_set_focus_object
FL_EXPORT FL_FORM_ATCLOSE fl_set_form_atclose(FL_FORM *form, FL_FORM_ATCLOSE fmclose, void *data){};
@@ -1014,7 +972,6 @@ FL_EXPORT void fl_set_app_nomainform(int flag){};
FL_EXPORT void fl_set_form_callback(FL_FORM *form, FL_FORMCALLBACKPTR callback, void *d){};
#define fl_set_form_call_back fl_set_form_callback
FL_EXPORT void fl_set_form_size(FL_FORM *form, FL_Coord w, FL_Coord h){};
@@ -1036,7 +993,6 @@ FL_EXPORT unsigned long fl_get_form_event_cmask(FL_FORM *form){};
FL_EXPORT void fl_set_form_geometry(FL_FORM *form, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h){};
#define fl_set_initial_placement fl_set_form_geometry
FL_EXPORT Window fl_show_form(FL_FORM *form, int place, int border, const char *name)
{
@@ -1088,7 +1044,6 @@ FL_EXPORT int fl_form_is_iconified(FL_FORM *form)
FL_EXPORT FL_RAW_CALLBACK fl_register_raw_callback(FL_FORM *form, unsigned long mask, FL_RAW_CALLBACK rcb){};
#define fl_register_call_back fl_register_raw_callback
FL_EXPORT FL_OBJECT *fl_bgn_group(void)
{
@@ -1204,7 +1159,6 @@ FL_EXPORT FL_OBJECT *fl_get_object_component(FL_OBJECT *composite, int objclass,
FL_EXPORT void fl_for_all_objects(FL_FORM *form, int (*cb)(FL_OBJECT *, void *), void *v){};
#define fl_draw_object_outside_label fl_draw_object_label_outside
FL_EXPORT void fl_set_object_dblclick(FL_OBJECT *obj, unsigned long timeout){};
@@ -1218,7 +1172,6 @@ FL_EXPORT void fl_set_object_geometry(FL_OBJECT *obj, FL_Coord x, FL_Coord y, FL
FL_EXPORT void fl_move_object(FL_OBJECT *obj, FL_Coord dx, FL_Coord dy){};
#define fl_set_object_lcolor fl_set_object_lcol
#define fl_get_object_lcolor fl_get_object_lcol
FL_EXPORT void fl_fit_object_label(FL_OBJECT *obj, FL_Coord xmargin, FL_Coord ymargin){};
@@ -1233,7 +1186,6 @@ FL_EXPORT void fl_get_object_bbox(FL_OBJECT *obj, FL_Coord *x, FL_Coord *y, FL_C
*x = *y = *w = *h = 0;
};
#define fl_compute_object_geometry fl_get_object_bbox
FL_EXPORT void fl_call_object_callback(FL_OBJECT *ob){};
@@ -1243,8 +1195,6 @@ FL_EXPORT FL_HANDLEPTR fl_set_object_posthandler(FL_OBJECT *ob, FL_HANDLEPTR pos
FL_EXPORT FL_CALLBACKPTR fl_set_object_callback(FL_OBJECT *obj, FL_CALLBACKPTR callback, long argument){};
#define fl_set_object_align fl_set_object_lalign
#define fl_set_call_back fl_set_object_callback
FL_EXPORT void fl_redraw_object(FL_OBJECT *obj){};
@@ -1320,7 +1270,6 @@ FL_EXPORT int fl_get_string_widthTAB(int style, int size, const char *s, int len
FL_EXPORT void fl_get_string_dimension(int fntstyle, int fntsize, const char *s, int len, int *width, int *height){};
#define fl_get_string_size fl_get_string_dimension
FL_EXPORT void fl_get_align_xy(int align, int x, int y, int w, int h, int xsize, int ysize, int xoff, int yoff, int *xx, int *yy){};
@@ -1364,7 +1313,6 @@ FL_EXPORT long fl_mapcolorname(FL_COLOR col, const char *name)
return 0;
};
#define fl_mapcolor_name fl_mapcolorname
FL_EXPORT void fl_free_colors(FL_COLOR *c, int n){};
@@ -1382,7 +1330,6 @@ FL_EXPORT unsigned long fl_get_pixel(FL_COLOR col)
return 0;
};
#define fl_get_flcolor fl_get_pixel
FL_EXPORT void fl_get_icm_color(FL_COLOR col, int *r, int *g, int *b){};
@@ -1489,7 +1436,6 @@ FL_EXPORT char **fl_get_cmdline_args(int *ia)
#define fl_set_error_logfp fl_set_err_logfp
#define fl_mousebutton fl_mouse_button
/* These give more flexibility for future changes. Also application
* can re-assign these pointers to whatever function it wants, e.g.,
@@ -1510,7 +1456,6 @@ FL_EXPORT int fl_msleep(unsigned long msec)
return 0;
};
#define FL_MAX_MENU_CHOICE_ITEMS 128
typedef const char *(*FL_VAL_FILTER)(FL_OBJECT *, double, int);
@@ -1535,7 +1480,6 @@ FL_EXPORT int fl_is_same_object(FL_OBJECT *obj1, FL_OBJECT *obj2)
enum { FL_XOR = 0, FL_COPY = 1, FL_AND = 2 };
#define FL_MINDEPTH 1
/* FL_xxx does not do anything anymore, but kept for compatibility */
@@ -1554,7 +1498,6 @@ enum { FL_North = 0, FL_NorthEast, FL_NorthWest, FL_South, FL_SouthEast, FL_Sout
#ifndef GreyScale
#define GreyScale GrayScale
#define StaticGrey StaticGray
#endif
#define FL_is_gray(v) ((v) == GrayScale || (v) == StaticGray)
@@ -1589,7 +1532,6 @@ typedef struct {
unsigned int bshift, bmask, bbits;
} FL_State;
#define FL_STATE FL_State /* for compatibility */
/***** Global variables ******/
@@ -1689,7 +1631,6 @@ FL_EXPORT void fl_point(FL_Coord x, FL_Coord y, FL_COLOR c){};
FL_EXPORT void fl_points(FL_POINT *p, int np, FL_COLOR c){};
#define fl_simple_line fl_line
FL_EXPORT void fl_dashedlinestyle(const char *dash, int ndash){};
@@ -1722,9 +1663,6 @@ FL_EXPORT int fl_get_drawmode(void)
return 0;
};
#define fl_set_linewidth fl_linewidth
#define fl_set_linestyle fl_linestyle
#define fl_set_drawmode fl_drawmode
/*
* Interfaces
@@ -1733,7 +1671,6 @@ FL_EXPORT int fl_get_drawmode(void)
FL_EXPORT XFontStruct *fl_get_fontstruct(int style, int size){};
#define fl_get_font_struct fl_get_fontstruct
#define fl_get_fntstruct fl_get_font_struct
FL_EXPORT Window fl_get_mouse(FL_Coord *x, FL_Coord *y, unsigned int *keymask)
{
@@ -1839,9 +1776,6 @@ FL_EXPORT void fl_winicontitle_f(Window win, const char *fmt, ...){};
FL_EXPORT void fl_winposition(FL_Coord x, FL_Coord y){};
#define fl_pref_winposition fl_winposition
#define fl_win_background fl_winbackground
#define fl_winstepunit fl_winstepsize
#define fl_set_winstepunit fl_winstepsize
FL_EXPORT void fl_winminsize(Window win, FL_Coord w, FL_Coord h){};
@@ -1855,7 +1789,6 @@ FL_EXPORT void fl_winsize(FL_Coord w, FL_Coord h){};
FL_EXPORT void fl_initial_winsize(FL_Coord w, FL_Coord h){};
#define fl_pref_winsize fl_winsize
FL_EXPORT void fl_initial_winstate(int state){};
@@ -1863,7 +1796,6 @@ FL_EXPORT Colormap fl_create_colormap(XVisualInfo *xv, int nfill){};
FL_EXPORT void fl_wingeometry(FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h){};
#define fl_pref_wingeometry fl_wingeometry
FL_EXPORT void fl_initial_wingeometry(FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h){};
@@ -1879,10 +1811,6 @@ FL_EXPORT void fl_get_wingeometry(Window win, FL_Coord *x, FL_Coord *y, FL_Coord
/* For compatibility */
#define fl_get_win_size fl_get_winsize
#define fl_get_win_origin fl_get_winorigin
#define fl_get_win_geometry fl_get_wingeometry
#define fl_initial_winposition fl_pref_winposition
#define fl_get_display() fl_display
#define FL_FormDisplay(form) fl_display
@@ -1895,7 +1823,6 @@ FL_EXPORT void fl_get_wingeometry(Window win, FL_Coord *x, FL_Coord *y, FL_Coord
FL_EXPORT Window fl_get_real_object_window(FL_OBJECT *ob){};
#define FL_OBJECT_WID FL_ObjWin
/* All registerable events, including Client Message */
@@ -1941,7 +1868,6 @@ FL_EXPORT long fl_remove_selected_xevent(Window win, long mask)
return 0;
};
#define fl_add_selected_xevent fl_addto_selected_xevent
FL_EXPORT void fl_set_idle_delta(long delta){};
@@ -1960,7 +1886,6 @@ FL_EXPORT void fl_XFlush(void){};
#define controlkey_down(mask) ((mask)&ControlMask)
#define button_down(mask) (((mask)&Button1Mask) || ((mask)&Button2Mask) || ((mask)&Button3Mask) || ((mask)&Button4Mask) || ((mask)&Button5Mask))
#define fl_keypressed fl_keysym_pressed
/****************** Resources ***************/
@@ -1975,7 +1900,6 @@ typedef struct {
int nbytes; /* used only for strings */
} FL_RESOURCE;
#define FL_resource FL_RESOURCE
#define FL_CMD_OPT XrmOptionDescRec
@@ -2002,9 +1926,6 @@ FL_EXPORT int fl_keysym_pressed(KeySym k)
return 0;
};
#define buttonLabelSize buttonFontSize
#define sliderLabelSize sliderFontSize
#define inputLabelSize inputFontSize
/* All Form control variables. Named closely as its resource name */
@@ -2035,9 +1956,6 @@ typedef struct {
char vname[24];
} FL_IOPT;
#define FL_PDButtonLabelSize FL_PDButtonFontSize
#define FL_PDSliderLabelSize FL_PDSliderFontSize
#define FL_PDInputLabelSize FL_PDInputFontSize
/* Program default masks */
@@ -2068,7 +1986,6 @@ enum {
FL_PDLabelFontSize = (1 << 24)
};
#define FL_PDButtonLabel FL_PDButtonLabelSize
FL_EXPORT void fl_set_defaults(unsigned long mask, FL_IOPT *cntl){};
@@ -2133,11 +2050,8 @@ typedef unsigned int FL_PACKED4;
#define FL_RMASK 0x000000ff
#define FL_RSHIFT 0
#define FL_GMASK 0x0000ff00
#define FL_GSHIFT 8
#define FL_BMASK 0x00ff0000
#define FL_BSHIFT 16
#define FL_AMASK 0xff000000
#define FL_ASHIFT 24
/* If PCBITS is not 8, we need to apply the RGBmask */
@@ -2225,8 +2139,6 @@ typedef int (*FL_MODIFY_CANVAS_PROP)(FL_OBJECT *);
/******************** Default *********************/
#define FL_CANVAS_BOXTYPE FL_DOWN_BOX /* really the decoration frame */
#define FL_CANVAS_ALIGN FL_ALIGN_TOP
/************ Interfaces ************************/
@@ -2244,7 +2156,6 @@ FL_EXPORT FL_OBJECT *fl_create_canvas(int type, FL_Coord x, FL_Coord y, FL_Coord
/* backward compatibility */
#define fl_set_canvas_decoration fl_set_object_boxtype
FL_EXPORT void fl_set_canvas_colormap(FL_OBJECT *ob, Colormap colormap){};
@@ -2306,10 +2217,6 @@ FL_EXPORT void fl_canvas_yield_to_shortcut(FL_OBJECT *ob, int yes){};
enum { FL_NORMAL_TEXT };
#define FL_TEXT_BOXTYPE FL_FLAT_BOX
#define FL_TEXT_COL1 FL_COL1
#define FL_TEXT_COL2 FL_MCOL
#define FL_TEXT_LCOL FL_LCOL
#define FL_TEXT_ALIGN (FL_ALIGN_LEFT | FL_ALIGN_INSIDE)
FL_EXPORT FL_OBJECT *fl_create_text(int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char *label)
@@ -2356,10 +2263,6 @@ enum { FL_GRID_NONE = 0, FL_GRID_MAJOR = 1, FL_GRID_MINOR = 2 };
/***** Defaults *****/
#define FL_XYPLOT_BOXTYPE FL_FLAT_BOX
#define FL_XYPLOT_COL1 FL_COL1
#define FL_XYPLOT_LCOL FL_LCOL
#define FL_XYPLOT_ALIGN FL_ALIGN_BOTTOM
#define FL_MAX_XYPLOTOVERLAY 32
/***** Others *****/
@@ -2382,7 +2285,6 @@ FL_EXPORT int fl_set_xyplot_file(FL_OBJECT *ob, const char *f, const char *title
FL_EXPORT void fl_insert_xyplot_data(FL_OBJECT *ob, int id, int n, double x, double y){};
#define fl_set_xyplot_datafile fl_set_xyplot_file
FL_EXPORT void fl_add_xyplot_text(FL_OBJECT *ob, double x, double y, const char *text, int al, FL_COLOR col){};