Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
106 commits
Select commit Hold shift + click to select a range
ba20cc9
Update apos docs and code comments.
Lightning11wins Jun 26, 2025
49f4641
Improve code readability without affecting functionality.
Lightning11wins Jun 26, 2025
817f6e1
Store adj weights for later CSS use.
Lightning11wins Jun 26, 2025
7670b48
Add a helpful error value when attempting to write widget properties …
Lightning11wins Jun 26, 2025
1a3dc3c
Implement rendering doubles as widget properties.
Lightning11wins Jun 26, 2025
c5855fa
Render the new adjustment weight doubles as widget properties for deb…
Lightning11wins Jun 26, 2025
837f6b4
Reformat CSS.
Lightning11wins Jun 27, 2025
0f0d1e8
Make design responsive by replacing px with %.
Lightning11wins Jun 27, 2025
6f327d5
Reformat CSS for autolayout.
Lightning11wins Jun 27, 2025
7becc70
Improve debugging.
Lightning11wins Jul 1, 2025
e3f0757
Add flexibility to autoscaling, using macros to make it more readable.
Lightning11wins Jul 1, 2025
5011169
Replace magic values for fl_x and fl_y with macros.
Lightning11wins Jul 1, 2025
9ea5011
Improve code documentation and readability.
Lightning11wins Jul 3, 2025
108e14c
Fix flexibility a little, but it's still broken.
Lightning11wins Jul 3, 2025
bbc0db3
Attempt to add responsiveness to widgets (doesn't quite work): autola…
Lightning11wins Jul 3, 2025
bfadfe7
Build testing apps.
Lightning11wins Jul 3, 2025
c5d998c
Sample pages appear to work now.
Lightning11wins Jul 23, 2025
5ae7c54
Working, server-side code.
Lightning11wins Jul 30, 2025
31f9a0d
Improve apos.c & add design support.
Lightning11wins Feb 6, 2026
a309b1f
Improve error handling.
Lightning11wins Feb 6, 2026
7b4b20b
Fix the qprintf() % bug.
Lightning11wins Feb 6, 2026
f55bb79
Improve naming conventions and dev experience.
Lightning11wins Feb 7, 2026
9da89e3
Update testing apps.
Lightning11wins Feb 7, 2026
a742576
Add tools to ht_geom_dom1html.
Lightning11wins Feb 7, 2026
9612eb4
Add tools for widget development and debugging.
Lightning11wins Feb 7, 2026
ba4dd5b
Add a warning when using the pane resize action, which breaks respons…
Lightning11wins Feb 7, 2026
83ea0b9
Make the point action responsive.
Lightning11wins Feb 7, 2026
c75f3e0
Make the autolayout widget responsive.
Lightning11wins Feb 7, 2026
db00d6b
Make the tab widget responsive.
Lightning11wins Feb 7, 2026
7cd1fd7
Make the clock widget responsive.
Lightning11wins Feb 9, 2026
b0b1553
Debug and clean up the component widget.
Lightning11wins Feb 9, 2026
aac68d9
Make the scrollpane widget responsive.
Lightning11wins Feb 9, 2026
c079d6e
Make the button widget responsive.
Lightning11wins Feb 9, 2026
00a7559
Make the chart widget responsive.
Lightning11wins Feb 9, 2026
30df51a
Make the HTML widget responsive.
Lightning11wins Feb 9, 2026
a44cbd0
Make checkbox widget responsive.
Lightning11wins Feb 9, 2026
cc4d154
Update docs.
Lightning11wins Feb 9, 2026
0b6a8a3
Add new content for testing.
Lightning11wins Feb 9, 2026
44499c3
Fix a bug in the textbutton widget that broke responsiveness.
Lightning11wins Feb 9, 2026
b291e5a
Make datetime widget responsive.
Lightning11wins Feb 9, 2026
32c24e3
Make dropdown widget responsive.
Lightning11wins Feb 9, 2026
a7d9958
Make editbox widget responsive.
Lightning11wins Feb 9, 2026
bf0987e
Make formstatus widget responsive.
Lightning11wins Feb 9, 2026
615994b
Make imagebutton widget responsive.
Lightning11wins Feb 9, 2026
afe9388
Make menu widget responsive.
Lightning11wins Feb 9, 2026
6277f78
Make objcanvas widget responsive (sort of).
Lightning11wins Feb 9, 2026
a2f1f1b
Make radiobutton pannel widget responsive.
Lightning11wins Feb 9, 2026
0e35c68
Remove unnecessary width from htdrv_treeview.js.
Lightning11wins Feb 9, 2026
03c9153
Make window widget responsive.
Lightning11wins Feb 9, 2026
56e114a
Make active areas responsive.
Lightning11wins Feb 9, 2026
cfc5e47
Cleanup unused comments.
Lightning11wins Feb 9, 2026
1e0d948
Add error messages to the image widget.
Lightning11wins Feb 9, 2026
44bbef4
Make table widget back end code responsive.
Lightning11wins Feb 9, 2026
2354c9a
Make table widget front end code responsive (I think).
Lightning11wins Feb 9, 2026
467ac3c
Improve button layout on radio button panel widgets.
Lightning11wins Feb 11, 2026
e1f9a63
Clean up some JS for the radio button panel widget.
Lightning11wins Feb 11, 2026
028f968
Add Easter Eggs for code reviewers to find.
Lightning11wins Feb 11, 2026
1b69670
Fix a bug in htdrv_radiobutton.js.
Lightning11wins Feb 11, 2026
59c9fc0
Tweak size of selection area in htdrv_radiobutton.js.
Lightning11wins Feb 11, 2026
f2f5d7a
Fix some inconsistent style issues with generated HTML & CSS.
Lightning11wins Feb 11, 2026
15718cc
Clean up focus box styles.
Lightning11wins Feb 12, 2026
b56b2da
Add fallback options to the default font value.
Lightning11wins Feb 12, 2026
b836f1b
Fix tab widget bugs.
Lightning11wins Feb 12, 2026
27cf99a
Clean up widget/label.
Lightning11wins Feb 16, 2026
cc4345a
Clean up widget/tab.
Lightning11wins Feb 16, 2026
d756a5f
Fix some validation warnings in generated HTML.
Lightning11wins Feb 16, 2026
367cae5
Improve scrollpane code.
Lightning11wins Feb 16, 2026
e231364
Improve startup.js.
Lightning11wins Feb 16, 2026
ba5a548
Fix inconsistent JS generation style.
Lightning11wins Feb 16, 2026
4c874de
Disable clipping CSS by default.
Lightning11wins Feb 19, 2026
47a789d
Bug fixes and cleanup.
Lightning11wins Feb 19, 2026
995bf9a
Improve pre-page serverside HTML generation.
Lightning11wins Feb 19, 2026
3856302
Improve point action code.
Lightning11wins Feb 20, 2026
363e489
Improve selection/hover area code.
Lightning11wins Feb 20, 2026
614b696
Improve consistency of ResizeObserver-based code.
Lightning11wins Feb 20, 2026
acf6a7c
Improve readability of the resize listener in htdrv_window.js.
Lightning11wins Feb 20, 2026
ab02e38
Fix a bug that caused hover boxes to not display (caused by disabling…
Lightning11wins Feb 20, 2026
64ca186
Clean up pg_mkbox() because I want to be able to read it.
Lightning11wins Feb 20, 2026
54379cd
Clean up parent width & height functions.
Lightning11wins Feb 20, 2026
1c2f6f7
Remove a comment referring to the qprintf() % bug, patched many commi…
Lightning11wins Feb 20, 2026
3fa3be5
Improve code readability.
Lightning11wins Feb 20, 2026
705df0f
Add support for sending new client-side datatypes.
Lightning11wins Feb 23, 2026
68effc6
Fix a bug that caused boxes to be drawn incorrectly.
Lightning11wins Feb 23, 2026
c7e070d
Update the pg_area() doc comment after realizing it had external docu…
Lightning11wins Feb 23, 2026
e664c8b
Fix a bug that made window widget title bars appear broken.
Lightning11wins Feb 23, 2026
729b117
Fix area bugs.
Lightning11wins Feb 23, 2026
bad37b4
Fix dynamic components being offset twice.
Lightning11wins Feb 24, 2026
e3432fa
Update testing apps.
Lightning11wins Feb 24, 2026
afad0ef
Clean up code.
Lightning11wins Feb 24, 2026
b5ffd1d
Fix a major regression that broke datetime dropdown rendering (introd…
Lightning11wins Feb 24, 2026
fdfb664
Fix a regression that caused hovers for many widgets to render incorr…
Lightning11wins Feb 24, 2026
d72687e
Add or update cursor styles to indicate clickable areas.
Lightning11wins Feb 24, 2026
2ab05ac
Fix a bug that caused table scrollbar to sometimes not resize properly.
Lightning11wins Feb 25, 2026
e3caaff
Add an error when attempting to get relative values on an invalid layer.
Lightning11wins Feb 25, 2026
3d1a58a
Replace the deprecated __defineGetter__() function with modern altern…
Lightning11wins Feb 25, 2026
875de77
Remove fast_setRelativeX/Y() functions because they weren't notably f…
Lightning11wins Feb 25, 2026
eba946c
Improve warnings when using actions that break responsive design.
Lightning11wins Feb 25, 2026
17e8957
Clean up from review.
Lightning11wins Feb 25, 2026
81ae919
Fix moveTo() passing incorrect parameter to setResponsiveY().
Lightning11wins Feb 25, 2026
ebd88cc
Remove a completed todo.
Lightning11wins Feb 26, 2026
c1f5b73
Add dups branch dependency changes (revert after dups branch is merged).
Lightning11wins Feb 26, 2026
4cdcd82
Fix minor window issues.
Lightning11wins Mar 3, 2026
0acb257
Add detail to docs for refresh_interval property on osrc widgets.
Lightning11wins Mar 3, 2026
922008b
Fix Greptile issues.
Lightning11wins Mar 6, 2026
1d92412
Update copyright notice in modified files.
Lightning11wins Mar 6, 2026
c53a8f4
Fix typo.
Lightning11wins Mar 6, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 39 additions & 11 deletions centrallix-doc/Widgets/widgets.xml
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,7 @@ checkbox_test "widget/page"

<action name="Open">Opens the window. If the parameter IsModal is set to 1, then the window becomes modal (only the window's contents are accessible to the user until the window is closed). If the parameter NoClose is set to 1, then the close button in the upper right corner of the window becomes inactive and the window will only close via the Close, SetVisibility, and ToggleVisibility actions.</action>

<action name="Point">Makes the window relocate to a side using a triangle (pop over).</action>
<action name="Point">Creates a triangular pointer on the edge of the window to point at a given (X,Y) coordinate.</action>

<action name="Popup">Opens a window like a pop-up.</action>

Expand Down Expand Up @@ -2323,7 +2323,7 @@ MyButton "widget/imagebutton"

<property name="point_fgcolor" type="string">The color (named or #numeric) of the text in the label when the user hovers the mouse over the label.</property>

<property name="style" type="string">(e.g. bold).</property>
<property name="style" type="string">'bold' for bold text, 'italic' for italic text.</property>

<property name="text" type="string">The text that the label is to display.</property>

Expand Down Expand Up @@ -2575,7 +2575,7 @@ myMenu "widget/menu"

<property name="receive_updates" type="yes/no">** This feature currently disabled in Centrallix 0.9.1 ** Default "no". If set to "yes", the objectsource will ask the server to send it updates on any changes that occur on the server side (i.e., if the changes were made by another objectsource or by another user, they would be automatically refreshed into this objectsource in near real-time).</property>

<property name="refresh_interval" type="integer">The time between the data refreshing, if set to 0 it does not automatically refresh.</property>
<property name="refresh_interval" type="integer">The time in milliseconds between the data refreshing, if set to 0 it does not automatically refresh.</property>

<property name="replicasize" type="integer">Represents the number of records to store in its replica. This value should be larger than the maximum number of records that will be displayed at any one time. At times, Centrallix may increase the number of records cached on the client beyond this number.</property>

Expand Down Expand Up @@ -2818,13 +2818,17 @@ osrc1 "widget/osrc"

<actions>

<action name="Alert">Sends an alert widget.</action>
<action name="Alert">Sends an alert widget. Set the 'Message' to specify a text string that should appear in the alert.</action>

<action name="Close">Closes the page.</action>

<action name="Launch">Starts a new app in a new window.</action>

<action name="Log">Logs data to the console (using console.log()), for testing and debugging. Set the 'Message' to specify a text string that should appear in the log. Might be useful for logging Easter Egg #8.</action>

<action name="LoadPage">Loads the page.</action>

<action name="ReloadPage">Reloads the page in the user's browser. Note: This event forces a reload, even if the original content could be loaded without one.</action>

</actions>

Expand Down Expand Up @@ -3087,7 +3091,9 @@ my_cmp "widget/component-decl"
<property name="bgcolor" type="string" subtype="color">A color, RGB or named, for the panel background. If neither bgcolor nor background transparent.</property>

<property name="height" type="integer">Height, in pixels, of the panel.</property>


<property name="spacing" type="integer">The maximum height (in pixels) of space allowed between radio buttons on the panel (default: 10px).</property>

<property name="outline_background" type="string" subtype="color">An image to be used for the rectangular border drawn around the radio buttons.</property>

<property name="textcolor" type="string" subtype="color">The color, RGB or named, of the text within the panel. Default: "black".</property>
Expand Down Expand Up @@ -3390,21 +3396,31 @@ $Version=2$

<actions>

<action name="ScrollTo">Scrolls to a specific location determined by the scroll bar.</action>
<action name="ScrollTo">Scrolls to a specific location determined by the scroll bar. Specify the 'Percent' attribute to indicate how far to scroll in decimal representation (so 1.00 is 100%, aka. the bottom of the page). Specify 'Offset' how many pixels the content should be offset from the top (specify 100 to scroll the first 100 px of content off the top of the scroll pane). Specify 'RangeStart' and 'RangeEnd' to scroll to within the pixel range (using the same units as offset). Keep in mind that this action will trigger a scroll event to occur.</action>

</actions>

<events>


<event name="Scroll">This event occurs any time the user scrolls the scroll pane. This includes scrolling by clicking the scroll buttons, clicking on the scroll bar, dragging the scroll thumb, turning the scroll wheel, or when the ScrollTo action is used. This event does not occur when the scroll pane moves because the contained content changed in length, or when the scroll pane is forced to scroll because the available visible area was resized. This event will never occur if the content within the scroll pane is shorter than the available visible area because then the content cannot be scrolled.
This event provides the :Percent attribute, a number from 0 to 100 (the same as the ScrollTo action above) representing the percentage that the user has now scrolled down the page as of the event occuring. This event also provides :Change, representing how much the user's scroll location has changed in the same unit as above (although this value will be negative if the user scrolled up).</event>

<event name="Click">This event occurs when the user moves the mouse pointer while it is over the widget. The event will repeatedly fire each time the pointer moves.</event>

<event name="Wheel">This event occurs when the user moves the scroll wheel while it is over the widget (or content inside the widget). The event will repeatedly fire each time the pointer moves.</event>

<event name="MouseDown">This event occurs when the user presses the mouse button on the widget. This differs from the 'Click' event in that the user must actually press and release the mouse button on the widget for a Click event to fire, whereas simply pressing the mouse button down will cause the MouseDown event to fire.</event>

<event name="MouseMove">This event occurs when the user moves the mouse pointer while it is over the widget. The event will repeatedly fire each time the pointer moves.</event>
<event name="MouseMove">This event occurs when the user moves the mouse pointer while it is over the widget (or content inside the widget). The event will repeatedly fire each time the pointer moves.</event>

<event name="MouseOut">This event occurs when the user moves the mouse pointer off of the widget.</event>

<event name="MouseOver">This event occurs when the user first moves the mouse pointer over the widget. It will not occur again until the user moves the mouse off of the widget and then back over it again.</event>

<event name="MouseUp">This event occurs when the user releases the mouse button on the widget.</event>

Note: The Click, Wheel, MouseDown, and MouseUp events provide several pieces of useful information, including :shiftKey, :ctrlKey, :altKey, and :metaKey, which are 1 if the respective key is held down and 0 otherwise. These events also provide :button, a number representing the button number that the user used to execute the event (which appears to always be 0 for wheel).

</events>

Expand Down Expand Up @@ -3467,7 +3483,7 @@ MyScrollPane "widget/scrollpane"

<p>The tab pages are containers, and as such, controls of various kinds, including other tab controls, can be placed inside the tab pages.</p>

<p>Tab pages are added to a tab control by including widgets of type "widget/tabpage" within the "widget/tab" widget in the structure file that defines the application. Any controls to appear inside a particular tab page should be placed inside their respective "widget/tabpage" widgets in the structure file.Only widgets of type "widget/tabpage" should be placed inside a "widget/tab", with the exception of nonvisuals such as connectors.</p>
<p>Tab pages are added to a tab control by including widgets of type "widget/tabpage" within the "widget/tab" widget in the structure file that defines the application. Any controls to appear inside a particular tab page should be placed inside their respective "widget/tabpage" widgets in the structure file.Only widgets of type "widget/tabpage" should be placed inside a "widget/tab", except nonvisuals such as connectors.</p>

<p>Tab pages also have a 'visible' property which allows them to be hidden and revealed. This is used if the type is set to dynamic, but can be used manually as well.</p>

Expand Down Expand Up @@ -3502,6 +3518,8 @@ MyScrollPane "widget/scrollpane"
<property name="tab_location" type="string">The location of the tabs: "top" (default), "bottom", "left", "right", or "none".</property>

<property name="tab_width" type="integer">The width of the tabs in pixels. This is optional for tab_locations of "top", "bottom", and "none".</property>

<property name="tab_height" type="integer">The height of the tabs in pixels. This is optional for all tab_locations. Defaults to 24px.</property>

<property name="textcolor" type="string" subtype="color">The color of the text to be used on the tabs to identify them.</property>

Expand All @@ -3511,7 +3529,15 @@ MyScrollPane "widget/scrollpane"

<property name="x" type="integer">X-coordinate of the upper left corner of the tab control, relative to the container.</property>

<property name="y" type="integer">Y-coordinate of the upper left corner of the control, relative to its container.</property>
<property name="rendering" type="string">'client-side' or 'server-side'. This property is intended for developers (although it can give a very small performance boost). A value of "server-side" turns off JS rendering on the client. This does not work for dynamic width tabs (aka. top or bottom tabs with no 'tab_width' property). Defaults to "client-side". </property>

<property name="select_translate_along" type="integer">The amount to translate a selected tab along the side of the tab control. Defaults to 0px.</property>

<property name="select_translate_out" type="integer">The amount to translate a selected tab out and away from the side of the tab control. Defaults to 2px.</property>

<property name="select_translate_x" type="integer">The amount to translate a selected tab in the x direction. If set, overrides the value derived from select_translate_along and/or select_translate_out.</property>

<property name="select_translate_y" type="integer">The amount to translate a selected tab in the y direction. If set, overrides the value derived from select_translate_along and/or select_translate_out.</property>

</properties>

Expand Down Expand Up @@ -3595,9 +3621,9 @@ myTabControl "widget/tab"

<overview>

<p>A table widget is used to display data in a tabular format. It consists of a header row with column labels, followed by any number of rows containing data.The header may have a different color or image scheme than the rows, and the rows may or may not be configured to alternate between two colors or background images.</p>
<p>A table widget is used to display data in a tabular format. It consists of a header row with column labels, followed by any number of rows containing data. The header may have a different color or image scheme than the rows, and the rows may or may not be configured to alternate between two colors or background images.</p>

<span class='__TEXT__'>Table widgets come in three different flavors: static, dynamicpage, and dynamicrow.Static table widgets are built on the server and write their data directly into the container in which they reside, which is usually a scrollpane widget. Dynamicpage table widgets load their data once they initialize on the client, by activating a query through an ObjectSource nonvisual widget.Dynamicpage table widgets do not support modification, but can be reloaded through an ObjectSource at will.Dynamicrow table widgets, on the other hand, display each row as an individual layer, and thus are modifiable on the client. Dynamicrow table widgets also load their contents through an ObjectSource widget query.As of the time of writing of this document, only <i>static</i> mode and <i>dynamicrow</i> mode were supported.</span>
<span class='__TEXT__'>Table widgets come in three different flavors: static, dynamicpage, and dynamicrow. Static table widgets are built on the server and write their data directly into the container in which they reside, which is usually a scrollpane widget. Dynamicpage table widgets load their data once they initialize on the client, by activating a query through an ObjectSource nonvisual widget. Dynamicpage table widgets do not support modification, but can be reloaded through an ObjectSource at will. Dynamicrow table widgets, on the other hand, display each row as an individual layer, and thus are modifiable on the client. Dynamicrow table widgets also load their contents through an ObjectSource widget query. As of the time of writing of this document, only <i>static</i> mode and <i>dynamicrow</i> mode were supported.</span>

<p>Table widgets allow the selection (keyboard, mouse, and data focus) of individual rows.</p>

Expand All @@ -3622,6 +3648,8 @@ myTabControl "widget/tab"
<property name="cellvspacing" type="integer">The vertical spacing between cells in the table, in pixels. Default is 1.</property>

<property name="colsep" type="integer">The width of the column separation lines in pixels. Default is 1.</property>

<property name="colsep_mode" type="string">Either 'full' or 'header'. Default is 'full'.</property>

<property name="data_mode" type="string">Either "rows" (default) or "properties". In "properties" mode, the table displays one row per attribute, and so only displays the current record in the objectsource. In "rows" mode, the table displays one row per record in the objectsource.</property>

Expand Down
33 changes: 32 additions & 1 deletion centrallix-lib/include/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,36 @@ extern "C" {
}
#endif

#endif /* UTILITY_H */
/** TODO: ISRAEL - Remove these after the dups branch is merged. **/

/*** @brief Returns the smaller of two values.
***
*** @param a The first value.
*** @param b The second value.
*** @return The smaller of the two values.
***
*** @note This macro uses GCC extensions to ensure type safety.
***/
#define min(a, b) \
({ \
__typeof__ (a) _a = (a); \
__typeof__ (b) _b = (b); \
(_a < _b) ? _a : _b; \
})

/*** @brief Returns the larger of two values.
***
*** @param a The first value.
*** @param b The second value.
*** @return The larger of the two values.
***
*** @note This macro uses GCC extensions to ensure type safety.
***/
#define max(a, b) \
({ \
__typeof__ (a) _a = (a); \
__typeof__ (b) _b = (b); \
(_a > _b) ? _a : _b; \
})

#endif /* UTILITY_H */
7 changes: 3 additions & 4 deletions centrallix-lib/src/mtask.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
/* Centrallix Application Server System */
/* Centrallix Base Library */
/* */
/* Copyright (C) 1998-2001 LightSys Technology Services, Inc. */
/* Copyright (C) 1998-2026 LightSys Technology Services, Inc. */
/* */
/* You may use these files and this library under the terms of the */
/* GNU Lesser General Public License, Version 2.1, contained in the */
Expand Down Expand Up @@ -2208,8 +2208,8 @@ thClearFlags(pThread thr, int flags)
int
thExcessiveRecursion()
{
unsigned char buf[1];
return (MTASK.CurrentThread->Stack - buf > MT_STACK_HIGHWATER);
const unsigned char stack_ptr[1];
return (MTASK.CurrentThread->Stack - stack_ptr > MT_STACK_HIGHWATER);
}


Expand Down Expand Up @@ -4265,4 +4265,3 @@ syGetSem(pSemaphore sem, int cnt, int flags)

return code;
}

24 changes: 21 additions & 3 deletions centrallix-lib/src/qprintf.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
/* Centrallix Application Server System */
/* Centrallix Base Library */
/* */
/* Copyright (C) 1998-2006 LightSys Technology Services, Inc. */
/* Copyright (C) 1998-2026 LightSys Technology Services, Inc. */
/* */
/* You may use these files and this library under the terms of the */
/* GNU Lesser General Public License, Version 2.1, contained in the */
Expand Down Expand Up @@ -880,6 +880,14 @@ qpf_internal_Translate(pQPSession s, const char* srcbuf, size_t srcsize, char**
*** change out from under this function to a new buffer if a realloc is
*** done by the grow_fn function. Do not store pointers to 'str'. Go
*** solely by offsets.
***
*** NULL, &(s->Tmpbuf), &(s->TmpbufSize), htr_internal_GrowFn, (void*)s, fmt, va
*** @param s Optional session struct.
*** @param str Pointer to a string buffer where data will be written.
*** @param size Pointer to the current size of the string buffer.
*** @param grow_fn A function to grow the string buffer.
*** @param format The format of data which should be written.
*** @param ap The arguments list to fulfill the provided format.
***/
int
qpfPrintf_va_internal(pQPSession s, char** str, size_t* size, qpf_grow_fn_t grow_fn, void* grow_arg, const char* format, va_list ap)
Expand Down Expand Up @@ -975,6 +983,12 @@ qpfPrintf_va_internal(pQPSession s, char** str, size_t* size, qpf_grow_fn_t grow
/** Simple specifiers **/
if (__builtin_expect(format[0] == '%', 0))
{
if (ignore)
{
format++;
continue;
}

if (__builtin_expect(!nogrow, 1) && (__builtin_expect(cpoffset+2 <= *size, 1) || (grow_fn(str, size, cpoffset, grow_arg, cpoffset+2))))
(*str)[cpoffset++] = '%';
else
Expand All @@ -987,6 +1001,12 @@ qpfPrintf_va_internal(pQPSession s, char** str, size_t* size, qpf_grow_fn_t grow
}
else if (__builtin_expect(format[0] == '&',0))
{
if (ignore)
{
format++;
continue;
}

if (__builtin_expect(!nogrow, 1) && (__builtin_expect(cpoffset+2 <= *size, 1) || (grow_fn(str, size, cpoffset, grow_arg, cpoffset+2))))
(*str)[cpoffset++] = '&';
else
Expand Down Expand Up @@ -1448,5 +1468,3 @@ qpfRegisterExt(char* ext_spec, int (*ext_fn)(), int is_source)

return;
}


2 changes: 1 addition & 1 deletion centrallix-os/apps/nav/default.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ default "widget/template"
{
bgcolor="#e0e0e0";
linkcolor="#0000ff";
font_name = "Arial";
font_name = "Arial, Helvetica, sans-serif";
font_size = 12;
icon = "/favicon.ico";
}
Expand Down
Loading