+ ISAMD_P rc=0;
+
+ int olddebug= is->method->debug;
+ if (ipos == 7320)
+ is->method->debug = 99; /*!*/
+
+ if ( filter_isempty(F) ) /* can be, if del-ins of the same */
+ {
+ if (is->method->debug >3)
+ logf(LOG_LOG,"isamd_appd: nothing to do for %d=",ipos);
+ filter_close(F);
+ ++(is->no_non);
+ return ipos; /* without doing anything at all */
+ }
+
+ if ( ( 0==ipos) && filter_only_one(F) )
+ {
+ struct it_key k;
+ int mode;
+ filter_read(F,&k,&mode);
+ assert(mode);
+ rc = singleton_encode(&k);
+ if (is->method->debug >9)
+ logf(LOG_LOG,"isamd_appd: singleton %d (%x)",
+ rc,rc);
+ if (rc)
+ is->no_singles++;
+ assert ( (rc==0) || is_singleton(rc) );
+ }
+ if ( 0==rc) /* either not single, or it did not fit */
+ {
+ rc = append_diffs(is,ipos,F);
+ assert ( ! is_singleton(rc) );
+ /* can happen if we run out of bits, so that block numbers overflow */
+ /* to SINGLETON_BIT */
+ }