~ubuntu-branches/debian/squeeze/sword/squeeze

« back to all changes in this revision

Viewing changes to olb/Getvrsn.c

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Glassey
  • Date: 2004-01-15 15:50:07 UTC
  • Revision ID: james.westby@ubuntu.com-20040115155007-n9mz4x0zxrs1isd3
Tags: upstream-1.5.7
ImportĀ upstreamĀ versionĀ 1.5.7

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include <online.dcl>
 
2
 
 
3
/*
 
4
  Get version id for display
 
5
 
 
6
  If triple verse A_B_C then
 
7
 
 
8
  Inputs:
 
9
      1 - returns "A"
 
10
      2 - returns "B"
 
11
      3 - returns "A_B"
 
12
      4 - returns "C"
 
13
      5 - returns "A_C"
 
14
      6 - returns "B_C"
 
15
      7 - returns "A_B_C"
 
16
*/
 
17
 
 
18
CHAR *GETVRSN(int version)
 
19
{
 
20
 extern struct zonline online;
 
21
 static CHAR versionid[16];
 
22
 
 
23
 X("Getvrsn");
 
24
 if (version < 1 || version > 7) then
 
25
    call ERROR("Version Id Invalid");
 
26
 versionid[0] = 0;
 
27
 if (version & 1) then
 
28
    {
 
29
     strcat(versionid, "_");
 
30
     STRCAT(versionid, &online.versions[0][0], 16, "Getrsn-1");
 
31
    }
 
32
 if (version & 2) then
 
33
    {
 
34
     if (online.versions[1][0] != 0) then
 
35
        {
 
36
         strcat(versionid, "_");
 
37
         STRCAT(versionid, &online.versions[1][0], 16, "Getrsn-2");
 
38
        }
 
39
    }
 
40
 if (version & 4) then
 
41
    {
 
42
     if (online.versions[2][0] != 0) then
 
43
        {
 
44
         strcat(versionid, "_");
 
45
         STRCAT(versionid, &online.versions[2][0], 16, "Getrsn-3");
 
46
        }
 
47
    }
 
48
 Y();
 
49
 return(&versionid[1]);
 
50
}