X-Git-Url: http://git.ozlabs.org/?p=yaboot.git;a=blobdiff_plain;f=second%2Fiso_util.c;h=134163ba3361021bcbe819e0b9a616cb0048a932;hp=b8fca0440c3172b538bd84f3d72dde7bbefcc359;hb=58cb1681bd92b96efbf251e847214c2447533cce;hpb=f4ebbd9f7ea23e3f0fcbe098754580c220894628 diff --git a/second/iso_util.c b/second/iso_util.c index b8fca04..134163b 100644 --- a/second/iso_util.c +++ b/second/iso_util.c @@ -12,75 +12,81 @@ int isonum_711 (char * p) { - return (*p & 0xff); + return (*p & 0xff); } int isonum_712 (char * p) { - int val; + int val; - val = *p; - if (val & 0x80) - val |= 0xffffff00; - return (val); + val = *p; + if (val & 0x80) + val |= 0xffffff00; + return (val); } int isonum_721 (char * p) { - return ((p[0] & 0xff) | ((p[1] & 0xff) << 8)); + return ((p[0] & 0xff) | ((p[1] & 0xff) << 8)); } int isonum_722 (char * p) { - return (((p[0] & 0xff) << 8) | (p[1] & 0xff)); + return (((p[0] & 0xff) << 8) | (p[1] & 0xff)); } int isonum_723 (char * p) { #if 0 - if (p[0] != p[3] || p[1] != p[2]) { - fprintf (stderr, "invalid format 7.2.3 number\n"); - exit (1); - } + if (p[0] != p[3] || p[1] != p[2]) { + fprintf (stderr, "invalid format 7.2.3 number\n"); + exit (1); + } #endif - return (isonum_721 (p)); + return (isonum_721 (p)); } int isonum_731 (char * p) { - return ((p[0] & 0xff) - | ((p[1] & 0xff) << 8) - | ((p[2] & 0xff) << 16) - | ((p[3] & 0xff) << 24)); + return ((p[0] & 0xff) + | ((p[1] & 0xff) << 8) + | ((p[2] & 0xff) << 16) + | ((p[3] & 0xff) << 24)); } int isonum_732 (char * p) { - return (((p[0] & 0xff) << 24) - | ((p[1] & 0xff) << 16) - | ((p[2] & 0xff) << 8) - | (p[3] & 0xff)); + return (((p[0] & 0xff) << 24) + | ((p[1] & 0xff) << 16) + | ((p[2] & 0xff) << 8) + | (p[3] & 0xff)); } int isonum_733 (char * p) { #if 0 - int i; + int i; - for (i = 0; i < 4; i++) { - if (p[i] != p[7-i]) { - fprintf (stderr, "bad format 7.3.3 number\n"); - exit (1); - } - } + for (i = 0; i < 4; i++) { + if (p[i] != p[7-i]) { + fprintf (stderr, "bad format 7.3.3 number\n"); + exit (1); + } + } #endif - return (isonum_731 (p)); + return (isonum_731 (p)); } +/* + * Local variables: + * c-file-style: "k&r" + * c-basic-offset: 8 + * End: + */