Changeset 42343 for branches/eam_branches/ipp-20220316/Ohana/src/opihi
- Timestamp:
- Jan 31, 2023, 10:55:31 AM (4 years ago)
- Location:
- branches/eam_branches/ipp-20220316/Ohana/src/opihi
- Files:
-
- 11 edited
- 2 moved
-
cmd.basic/memory.c (modified) (1 diff)
-
cmd.basic/test/stackmath.tp (moved) (moved from branches/eam_branches/ipp-20220316/Ohana/src/opihi/cmd.basic/test/stackmath.sh ) (1 diff)
-
cmd.data/read_vectors.c (modified) (1 diff)
-
cmd.data/test/histogram.sh (modified) (2 diffs)
-
cmd.data/test/join.sh (modified) (1 diff)
-
cmd.data/wd.c (modified) (2 diffs)
-
cmd.data/write_vectors.c (modified) (1 diff)
-
dvo/aregion.c (modified) (1 diff)
-
dvo/find_regions.c (modified) (1 diff)
-
lib.shell/VectorIO.c (modified) (1 diff)
-
lib.shell/expand_vectors.c (modified) (3 diffs)
-
test/tap.tp (moved) (moved from branches/eam_branches/ipp-20220316/Ohana/src/opihi/cmd.basic/test/tap.sh )
-
test/tests.sh (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20220316/Ohana/src/opihi/cmd.basic/memory.c
r41341 r42343 27 27 if (!strcasecmp (argv[1], "checkfree")) { 28 28 ohana_memcheck (1); 29 return (TRUE); 30 } 31 if (!strcasecmp (argv[1], "stats")) { 32 OhanaMemstats memstats = ohana_memstats (0); 33 set_variable ("memory:Ntotal", memstats.Ntotal); 34 set_variable ("memory:Nbytes", memstats.Nbytes); 35 set_variable ("memory:Ngood", memstats.Ngood); 36 set_variable ("memory:Nbad", memstats.Nbad); 29 37 return (TRUE); 30 38 } -
branches/eam_branches/ipp-20220316/Ohana/src/opihi/cmd.basic/test/stackmath.tp
r42342 r42343 1 1 2 input tap.sh2 input ../../test/tap.tp 3 3 4 4 macro go -
branches/eam_branches/ipp-20220316/Ohana/src/opihi/cmd.data/read_vectors.c
r42082 r42343 385 385 if (!lineStatus && VERBOSE) { 386 386 char temp[32]; 387 strncpy (temp, c0, 32); 388 temp[31] = 0; 387 strncpy_nowarn (temp, c0, 31); 389 388 gprint (GP_ERR, "skip line %s\n\n", temp); 390 389 } -
branches/eam_branches/ipp-20220316/Ohana/src/opihi/cmd.data/test/histogram.sh
r20936 r42343 35 35 local i 36 36 37 list word -x "ps -p $PID -o rss" 38 $startmem = $word:1 37 create xhis 0 10 0.1 38 $i = 1 39 40 memory stats 41 $startmem = $memory:Ntotal 39 42 40 43 for i 0 1000 … … 42 45 end 43 46 44 list word -x "ps -p $PID -o rss"45 $endmem = $ word:147 memory stats 48 $endmem = $memory:Ntotal 46 49 47 50 $PASS = 1 -
branches/eam_branches/ipp-20220316/Ohana/src/opihi/cmd.data/test/join.sh
r36084 r42343 21 21 22 22 join ID1 ID2 23 24 mana: for i 0 index1[]25 >> echo index1[$i] index2[$i]26 >> end27 0 228 2 129 4 030 5 331 mana: join ID1 ID2 -outer32 mana: vectors33 N name size34 0 ID1 6 (INT)35 1 val1 6 (FLT)36 2 ID2 4 (INT)37 3 val 4 (FLT)38 4 index1 6 (INT)39 5 index2 4 (INT)40 mana: for i 0 index1[]41 >> echo index1[$i]42 >> end43 244 -145 146 -147 048 349 mana: echo ID1[2]50 351 mana: echo ID1[0] ID2[2]52 1 153 mana: for i 0 index1[]54 >> if (index1[$i] == -1) continue55 >> $N = index1[$i]56 >> echo $i index1[$i] ID1[$i] ID2[$N]57 >> end58 0 2 1 159 2 1 3 360 4 0 5 561 5 3 6 662 mana: for i 0 index2[]63 >> if (index2[$i] == -1) continue64 >> $N = index2[$i]65 >> echo $i index2[$i] ID2[$i] ID1[$N]66 >> end67 0 4 5 568 1 2 3 369 2 0 1 170 3 5 6 671 mana:72 73 # if ((xvec[1024] != 17) || (yvec[1024] != 100))74 # $PASS = 075 # echo "Value mismatch: xvec[1024] yvec[1024] (should be 17,100)"76 # end77 #78 # imhist -q buff xvec yvec -region 40 0 25 10 -range 0 1079 #80 # if ((xvec[1024] != 10) || (yvec[1024] != 100))81 # $PASS = 082 # echo "Value mismatch: xvec[1024] yvec[1024] (should be 10,100)"83 # end84 23 85 24 end -
branches/eam_branches/ipp-20220316/Ohana/src/opihi/cmd.data/wd.c
r41674 r42343 115 115 Ns = strlen (simple); 116 116 No = 80 - Ns; 117 strncpy (temp_header.buffer, simple, Ns);117 strncpy_nowarn (temp_header.buffer, simple, Ns); 118 118 memset (&temp_header.buffer[Ns], ' ', No); 119 119 } … … 275 275 return (f); 276 276 } 277 278 279 /// /* fix up header */280 /// {281 /// static char simple[] = "XTENSION= 'IMAGE ' / Image extension";282 /// int Ns, No;283 /// Ns = strlen (simple);284 /// No = 80 - Ns;285 /// strncpy (temp_header.buffer, simple, Ns);286 /// memset (&temp_header.buffer[Ns], ' ', No);287 /// }288 ///289 /// /* position to end of file to write new extend */290 /// fseeko (f, 0LL, SEEK_END);291 /// nbytes = fwrite (temp_header.buffer, 1, temp_header.datasize, f);292 /// fclose (f);293 /// if (nbytes != temp_header.datasize) {294 /// gprint (GP_ERR, "failed to write file\n");295 /// status = FALSE;296 /// goto done1;297 /// }298 ///299 /// } -
branches/eam_branches/ipp-20220316/Ohana/src/opihi/cmd.data/write_vectors.c
r42166 r42343 214 214 /* identify type (%NNNNd %NNNNf) */ 215 215 for (p2 = p1 + 1; (*p2 == '.') || (*p2 == '-') || (*p2 == '+') || (*p2 == ' ') || isdigit(*p2); p2++); 216 strncpy (fmtlist[j], p0, p2 - p0 + 1);216 strncpy_nowarn (fmtlist[j], p0, p2 - p0 + 1); 217 217 switch (*p2) { 218 218 case 'e': -
branches/eam_branches/ipp-20220316/Ohana/src/opihi/dvo/aregion.c
r27435 r42343 49 49 fread (buffer, 1, 48*NDecLines[NBigDec], f); 50 50 for (i = 0; !done && (i < NDecLines[NBigDec]); i++) { 51 strncpy (temp, &buffer[i*48], 48); 52 temp[49] = 0; 51 strncpy_nowarn (temp, &buffer[i*48], 48); 53 52 hstgsc_hms_to_deg (&RA0, &RA1, &DEC0, &DEC1, &temp[7]); 54 53 if (RA1 < RA0) RA1 += 360.0; -
branches/eam_branches/ipp-20220316/Ohana/src/opihi/dvo/find_regions.c
r27435 r42343 100 100 fread (buffer, 48*NDecLines[NBigDec + j], 1, f); 101 101 for (i = 0; (i < NDecLines[NBigDec + j]); i++) { 102 strncpy (temp, &buffer[i*48], 48); 103 temp[49] = 0; 102 strncpy_nowarn (temp, &buffer[i*48], 48); 104 103 hstgsc_hms_to_deg (&RA0, &RA1, &DEC0, &DEC1, &temp[7]); 105 104 if (RA1 < RA0) RA1 += 360.0; -
branches/eam_branches/ipp-20220316/Ohana/src/opihi/lib.shell/VectorIO.c
r42166 r42343 261 261 memset (endptr, ' ', FT_LINE_LENGTH); 262 262 263 strncpy (endptr, newline, 80);263 strncpy_nowarn (endptr, newline, 80); 264 264 endptr += FT_LINE_LENGTH; 265 265 -
branches/eam_branches/ipp-20220316/Ohana/src/opihi/lib.shell/expand_vectors.c
r42165 r42343 51 51 52 52 n = L - line; 53 strncpy (newline, line, n);53 strncpy_nowarn (newline, line, n); 54 54 N = newline + n; 55 55 J = 0; … … 256 256 257 257 n = (int) (w - L); 258 strncpy (N, L, n);258 strncpy_nowarn (N, L, n); 259 259 N += n; 260 260 n = strlen (strValue); 261 strncpy (N, strValue, n);261 strncpy_nowarn (N, strValue, n); 262 262 N += n; 263 263 L = q + 1; … … 274 274 275 275 n = strlen (L); 276 strncpy (N, L, n); 277 N[n] = 0; 276 strncpy_nowarn (N, L, n); 278 277 free (line); 279 278 return (newline); -
branches/eam_branches/ipp-20220316/Ohana/src/opihi/test/tests.sh
r41470 r42343 53 53 for Tj 0 $testscripts:n 54 54 if ($VERBOSE > 1) 55 echo " running $testscripts:$Tj"55 echo " ----- running $testscripts:$Tj -----" 56 56 end 57 57 runtests $testscripts:$Tj
Note:
See TracChangeset
for help on using the changeset viewer.
