Incorporate Debian patch for icosmesh in other locales

master
cim 2015-09-06 10:05:05 +01:00
parent 134b07bc09
commit d8b75e9120
2 changed files with 11 additions and 0 deletions

1
.gitignore vendored
View File

@ -23,6 +23,7 @@ obj.win.spk
obj.spk.dbg
obj.win.spk.dbg
AddOns/
tools/icosmesh/obj
# Debug output
/core

View File

@ -3,6 +3,7 @@
Tool to generate subdivided icosahedron mesh data.
*/
#import <locale.h>
#import <stdio.h>
#import "icosmesh.h"
#import "JAIcosTriangle.h"
@ -130,6 +131,15 @@ int main (int argc, const char * argv[])
autorelease pool to suppress warnings when running without gc.
*/
(void)[NSAutoreleasePool new];
/* Let printf ignore local number formatting conventions. */
/* For example, use a dot as decimal separator. */
if (setlocale (LC_NUMERIC, "C") == NULL)
{
fprintf(stderr, "Failed to set locale.\n");
return EXIT_FAILURE;
}
FILE *header = fopen(kFileName ".h", "w");
FILE *source = fopen(kFileName ".c", "w");