Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit af06983

Browse files
author
Fraser J. Gordon
committed
Fix the libfoundation VS project files after foundation/system split
1 parent a46f464 commit af06983

5 files changed

Lines changed: 67 additions & 30 deletions

File tree

libfoundation/include/system-stream.h

100644100755
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ along with LiveCode. If not see <http://www.gnu.org/licenses/>. */
2323
* C stdio-based streams
2424
* ================================================================ */
2525

26+
#include <stdio.h>
27+
2628
// Standard streams
2729
MC_DLLEXPORT bool MCSStreamGetStandardOutput(MCStreamRef & r_stdout);
2830
MC_DLLEXPORT bool MCSStreamGetStandardInput(MCStreamRef & r_stdin);

libfoundation/libfoundation.vcproj

Lines changed: 52 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -175,18 +175,6 @@
175175
RelativePath=".\src\foundation-error.cpp"
176176
>
177177
</File>
178-
<File
179-
RelativePath=".\src\foundation-file-private.h"
180-
>
181-
</File>
182-
<File
183-
RelativePath=".\src\foundation-file-w32.cpp"
184-
>
185-
</File>
186-
<File
187-
RelativePath=".\src\foundation-file.cpp"
188-
>
189-
</File>
190178
<File
191179
RelativePath=".\src\foundation-filters.cpp"
192180
>
@@ -235,10 +223,6 @@
235223
RelativePath=".\src\foundation-proper-list.cpp"
236224
>
237225
</File>
238-
<File
239-
RelativePath=".\src\foundation-random.cpp"
240-
>
241-
</File>
242226
<File
243227
RelativePath=".\src\foundation-record.cpp"
244228
>
@@ -247,10 +231,6 @@
247231
RelativePath=".\src\foundation-set.cpp"
248232
>
249233
</File>
250-
<File
251-
RelativePath=".\src\foundation-stream-stdio.cpp"
252-
>
253-
</File>
254234
<File
255235
RelativePath=".\src\foundation-stream.cpp"
256236
>
@@ -287,6 +267,34 @@
287267
RelativePath=".\src\foundation-value.cpp"
288268
>
289269
</File>
270+
<File
271+
RelativePath=".\src\system-commandline.cpp"
272+
>
273+
</File>
274+
<File
275+
RelativePath=".\src\system-file-w32.cpp"
276+
>
277+
</File>
278+
<File
279+
RelativePath=".\src\system-file.cpp"
280+
>
281+
</File>
282+
<File
283+
RelativePath=".\src\system-init.cpp"
284+
>
285+
</File>
286+
<File
287+
RelativePath=".\src\system-private.h"
288+
>
289+
</File>
290+
<File
291+
RelativePath=".\src\system-random.cpp"
292+
>
293+
</File>
294+
<File
295+
RelativePath=".\src\system-stream.cpp"
296+
>
297+
</File>
290298
</Filter>
291299
<Filter
292300
Name="Header Files"
@@ -333,6 +341,10 @@
333341
RelativePath=".\include\foundation-string.h"
334342
>
335343
</File>
344+
<File
345+
RelativePath=".\include\foundation-system.h"
346+
>
347+
</File>
336348
<File
337349
RelativePath=".\include\foundation-text.h"
338350
>
@@ -345,6 +357,26 @@
345357
RelativePath=".\include\foundation.h"
346358
>
347359
</File>
360+
<File
361+
RelativePath=".\include\system-commandline.h"
362+
>
363+
</File>
364+
<File
365+
RelativePath=".\include\system-file.h"
366+
>
367+
</File>
368+
<File
369+
RelativePath=".\include\system-init.h"
370+
>
371+
</File>
372+
<File
373+
RelativePath=".\include\system-random.h"
374+
>
375+
</File>
376+
<File
377+
RelativePath=".\include\system-stream.h"
378+
>
379+
</File>
348380
</Filter>
349381
<Filter
350382
Name="Resource Files"

libfoundation/src/system-commandline.cpp

