Check-in [49b5f3d097]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:[CORE] - Silence annoying compiler warnings because wrong pointer assignation, dedicated to 'fxm' in FreeBASIC forums.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 49b5f3d0973f0451d2af97ee96f2fc866811a621
User & Date: julcar 2021-10-09 08:38:01.062
Context
2021-10-12
08:25
[LANGUAGES] - Add module_publisher_post_read_more for publisher module. check-in: fa1c61d1bc user: julcar tags: trunk
2021-10-09
08:38
[CORE] - Silence annoying compiler warnings because wrong pointer assignation, dedicated to 'fxm' in FreeBASIC forums. check-in: 49b5f3d097 user: julcar tags: trunk
2021-10-08
09:17
[CORE] - Addendum to last commit: don't forget the widgets. check-in: b4dc66e177 user: julcar tags: trunk
Changes
Side-by-Side Diff Ignore Whitespace Patch
Changes to core/modules.bas.
21
22
23
24
25
26
27
28

29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46

47
48
49
50
51
52
53
21
22
23
24
25
26
27

28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45

46
47
48
49
50
51
52
53







-
+

















-
+








SUB LoadModule(ModuleName AS STRING)
  DIM ModuleFrontEnd AS SUB()
  DIM ModuleIndex AS LONG = UBOUND(CompiledModules)
  IF ModuleIndex >= 0 THEN
    FOR i AS LONG = 0 TO ModuleIndex
      IF ModuleName = CompiledModules(i).Name THEN
        ModuleFrontEnd = CompiledModules(i).MainLoader
        ModuleFrontEnd = CPTR(SUB, CompiledModules(i).MainLoader)
        IF ModuleFrontEnd > 0 THEN
          LoadLanguage(ModuleName)
          LoadTplSnippets(ModuleName)
          ModuleFrontEnd()
        END IF
        EXIT FOR
      END IF
    NEXT
  END IF
END SUB

SUB LoadAdminModule(ModuleName AS STRING)
  DIM ModuleBackEnd AS SUB()
  DIM ModuleIndex AS LONG = UBOUND(CompiledModules)
  IF ModuleIndex >= 0 THEN
    FOR i AS LONG = 0 TO ModuleIndex
      IF ModuleName = CompiledModules(i).Name THEN
        ModuleBackEnd = CompiledModules(i).AdminLoader
        ModuleBackEnd = CPTR(SUB, CompiledModules(i).AdminLoader)
        IF ModuleBackEnd > 0 THEN
          LoadLanguage(ModuleName)
          LoadTplSnippets(ModuleName)
          ModuleBackEnd()
        END IF
        EXIT FOR
      END IF
63
64
65
66
67
68
69
70

71
72
73
74
75
76
77
63
64
65
66
67
68
69

70
71
72
73
74
75
76
77







-
+







    SubKey = MID(Key, INSTR(Key, "_") + 1, LEN(Key))
    ModuleRequest = LEFT(Key, INSTR(Key, "_") - 1)
  END IF
  DIM ModuleIndex AS LONG = UBOUND(CompiledModules)
  IF ModuleIndex >= 0 THEN
    FOR i AS LONG = 0 TO ModuleIndex
      IF ModuleRequest = CompiledModules(i).Name THEN
        ModuleVars = CompiledModules(i).VarsFunction
        ModuleVars = CPTR(FUNCTION(AS STRING) AS STRING, CompiledModules(i).VarsFunction)
        IF ModuleVars > 0 THEN
          ModuleParser = ModuleVars(SubKey)
        ELSE
          ModuleParser = SubKey
        END IF
        EXIT FOR
      END IF
89
90
91
92
93
94
95
96

97
98
99
100
101
102
89
90
91
92
93
94
95

96
97
98
99
100
101
102







-
+






END SUB

SUB RunLoaders()
  DIM LoaderEntry AS SUB()
  DIM LoaderIndex AS LONG = UBOUND(ArrayLoaders)
  IF LoaderIndex >= 0 THEN
    FOR i AS LONG = 0 TO LoaderIndex
      LoaderEntry = ArrayLoaders(i)
      LoaderEntry = CPTR(SUB, ArrayLoaders(i))
      IF LoaderEntry > 0 THEN
        LoaderEntry()
      END IF
    NEXT
  END IF
END SUB
Changes to core/widgets.bas.
10
11
12
13
14
15
16
17

18
19
20
21
22
23
24
10
11
12
13
14
15
16

17
18
19
20
21
22
23
24







-
+








FUNCTION LoadWidget(WidgetName AS STRING) AS STRING
  DIM WidgetLoader AS FUNCTION() AS STRING
  DIM WidgetIndex AS LONG = UBOUND(ArrayWidgets) + 1
  IF WidgetIndex >= 0 THEN
    FOR i AS LONG = 0 TO WidgetIndex
      IF WidgetName = ArrayWidgets(i).Name THEN
        WidgetLoader = ArrayWidgets(i).Loader
        WidgetLoader = CPTR(FUNCTION AS STRING, ArrayWidgets(i).Loader)
        IF WidgetLoader > 0 THEN
          LoadWidget = WidgetLoader()
        END IF
        EXIT FOR
      END IF
    NEXT
  END IF