Isis 3.0 Application Source Code Reference |
Home |
00001 /* 00002 NOTICE 00003 00004 The software accompanying this notice (the "Software") is provided to you 00005 free of charge to facilitate your use of the data collected by the Mars 00006 Orbiter Camera (the "MOC Data"). Malin Space Science Systems ("MSSS") 00007 grants to you (either as an individual or entity) a personal, 00008 non-transferable, and non-exclusive right (i) to use and reproduce the 00009 Software solely for the purpose of accessing the MOC Data; (ii) to modify 00010 the source code of the Software as necessary to maintain or adapt the 00011 Software to run on alternate computer platforms; and (iii) to compile, use 00012 and reproduce the modified versions of the Software solely for the purpose 00013 of accessing the MOC Data. In addition, you may distribute the Software, 00014 including any modifications thereof, solely for use with the MOC Data, 00015 provided that (i) you must include this notice with all copies of the 00016 Software to be distributed; (ii) you may not remove or alter any 00017 proprietary notices contained in the Software; (iii) you may not charge any 00018 third party for the Software; and (iv) you will not export the Software 00019 without the appropriate United States and foreign government licenses. 00020 00021 You acknowledge that no title to the intellectual property in the Software 00022 is transferred to you. You further acknowledge that title and full 00023 ownership rights to the Software will remain the exclusive property of MSSS 00024 or its suppliers, and you will not acquire any rights to the Software 00025 except as expressly set forth above. The Software is provided to you AS 00026 IS. MSSS MAKES NO WARRANTY, EXPRESS OR IMPLIED, WITH RESPECT TO THE 00027 SOFTWARE, AND SPECIFICALLY DISCLAIMS THE IMPLIED WARRANTIES OF 00028 NON-INFRINGEMENT OF THIRD PARTY RIGHTS, MERCHANTABILITY AND FITNESS FOR A 00029 PARTICULAR PURPOSE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR 00030 LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO SUCH LIMITATIONS OR 00031 EXCLUSIONS MAY NOT APPLY TO YOU. 00032 00033 Your use or reproduction of the Software constitutes your agreement to the 00034 terms of this Notice. If you do not agree with the terms of this notice, 00035 promptly return or destroy all copies of the Software in your possession. 00036 00037 Copyright (C) 1999 Malin Space Science Systems. All Rights Reserved. 00038 */ 00039 //static char *sccsid = "@(#)readGroups.c 1.1 10/04/99"; 00040 #if (!defined(NOSCCSID) && (!defined(LINT))) 00041 #endif 00042 /* 00043 * DESCRIPTION 00044 * 00045 * COMMENTARY 00046 */ 00047 00048 #include <stdio.h> 00049 #include <stdlib.h> 00050 00051 #include "fs.h" 00052 00053 #include "readBits.h" 00054 #include "readGroups.h" 00055 00056 extern void exit(); 00057 00058 uint32 *readGroups(register uint32 numBlocks, register BITSTRUCT *bitStuff) 00059 { 00060 register uint32 block; 00061 uint32 *groups; 00062 register uint32 *scanGroups; 00063 00064 if((groups = (uint32 *)malloc((uint32)(numBlocks * sizeof(*groups)))) == NULL) { 00065 (void)fprintf(stderr, "Not enough memory for decoding of image\n"); 00066 exit(1); 00067 }; 00068 00069 scanGroups = groups; 00070 00071 for(block = 0; block < numBlocks; block++) { 00072 *(scanGroups++) = readBits(3, bitStuff); 00073 }; 00074 00075 return(groups); 00076 }