~ubuntu-branches/ubuntu/saucy/orbit2/saucy-proposed

« back to all changes in this revision

Viewing changes to src/idl-compiler/orbit-idl-c-headers.c

  • Committer: Bazaar Package Importer
  • Author(s): Sebastian Dröge
  • Date: 2010-04-08 12:27:40 UTC
  • mfrom: (1.2.18 upstream)
  • Revision ID: james.westby@ubuntu.com-20100408122740-wf9bxam9p02g2fiq
Tags: 1:2.14.18-0.1
* Non-maintainer upload.
* New upstream bugfix release, one API addition:
  + debian/patches/700-autoreconf.patch:
    - Regenerated for the new version.

Show diffs side-by-side

added added

removed removed

Lines of Context:
574
574
ch_output_codefrag(IDL_tree tree, OIDL_Run_Info *rinfo, OIDL_C_Info *ci)
575
575
{
576
576
  GSList *list;
 
577
  char *ctmp;
577
578
 
578
579
  for(list = IDL_CODEFRAG(tree).lines; list;
579
580
      list = g_slist_next(list)) {
580
 
    if(!strncmp(list->data,
581
 
                "#pragma include_defs",
582
 
                sizeof("#pragma include_defs")-1)) {
583
 
        char *ctmp, *cte;
584
 
        ctmp = ((char *)list->data) + sizeof("#pragma include_defs");
585
 
        while(*ctmp && (isspace((int)*ctmp) || *ctmp == '"')) ctmp++;
586
 
        cte = ctmp;
587
 
        while(*cte && !isspace((int)*cte) && *cte != '"') cte++;
588
 
        *cte = '\0';
589
 
      fprintf(ci->fh, "#include <%s>\n", ctmp);
590
 
    } else
591
 
      fprintf(ci->fh, "%s\n", (char *)list->data);
 
581
    ctmp = list->data;
 
582
    if(!strncmp(ctmp, "#pragma", sizeof("#pragma")-1)) {
 
583
      ctmp += sizeof("#pragma")-1;
 
584
      if (*ctmp && (isspace((int)*ctmp))) {
 
585
        while(*ctmp && (isspace((int)*ctmp))) ctmp++;
 
586
        if(!strncmp(ctmp, "include_defs", sizeof("include_defs")-1)) {
 
587
          char *cte;
 
588
 
 
589
          ctmp += sizeof("include_defs")-1;
 
590
          while(*ctmp && (isspace((int)*ctmp) || *ctmp == '"')) ctmp++;
 
591
          cte = ctmp;
 
592
          while(*cte && !isspace((int)*cte) && *cte != '"') cte++;
 
593
          *cte = '\0';
 
594
          fprintf(ci->fh, "#include <%s>\n", ctmp);
 
595
          continue;
 
596
        }
 
597
      }
 
598
    }
 
599
    fprintf(ci->fh, "%s\n", (char *)list->data);
592
600
  }
593
601
}
594
602