@@ -48,14 +48,6 @@ static int output_stream = -1;
48
48
/* How long to wait between displaying duplicate show_help notices */
49
49
static struct timeval show_help_interval = {5 , 0 };
50
50
51
- typedef struct pmix_log_info_t {
52
-
53
- pmix_info_t * info ;
54
- pmix_info_t * dirs ;
55
- char * msg ;
56
-
57
- } pmix_log_info_t ;
58
-
59
51
static void show_help_cbfunc (pmix_status_t status , void * cbdata )
60
52
{
61
53
pmix_query_caddy_t * cd = (pmix_query_caddy_t * ) cbdata ;
@@ -66,7 +58,9 @@ static void show_help_cbfunc(pmix_status_t status, void *cbdata)
66
58
PMIX_RELEASE (cd );
67
59
}
68
60
69
- static void local_delivery (const char * file , const char * topic , char * msg )
61
+ static void local_delivery (const char * file ,
62
+ const char * topic ,
63
+ const char * msg )
70
64
{
71
65
pmix_shift_caddy_t * cd ;
72
66
@@ -148,7 +142,7 @@ static const char *dash_line
148
142
= "--------------------------------------------------------------------------\n" ;
149
143
static char * * search_dirs = NULL ;
150
144
151
- static int match (const char * a , const char * b )
145
+ static pmix_status_t match (const char * a , const char * b )
152
146
{
153
147
int rc = PMIX_ERROR ;
154
148
char * p1 , * p2 , * tmp1 = NULL , * tmp2 = NULL ;
@@ -194,7 +188,7 @@ static int match(const char *a, const char *b)
194
188
}
195
189
196
190
197
- static int pmix_get_tli (const char * filename , const char * topic , tuple_list_item_t * * tli_ )
191
+ static pmix_status_t pmix_get_tli (const char * filename , const char * topic , tuple_list_item_t * * tli_ )
198
192
{
199
193
tuple_list_item_t * tli = * tli_ ;
200
194
@@ -261,7 +255,7 @@ static void pmix_show_accumulated_duplicates(int fd, short event, void *context)
261
255
}
262
256
263
257
264
- int pmix_help_check_dups (const char * filename , const char * topic )
258
+ pmix_status_t pmix_help_check_dups (const char * filename , const char * topic )
265
259
{
266
260
267
261
tuple_list_item_t * tli ;
@@ -324,7 +318,7 @@ int pmix_help_check_dups(const char *filename, const char *topic)
324
318
/*
325
319
* Local functions
326
320
*/
327
- int pmix_show_help_init (char * helpdir )
321
+ pmix_status_t pmix_show_help_init (char * helpdir )
328
322
{
329
323
pmix_output_stream_t lds ;
330
324
@@ -341,7 +335,7 @@ int pmix_show_help_init(char *helpdir)
341
335
return PMIX_SUCCESS ;
342
336
}
343
337
344
- int pmix_show_help_finalize (void )
338
+ pmix_status_t pmix_show_help_finalize (void )
345
339
{
346
340
pmix_output_close (output_stream );
347
341
output_stream = -1 ;
@@ -361,7 +355,7 @@ int pmix_show_help_finalize(void)
361
355
* efficient method in the world, but we're going for clarity here --
362
356
* not optimization. :-)
363
357
*/
364
- static int array2string (char * * outstring , int want_error_header , char * * lines )
358
+ static pmix_status_t array2string (char * * outstring , int want_error_header , char * * lines )
365
359
{
366
360
int i , count ;
367
361
size_t len ;
@@ -407,7 +401,7 @@ static int array2string(char **outstring, int want_error_header, char **lines)
407
401
/*
408
402
* Find the right file to open
409
403
*/
410
- static int open_file (const char * base , const char * topic )
404
+ static pmix_status_t open_file (const char * base , const char * topic )
411
405
{
412
406
char * filename ;
413
407
char * err_msg = NULL ;
@@ -483,7 +477,7 @@ static int open_file(const char *base, const char *topic)
483
477
* In the file that has already been opened, find the topic that we're
484
478
* supposed to output
485
479
*/
486
- static int find_topic (const char * base , const char * topic )
480
+ static pmix_status_t find_topic (const char * base , const char * topic )
487
481
{
488
482
int token , ret ;
489
483
char * tmp ;
@@ -528,7 +522,7 @@ static int find_topic(const char *base, const char *topic)
528
522
* We have an open file, and we're pointed at the right topic. So
529
523
* read in all the lines in the topic and make a list of them.
530
524
*/
531
- static int read_topic (char * * * array )
525
+ static pmix_status_t read_topic (char * * * array )
532
526
{
533
527
int token , rc ;
534
528
@@ -551,7 +545,7 @@ static int read_topic(char ***array)
551
545
/* Never get here */
552
546
}
553
547
554
- static int load_array (char * * * array , const char * filename , const char * topic )
548
+ static pmix_status_t load_array (char * * * array , const char * filename , const char * topic )
555
549
{
556
550
int ret ;
557
551
@@ -612,7 +606,8 @@ char *pmix_show_help_string(const char *filename, const char *topic, int want_er
612
606
return output ;
613
607
}
614
608
615
- int pmix_show_vhelp (const char * filename , const char * topic , int want_error_header , va_list arglist )
609
+ pmix_status_t pmix_show_vhelp (const char * filename , const char * topic ,
610
+ int want_error_header , va_list arglist )
616
611
{
617
612
char * output ;
618
613
@@ -627,7 +622,8 @@ int pmix_show_vhelp(const char *filename, const char *topic, int want_error_head
627
622
return (NULL == output ) ? PMIX_ERROR : PMIX_SUCCESS ;
628
623
}
629
624
630
- int pmix_show_help (const char * filename , const char * topic , int want_error_header , ...)
625
+ pmix_status_t pmix_show_help (const char * filename , const char * topic ,
626
+ int want_error_header , ...)
631
627
{
632
628
va_list arglist ;
633
629
char * output ;
@@ -645,8 +641,16 @@ int pmix_show_help(const char *filename, const char *topic, int want_error_heade
645
641
return PMIX_SUCCESS ;
646
642
}
647
643
648
- int pmix_show_help_add_dir (const char * directory )
644
+ pmix_status_t pmix_show_help_add_dir (const char * directory )
649
645
{
650
646
pmix_argv_append_nosize (& search_dirs , directory );
651
647
return PMIX_SUCCESS ;
652
648
}
649
+
650
+ pmix_status_t pmix_show_help_norender (const char * filename ,
651
+ const char * topic ,
652
+ const char * output )
653
+ {
654
+ local_delivery (filename , topic , output );
655
+ return PMIX_SUCCESS ;
656
+ }
0 commit comments