Plan 9 from Bell Labs’s /usr/web/sources/contrib/fgb/root/sys/src/cmd/4th/examples/udc.scr

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


( Conversion from UNIX ASCII files to DOS ASCII files - I)                                                                      : OpenFile                                                        args over over >r >r rot open error?                            if                                                                stdout use                                                      ." Cannot open "                                                r> r> type cr abort                                           else                                                              dup use r> r> drop drop                                       then                                                          ;                                                                                                                                                                                                                                                                                                                               ( Conversion from UNIX ASCII files to DOS ASCII files - II)                                                                     : OpenFiles                                                       argn 3 < abort" Usage: udc infile outfile"                      input  1 OpenFile                                               output 2 Openfile                                             ;                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               ( Conversion from UNIX ASCII files to DOS ASCII files - III)                                                                    : ProcessFile                                                     begin                                                             refill                                                        while                                                             0 parse                                                         type 13 emit 10 emit                                          repeat                                                        ;                                                                                                                               : Convert OpenFiles ProcessFile ;                                                                                               Convert                                                                                                                                                                                         

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.