Ignore:
Timestamp:
Oct 12, 2023, 10:30:22 AM (15 months ago)
Author:
slebonnois
Message:

BBT : Update for the titan microphysics and cloud model

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.TITAN/libf/muphytitan/csystem.h

    r1897 r3083  
    1 /* Copyright Jérémie Burgalat (2010-2015,2017)
    2  *
    3  * jeremie.burgalat@univ-reims.fr
    4  *
    5  * This software is a computer program whose purpose is to provide configuration
    6  * file and command line arguments parsing features to Fortran programs.
    7  *
    8  * This software is governed by the CeCILL-B license under French law and
    9  * abiding by the rules of distribution of free software.  You can  use,
    10  * modify and/ or redistribute the software under the terms of the CeCILL-B
    11  * license as circulated by CEA, CNRS and INRIA at the following URL
    12  * "http://www.cecill.info".
    13  *
    14  * As a counterpart to the access to the source code and  rights to copy,
    15  * modify and redistribute granted by the license, users are provided only
    16  * with a limited warranty  and the software's author,  the holder of the
    17  * economic rights,  and the successive licensors  have only  limited
    18  * liability.
    19  *
    20  * In this respect, the user's attention is drawn to the risks associated
    21  * with loading,  using,  modifying and/or developing or reproducing the
    22  * software by the user in light of its specific status of free software,
    23  * that may mean  that it is complicated to manipulate,  and  that  also
    24  * therefore means  that it is reserved for developers  and  experienced
    25  * professionals having in-depth computer knowledge. Users are therefore
    26  * encouraged to load and test the software's suitability as regards their
    27  * requirements in conditions enabling the security of their systems and/or
    28  * data to be ensured and,  more generally, to use and operate it in the
    29  * same conditions as regards security.
    30  *
    31  * The fact that you are presently reading this means that you have had
    32  * knowledge of the CeCILL-B license and that you accept its terms.
     1/*
     2 * Copyright (c) (2013-2015,2017) Jeremie Burgalat (jeremie.burgalat@univ-reims.fr).
     3 *
     4 * This file is part of SWIFT
     5 *
     6 * Permission is hereby granted, free of charge, to any person obtaining a copy of
     7 * this software and associated documentation files (the "Software"), to deal in
     8 * the Software without restriction, including without limitation the rights to
     9 * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
     10 * the Software, and to permit persons to whom the Software is furnished to do so,
     11 * subject to the following conditions:
     12 *
     13 * The above copyright notice and this permission notice shall be included in all
     14 * copies or substantial portions of the Software.
     15 *
     16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
     17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
     18 * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
     19 * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
     20 * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
     21 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
    3322 */
    3423
     
    4332int c_umask();
    4433
    45 /** 
    46  * Get directory name of input path 
     34/**
     35 * Get directory name of input path
    4736 * @param[in] in A C string with the input path
    4837 * @return A pointer to a char array with the directory name of @bti{input} path.
    4938 * @note On error, a NULL pointer is returned.
    50  * @warning In any case, the returned pointer must be freed in the Fortran counterpart 
     39 * @warning In any case, the returned pointer must be freed in the Fortran counterpart
    5140 * (using fsystem::free_c).
    5241 */
    5342char * c_dirname(const char *in);
    5443
    55 /** 
    56  * Get base name of input path 
     44/**
     45 * Get base name of input path
    5746 * @param[in] in A C string with the input path
    5847 * @return A pointer to a char array with the base name of @bti{input} path.
    5948 * @note On error, a NULL pointer is returned.
    60  * @warning In any case, the returned pointer must be freed in the Fortran counterpart 
     49 * @warning In any case, the returned pointer must be freed in the Fortran counterpart
    6150 * (using fsystem::free_c).
    6251 */
    6352char* c_basename(const char *in);
    6453
    65 /** 
     54/**
    6655 * Get the current working directory.
    6756 * @return A pointer to a char array with the current workind directory.
    6857 * @note On error, a NULL pointer is returned.
    69  * @warning In any case, the returned pointer must be freed in the Fortran counterpart 
     58 * @warning In any case, the returned pointer must be freed in the Fortran counterpart
    7059 * (using fsystem::free_c).
    7160 */
     
    7362
    7463
    75 /** 
     64/**
    7665 * Get the realpath of input path.
    7766 * @param[in] input A C string with the input path
    7867 * @return A pointer to a char array with the realpath of @bti{input} path.
    7968 * @note On error, a NULL pointer is returned.
    80  * @warning In any case, the returned pointer must be freed in the Fortran counterpart 
     69 * @warning In any case, the returned pointer must be freed in the Fortran counterpart
    8170 * (using fsystem::free_c).
    8271 */
     
    9180 * @return A pointer to a char array with the relative path.
    9281 * @note On error, a NULL pointer is returned.
    93  * @warning In any case, the returned pointer must be freed in the Fortran counterpart 
     82 * @warning In any case, the returned pointer must be freed in the Fortran counterpart
    9483 * (using fsystem::free_c).
    9584 */
     
    10190 * @return A pointer to a char array with the user name.
    10291 * @note On error, a NULL pointer is returned.
    103  * @warning In any case, the returned pointer must be freed in the Fortran counterpart 
     92 * @warning In any case, the returned pointer must be freed in the Fortran counterpart
    10493 * (using fsystem::free_c).
    10594 */
     
    111100 * @return A pointer to a char array with the group name.
    112101 * @note On error, a NULL pointer is returned.
    113  * @warning In any case, the returned pointer must be freed in the Fortran counterpart 
     102 * @warning In any case, the returned pointer must be freed in the Fortran counterpart
    114103 * (using fsystem::free_c).
    115104 */
     
    122111int c_get_errno();
    123112
    124 /** 
     113/**
    125114 * Get the error message of the given error id
    126115 * @param err An integer with the error id
    127116 * @return A pointer to a char array with the group name.
    128117 * @note On error, the hard-coded message "Unknown error" is returned.
    129  * @warning In any case, the returned pointer must be freed in the Fortran counterpart 
     118 * @warning In any case, the returned pointer must be freed in the Fortran counterpart
    130119 * (using fsystem::free_c).
    131120 */
     
    139128 * @return An integer with 0 on success, last errno on failure
    140129 */
    141 int c_mkdirp(const char *path, mode_t mode); 
     130int c_mkdirp(const char *path, mode_t mode);
    142131
    143132/**
     
    151140/**
    152141 * Change path permissions
    153  * @param path A string with the path 
     142 * @param path A string with the path
    154143 * @param mode A integer with the new permissions to set
    155144 * @return An integer with 0 on success, last errno on failure
     
    170159 *                 (as well as all the parent directorie created, if any).
    171160 * @return An integer with 0 on success, last errno on failure
    172  */ 
     161 */
    173162int c_mkdir(const char *path, mode_t mode);
    174163
     
    200189 * Remove a directory and its contents recursively
    201190 *
    202  * This method mimics 'rm -rf' command. 
     191 * This method mimics 'rm -rf' command.
    203192 * @param path A C string with the path of the directory to remove.
    204193 * @return An integer with 0 on success, last errno on failure
     
    208197/**
    209198 * Get some file informations
    210  * @note If the path cannot be "stat", most of the output parameters are set 
     199 * @note If the path cannot be "stat", most of the output parameters are set
    211200 * to -1.
    212201 * @param[in] p A C string with the path of a file (or directory)
    213  * @param[out] pe An int with the permissions of the path 
     202 * @param[out] pe An int with the permissions of the path
    214203 * @param[out] nl An int with the inumber of links
    215204 * @param[out] ty An int with the type of the file :
     
    219208 *    - 3 -> link to a directory
    220209 *    - 4 -> Other (fifo, socket, block special, char special ...)
    221  * @param[out] ui An int with the user id of the path 
    222  * @param[out] gi An int with the group id of the path 
    223  * @param[out] si An int with the size of the path 
     210 * @param[out] ui An int with the user id of the path
     211 * @param[out] gi An int with the group id of the path
     212 * @param[out] si An int with the size of the path
    224213 * @param[out] a A C string (20 chars wide, including NULL character) with the
    225214 * last access date
    226215 * @param[out] m A C string (20 chars wide, including NULL character) with the
    227216 * last modification date
    228  * @param[out] c A C string (20 chars wide, including NULL character) with the 
     217 * @param[out] c A C string (20 chars wide, including NULL character) with the
    229218 * creation date
    230  * @return An integer with 0 on success, last errno on failure 
    231  */
    232 int c_fstat(const char *p, int *pe, int *nl, int *ty, int *ui, int *gi, 
     219 * @return An integer with 0 on success, last errno on failure
     220 */
     221int c_fstat(const char *p, int *pe, int *nl, int *ty, int *ui, int *gi,
    233222            long *si, char a[20], char m[20], char c[20]);
    234223
     
    238227 * @param[in] perm An integer with the user's permission to check :
    239228 *   - 0 do not check for permissions
    240  *   - 1 check for execute permission 
     229 *   - 1 check for execute permission
    241230 *   - 2 check for write permission
    242231 *   - 4 check for read permission
     
    259248 * @param[out] rows Number of rows of the current terminal window
    260249 * @param[out] cols Number of columns of the current terminal window
    261  * @return An int with 0 on success, errno on failure. On failure, rows is set 
     250 * @return An int with 0 on success, errno on failure. On failure, rows is set
    262251 * to 80 and cols to 20.
    263252 */
Note: See TracChangeset for help on using the changeset viewer.