~ubuntu-branches/ubuntu/trusty/xscreensaver/trusty

« back to all changes in this revision

Viewing changes to hacks/glx/molecule.c

  • Committer: Bazaar Package Importer
  • Author(s): Robert Ancell
  • Date: 2009-11-30 13:33:13 UTC
  • mfrom: (1.1.8 upstream) (2.1.6 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091130133313-3b5nz2e7hvbb8h3l
Tags: 5.10-3ubuntu1
* Merge with Debian unstable, remaining changes: (LP: #489062)
  - debian/control: add Build-Depends on ubuntu-artwork
  - debian/rules: use /usr/share/backgrounds
  - debian/control: Move xli | xloadimage recommends to suggests
  - debian/split-hacks.config: Use different set of default hacks to Debian
  - debian/source_xscreensaver.py: Add apport hook
  - debian/patches/53_XScreenSaver.ad.in.patch: Use Ubuntu branding

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
/* Documentation on the PDB file format:
15
15
   http://en.wikipedia.org/wiki/Protein_Data_Bank_%28file_format%29
16
16
   http://www.wwpdb.org/docs.html
 
17
   http://www.wwpdb.org/documentation/format32/v3.2.html
 
18
   http://www.wwpdb.org/documentation/format32/sect9.html
17
19
   http://www.rcsb.org/pdb/file_formats/pdb/pdbguide2.2/guide2.2_frame.html
18
20
 
19
21
   Good source of PDB files:
752
754
      else if (!strncmp (s, "ATOM   ", 7))
753
755
        {
754
756
          int id;
 
757
          const char *end = strchr (s, '\n');
 
758
          int L = end - s;
755
759
          char *name = (char *) calloc (1, 4);
756
760
          GLfloat x = -999, y = -999, z = -999;
757
761
 
758
762
          if (1 != sscanf (s+7, " %d ", &id))
759
763
            parse_error (filename, line, s);
760
764
 
 
765
          /* Use the "atom name" field if that is all that is available. */
761
766
          strncpy (name, s+12, 3);
 
767
 
 
768
          /* But prefer the "element" field. */
 
769
          if (L > 77 && !isspace(s[77])) {
 
770
            /* fprintf(stderr, "  \"%s\" -> ", name); */
 
771
            name[0] = s[76];
 
772
            name[1] = s[77];
 
773
            name[2] = 0;
 
774
            /* fprintf(stderr, "\"%s\"\n", name); */
 
775
          }
 
776
 
762
777
          while (isspace(*name)) name++;
763
778
          ss = name + strlen(name)-1;
764
779
          while (isspace(*ss) && ss > name)