1
1

Allow lds==NULL on lam_output_open(), giving a default set of output

destinations (i.e., stderr)

This commit was SVN r1137.
Этот коммит содержится в:
Jeff Squyres 2004-05-19 19:52:24 +00:00
родитель e68af0dde8
Коммит e8e3646c9d
2 изменённых файлов: 10 добавлений и 0 удалений

Просмотреть файл

@ -328,6 +328,13 @@ static int do_open(int output_id, lam_output_stream_t *lds)
i = output_id; i = output_id;
} }
/* Special case: if we got NULL for lds, then just use the default
verbose */
if (NULL == lds) {
lds = &verbose;
}
/* Got a stream -- now initialize it and open relevant outputs */ /* Got a stream -- now initialize it and open relevant outputs */
info[i].ldi_used = true; info[i].ldi_used = true;

Просмотреть файл

@ -220,6 +220,9 @@ extern "C" {
* using it in successive calls to LAM_OUTPUT(), lam_output(), * using it in successive calls to LAM_OUTPUT(), lam_output(),
* lam_output_switch(), and lam_output_close(). * lam_output_switch(), and lam_output_close().
* *
* If lds is NULL, the default descriptions will be used, meaning
* that output will only be sent to stderr.
*
* It is safe to have multiple threads invoke this function * It is safe to have multiple threads invoke this function
* simultaneously; their execution will be serialized in an * simultaneously; their execution will be serialized in an
* unspecified manner. * unspecified manner.