Skip to content

Commit

Permalink
Missed a bit when merging this file. Patched to compile.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed May 25, 2004
1 parent 9d2ea42 commit e1adc6e
Showing 1 changed file with 38 additions and 1 deletion.
39 changes: 38 additions & 1 deletion platform_unix.c
Expand Up @@ -237,7 +237,44 @@ static char *find_info_plist_version(char *ptr)
} /* find_info_plist_version */


static int parse_info_dot_plist(const char *version)
/* !!! FIXME: Code duplication */
static char *find_info_plist_bundle_id(char *ptr)
{
int have_key = 0;
char *tag;
char *val;

while ( (ptr = parse_xml(ptr, &tag, &val)) != NULL )
{
if (have_key)
{
have_key = 0;
if (strcasecmp(tag, "string") == 0)
return(val);
} /* if */

if ((strcasecmp(tag, "plist") == 0) || (strcasecmp(tag, "dict") == 0))
{
ptr = val;
continue;
} /* if */

/* You should only use CFBundleShortVersionString, for various
* reasons not worth explaining here. CFBundleVersion is here
* for older products that need to update to the other tag.
*/
if (strcasecmp(tag,"key") == 0)
{
if (strcasecmp(val,"CFBundleIdentifier") == 0)
have_key = 1;
} /* if */
} /* while */

return(NULL);
} /* find_info_plist_version */


static int parse_info_dot_plist(const char *ident, const char *version)
{
const char *fname = "Contents/Info.plist"; // already chdir'd for this.
char *mem = NULL;
Expand Down

0 comments on commit e1adc6e

Please sign in to comment.