@@ -44,18 +44,6 @@ const char *subject_pronoun(int sex) {
4444 return lang_get_offset (LangPronoun , 4 + sex );
4545}
4646
47- char const * pronoun_strip (char const * pronoun , char * buf , size_t buf_size ) {
48- size_t pronoun_len = strlen (pronoun );
49- while (pronoun_len && pronoun [pronoun_len - 1 ] == '\n' ) {
50- pronoun_len -- ;
51- }
52- if (pronoun_len >= buf_size )
53- pronoun_len = buf_size - 1 ;
54- memcpy (buf , pronoun , pronoun_len );
55- buf [pronoun_len ] = '\0' ;
56- return buf ;
57- }
58-
5947static void newsroom_fixup_capitalization (str * tmp ) {
6048 // XXX non-const str_c variant?
6149 char * it = (char * )str_c (tmp );
@@ -99,18 +87,17 @@ void newsroom_fixup_str(newsroom_local *local) {
9987 raw_translation = lang_get_offset (LangNewsroomReport , local -> news_id + min2 (local -> screen , 1 ));
10088 }
10189
102- char scratch [9 ];
10390 str tmp ;
10491 str_from_c (& tmp , raw_translation );
105- str_replace (& tmp , "~11" , pronoun_strip ( subject_pronoun (local -> sex2 ), scratch , sizeof scratch ), -1 );
106- str_replace (& tmp , "~10" , pronoun_strip ( object_pronoun (local -> sex2 ), scratch , sizeof scratch ), -1 );
107- str_replace (& tmp , "~9" , pronoun_strip ( possessive_pronoun (local -> sex2 ), scratch , sizeof scratch ), -1 );
108- str_replace (& tmp , "~8" , pronoun_strip ( subject_pronoun (local -> sex1 ), scratch , sizeof scratch ), -1 );
109- str_replace (& tmp , "~7" , pronoun_strip ( object_pronoun (local -> sex1 ), scratch , sizeof scratch ), -1 );
110- str_replace (& tmp , "~6" , pronoun_strip ( possessive_pronoun (local -> sex1 ), scratch , sizeof scratch ), -1 );
92+ str_replace (& tmp , "~11" , subject_pronoun (local -> sex2 ), -1 );
93+ str_replace (& tmp , "~10" , object_pronoun (local -> sex2 ), -1 );
94+ str_replace (& tmp , "~9" , possessive_pronoun (local -> sex2 ), -1 );
95+ str_replace (& tmp , "~8" , subject_pronoun (local -> sex1 ), -1 );
96+ str_replace (& tmp , "~7" , object_pronoun (local -> sex1 ), -1 );
97+ str_replace (& tmp , "~6" , possessive_pronoun (local -> sex1 ), -1 );
11198 str_replace (& tmp , "~5" , "Stadium" , -1 );
112- str_replace (& tmp , "~4" , pronoun_strip ( lang_get_offset (LangRobot , local -> har2 ), scratch , sizeof scratch ), -1 );
113- str_replace (& tmp , "~3" , pronoun_strip ( lang_get_offset (LangRobot , local -> har1 ), scratch , sizeof scratch ), -1 );
99+ str_replace (& tmp , "~4" , lang_get_offset (LangRobot , local -> har2 ), -1 );
100+ str_replace (& tmp , "~3" , lang_get_offset (LangRobot , local -> har1 ), -1 );
114101 str_replace (& tmp , "~2" , str_c (& local -> pilot2 ), -1 );
115102 str_replace (& tmp , "~1" , str_c (& local -> pilot1 ), -1 );
116103
@@ -123,6 +110,7 @@ void newsroom_fixup_str(newsroom_local *local) {
123110void newsroom_set_names (newsroom_local * local , const char * pilot1 , const char * pilot2 , int har1 , int har2 , int sex1 ,
124111 int sex2 ) {
125112
113+ // XXX TODO: Magnus: put pilot names in title case
126114 str_from_c (& local -> pilot1 , pilot1 );
127115 str_from_c (& local -> pilot2 , pilot2 );
128116 local -> har1 = har1 ;
0 commit comments