1- /*
2- * Copyright (C) Jan 2019 Mellanox Technologies Ltd. All rights reserved.
3- *
1+ /*
2+ *
3+ * Copyright (c) 2010-2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
4+ *
45 * This software is available to you under a choice of one of two
56 * licenses. You may choose to be licensed under the terms of the GNU
67 * General Public License (GPL) Version 2, available from the file
78 * COPYING in the main directory of this source tree, or the
89 * OpenIB.org BSD license below:
9- *
10+ *
1011 * Redistribution and use in source and binary forms, with or
1112 * without modification, are permitted provided that the following
1213 * conditions are met:
13- *
14+ *
1415 * - Redistributions of source code must retain the above
1516 * copyright notice, this list of conditions and the following
1617 * disclaimer.
17- *
18+ *
1819 * - Redistributions in binary form must reproduce the above
1920 * copyright notice, this list of conditions and the following
2021 * disclaimer in the documentation and/or other materials
2122 * provided with the distribution.
22- *
23+ *
2324 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
2425 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
2526 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
2829 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
2930 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
3031 * SOFTWARE.
31-
32- *
33- * End of legal section ......................................................
34- *
35- * adb_db.c - "C" wrapper module for adb_parser classes.
36- * This module provides an alternative "C" way to work with AdbInstance objects.
3732 *
3833 * Version: $Id$
3934 *
4540#include < boost/algorithm/string.hpp>
4641#include < boost/lexical_cast.hpp>
4742#include " adb_db.h"
48- #include " adb_parser.h"
4943
5044#define CHECK_FIELD (field, node_w ) \
5145 if (((AdbInstance*)field)->isReserved ()) { \
@@ -79,7 +73,7 @@ adb_db_t* db_create()
7973 */
8074int db_load (adb_db_t *db, const char *adb_file_path, int add_reserved)
8175{
82- if (!((Adb*)db)->load (adb_file_path, add_reserved, NULL , false )) {
76+ if (!((Adb*)db)->load (adb_file_path, add_reserved, false )) {
8377 sprintf (err, " Failed to load adabe project: %s" , ((Adb*)db)->getLastError ().c_str ());
8478 return 1 ;
8579 }
@@ -92,7 +86,7 @@ int db_load(adb_db_t *db, const char *adb_file_path, int add_reserved)
9286 */
9387int db_load_from_str (adb_db_t *db, const char *adb_data, int add_reserved)
9488{
95- if (!((Adb*)db)->loadFromString (adb_data, add_reserved, NULL , false )) {
89+ if (!((Adb*)db)->loadFromString (adb_data, add_reserved, false )) {
9690 sprintf (err, " Failed to load adabe project: %s" , ((Adb*)db)->getLastError ().c_str ());
9791 return 1 ;
9892 }
@@ -157,7 +151,7 @@ void db_destroy_limits_map(adb_limits_map_t *limits)
157151adb_node_t * db_get_node (adb_db_t *db, const char *node_name)
158152{
159153 Adb *adb = (Adb*)db;
160- AdbInstance *node = adb->createLayout (node_name, false , NULL );
154+ AdbInstance *node = adb->createLayout (node_name, false );
161155 if (!node) {
162156 sprintf (err, " Failed to create node %s: %s" , node_name, adb->getLastError ().c_str ());
163157 return NULL ;
0 commit comments