Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Incorporate Debian patch for icosmesh in other locales
  • Loading branch information
cim-- committed Sep 6, 2015
1 parent 134b07b commit d8b75e9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -23,6 +23,7 @@ obj.win.spk
obj.spk.dbg
obj.win.spk.dbg
AddOns/
tools/icosmesh/obj

# Debug output
/core
10 changes: 10 additions & 0 deletions tools/icosmesh/main.m
Expand Up @@ -3,6 +3,7 @@
Tool to generate subdivided icosahedron mesh data.
*/

#import <locale.h>
#import <stdio.h>
#import "icosmesh.h"
#import "JAIcosTriangle.h"
Expand Down Expand Up @@ -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");
Expand Down

0 comments on commit d8b75e9

Please sign in to comment.