The R Project SVN R-packages

Rev

Rev 8533 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 8533 Rev 8535
Line 24... Line 24...
24
 *  A copy of the GNU General Public License is available via WWW at
24
 *  A copy of the GNU General Public License is available via WWW at
25
 *  http://www.gnu.org/copyleft/gpl.html.  You can also obtain it by
25
 *  http://www.gnu.org/copyleft/gpl.html.  You can also obtain it by
26
 *  writing to the Free Software Foundation, Inc., 59 Temple Place,
26
 *  writing to the Free Software Foundation, Inc., 59 Temple Place,
27
 *  Suite 330, Boston, MA  02111-1307  USA.
27
 *  Suite 330, Boston, MA  02111-1307  USA.
28
 *
28
 *
29
 *  $Id: RController.m 8533 2025-06-13 22:59:46Z urbaneks $
29
 *  $Id: RController.m 8535 2025-06-14 01:19:07Z urbaneks $
30
 */
30
 */
31
 
31
 
32
 
32
 
33
#import "RGUI.h"
33
#import "RGUI.h"
34
#include <R.h>
34
#include <R.h>
Line 540... Line 540...
540
				if (atr.location != NSNotFound) {
540
				if (atr.location != NSNotFound) {
541
					lss = [lss substringToIndex:atr.location];
541
					lss = [lss substringToIndex:atr.location];
542
					SLog(@"   - it contains @, stripped to \"%@\"", lss);
542
					SLog(@"   - it contains @, stripped to \"%@\"", lss);
543
				}
543
				}
544
				strncpy(cloc, [lss UTF8String], 63);
544
				strncpy(cloc, [lss UTF8String], 63);
-
 
545
				/* cloc can be en-NZ instead of en_NZ so convert those */
-
 
546
				char *clp = cloc;
-
 
547
				while (*clp && *clp != '.') {
-
 
548
					if (*clp == '-') *clp = '_';
-
 
549
					clp++;
-
 
550
				}
545
			}
551
			}
546
			if (! *cloc) {
552
			if (! *cloc) {
547
				SLog(@"   CFLocaleGetIdentifier is empty, falling back to en_US.UTF-8");
553
				SLog(@"   CFLocaleGetIdentifier is empty, falling back to en_US.UTF-8");
548
				strcpy(cloc,"en_US.UTF-8");
554
				strcpy(cloc,"en_US.UTF-8");
549
			}
555
			}