| 1 | /* $Id$ */ |
|---|
| 2 | /* |
|---|
| 3 | * FedStage DRMAA for PBS Pro |
|---|
| 4 | * Copyright (C) 2006-2009 FedStage Systems |
|---|
| 5 | * |
|---|
| 6 | * This program is free software: you can redistribute it and/or modify |
|---|
| 7 | * it under the terms of the GNU General Public License as published by |
|---|
| 8 | * the Free Software Foundation, either version 3 of the License, or |
|---|
| 9 | * (at your option) any later version. |
|---|
| 10 | * |
|---|
| 11 | * This program is distributed in the hope that it will be useful, |
|---|
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 14 | * GNU General Public License for more details. |
|---|
| 15 | * |
|---|
| 16 | * You should have received a copy of the GNU General Public License |
|---|
| 17 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
|---|
| 18 | */ |
|---|
| 19 | |
|---|
| 20 | #ifndef __PBS_DRMAA__UTIL_H |
|---|
| 21 | #define __PBS_DRMAA__UTIL_H |
|---|
| 22 | |
|---|
| 23 | #ifdef HAVE_CONFIG_H |
|---|
| 24 | # include <config.h> |
|---|
| 25 | #endif |
|---|
| 26 | |
|---|
| 27 | void pbsdrmaa_exc_raise_pbs( const char *function ); |
|---|
| 28 | int pbsdrmaa_map_pbs_errno( int _pbs_errno ); |
|---|
| 29 | |
|---|
| 30 | struct attrl; |
|---|
| 31 | |
|---|
| 32 | void pbsdrmaa_free_attrl( struct attrl *list ); |
|---|
| 33 | void pbsdrmaa_dump_attrl( |
|---|
| 34 | const struct attrl *attribute_list, const char *prefix ); |
|---|
| 35 | |
|---|
| 36 | /** |
|---|
| 37 | * Writes temporary file. |
|---|
| 38 | * @param content Buffer with content to write. |
|---|
| 39 | * @param len Buffer's length. |
|---|
| 40 | * @return Path to temporary file. |
|---|
| 41 | */ |
|---|
| 42 | char * |
|---|
| 43 | pbsdrmaa_write_tmpfile( const char *content, size_t len ); |
|---|
| 44 | |
|---|
| 45 | ssize_t |
|---|
| 46 | fsd_getline(char * line,ssize_t size, int fd); |
|---|
| 47 | |
|---|
| 48 | ssize_t |
|---|
| 49 | fsd_getline_buffered(char * line,char * buf, ssize_t size, int fd, int * idx, int * end_idx, int * line_idx); |
|---|
| 50 | |
|---|
| 51 | #endif /* __PBS_DRMAA__UTIL_H */ |
|---|
| 52 | |
|---|