File: maxint.c

package info (click to toggle)
meschach 1.2b-12
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, sarge
  • size: 1,264 kB
  • ctags: 1,749
  • sloc: ansic: 21,958; makefile: 482; sh: 4
file content (38 lines) | stat: -rw-r--r-- 1,257 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38

/**************************************************************************
**
** Copyright (C) 1993 David E. Steward & Zbigniew Leyk, all rights reserved.
**
**			     Meschach Library
** 
** This Meschach Library is provided "as is" without any express 
** or implied warranty of any kind with respect to this software. 
** In particular the authors shall not be liable for any direct, 
** indirect, special, incidental or consequential damages arising 
** in any way from use of the software.
** 
** Everyone is granted permission to copy, modify and redistribute this
** Meschach Library, provided:
**  1.  All copies contain this copyright notice.
**  2.  All modified copies shall carry a notice stating who
**      made the last modification and the date of such modification.
**  3.  No charge is made for this software or works derived from it.  
**      This clause shall not be construed as constraining other software
**      distributed on the same medium as this software, nor is a
**      distribution fee considered a charge.
**
***************************************************************************/


main()
{
    int		i, old_i;

    i = 1;
    while ( i > 0 )
    {
	old_i = i;
	i = (i << 1) | 1;
    }
    printf("%d\n", old_i);
}