100644100755
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ MCStringRef s_filename = NULL;
4141
/* Windows-specific functions for getting the command line arguments
4242
* encoded as UTF-16 rather than using the system codepage. */
4343
static bool __MCSWindowsCommandLineGet (uindex_t &, unichar_t **&);
44-
static bool __MCSWindowsCommandLineFree (uindex_t &, unichar_t **& );
44+
static void __MCSWindowsCommandLineFree (uindex_t &, unichar_t **& );
4545

4646
/* ================================================================
4747
* Setters and getters
@@ -262,8 +262,8 @@ static bool
262262
__MCSWindowsCommandLineGet (uindex_t & r_argc,
263263
unichar_t **& r_argv)
264264
{
265-
const LPWSTR t_args_w32;
266-
uindex_t t_arg_count_w32;
265+
LPCWSTR t_args_w32;
266+
int t_arg_count_w32;
267267
LPWSTR *t_arg_array_w32;
268268

269269
t_args_w32 = GetCommandLineW ();

libfoundation/src/system-file-w32.cpp

100644100755
Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ for more details.
1515
You should have received a copy of the GNU General Public License
1616
along with LiveCode. If not see <http://www.gnu.org/licenses/>. */
1717

18+
#define __MCS_INTERNAL_API__
1819
#include <foundation.h>
1920
#include <foundation-system.h>
2021
#include <foundation-auto.h>
@@ -597,7 +598,7 @@ __MCSFileCreateStream (MCStringRef p_native_path,
597598

598599
/* Store the newly-created cstdio stream in a new MCStream instance. */
599600
MCStreamRef t_stream;
600-
if (!__MCStdioStreamCreate (t_cstream, t_stream))
601+
if (!__MCSStreamCreateWithStdio (t_cstream, t_stream))
601602
{
602603
/* UNCHECKED */ fclose (t_cstream); /* Also closes underlying handle */
603604
}
@@ -661,19 +662,19 @@ __MCSFileGetDirectoryEntries (MCStringRef p_native_path,
661662
* However, the input path might already end in a directory
662663
* separator. If so, remove it. */
663664
MCAutoStringRef t_native_path;
664-
if (MCStringEndsWithCString (p_native_path, "\\",
665+
if (MCStringEndsWithCString (p_native_path, (const char_t*)"\\",
665666
kMCStringOptionCompareExact))
666667
/* Trim last character */
667668
MCStringCopySubstring (p_native_path,
668669
MCRangeMake (0, MCStringGetLength (p_native_path) - 1),
669670
&t_native_path);
670671
else
671-
MCStringCopy (p_native_path, t_native_path);
672+
MCStringCopy (p_native_path, &t_native_path);
672673

673674
/* Add the glob suffix */
674675
MCAutoStringRef t_native_search_path;
675676
if (!MCStringFormat (&t_native_search_path, "%@\\*",
676-
*t_native_path, MCSTR(t_wildcard_suffix)))
677+
*t_native_path))
677678
return false;
678679

679680
/* Get a system path */
@@ -737,8 +738,8 @@ __MCSFileGetDirectoryEntries (MCStringRef p_native_path,
737738
goto error_cleanup;
738739

739740
/* Skip "." and ".." */
740-
if (MCStringIsEqualTo (t_entry_name, t_curdir) ||
741-
MCStringIsEqualTo (t_entry_name, t_parentdir))
741+
if (MCStringIsEqualTo (t_entry_name, t_curdir, kMCStringOptionCompareExact) ||
742+
MCStringIsEqualTo (t_entry_name, t_parentdir, kMCStringOptionCompareExact))
742743
{
743744
MCValueRelease (t_entry_name);
744745
continue;
@@ -750,7 +751,7 @@ __MCSFileGetDirectoryEntries (MCStringRef p_native_path,
750751

751752
/* Clean up and return the list of directory entries */
752753
FindClose (t_find_handle);
753-
return t_entries->TakeAsProperList (r_native_entries);
754+
return t_entries.TakeAsProperList (r_native_entries);
754755

755756
error_cleanup:
756757
FindClose (t_find_handle);

libfoundation/src/system-random.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ along with LiveCode. If not see <http://www.gnu.org/licenses/>. */
2626
# include <dlfcn.h>
2727
#endif
2828

29+
#include <foundation-math.h>
30+
2931
/* ================================================================
3032
* Random value generation
3133
* ================================================================ */

0 commit comments

Comments
 (0)