encode(file,ts,Nb,Ne,exports,foreigns,done) {|| stdio:printf("Warning: ptn_encode:encode(): No longer supported\n", {}, _) /*** DEAD CODE ** sys:hash(256,Nb), co_en:encode(ts,Ne,instructions), co_old_mod:model(file,instructions,instructions1,moddone), co_old_ass:assemble(foreigns,exports,instructions1,module), extension(file,file1,".pam"), {? data(moddone) -> {; out(file1,module,pamdone) } }, { ? data(moddone), pamdone==0 -> {|| stdio:printf("Written: %s\n", {file1}, done) }, default -> {; done=[] } } */ } extension(f,f1,ext) {|| sys:string_to_list(f,lb,lm), sys:string_to_list(ext,lm,[]), sys:list_to_string(lb,f1) } #ifdef TARGET1 out(of,mod,done) int f; { ? char(of) -> { ; open_file(of,f), out1(of,f,mod,done)}, default -> {; done=1 } } out1(of,f,cs,done) int f; { ? cs ?= [c|cs1], int(c) -> { ; write_char(f,c), out1(of,f,cs1,done)}, cs ?= [], char(of) -> {|| close_file(f), done=0}, default -> {|| close_file(f), stdio:printf("Bad output data\n",{},done) } } #endif TARGET1