diff --git a/tdishr/TdiIo.c b/tdishr/TdiIo.c index 3df35d0059..66729c504e 100644 --- a/tdishr/TdiIo.c +++ b/tdishr/TdiIo.c @@ -182,6 +182,27 @@ int Tdi1Fclose(opcode_t opcode __attribute__((unused)), return TdiPutLong((int *)&err, out_ptr); } +mdsdsc_t * Tdi3SeekSet() +{ + static const int value = SEEK_SET; + static const mdsdsc_t constant = { sizeof(value), DTYPE_L, CLASS_S, (char *)&value }; + return (mdsdsc_t *)&constant; +} + +mdsdsc_t * Tdi3SeekCur() +{ + static const int value = SEEK_CUR; + static const mdsdsc_t constant = { sizeof(value), DTYPE_L, CLASS_S, (char *)&value }; + return (mdsdsc_t *)&constant; +} + +mdsdsc_t * Tdi3SeekEnd() +{ + static const int value = SEEK_END; + static const mdsdsc_t constant = { sizeof(value), DTYPE_L, CLASS_S, (char *)&value }; + return (mdsdsc_t *)&constant; +} + /*---------------------------------------------- Specify position of file pointer. err = FSEEK(unit, offset, origin) diff --git a/tdishr/opcodes.csv b/tdishr/opcodes.csv index 15827f8811..a24e92e851 100644 --- a/tdishr/opcodes.csv +++ b/tdishr/opcodes.csv @@ -460,3 +460,6 @@ "458","List","LIST","List","undef","undef","XX","YY","XX","YY","0","254","OK+I+S","%f9+ [a..z1:z2:dz..n@[this]]" "459","Squeeze","SQUEEZE","Reshape","undef","undef","XX","YY","XX","YY","1","2","OK","%f9+ squeeze(array, [min ndim]) " "460","Flatten","FLATTEN","Reshape","undef","undef","XX","YY","XX","YY","1","1","OK","%f9+ flatten(array) " +"461","SeekSet","$SEEK_SET","Constant","undef","SeekSet","VV","VV","VV","VV","0","0","CONST","SEEK_SET" +"462","SeekCur","$SEEK_CUR","Constant","undef","SeekCur","VV","VV","VV","VV","0","0","CONST","SEEK_CUR" +"463","SeekEnd","$SEEK_END","Constant","undef","SeekEnd","VV","VV","VV","VV","0","0","CONST","SEEK_END"