Doxygen Source Code Documentation
close.c File Reference
#include "stdlib.h"#include "f2c.h"#include "fio.h"Go to the source code of this file.
Defines | |
| #define | unlink remove |
Functions | |
| integer | f_clos (cllist *a) |
| void | f_exit (void) |
| int | flush_ (void) |
Define Documentation
|
|
Definition at line 13 of file close.c. Referenced by close_backing_store(), COMPRESS_unlink(), DCM_CloseObject(), exit_me_baby(), f_clos(), ISQ_saver_CB(), main(), ncio_close(), NI_read_URL_tmpdir(), read_URL_ftp(), read_URL_http(), read_URL_tmpdir(), t_runc(), THD_delete_3dim_dataset(), THD_fetch_1D(), THD_fetch_dataset(), THD_open_3dcalc(), and Un_link_all(). |
Function Documentation
|
|
Definition at line 27 of file close.c. References a, free, MXUNIT, t_runc(), unit::uend, unit::ufd, unit::ufnm, unlink, unit::uscrtch, and unit::uwrt. Referenced by f_exit(), f_open(), and MAIN__().
00029 { unit *b;
00030
00031 if(a->cunit >= MXUNIT) return(0);
00032 b= &f__units[a->cunit];
00033 if(b->ufd==NULL)
00034 goto done;
00035 if (!a->csta)
00036 if (b->uscrtch == 1)
00037 goto Delete;
00038 else
00039 goto Keep;
00040 switch(*a->csta) {
00041 default:
00042 Keep:
00043 case 'k':
00044 case 'K':
00045 if(b->uwrt == 1)
00046 t_runc((alist *)a);
00047 if(b->ufnm) {
00048 fclose(b->ufd);
00049 free(b->ufnm);
00050 }
00051 break;
00052 case 'd':
00053 case 'D':
00054 Delete:
00055 if(b->ufnm) {
00056 fclose(b->ufd);
00057 unlink(b->ufnm); /*SYSDEP*/
00058 free(b->ufnm);
00059 }
00060 }
00061 b->ufd=NULL;
00062 done:
00063 b->uend=0;
00064 b->ufnm=NULL;
00065 return(0);
00066 }
|
|
|
Definition at line 71 of file close.c. References cllist::cerr, cllist::csta, cllist::cunit, f_clos(), i, and MXUNIT. Referenced by exit_(), main(), s_1paus(), and s_stop().
|
|
|
Definition at line 89 of file close.c.
|