message
stringlengths 6
474
| diff
stringlengths 8
5.22k
|
---|---|
Need to fix wifi test before re-enabling. | @@ -46,19 +46,6 @@ pipeline {
}
}
}
- stage('Test Dev Build (WIFI)') {
- steps {
- lock(resource: "Pandas", inversePrecedence: true, quantity: 1){
- timeout(time: 60, unit: 'MINUTES') {
- script {
- sh "docker run --name ${env.DOCKER_NAME} --privileged --volume /dev/bus/usb:/dev/bus/usb --volume /var/run/dbus:/var/run/dbus --net host ${env.DOCKER_IMAGE_TAG} bash -c 'cd /tmp/panda; ./run_automated_tests.sh'"
- sh "docker cp ${env.DOCKER_NAME}:/tmp/panda/nosetests.xml test_results_dev.xml"
- sh "docker rm ${env.DOCKER_NAME}"
- }
- }
- }
- }
- }
}
post {
failure {
|
Capitals anyone? | @@ -763,7 +763,7 @@ static void on_rack_request(http_s *h) {
static void on_rack_upgrade(http_s *h, char *proto, size_t len) {
iodine_http_request_handle_s handle = (iodine_http_request_handle_s){.h = h};
- if (len == 9 && proto[1] == 'e') {
+ if (len == 9 && (proto[1] == 'e' || proto[1] == 'E')) {
handle.upgrade = IODINE_UPGRADE_WEBSOCKET;
} else if (len == 3 && proto[0] == 's') {
handle.upgrade = IODINE_UPGRADE_SSE;
|
Fix test for reference basestation | @@ -358,13 +358,21 @@ static int setup_optimizer(struct async_optimizer_user *user, survive_optimizer
SurvivePose lhs[NUM_GEN2_LIGHTHOUSES] = {0};
if (canPossiblySolveLHS) {
if (!needsInitialEstimate || general_optimizer_data_record_current_lhs(&d->opt, pdl, lhs)) {
+ uint32_t reference_basestation = survive_configi(ctx, "reference-basestation", SC_GET, 0);
+
for (int lh = 0; lh < so->ctx->activeLighthouses; lh++) {
bool needsSolve = !so->ctx->bsd[lh].PositionSet;
if (needsSolve) {
- if (so->ctx->bsd[lh].PositionSet) {
- memcpy(&lhs[lh], &so->ctx->bsd[lh].Pose, sizeof(SurvivePose));
+ // Reference basestations are used mostly for unit testing; if we can't solve for it we don't solve
+ // for anything
+ if (reference_basestation != 0 && quatiszero(lhs[lh].Rot)) {
+ if (reference_basestation == so->ctx->bsd[lh].BaseStationID) {
+ canPossiblySolveLHS = false;
}
+ }
+
assert(!isnan(lhs[lh].Rot[0]));
+
if (quatiszero(lhs[lh].Rot) && has_data_for_lh(meas_for_lhs_axis, lh)) {
SV_WARN("Seed poser failed for %d, not trying to solve LH system", lh);
canPossiblySolveLHS = false;
|
made sure parser is freed | @@ -443,12 +443,10 @@ static void ccl_cosmology_compute_power_class(ccl_cosmology * cosmo, int * statu
if (*status != CCL_ERROR_CLASS)
ccl_run_class(cosmo, &fc,&pr,&ba,&th,&pt,&tr,&pm,&sp,&nl,&le,&op,init_arr,status);
- if (*status == 0) {
if (parser_free(&fc)== _FAILURE_) {
*status = CCL_ERROR_CLASS;
ccl_cosmology_set_status_message(cosmo, "ccl_power.c: ccl_cosmology_compute_power_class(): Error freeing CLASS parser\n");
}
- }
double kmin,kmax,ndecades,amin,amax,ic;
int nk,na,s;
@@ -1165,12 +1163,10 @@ static void ccl_cosmology_compute_power_emu(ccl_cosmology * cosmo, int * status)
if (*status != CCL_ERROR_CLASS)
ccl_run_class(cosmo, &fc,&pr,&ba,&th,&pt,&tr,&pm,&sp,&nl,&le,&op,init_arr,status);
- if (*status == 0) {
if (parser_free(&fc)== _FAILURE_) {
*status = CCL_ERROR_CLASS;
ccl_cosmology_set_status_message(cosmo, "ccl_power.c: ccl_cosmology_compute_power_class(): Error freeing CLASS parser\n");
}
- }
double kmin,kmax,ndecades,amin,amax,ic;
int nk,na,s;
|
Fixing some values. | @@ -224,7 +224,7 @@ consume_partial:
if (name[name_len - 1] == '"')
--name_len;
} else if (start + 9 < end && !strncasecmp(start, "filename", 8)) {
- uint8_t encoded;
+ uint8_t encoded = 0;
start += 8;
if (start[0] == '*') {
encoded = 1;
@@ -254,9 +254,12 @@ consume_partial:
}
if (filename[filename_len - 1] == '"')
--filename_len;
- if (encoded)
- filename_len =
+ if (encoded) {
+ ssize_t new_len =
http_mime_decode_url(filename, filename, filename_len);
+ if (new_len > 0)
+ filename_len = new_len;
+ }
} else {
start = memchr(start, ';', (size_t)(end - start));
}
@@ -270,6 +273,8 @@ consume_partial:
start = memchr(start, ';', (size_t)(end - start));
if (!start) {
mime_len = (size_t)(end - mime);
+ if (mime[mime_len - 1] == '\r')
+ --mime_len;
} else {
mime_len = (size_t)(start - mime);
}
|
rune/libenclave/pal: fix the PAL version API description error in spec_v2.md
In enclave runtime PAL v2, the API of PAL version is named as pal_get_version
rather than pal_version. | # Enclave Runtime PAL API Specification v2
Enclave Runtime PAL API defines a common interface to interact between `rune` and enclave runtime.
-## 1.pal_version()
+## 1.pal_get_version()
### Description
Indicate PAL API version number implemented by runelet and enclave runtime; runelet is compatible with any enclave runtimes equal to or less than the indicated value. If this symbol is undefined in enclave runtime, version 1 is assuemd by runelet.
### Prototype
```c
-int pal_version();
+int pal_get_version();
```
### Parameters
|
Mention scrcpy Debian package in README | @@ -37,8 +37,11 @@ control it using keyboard and mouse.
### Linux
-On Linux, you typically need to [build the app manually][BUILD]. Don't worry,
-it's not that hard.
+In Debian (_testing_ and _sid_ for now):
+
+```
+apt install scrcpy
+```
A [Snap] package is available: [`scrcpy`][snap-link].
@@ -56,6 +59,10 @@ For Gentoo, an [Ebuild] is available: [`scrcpy/`][ebuild-link].
[Ebuild]: https://wiki.gentoo.org/wiki/Ebuild
[ebuild-link]: https://github.com/maggu2810/maggu2810-overlay/tree/master/app-mobilephone/scrcpy
+You could also [build the app manually][BUILD] (don't worry, it's not that
+hard).
+
+
### Windows
|
doc BUGFIX language name | @@ -175,7 +175,7 @@ If you are using `cmake` in you project, it is also possible to use the provided
There are no bindings for other languages directly in this project but they are
available separately.
-* [RUST](https://github.com/rwestphal/yang2-rs/)
+* [Rust](https://github.com/rwestphal/yang2-rs/)
## yanglint
|
pbio/drivebase: Use servo actuators.
In order to support different stop types for drive bases, we shouldn't call dc motors directly, but set the actuation type according to the controller. | @@ -313,26 +313,16 @@ pbio_error_t pbio_drivebase_update(pbio_drivebase_t *db) {
return PBIO_ERROR_INVALID_OP;
}
- // TODO: Use generic actuator with torque type.
- // FIXME: There is a possible change of actuation at this point; so should pass through servo_actuate instead of actuating here
- // It only works now because the assumed stop type is always hold for drive bases, but that won't be the case in future versions
-
- // Left carries sum/2 + dif/2
- int32_t torque_left = sum_torque / 2 + dif_torque / 2;
- torque_left += pbio_observer_get_feedforward_torque(&db->left->observer, sum_rate_ref / 2 + dif_rate_ref / 2, sum_acceleration_ref / 2 + dif_acceleration_ref / 2);
- int32_t voltage_left = pbio_observer_torque_to_voltage(&db->left->observer, torque_left);
-
- // Right carries sum/2 - dif/2
- int32_t torque_right = sum_torque / 2 - dif_torque / 2;
- torque_right += pbio_observer_get_feedforward_torque(&db->right->observer, sum_rate_ref / 2 - dif_rate_ref / 2, sum_acceleration_ref / 2 - dif_acceleration_ref / 2);
- int32_t voltage_right = pbio_observer_torque_to_voltage(&db->left->observer, torque_right);
-
- // Apply the voltages
- err = pbio_dcmotor_set_voltage(db->left->dcmotor, voltage_left);
+ // The left servo drives at a torque and speed of sum / 2 + dif / 2
+ int32_t feed_forward_left = pbio_observer_get_feedforward_torque(&db->left->observer, sum_rate_ref / 2 + dif_rate_ref / 2, sum_acceleration_ref / 2 + dif_acceleration_ref / 2);
+ err = pbio_servo_actuate(db->left, sum_actuation, sum_torque / 2 + dif_torque / 2 + feed_forward_left);
if (err != PBIO_SUCCESS) {
return err;
}
- return pbio_dcmotor_set_voltage(db->right->dcmotor, voltage_right);
+
+ // The right servo drives at a torque and speed of sum / 2 - dif / 2
+ int32_t feed_forward_right = pbio_observer_get_feedforward_torque(&db->right->observer, sum_rate_ref / 2 - dif_rate_ref / 2, sum_acceleration_ref / 2 - dif_acceleration_ref / 2);
+ return pbio_servo_actuate(db->right, dif_actuation, sum_torque / 2 - dif_torque / 2 + feed_forward_right);
}
pbio_error_t pbio_drivebase_straight(pbio_drivebase_t *db, int32_t distance, int32_t drive_speed, int32_t drive_acceleration) {
|
ipmi-sel: use opal_booting() over poking at debug descriptor | @@ -504,8 +504,7 @@ static void sel_power(uint8_t power)
switch (power) {
case SOFT_OFF:
prlog(PR_NOTICE, "Soft shutdown requested\n");
- if (!(debug_descriptor.state_flags & OPAL_BOOT_COMPLETE) &&
- platform.cec_power_down) {
+ if (opal_booting() && platform.cec_power_down) {
prlog(PR_NOTICE, "Host not up, shutting down now\n");
platform.cec_power_down(IPMI_CHASSIS_PWR_DOWN);
} else {
@@ -515,8 +514,7 @@ static void sel_power(uint8_t power)
break;
case SOFT_REBOOT:
prlog(PR_NOTICE, "Soft reboot requested\n");
- if (!(debug_descriptor.state_flags & OPAL_BOOT_COMPLETE) &&
- platform.cec_reboot) {
+ if (opal_booting() && platform.cec_reboot) {
prlog(PR_NOTICE, "Host not up, rebooting now\n");
platform.cec_reboot();
} else {
|
update build steps for esp32 for mac | First, clone recursively IoTivity-Lite which includes a port for the ESP32.
```bash
-git clone --recursive https://gitlab.iotivity.org/iotivity/iotivity-lite.git
+git clone --recursive https://github.com/iotivity/iotivity-lite.git
```
## Build
@@ -24,8 +24,6 @@ Jump to the [common steps](#common-steps) below.
Jump to the [common steps](#common-steps) below.
-> Note: `./esp-idf/export.sh` script exports invalid `IDF_PATH` value. Please modify it after export manually.
-
### Windows
Install ubuntu via wsl2 and then run the Ubuntu bash in terminal:
|
allow unrestricted radio driver packet size for nullradio | #define NETSTACK_RADIO NETSTACK_CONF_RADIO
#else /* NETSTACK_CONF_RADIO */
#define NETSTACK_RADIO nullradio_driver
+/* for nullradio, allow unlimited packet size */
+#define nullradio_driver_max_payload_len ((unsigned short)-1)
#endif /* NETSTACK_CONF_RADIO */
/* Framer selection. The framer is used by the MAC implementation
|
config_map: initialize description | @@ -306,6 +306,7 @@ struct mk_list *flb_config_map_create(struct flb_config *config,
new->set_property = m->set_property;
new->offset = m->offset;
new->value.mult = NULL;
+ new->desc = m->desc;
mk_list_add(&new->_head, list);
if (new->set_property == FLB_FALSE) {
|
Fix compile error with clang-6.0 | @@ -54,13 +54,13 @@ int main() {
/* initialize the CUnit test registry */
if (CUE_SUCCESS != CU_initialize_registry())
- return CU_get_error();
+ return (int)CU_get_error();
/* add a suite to the registry */
pSuite = CU_add_suite("libngtcp2_TestSuite", init_suite1, clean_suite1);
if (NULL == pSuite) {
CU_cleanup_registry();
- return CU_get_error();
+ return (int)CU_get_error();
}
/* add the tests to the suite */
@@ -203,7 +203,7 @@ int main() {
!CU_add_test(pSuite, "conn_pkt_payloadlen",
test_ngtcp2_conn_pkt_payloadlen)) {
CU_cleanup_registry();
- return CU_get_error();
+ return (int)CU_get_error();
}
/* Run all tests using the CUnit Basic interface */
@@ -215,6 +215,6 @@ int main() {
return (int)num_tests_failed;
} else {
printf("CUnit Error: %s\n", CU_get_error_msg());
- return CU_get_error();
+ return (int)CU_get_error();
}
}
|
Fix coverity warning, | @@ -1340,6 +1340,9 @@ tap_connect_command_fn (vlib_main_t * vm,
format_unformat_error, line_input);
}
+ if (intfc_name == 0)
+ return clib_error_return (0, "interface name must be specified");
+
memset (ap, 0, sizeof (*ap));
ap->intfc_name = intfc_name;
|
add const qualifier to tests that require it | @@ -94,7 +94,7 @@ set_global_address(void)
#if RPL_WITH_STORING
uint8_t should_blink = 1;
static void
-route_callback(int event, uip_ipaddr_t *route, uip_ipaddr_t *ipaddr, int num_routes)
+route_callback(int event, const uip_ipaddr_t *route, const uip_ipaddr_t *ipaddr, int num_routes)
{
if(event == UIP_DS6_NOTIFICATION_DEFRT_ADD) {
should_blink = 0;
|
Build: Fix TestExt4Dxe build for Ia32 target | @@ -90,7 +90,7 @@ LLVMFuzzerTestOneInput (
EFI_STATUS Status;
EXT4_PARTITION *Part;
EFI_FILE_PROTOCOL *This;
- UINT64 BufferSize;
+ UINTN BufferSize;
VOID *Buffer;
EFI_FILE_PROTOCOL *NewHandle;
CHAR16 *FileName;
|
traj: Option for asymmetric trajectories | @@ -93,6 +93,7 @@ int main_traj(int argc, char* argv[])
int turns = 1;
bool d3d = false;
bool transverse = false;
+ bool asymTraj = false;
float gdelays[2][3] = {
{ 0., 0., 0. },
@@ -115,6 +116,7 @@ int main_traj(int argc, char* argv[])
OPT_FLVEC3('Q', &gdelays[1], "delays", "(gradient delays: z, xz, yz)"),
OPT_SET('O', &transverse, "correct transverse gradient error for radial tajectories"),
OPT_SET('3', &d3d, "3D"),
+ OPT_SET('c', &asymTraj, "Asymmetric trajectory [DC sampled]"),
};
cmdline(&argc, argv, 1, 1, usage_str, help_str, ARRAY_SIZE(opts), opts);
@@ -191,7 +193,13 @@ int main_traj(int argc, char* argv[])
double golden_angle = 3. - sqrtf(5.);
double base = golden ? ((2. - golden_angle) / 2.) : (1. / (float)Y);
double angle = M_PI * (float)remap(mode, Y, turns, mb, j) * (dbl ? 2. : 1.) * base;
- double read = (float)i + 0.5 - (float)X / 2.;
+
+ /* Calculate read-out samples
+ * for symmetric Trajectory [DC between between sample no. X/2-1 and X/2, zero-based indexing]
+ * or asymmetric Trajectory [DC component at sample no. X/2, zero-based indexing]
+ */
+ double read = (float)i + (asymTraj ? 0 : 0.5) - (float)X / 2.;
+
double angle2 = 0.;
if (d3d) {
|
Add docs for log module | +---
+layout: default
+title: Log
+nav_order: 16
+parent: Standard Library
+---
+
+# Log
+{: .no_toc }
+
+## Table of contents
+{: .no_toc .text-delta }
+
+1. TOC
+{:toc}
+
+---
+
+## Log
+
+To make use of the Log module an import is required.
+
+```cs
+import Log;
+```
+
+### Constants
+
+| Constant | Description |
+| ---------- | --------------------------------------------------------------------- |
+| Log.stdout | The default file descriptor where a process can write output. |
+| Log.stderr | An input stream where data is sent to and read by a program. |
+| Log.stdin | The default file descriptor where a process can write error messages. |
+
+### Log.print(string)
+
+```cs
+Log.print("something extremely interesting");
+```
+
+### Log.println(string)
+
+```cs
+Log.println("hello, world! println");
+```
+
+### Log.new(number)
+
+Create a new instance of a logger.
+
+```cs
+var log = Log.new(Log.stdout).unwrap();
+```
+
+### log.setPrefix(string)
+
+A prefix can be set on the logger that will be included in the output just before the user provided content.
+
+```cs
+log.setPrefix("prefix");
+```
+
+### log.unsetPrefix(string)
+
+Remove the prefix on the logger. This is a noop if there was no prefix previously set.
+
+```cs
+log.unsetPrefix();
+```
\ No newline at end of file
|
[mechanics] Fix missing virtual destructor warning for BulletR. | @@ -39,6 +39,8 @@ public:
double y_correction_B=0,
double scaling=1);
+ virtual ~BulletR() {}
+
/* For users that may require extra information about contacts. */
SP::btCollisionObject btObject[2];
SP::btCollisionShape btShape[2];
|
py/objexcept: Use INT_FMT when printing errno value. | @@ -118,7 +118,7 @@ STATIC void mp_obj_exception_print(const mp_print_t *print, mp_obj_t o_in, mp_pr
if (o->base.type == &mp_type_OSError && MP_OBJ_IS_SMALL_INT(o->args->items[0])) {
qstr qst = mp_errno_to_str(o->args->items[0]);
if (qst != MP_QSTR_NULL) {
- mp_printf(print, "[Errno %d] %q", MP_OBJ_SMALL_INT_VALUE(o->args->items[0]), qst);
+ mp_printf(print, "[Errno " INT_FMT "] %q", MP_OBJ_SMALL_INT_VALUE(o->args->items[0]), qst);
return;
}
}
|
Fixed issue with tag cloud numbers | @@ -73,10 +73,10 @@ AjaxFranceLabs.TagCloudWidget = AjaxFranceLabs.AbstractWidget.extend({
},
update : function() {
- this.total = 0;
if (!this.manager.response.clusters) {
return;
}
+ this.total = parseInt(this.manager.response.responseHeader.params.rows, 10);
var self = this;
var data = this.assocTags(this.manager.response.clusters);
var max = (data.length > this.maxDisplay) ? this.maxDisplay : data.length;
@@ -132,7 +132,6 @@ AjaxFranceLabs.TagCloudWidget = AjaxFranceLabs.AbstractWidget.extend({
nb : data[i].docs.length,
score: data[i].score
});
- this.total += data[i].docs.length;
}
}
return tags;
|
Minor comment format update. | @@ -2371,13 +2371,13 @@ typedef struct
typedef struct entity
{
- e_spawn_type spawntype; // Type of spawn (level spawn, script spawn, ...)*
- bool exists; // flag to determine if it is a valid entity.
- bool deduct_ammo; // Check for ammo count?
- e_projectile_prime projectile_prime; // If this entity is a projectile, several priming values go here to set up its behavior.
- int playerindex; // Player controlling the entity.
- s_energy_status energy_status; // Health and MP.
- char name[MAX_NAME_LEN]; // this is display name
+ e_spawn_type spawntype; // Type of spawn (level spawn, script spawn, ...)**
+ bool exists; // flag to determine if it is a valid entity.**
+ bool deduct_ammo; // Check for ammo count?**
+ e_projectile_prime projectile_prime; // If this entity is a projectile, several priming values go here to set up its behavior.**
+ int playerindex; // Player controlling the entity.**
+ s_energy_status energy_status; // Health and MP.**
+ char name[MAX_NAME_LEN]; // this is display name.**
s_model *defaultmodel; // this is the default model
s_model *model; // current model
s_model modeldata; // model data copied here
|
Fix partition_locking ICG test | @@ -448,7 +448,6 @@ delete from partlockt where i = 4;
select * from locktest_master where coalesce not like 'gp_%' and coalesce not like 'pg_%';
coalesce | mode | locktype | node
-------------------------+------------------+----------+--------
- partlockt | AccessShareLock | relation | master
partlockt | ExclusiveLock | relation | master
partlockt_1_prt_1 | AccessShareLock | relation | master
partlockt_1_prt_2 | AccessShareLock | relation | master
@@ -461,7 +460,7 @@ select * from locktest_master where coalesce not like 'gp_%' and coalesce not li
partlockt_1_prt_7 | AccessShareLock | relation | master
partlockt_1_prt_8 | AccessShareLock | relation | master
partlockt_1_prt_9 | AccessShareLock | relation | master
-(13 rows)
+(12 rows)
-- start_ignore
-- GPDB_12_MERGE_FIXME Revisit this post merge and see if we have a chance to unlock the root table
|
extmod/uasyncio: Don't create a Loop instance in get_event_loop().
The event loop is (for now) just a singleton so make it so that Loop
instances are not needed. | @@ -215,20 +215,20 @@ def run(coro):
class Loop:
- def create_task(self, coro):
+ def create_task(coro):
return create_task(coro)
- def run_forever(self):
+ def run_forever():
run_until_complete()
# TODO should keep running until .stop() is called, even if there're no tasks left
- def run_until_complete(self, aw):
+ def run_until_complete(aw):
return run_until_complete(_promote_to_task(aw))
- def close(self):
+ def close():
pass
# The runq_len and waitq_len arguments are for legacy uasyncio compatibility
def get_event_loop(runq_len=0, waitq_len=0):
- return Loop()
+ return Loop
|
Proper bounding box filtering support for MapBoxOnlineGeocodingService | #include "components/Exceptions.h"
#include "geocoding/MapBoxGeocodingProxy.h"
#include "projections/Projection.h"
+#include "projections/EPSG3857.h"
+#include "utils/Const.h"
#include "utils/GeneralUtils.h"
#include "utils/NetworkUtils.h"
#include "utils/Log.h"
#include <map>
+#include <cmath>
#include <boost/lexical_cast.hpp>
@@ -87,7 +90,12 @@ namespace carto {
if (request->getLocationRadius() > 0) {
MapPos focusPoint = request->getProjection()->toWgs84(request->getLocation());
params["proximity"] = boost::lexical_cast<std::string>(focusPoint.getX()) + "," + boost::lexical_cast<std::string>(focusPoint.getY());
- // TODO: bbox
+
+ EPSG3857 epsg3857;
+ double radius = request->getLocationRadius() / std::cos(focusPoint.getY() * Const::DEG_TO_RAD);
+ MapPos point0 = epsg3857.toWgs84(epsg3857.fromWgs84(focusPoint) - MapVec(radius, radius));
+ MapPos point1 = epsg3857.toWgs84(epsg3857.fromWgs84(focusPoint) + MapVec(radius, radius));
+ params["bbox"] = boost::lexical_cast<std::string>(point0.getX()) + "," + boost::lexical_cast<std::string>(point0.getY()) + "," + boost::lexical_cast<std::string>(point1.getX()) + "," + boost::lexical_cast<std::string>(point1.getY());
}
std::string url = NetworkUtils::BuildURLFromParameters(baseURL, params);
|
remove extra S2N_API | @@ -343,7 +343,6 @@ S2N_API
extern ssize_t s2n_client_hello_get_extension_length(struct s2n_client_hello *ch, s2n_tls_extension_type extension_type);
S2N_API
extern ssize_t s2n_client_hello_get_extension_by_id(struct s2n_client_hello *ch, s2n_tls_extension_type extension_type, uint8_t *out, uint32_t max_length);
-S2N_API
/**
* Used to check if a particular extension exists in the client hello.
*
|
pbio/dcmotor: always coast during setup
Make sure we always coast even if the id check fails, by putting coast first rather than last. | @@ -20,6 +20,12 @@ static pbio_error_t pbio_dcmotor_setup(pbio_dcmotor_t *dcmotor, pbio_port_t port
pbio_error_t err;
+ // Coast the device
+ err = pbio_dcmotor_coast(dcmotor);
+ if (err != PBIO_SUCCESS) {
+ return err;
+ }
+
// Get device ID to ensure we are dealing with a supported device
err = pbdrv_motor_get_id(port, &dcmotor->id);
if (err != PBIO_SUCCESS) {
@@ -32,12 +38,7 @@ static pbio_error_t pbio_dcmotor_setup(pbio_dcmotor_t *dcmotor, pbio_port_t port
dcmotor->state = PBIO_DCMOTOR_COAST;
// Set duty scaling and offsets
- err = pbio_dcmotor_set_settings(dcmotor, 100, 0);
- if (err != PBIO_SUCCESS) {
- return err;
- }
-
- return pbio_dcmotor_coast(dcmotor);
+ return pbio_dcmotor_set_settings(dcmotor, 100, 0);
}
pbio_error_t pbio_dcmotor_get(pbio_port_t port, pbio_dcmotor_t **dcmotor, pbio_direction_t direction) {
|
conf_def.c: Avoid calling strlen() in a loop | @@ -729,7 +729,9 @@ static BIO *process_include(char *include, OPENSSL_DIR_CTX **dirctx,
static BIO *get_next_file(const char *path, OPENSSL_DIR_CTX **dirctx)
{
const char *filename;
+ size_t pathlen;
+ pathlen = strlen(path);
while ((filename = OPENSSL_DIR_read(dirctx, path)) != NULL) {
size_t namelen;
@@ -742,7 +744,7 @@ static BIO *get_next_file(const char *path, OPENSSL_DIR_CTX **dirctx)
char *newpath;
BIO *bio;
- newlen = strlen(path) + namelen + 2;
+ newlen = pathlen + namelen + 2;
newpath = OPENSSL_zalloc(newlen);
if (newpath == NULL) {
CONFerr(CONF_F_GET_NEXT_FILE, ERR_R_MALLOC_FAILURE);
@@ -753,15 +755,12 @@ static BIO *get_next_file(const char *path, OPENSSL_DIR_CTX **dirctx)
* If the given path isn't clear VMS syntax,
* we treat it as on Unix.
*/
- {
- size_t pathlen = strlen(path);
-
- if (path[pathlen - 1] == ']' || path[pathlen - 1] == '>'
+ if (path[pathlen - 1] == ']'
+ || path[pathlen - 1] == '>'
|| path[pathlen - 1] == ':') {
/* Clear VMS directory syntax, just copy as is */
OPENSSL_strlcpy(newpath, path, newlen);
}
- }
#endif
if (newpath[0] == '\0') {
OPENSSL_strlcpy(newpath, path, newlen);
|
Add ReLAPACK option | @@ -24,6 +24,7 @@ option(BUILD_WITHOUT_LAPACK "Without LAPACK and LAPACKE (Only BLAS or CBLAS)" ON
endif()
option(BUILD_WITHOUT_CBLAS "Without CBLAS" OFF)
option(DYNAMIC_ARCH "Build with DYNAMIC_ARCH" OFF)
+option(BUILD_RELAPACK "Build with ReLAPACK (recursive LAPACK" OFF)
#######
if(BUILD_WITHOUT_LAPACK)
set(NO_LAPACK 1)
@@ -55,6 +56,9 @@ endif ()
set(SUBDIRS ${BLASDIRS})
if (NOT NO_LAPACK)
list(APPEND SUBDIRS lapack)
+ if(BUILD_RELAPACK)
+ list(APPEND SUBDIRS relapack/src)
+ endif()
endif ()
# set which float types we want to build for
@@ -141,7 +145,7 @@ endif()
# add objects to the openblas lib
-add_library(${OpenBLAS_LIBNAME} ${LA_SOURCES} ${LAPACKE_SOURCES} ${TARGET_OBJS} ${OpenBLAS_DEF_FILE})
+add_library(${OpenBLAS_LIBNAME} ${LA_SOURCES} ${LAPACKE_SOURCES} ${RELA_SOURCES} ${TARGET_OBJS} ${OpenBLAS_DEF_FILE})
# Handle MSVC exports
if(MSVC AND BUILD_SHARED_LIBS)
|
BUMP pymongocrypt 1.1.2.dev0 | # See the License for the specific language governing permissions and
# limitations under the License.
-__version__ = '1.1.1'
+__version__ = '1.1.2.dev0'
_MIN_LIBMONGOCRYPT_VERSION = '1.2.0'
|
[Kernel] Fix the maxlen issue in rt_object_get_pointers | @@ -291,6 +291,8 @@ int rt_object_get_pointers(enum rt_object_class_type type, rt_object_t *pointers
pointers[index] = object;
index ++;
+
+ if (index >= maxlen) break;
}
rt_hw_interrupt_enable(level);
|
Change TCODLine implementation
Add tcod::BresenhamLine class and tcod::bresenham_line function. | #ifndef _TCOD_BRESENHAM_H
#define _TCOD_BRESENHAM_H
+#ifdef __cplusplus
+#include <functional>
+#include <vector>
+#endif // __cplusplus
+
#include "portability.h"
#ifdef __cplusplus
@@ -80,7 +85,65 @@ TCODLIB_API bool TCOD_line_step_mt(int* __restrict xCur, int* __restrict yCur, T
TCOD_DEPRECATED("Use TCOD_line instead.")
TCODLIB_API bool TCOD_line_mt(
int xFrom, int yFrom, int xTo, int yTo, TCOD_line_listener_t listener, TCOD_bresenham_data_t* data);
+
#ifdef __cplusplus
}
-#endif
-#endif
+
+namespace tcod {
+/**
+tcod::BresenhamLine class
+
+Implements a lightweight bresenham line drawing algorithm.
+ */
+class TCODLIB_API BresenhamLine {
+ public:
+ /**
+ tcod::BresenhamLine constructor
+
+ Initializes the object to draw a line between [xFrom, yFrom] to [xTo, yTo]
+ \rst
+ .. cpp:function:: tcod::BresenhamLine(int xFrom, int yFrom, int xTo, int yTo);
+ \endrst
+ */
+ BresenhamLine(int xFrom, int yFrom, int xTo, int yTo) { TCOD_line_init_mt(xFrom, yFrom, xTo, yTo, &data_); }
+
+ /**
+ tcod::BresenhamLine step method
+
+ Steps through each cell from the start to the end coordinates.
+ The input variables [xCur, yCur] are passed in by reference and updated at each step of the line.
+ \rst
+ .. cpp:function:: bool step(int& xCur, int& yCur);
+ \endrst
+ */
+ inline bool step(int& xCur, int& yCur) { return TCOD_line_step_mt(&xCur, &yCur, &data_); }
+
+ private:
+ TCOD_bresenham_data_t data_{};
+};
+
+/**
+ tcod::BresenhamLine callback function
+
+ \rst
+ .. cpp:function:: bool tcod::bresenham_line(int xFrom, int yFrom, int xTo, int yTo, const std::function<bool(int,
+ int)>& callback);
+ \endrst
+ */
+inline bool bresenham_line(int xFrom, int yFrom, int xTo, int yTo, const std::function<bool(int, int)>& callback) {
+ auto line = BresenhamLine(xFrom, yFrom, xTo, yTo);
+
+ do {
+ if (!callback(xFrom, yFrom)) {
+ return false;
+ }
+ } while (!line.step(xFrom, yFrom));
+
+ return true;
+}
+
+} // namespace tcod
+
+#endif // __cplusplus
+
+#endif // _TCOD_BRESENHAM_H
|
out_flowcounter: set config_map flags | @@ -251,12 +251,12 @@ static int out_fcount_exit(void *data, struct flb_config* config)
static struct flb_config_map config_map[] = {
{
FLB_CONFIG_MAP_STR, "unit", NULL,
- FLB_FALSE, 0,
+ 0, FLB_FALSE, 0,
NULL
},
{
FLB_CONFIG_MAP_BOOL, "event_based", "false",
- FLB_TRUE, offsetof(struct flb_flowcounter, event_based),
+ 0, FLB_TRUE, offsetof(struct flb_flowcounter, event_based),
NULL
},
|
also implement my_realloc | @@ -92,8 +92,8 @@ void my_free(picoquic_cnx_t *cnx, void *ptr) {
* If an invalid pointer is provided, it returns NULL without changing anything.
*/
void *my_realloc(picoquic_cnx_t *cnx, void *ptr, unsigned int size) {
- /* NOT IMPLEMENTED! */
- exit(-1);
+ my_free(cnx, ptr);
+ return my_malloc(cnx, size);
}
void init_memory_management(protoop_plugin_t *p)
|
type error
Verfying -> Verifying | @@ -471,7 +471,7 @@ int mtdpart_main(int argc, char *argv[])
* should on the device.
*/
- printf("Verfying media:\n");
+ printf("Verifying media:\n");
fd = open("/dev/mtd2", O_RDONLY);
if (fd < 0) {
|
Attempting to find boost interruption_point() in windows build. | #include "assets.h"
#include "validation.h"
+#include <boost/thread.hpp>
+
static const char ASSET_FLAG = 'A';
static const char ASSET_ADDRESS_QUANTITY_FLAG = 'B';
static const char MY_ASSET_FLAG = 'M';
|
build BUGFIX OpenSSL is needed even when only SSH transport is enabled | @@ -112,7 +112,7 @@ if(ENABLE_SSH)
endif()
# dependencies - openssl
-if(ENABLE_TLS OR ENABLE_DNSSEC)
+if(ENABLE_TLS OR ENABLE_DNSSEC OR ENABLE_SSH)
find_package(OpenSSL REQUIRED)
if (ENABLE_TLS)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DNC_ENABLED_TLS")
|
Cherry-pick: Use clock_gettime for measuring time
Cherry picking changes from intel-afu repo for the use of clock_gettime in the fpga_dma_test. | @@ -92,8 +92,16 @@ void report_bandwidth(size_t size, double seconds) {
printf("\rMeasured bandwidth = %lf Megabytes/sec\n", throughput);
}
+// return elapsed time
+double getTime(struct timespec start, struct timespec end) {
+ uint64_t diff = 1000000000L * (end.tv_sec - start.tv_sec) + end.tv_nsec - start.tv_nsec;
+ return (double) diff/(double)1000000000L;
+}
+
+
fpga_result ddr_sweep(fpga_dma_handle dma_h) {
int res;
+ struct timespec start, end;
ssize_t total_mem_size = (uint64_t)(4*1024)*(uint64_t)(1024*1024);
@@ -110,35 +118,35 @@ fpga_result ddr_sweep(fpga_dma_handle dma_h) {
uint64_t dst = 0x0;
printf("DDR Sweep Host to FPGA\n");
- clock_t start, end;
- start = clock();
+ clock_gettime(CLOCK_MONOTONIC, &start);
res = fpgaDmaTransferSync(dma_h, dst, src, total_mem_size, HOST_TO_FPGA_MM);
+ clock_gettime(CLOCK_MONOTONIC, &end);
if(res != FPGA_OK) {
printf(" fpgaDmaTransferSync Host to FPGA failed with error %s", fpgaErrStr(res));
free(dma_buf_ptr);
return FPGA_EXCEPTION;
}
- end = clock();
- double seconds = ((double) (end - start)) / CLOCKS_PER_SEC;
- report_bandwidth(total_mem_size, seconds);
+
+ report_bandwidth(total_mem_size, getTime(start,end));
printf("\rClear buffer\n");
clear_buffer((char*)dma_buf_ptr, total_mem_size);
src = 0x0;
dst = (uint64_t)dma_buf_ptr;
- start = clock();
+
printf("DDR Sweep FPGA to Host\n");
+ clock_gettime(CLOCK_MONOTONIC, &start);
res = fpgaDmaTransferSync(dma_h, dst, src, total_mem_size, FPGA_TO_HOST_MM);
+ clock_gettime(CLOCK_MONOTONIC, &end);
+
if(res != FPGA_OK) {
printf(" fpgaDmaTransferSync FPGA to Host failed with error %s", fpgaErrStr(res));
free(dma_buf_ptr);
return FPGA_EXCEPTION;
}
- end = clock();
- seconds = ((double) (end - start)) / CLOCKS_PER_SEC;
- report_bandwidth(total_mem_size, seconds);
+ report_bandwidth(total_mem_size, getTime(start,end));
printf("Verifying buffer..\n");
verify_buffer((char*)dma_buf_ptr, total_mem_size);
|
OcBootManagementLib: Make failed image loading a warning | @@ -1813,7 +1813,7 @@ OcLoadBootEntry (
InternalUnloadDmg (&DmgLoadContext);
}
} else {
- DEBUG ((DEBUG_ERROR, "OCB: LoadImage failed - %r\n", Status));
+ DEBUG ((DEBUG_WARN, "OCB: LoadImage failed - %r\n", Status));
}
return Status;
|
I updated the list of contributors in the GUI. This resolves | <p align="center"><b><font size="6">Active Developers</font></b></p>
<ul>
-<li>Sean Ahern</li>
<li>Kathleen Biagas</li>
<li>Eric Brugger</li>
<li>David Camp</li>
<li>Hank Childs</li>
-<li>Cameron Christensen</li>
+<li>Kevin Griffin</li>
<li>Cyrus Harrison</li>
<li>Harinarayan Krishnan</li>
-<li>Jeremy Meredith</li>
+<li>Matt Larsen</li>
+<li>Alister Maguire</li>
<li>Mark Miller</li>
<li>Dave Pugmire</li>
<li>Allen Sanderson</li>
<p align="center"><b><font size="6">Former Developers</font></b></p>
<ul>
+<li>Sean Ahern</li>
<li>Mark Blair</li>
<li>David Bremer</li>
+<li>Cameron Christensen</li>
<li>Thomas Fogal</li>
+<li>Jeremy Meredith</li>
<li>Shelly Prevost</li>
<li>Ellen Tarwater</li>
<li>Tom Treadway</li>
<li>Gauthier Fauchet</li>
<li>Patrick Fragile</li>
<li>Christoph Garth</li>
+<li>Henri Girard</li>
<li>Markus Glatter</li>
<li>Akira Haddox</li>
<li>Allen S. Harvey Jr.</li>
|
Remove unused tui hud field | @@ -417,7 +417,7 @@ void draw_hud(WINDOW* win, int win_y, int win_x, int height, int width,
(int)ruler_spacing_x, (int)ruler_spacing_y, (int)tick_num, (int)bpm);
print_meter(win, meter_level);
wmove(win, win_y + 1, win_x);
- wprintw(win, "%d,%d\t%d:%d\tcell\t", (int)ged_cursor->x, (int)ged_cursor->y,
+ wprintw(win, "%d,%d\t%d:%d\t", (int)ged_cursor->x, (int)ged_cursor->y,
(int)ged_cursor->w, (int)ged_cursor->h);
switch (input_mode) {
case Ged_input_mode_normal:
|
userguide: document smart_borders | @@ -798,6 +798,27 @@ hide_edge_borders none|vertical|horizontal|both|smart|smart_no_gaps
hide_edge_borders vertical
----------------------
+[[_smart_borders]]
+=== Smart borders
+
+Smart borders will draw borders on windows only if there is more than one window
+in a workspace. This feature can also be enabled only if the gap size between
+window and screen edge is +0+.
+
+*Syntax*:
+-----------------------------------------------
+smart_borders on|off|no_gaps
+-----------------------------------------------
+
+*Example*:
+----------------------
+# Activate smart borders (always)
+smart_borders on
+
+# Activate smart borders (only when there are effectively no gaps)
+smart_borders no_gaps
+----------------------
+
[[for_window]]
=== Arbitrary commands for specific windows (for_window)
|
Homestar:LED:Power LED and Battery LED status amend
TEST=make -j BOARD=homestar
Verify build on EVT board
BRANCH=Trogdo
Tested-by: Wai-Hong Tam | @@ -83,24 +83,25 @@ static void board_led_set_battery(void)
battery_ticks++;
switch (charge_get_state()) {
- case PWR_STATE_DISCHARGE:
+ case PWR_STATE_CHARGE:
+ case PWR_STATE_CHARGE_NEAR_FULL:
if (chipset_in_state(CHIPSET_STATE_ON |
CHIPSET_STATE_ANY_SUSPEND |
CHIPSET_STATE_ANY_OFF)) {
if (percent <= BATTERY_LEVEL_CRITICAL) {
- /* battery capa < 5%, Red */
+ /* battery capa <= 5%, Red */
color = LED_RED;
} else if (percent > BATTERY_LEVEL_CRITICAL &&
percent < BATTERY_LEVEL_NEAR_FULL) {
/* 5% < battery capa < 97%, Orange */
color = LED_ORANGE;
} else {
- /* battery capa > 97%, Green */
+ /* battery capa >= 97%, Green */
color = LED_GREEN;
}
}
break;
- case PWR_STATE_CHARGE:
+ case PWR_STATE_DISCHARGE:
if (chipset_in_state(CHIPSET_STATE_ON)) {
/* S0, Green (soild on) */
color = LED_GREEN;
|
board/careena/board.c: Format with clang-format
BRANCH=none
TEST=none | @@ -30,41 +30,31 @@ const int hibernate_wake_pins_used = ARRAY_SIZE(hibernate_wake_pins);
/* I2C port map. */
const struct i2c_port_t i2c_ports[] = {
- {
- .name = "power",
+ { .name = "power",
.port = I2C_PORT_POWER,
.kbps = 100,
.scl = GPIO_I2C0_SCL,
- .sda = GPIO_I2C0_SDA
- },
- {
- .name = "tcpc0",
+ .sda = GPIO_I2C0_SDA },
+ { .name = "tcpc0",
.port = I2C_PORT_TCPC0,
.kbps = 400,
.scl = GPIO_I2C1_SCL,
- .sda = GPIO_I2C1_SDA
- },
- {
- .name = "tcpc1",
+ .sda = GPIO_I2C1_SDA },
+ { .name = "tcpc1",
.port = I2C_PORT_TCPC1,
.kbps = 400,
.scl = GPIO_I2C2_SCL,
- .sda = GPIO_I2C2_SDA
- },
- {
- .name = "thermal",
+ .sda = GPIO_I2C2_SDA },
+ { .name = "thermal",
.port = I2C_PORT_THERMAL_AP,
.kbps = 400,
.scl = GPIO_I2C3_SCL,
- .sda = GPIO_I2C3_SDA
- },
- {
- .name = "sensor",
+ .sda = GPIO_I2C3_SDA },
+ { .name = "sensor",
.port = I2C_PORT_SENSOR,
.kbps = 400,
.scl = GPIO_I2C7_SCL,
- .sda = GPIO_I2C7_SDA
- },
+ .sda = GPIO_I2C7_SDA },
};
const unsigned int i2c_ports_used = ARRAY_SIZE(i2c_ports);
|
possible fix for ARM linux compilation | @@ -138,7 +138,6 @@ static inline size_t _mi_wsize_from_size(size_t size) {
return (size + sizeof(uintptr_t) - 1) / sizeof(uintptr_t);
}
-//extern mi_decl_thread mi_heap_t* _mi_backing_heap; // thread local heap
extern const mi_heap_t _mi_heap_empty; // read-only empty heap, initial value of the thread local default heap
extern mi_heap_t _mi_heap_main; // statically allocated main backing heap
extern bool _mi_process_is_initialized;
@@ -154,7 +153,8 @@ static inline mi_heap_t* mi_get_default_heap() {
// TODO: patch ourselves dynamically to avoid this check every time?
if (!_mi_process_is_initialized) return &_mi_heap_main;
#endif
- return _mi_heap_default;
+ return _mi_
+ ault;
}
static inline bool mi_heap_is_default(const mi_heap_t* heap) {
@@ -309,7 +309,7 @@ static inline uintptr_t _mi_thread_id() mi_attr_noexcept {
#else
// otherwise use standard C
static inline uintptr_t _mi_thread_id() mi_attr_noexcept {
- return (uintptr_t)&_mi_backing_heap;
+ return (uintptr_t)&_mi_heap_default;
}
#endif
|
Linux warning fixes | @@ -1165,7 +1165,7 @@ static int print_miner(FILE *out, int index, struct miner_pool_data *miner, int
return miner->state == MINER_ACTIVE ? 1 : 0;
}
-int print_miners(FILE *out)
+static int print_miners(FILE *out)
{
int count_active = print_miner(out, -1, &g_pool_miner, 1);
@@ -1210,13 +1210,12 @@ static void print_connection(FILE *out, int index, struct connection_pool_data *
sprintf(in_out_str, "%llu/%llu", (unsigned long long)conn_data->nfield_in * sizeof(struct xdag_field),
(unsigned long long)conn_data->nfield_out * sizeof(struct xdag_field));
- sprintf(address, conn_data->miner ? xdag_hash2address(conn_data->miner->id.data) : "- ");
+ strcpy(address, (conn_data->miner ? xdag_hash2address(conn_data->miner->id.data) : "- "));
fprintf(out, "%3d. %s %s %-21s %-16s %lf\n", index, address,
connection_state_to_string(conn_data->state), ip_port_str, in_out_str, connection_calculate_unpaid_shares(conn_data));
}
-int print_connections(FILE *out);
-int print_connections(FILE *out)
+static int print_connections(FILE *out)
{
connection_list_element *elt;
int index = 0;
|
auth zone work, nicer debug output. | @@ -5141,11 +5141,11 @@ auth_xfer_transfer_http_callback(struct comm_point* c, void* arg, int err,
log_assert(xfr->task_transfer);
lock_basic_lock(&xfr->lock);
env = xfr->task_transfer->env;
- verbose(VERB_ALGO, "auth zone transfer http callback");
if(env->outnet->want_to_quit) {
lock_basic_unlock(&xfr->lock);
return 0; /* stop on quit */
}
+ verbose(VERB_ALGO, "auth zone transfer http callback");
if(err != NETEVENT_NOERROR && err != NETEVENT_DONE) {
/* connection failed, closed, or timeout */
|
Fix windows build warnings. | @@ -493,15 +493,15 @@ static void emit_bytes(Builder *b, uint32_t op, int32_t len, const uint8_t *byte
/* For fixed arity rules of arities 1, 2, and 3 */
static void emit_1(Reserve r, uint32_t op, uint32_t arg) {
- return emit_rule(r, op, 1, &arg);
+ emit_rule(r, op, 1, &arg);
}
static void emit_2(Reserve r, uint32_t op, uint32_t arg1, uint32_t arg2) {
uint32_t arr[2] = {arg1, arg2};
- return emit_rule(r, op, 2, arr);
+ emit_rule(r, op, 2, arr);
}
static void emit_3(Reserve r, uint32_t op, uint32_t arg1, uint32_t arg2, uint32_t arg3) {
uint32_t arr[3] = {arg1, arg2, arg3};
- return emit_rule(r, op, 3, arr);
+ emit_rule(r, op, 3, arr);
}
/*
|
Configure: pass -no-integrated-as.
Occasionally you have to pass -no-integrated-as to clang, but we
consider any -no-option as no-option. Don't touch -no-integrated-as. | @@ -638,7 +638,9 @@ while (@argvcopy)
{
s/^([^=]*)/lc($1)/e;
}
- s /^-no-/no-/; # some people just can't read the instructions
+
+ # some people just can't read the instructions, clang people have to...
+ s/^-no-(?!integrated-as)/no-/;
# rewrite some options in "enable-..." form
s /^-?-?shared$/enable-shared/;
|
swift highlight test | @@ -834,7 +834,7 @@ Basemaps apply the map background required for rendering data. Basemaps are requ
</div>
<div class="Carousel-item js-Tabpanes-item--lang js-Tabpanes-item--lang--kotlin">
- {% highlight kotlin %}
+ {% highlight swift %}
mapView = MapView(this)
setContentView(mapView)
|
fix red_bug_51 to return proper status | @@ -33,5 +33,10 @@ int main()
std::cout << " wrong counts1 = " << counts1 << " should be 4!" << std::endl;
if (counts2 != 4)
std::cout << " wrong counts2 = " << counts2 << " should be 4!" << std::endl;
+ if (counts1 !=4 || counts2 != 4) {
+ std::cout << "Failed" << std::endl;
+ return 1;
+ }
+ return 0;
}
|
Add more cc vers/id flag logic to build tool | @@ -152,6 +152,14 @@ cc_vers_is_gte() {
fi
}
+cc_id_and_vers_gte() {
+ if [[ $cc_id == "$1" ]] && cc_vers_is_gte "$2"; then
+ return 0
+ else
+ return 1
+ fi
+}
+
add() {
if [[ -z "${1:-}" ]]; then
script_error "At least one argument required for array add"
@@ -162,6 +170,17 @@ add() {
eval "$array_name+=($(printf "'%s' " "$@"))"
}
+concat() {
+ if [[ -z "${1:-}" || -z "${2:-}" ]]; then
+ script_error "Two arguments required for array concat"
+ fi
+ local lhs_name
+ local rhs_name
+ lhs_name=${1}
+ rhs_name=${2}
+ eval "$lhs_name+=(\"\${${rhs_name}[@]}\")"
+}
+
try_make_dir() {
if ! [[ -e "$1" ]]; then
verbose_echo mkdir "$1"
@@ -178,7 +197,10 @@ build_target() {
local libraries=()
local source_files=()
local out_exe
- add cc_flags -std=c99 -pipe -finput-charset=UTF-8 -Wall -Wpedantic -Wextra -Wconversion -Wstrict-prototypes -Werror=implicit-function-declaration -Werror=implicit-int -Werror=incompatible-pointer-types -Werror=int-conversion
+ add cc_flags -std=c99 -pipe -finput-charset=UTF-8 -Wall -Wpedantic -Wextra
+ if cc_id_and_vers_gte gcc 6.0.0 || cc_id_and_vers_gte clang 3.9.0; then
+ add cc_flags -Wconversion -Wstrict-prototypes -Werror=implicit-function-declaration -Werror=implicit-int -Werror=incompatible-pointer-types -Werror=int-conversion
+ fi
if [[ $lld_detected = 1 ]]; then
add cc_flags -fuse-ld=lld
fi
@@ -187,12 +209,10 @@ build_target() {
fi
if [[ $pie_enabled = 1 ]]; then
add cc_flags -pie -fpie -Wl,-pie
- elif [[ $os != mac ]]; then
- # Only explicitly specify no-pie for clang if version >= 6.0.0
- if [[ $cc_id == gcc ]] || cc_vers_is_gte "6.0.0"; then
+ # Only explicitly specify no-pie if cc version is new enough
+ elif cc_id_and_vers_gte gcc 6.0.0 || cc_id_and_vers_gte clang 6.0.0; then
add cc_flags -no-pie -fno-pie
fi
- fi
if [[ $static_enabled = 1 ]]; then
add cc_flags -static
fi
@@ -202,8 +222,10 @@ build_target() {
add cc_flags -DDEBUG -ggdb
# cygwin gcc doesn't seem to have this stuff, just elide for now
if [[ $os != cygwin ]]; then
+ if cc_id_and_vers_gte gcc 6.0.0 || cc_id_and_vers_gte clang 3.9.0; then
add cc_flags -fsanitize=address -fsanitize=undefined
fi
+ fi
if [[ $os = mac ]]; then
# Our mac clang does not have -Og
add cc_flags -O1
|
Names and comments | @@ -826,16 +826,16 @@ struct websocket_multi_write {
/* ... we need to have padding for pointer arithmatics... */
size_t count;
size_t length;
- uint8_t buffer[];
+ uint8_t buffer[]; /* starts on border alignment */
};
-static void ws_defered_on_finish_fb(intptr_t fd, void *arg) {
+static void ws_mw_defered_on_finish_fb(intptr_t fd, void *arg) {
(void)(fd);
struct websocket_multi_write *fin = arg;
fin->on_finished(NULL, fin->arg);
free(fin);
}
-static void ws_defered_on_finish(intptr_t fd, protocol_s *ws, void *arg) {
+static void ws_mw_defered_on_finish(intptr_t fd, protocol_s *ws, void *arg) {
(void)(fd);
struct websocket_multi_write *fin = arg;
fin->on_finished((ws->service == WEBSOCKET_ID_STR ? (ws_s *)ws : NULL),
@@ -850,8 +850,8 @@ static void ws_reduce_or_free_multi_write(void *buff) {
spn_unlock(&mw->lock);
if (!mw->count) {
if (mw->on_finished) {
- server_task(mw->origin, ws_defered_on_finish, mw,
- ws_defered_on_finish_fb);
+ server_task(mw->origin, ws_mw_defered_on_finish, mw,
+ ws_mw_defered_on_finish_fb);
} else
free(mw);
}
|
Add Missing Config for Libc Mqueue TC
Adds missing Kconfig TC_KERNEL_LIBC_MQUEUE in Kernel TC to enable TC for libc mqueue. | @@ -89,6 +89,10 @@ config TC_KERNEL_LIBC_MISC
select DEBUG_ERROR
select DEBUG_VERBOSE
+config TC_KERNEL_LIBC_MQUEUE
+ bool "Libc Mqueue"
+ default n
+
config TC_KERNEL_LIBC_PTHREAD
bool "Libc Pthread"
default n
|
Don't include empty lines in console data | @@ -23,6 +23,9 @@ export default function console(state = initialState.console, action) {
warnings: []
};
case CMD_STD_OUT:
+ if(!action.text) {
+ return state;
+ }
return {
...state,
output: [].concat(state.output, {
@@ -31,6 +34,9 @@ export default function console(state = initialState.console, action) {
})
};
case CMD_STD_ERR:
+ if(!action.text) {
+ return state;
+ }
return {
...state,
output: [].concat(state.output, {
|
Fix Pylint-detected function argument syntax error | @@ -560,7 +560,7 @@ class NameCheck(object):
return symbols
- def perform_checks(self, show_problems: True):
+ def perform_checks(self, show_problems=True):
"""
Perform each check in order, output its PASS/FAIL status. Maintain an
overall test status, and output that at the end.
|
docs; strings; fix formatting for example | @@ -132,7 +132,7 @@ from any other string, it's just parsed in a different way.
</pre>
When a raw string spans multiple lines, the newline immediately
-after the triple quote will be ignored, and any whitespace after
+after the triple quote will be ignored, and any spaces or tabs after
the last newline (before the closing triple quote) will be ignored too.
<pre class="snippet">
@@ -141,9 +141,12 @@ the last newline (before the closing triple quote) will be ignored too.
"""
</pre>
-The value in the string above is ` Hello world`, it contains no newlines.
-The newline after `"""` and the whitespace on the closing line are ignored.
-Note that the whitespace on the line is preserved.
+The value in the string above has no newlines, but the spaces in front
+are preserved. The newline after `"""` and the whitespace on the closing line are ignored.
+
+<pre class="snippet">
+ Hello world
+</pre>
A raw string will be parsed exactly as is in the file, unmodified.
This means it can contain quotes, invalid syntax, other data formats
|
Remove the additional dot in output of compat.sh | @@ -804,7 +804,8 @@ run_client() {
TESTS=$(( $TESTS + 1 ))
TITLE="${1%"${1#?}"}->${SERVER_NAME%"${SERVER_NAME#?}"}"
TITLE="$TITLE $MODE,$VERIF $2"
- printf "%s %.*s " "$TITLE" "$((72 - ${#TITLE}))" ........................................................................
+ DOTS72="........................................................................"
+ printf "%s %.*s " "$TITLE" "$((71 - ${#TITLE}))" "$DOTS72"
# should we skip?
if [ "X$SKIP_NEXT" = "XYES" ]; then
|
Fix no-des build | @@ -336,19 +336,25 @@ static int KRB5KDF(const EVP_CIPHER *cipher, ENGINE *engine,
size_t blocksize;
size_t cipherlen;
size_t osize;
+#ifndef OPENSSL_NO_DES
int des3_no_fixup = 0;
+#endif
int ret;
if (key_len != okey_len) {
+#ifndef OPENSSL_NO_DES
/* special case for 3des, where the caller may be requesting
* the random raw key, instead of the fixed up key */
if (EVP_CIPHER_nid(cipher) == NID_des_ede3_cbc &&
key_len == 24 && okey_len == 21) {
des3_no_fixup = 1;
} else {
+#endif
ERR_raise(ERR_LIB_PROV, PROV_R_WRONG_OUTPUT_BUFFER_SIZE);
return 0;
+#ifndef OPENSSL_NO_DES
}
+#endif
}
ctx = EVP_CIPHER_CTX_new();
|
ci: Use test builds with the test image
rpi-test-image is based on core-image-base but includes more packages
that this layer provides. In this way we can have CI test more recipe
updates. | @@ -25,7 +25,7 @@ jobs:
- raspberrypi4
- raspberrypi-cm3
- raspberrypi-cm
- image: [core-image-base]
+ image: [rpi-test-image]
distro: [poky]
runs-on: [self-hosted, Linux]
name: ${{ matrix.machine }}/${{ matrix.image }}/poky/systemd
|
(516) Stop using github cache for non-master branches. | @@ -178,8 +178,6 @@ jobs:
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-${{ steps.env.outputs.arch }}-buildx-${{ github.sha }}
- restore-keys: |
- ${{ runner.os }}-${{ steps.env.outputs.arch }}-buildx-
upload-chunk-size: 1000000
# Cache downloaded Go dependencies.
@@ -193,8 +191,6 @@ jobs:
cli/.gocache
cli/.gomod
key: ${{ runner.os }}-${{ steps.env.outputs.arch }}-go-${{ hashFiles('cli/go.sum') }}
- restore-keys: |
- ${{ runner.os }}-${{ steps.env.outputs.arch }}-go-
upload-chunk-size: 1000000
# Cache the cmocka build. Use a key based on a hash of all the files used
@@ -204,8 +200,6 @@ jobs:
with:
path: contrib/build/cmocka
key: ${{ runner.os }}-${{ steps.env.outputs.arch }}-cmocka-${{ hashFiles('contrib/Makefile', 'contrib/cmocka/**') }}
- restore-keys: |
- ${{ runner.os }}-${{ steps.env.outputs.arch }}-cmocka-
upload-chunk-size: 1000000
# Cache the funchook build. Use a key based on a hash of all the files
@@ -215,8 +209,6 @@ jobs:
with:
path: contrib/build/funchook
key: ${{ runner.os }}-${{ steps.env.outputs.arch }}-funchook-${{ hashFiles('contrib/Makefile', 'contrib/funchook/**') }}
- restore-keys: |
- ${{ runner.os }}-${{ steps.env.outputs.arch }}-funchook-
upload-chunk-size: 1000000
# Cache the funchook build. Use a key based on a hash of all the files
@@ -226,8 +218,6 @@ jobs:
with:
path: contrib/build/pcre2
key: ${{ runner.os }}-${{ steps.env.outputs.arch }}-pcre2-${{ hashFiles('contrib/Makefile', 'contrib/cpre2/**') }}
- restore-keys: |
- ${{ runner.os }}-${{ steps.env.outputs.arch }}-pcre2-
upload-chunk-size: 1000000
# Cache the openssl build. Use a key based on a hash of all the files
@@ -237,8 +227,6 @@ jobs:
with:
path: contrib/build/openssl
key: ${{ runner.os }}-${{ steps.env.outputs.arch }}-openssl-${{ hashFiles('contrib/Makefile', 'contrib/openssl/**') }}
- restore-keys: |
- ${{ runner.os }}-${{ steps.env.outputs.arch }}-openssl-
upload-chunk-size: 1000000
# Build our `appscope-builder` image. This should only end up using the
|
Display error/warning before message in summary | @@ -80,12 +80,12 @@ namespace ebi
virtual void write_error(Error &error) override
{
- summary.add_to_summary(error.message, error.line);
+ summary.add_to_summary("Error: " + error.message, error.line);
}
virtual void write_warning(Error &error) override
{
- summary.add_to_summary(error.message + " (warning)", error.line);
+ summary.add_to_summary("Warning: " + error.message, error.line);
}
virtual void write_message(const std::string &report_result) override
|
dojo: improve ford rune support for cable expressions | %+ turn cables
|= cable=cable:clay
^- dojo-source
- :: TODO: The following *does* properly add faces to imported cores,
- :: but discards all their type information, making them hard to
- :: work with
- ::
- :: =+ add-face=?~(face.cable "|=(n=* n)" ;:(weld "|=(n=* ^=(" (trip u.face.cable) " n))"))
- :: :^ 0 %do (scan add-face parse-hoon)
+ =+ add-face=?~(face.cable "|*(n=* n)" ;:(weld "|*(n=* ^=(" (trip u.face.cable) " n))"))
+ :^ 0 %do (scan add-face parse-hoon)
:+ 0 %dv [-.dir `path`[base-path file-path.cable ~]]
::
++ parse-cable
|
fix missing pointer deref | @@ -240,7 +240,7 @@ API_EXPORT int CALL_CONV LMS_GetClockFreq(lms_device_t *device, size_t clk_id, f
}
lime::LMS7_Device* lms = (lime::LMS7_Device*)device;
*freq = lms->GetClockFreq(clk_id);
- return freq > 0 ? 0 : -1;
+ return *freq > 0 ? 0 : -1;
}
API_EXPORT int CALL_CONV LMS_SetClockFreq(lms_device_t *device, size_t clk_id, float_type freq)
|
Fixes a wrongly timed mem free | @@ -175,8 +175,6 @@ double pubsub_utils_matchSubscriber(
requested_admin = celix_properties_get(ep, PUBSUB_ENDPOINT_ADMIN_TYPE, NULL);
requested_qos = celix_properties_get(ep, PUBSUB_UTILS_QOS_ATTRIBUTE_KEY, NULL);
requested_serializer = celix_properties_get(ep, PUBSUB_ENDPOINT_SERIALIZER, NULL);
- celix_properties_destroy(ep);
- data.outEndpoint = NULL;
}
double score = getPSAScore(requested_admin, requested_qos, adminType, sampleScore, controlScore, defaultScore);
@@ -190,6 +188,10 @@ double pubsub_utils_matchSubscriber(
*outSerializerSvcId = serializerSvcId;
}
+ if (ep != NULL) {
+ celix_properties_destroy(ep);
+ }
+
return score;
}
|
Cleanup the vst2 converter | #pragma once
-#include "../../clap.h"
-#include "../../stream.h"
+#include "../clap.h"
+#include "../stream.h"
#ifdef __cplusplus
extern "C" {
#endif
+// This interface provide all the tool to convert a vst2 plugin instance into a clap plugin instance
typedef struct clap_vst2_converter {
uint32_t vst2_plugin_id;
const char *vst2_plugin_name;
const char *clap_plugin_id;
// [main-thread]
- bool (*convert_state)(const struct *clap_vst2_converter *converter, const clap_istream *vst2, const clap_ostream *clap);
+ bool (*convert_state)(const struct *clap_vst2_converter *converter,
+ const clap_istream *vst2,
+ const clap_ostream *clap);
// converts the vst2 param id and normalized value to clap param id and
// plain value.
@@ -34,12 +37,17 @@ typedef struct clap_vst2_converter {
double *clap_plain_value);
} clap_vst2_converter;
+// Factory identifier
static CLAP_CONSTEXPR const char CLAP_VST2_CONVERTER_FACTORY_ID[] = "clap.vst2-converter";
-typedef struct clap_vst2_converter_factory
-{
+// List all the converters available in the current DSO.
+typedef struct clap_vst2_converter_factory {
+ // Get the number of converters
uint32_t (*count)(const struct clap_vst2_converter_factory *factory);
- const clap_vst2_converter *(*get)(const struct clap_vst2_converter_factory *factory, uint32_t index);
+
+ // Get the converter at the given index
+ const clap_vst2_converter *(*get)(const struct clap_vst2_converter_factory *factory,
+ uint32_t index);
} clap_vst2_converter_factory;
#ifdef __cplusplus
|
nimble/host: fix l2cap coc rx endpoint buffs alloc
Dissallow current vs next sdu index check when only one buffer is used. | @@ -604,7 +604,8 @@ ble_l2cap_coc_recv_ready(struct ble_l2cap_chan *chan, struct os_mbuf *sdu_rx)
}
if (chan->coc_rx.sdus[0] != NULL &&
- chan->coc_rx.next_sdu_alloc_idx == chan->coc_rx.current_sdu_idx) {
+ chan->coc_rx.next_sdu_alloc_idx == chan->coc_rx.current_sdu_idx &&
+ BLE_L2CAP_SDU_BUFF_CNT != 1) {
return BLE_HS_EBUSY;
}
|
Add README.md file in repository with compile instructions. | - Fix makedist.sh for use with git.
- Nicer output on travis for clang analysis.
- Add .gitignore file to exclude built files from version tracking.
+ - Add README.md file in repository with compile instructions.
25 April 2019: Wouter
- Add tls.tpkg unit test for DNS over TLS functionality.
|
Update version with release 1.1.0 tag. | @@ -28,6 +28,7 @@ repo.versions:
"0.9.99": "mynewt_1_0_0_b2_tag"
"0.9.999": "mynewt_1_0_0_rc1_tag"
"1.0.0": "mynewt_1_0_0_tag"
+ "1.1.0": "mynewt_1_1_0_tag"
"0-latest": "1.0.0" # 1.0.0
"0-dev": "0.0.0" # master
|
extmod/modbluetooth: In gap_advertise only accept None to stop adv.
To match the docs, and interval=0 may be used in the future to indicate
something else. | @@ -313,12 +313,12 @@ STATIC mp_obj_t bluetooth_ble_gap_advertise(size_t n_args, const mp_obj_t *pos_a
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
mp_arg_parse_all(n_args - 1, pos_args + 1, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
- mp_int_t interval_us;
- if (args[ARG_interval_us].u_obj == mp_const_none || (interval_us = mp_obj_get_int(args[ARG_interval_us].u_obj)) == 0) {
+ if (args[ARG_interval_us].u_obj == mp_const_none) {
mp_bluetooth_gap_advertise_stop();
return mp_const_none;
}
+ mp_int_t interval_us = mp_obj_get_int(args[ARG_interval_us].u_obj);
bool connectable = mp_obj_is_true(args[ARG_connectable].u_obj);
mp_buffer_info_t adv_bufinfo = {0};
|
Add documentation to cidset.h | picohash_table * cidset_create();
picohash_table * cidset_delete(picohash_table * cids);
-int cidset_insert(picohash_table * cids, const picoquic_connection_id_t * cnx_id);
+
+/*! \brief Insert connection id \a cid into a set of connection ids \a cids if
+ * \a cids doesn't contain \a cid already.
+ * \return 0 if successful, -1 otherwise.
+ */
+int cidset_insert(picohash_table * cids, const picoquic_connection_id_t * cid);
+
+/*! \brief Return 1 if a given set of connection ids \a cids contains a specific
+ * connection id \cid, return 0 otherwise.
+ */
int cidset_has_cid(picohash_table * cids, const picoquic_connection_id_t * cid);
+
+/*! \brief Call the given callback once for every connection id in the given
+ * set of connection ids.
+ *
+ * \param cids Set of connection ids to iterate.
+ * \param cb Callback to call with each connection id.
+ * \param cbptr A caller provided context pointer that is passed through
+ * to the callback.
+ *
+ * \return 0 if successfully iterated through all items, otherwise return
+ * the return value of the failing callback.
+ */
int cidset_iterate(const picohash_table * cids, int(*cb)(const picoquic_connection_id_t *, void *), void * cbptr);
+
+/*! \brief Convert all connection ids as hexadecimal values into strings
+ * and print them into the provided file.
+ *
+ * \param f The file handle of the opened output stream.
+ * \param cids Set of connection ids to print.
+ */
void cidset_print(FILE * f, picohash_table * cids);
|
fstore: remove unused dump | @@ -438,8 +438,6 @@ int flb_fstore_destroy(struct flb_fstore *fs)
struct flb_fstore_stream *fs_stream;
struct flb_fstore_file *fsf;
- flb_fstore_dump(fs);
-
mk_list_foreach_safe(head, tmp, &fs->streams) {
fs_stream = mk_list_entry(head, struct flb_fstore_stream, _head);
|
story: lib: remove ;; in favor of typecast | ?: ?=([prose ~] proses-list)
(prose-to-text i.proses-list)
%- tail
- %^ spin ;;((list prose) t.proses-list) :: XX WHY DO WE NEED ;;
+ %^ spin `(list prose)`t.proses-list
(prose-to-text i.proses-list)
|= [prz=prose state=tape]
^- [prose tape]
|
add gorilla/sessions | @@ -62,6 +62,9 @@ ALLOW .* -> vendor/github.com/gofrs/uuid
# websocket protocol
ALLOW .* -> vendor/github.com/gorilla/websocket
+# http sessions with cookie and filesystem session storage
+ALLOW .* -> vendor/github.com/gorilla/sessions
+
# S2 geometry
ALLOW .* -> vendor/github.com/golang/geo
|
TLSProxy/Proxy.pm: harmonize inner loop with the way sockets are. | @@ -356,7 +356,8 @@ sub clientstart
my @ready;
my $ctr = 0;
local $SIG{PIPE} = "IGNORE";
- while( (!(TLSProxy::Message->end)
+ while($fdset->count
+ && (!(TLSProxy::Message->end)
|| (defined $self->sessionfile()
&& (-s $self->sessionfile()) == 0))
&& $ctr < 10) {
@@ -366,15 +367,25 @@ sub clientstart
}
foreach my $hand (@ready) {
if ($hand == $server_sock) {
- $server_sock->sysread($indata, 16384) or goto END;
- $indata = $self->process_packet(1, $indata);
- $client_sock->syswrite($indata);
+ if ($server_sock->sysread($indata, 16384)) {
+ if ($indata = $self->process_packet(1, $indata)) {
+ $client_sock->syswrite($indata) or goto END;
+ }
$ctr = 0;
+ } else {
+ $fdset->remove($server_sock);
+ $client_sock->shutdown(SHUT_WR);
+ }
} elsif ($hand == $client_sock) {
- $client_sock->sysread($indata, 16384) or goto END;
- $indata = $self->process_packet(0, $indata);
- $server_sock->syswrite($indata);
+ if ($client_sock->sysread($indata, 16384)) {
+ if ($indata = $self->process_packet(0, $indata)) {
+ $server_sock->syswrite($indata) or goto END;
+ }
$ctr = 0;
+ } else {
+ $fdset->remove($client_sock);
+ $server_sock->shutdown(SHUT_WR);
+ }
} else {
kill(3, $self->{real_serverpid});
die "Unexpected handle";
|
fix: a warning | @@ -431,7 +431,7 @@ field_from_json(char *json, size_t size, void *x)
loc_from_json, &p->loc,
&p->comment);
- snprintf(p->spec, sizeof(p->spec), "%.*s", size, json);
+ snprintf(p->spec, sizeof(p->spec), "%.*s", (int)size, json);
if (spec_buffer.start) {
addr_to_lnc (spec_buffer.start, spec_buffer.size, json, &lnc);
|
Also guard include of mbedtls/threading.h in ssl_cookie.h when USE_PSA_CRYPTO is set | #include "mbedtls/ssl.h"
+#if !defined(MBEDTLS_USE_PSA_CRYPTO)
#if defined(MBEDTLS_THREADING_C)
#include "mbedtls/threading.h"
#endif
+#endif /* !MBEDTLS_USE_PSA_CRYPTO */
/**
* \name SECTION: Module settings
|
Fix for memory leak in framework | @@ -2392,7 +2392,7 @@ static void *fw_eventDispatcher(void *fw) {
event->errorCode = request->errorCode;
fw_invokeFrameworkListener(framework, listener->listener, event, listener->bundle);
-
+ free(event->bundleSymbolicName);
free(event);
}
}
|
Add option to disable installing of OpenCL headers | @@ -834,8 +834,10 @@ message(STATUS "Run tests with ICD: ${TESTS_USE_ICD}")
######################################################################################
-if(DEFINED INSTALL_OPENCL_HEADERS)
+if(INSTALL_OPENCL_HEADERS)
message(STATUS "Install POCL's OpenCL headers: ${INSTALL_OPENCL_HEADERS}")
+elseif(DEFINED INSTALL_OPENCL_HEADERS AND NOT INSTALL_OPENCL_HEADERS)
+ message(STATUS "Not install POCL's OpenCL headers: ${INSTALL_OPENCL_HEADERS}")
else() # Undefined = auto -> check
find_file(OPENCL_H opencl.h PATH_SUFFIXES CL OpenCL)
if(OPENCL_H)
|
improved detection of frequency scan capabilites | @@ -5712,6 +5712,8 @@ if(ioctl(fd_socket, SIOCSIWFREQ, &pwrq) < 0)
fprintf(stderr, "driver doesn't support ioctl() SIOCSIWFREQ\n");
return false;
}
+memset(&pwrq, 0, sizeof(pwrq));
+memcpy(&pwrq.ifr_name, interfacename, IFNAMSIZ);
if(ioctl(fd_socket, SIOCGIWFREQ, &pwrq) < 0)
{
fprintf(stderr, "driver doesn't support ioctl() SIOCGIWFREQ\n");
|
passing neutrino masses to CLASS | @@ -280,6 +280,26 @@ static void ccl_fill_class_parameters(ccl_cosmology * cosmo, struct file_content
strcpy(fc->name[13],"wa_fld");
sprintf(fc->value[13],"%e",cosmo->params.wa);
}
+ //neutrino parameters
+ //massless neutrinos
+ if (cosmo->params.N_nu_rel > 1.e-4){
+ strcpy(fc->name[14],"N_ur");
+ sprintf(fc->value[14],"%e",cosmo->params.N_nu_rel);
+ }
+ if (cosmo->params.N_nu_mass > 0){
+ strcpy(fc->name[15],"N_ncdm");
+ sprintf(fc->value[15],"%e",cosmo->params.N_nu_mass);
+ strcpy(fc->name[16],"m_ncdm");
+ sprintf(fc->value[16],"%e",cosmo->params.mnu/cosmo->params.N_nu_mass);
+ //assume equal mass neutrino species for now!
+ for (int i = 1; i < cosmo->params.N_nu_mass; i++){
+ char tmp[20];
+ sprintf(tmp,", %e",cosmo->params.mnu/cosmo->params.N_nu_mass);
+ strcat(fc->value[16],tmp);
+ }
+ printf("\n\nneutrino masses passed to CLASS: %s\n\n",fc->value[16]);
+ exit(1);
+ }
//normalization comes last, so that all other parameters are filled in for determining A_s if sigma_8 is specified
if (isfinite(cosmo->params.sigma_8) && isfinite(cosmo->params.A_s)){
cosmo->status = CCL_ERROR_INCONSISTENT;
|
Disable isl dep coalesce by default
See comment. | @@ -2491,9 +2491,6 @@ static void compute_deps(osl_scop_p scop, PlutoProg *prog,
}
}
- // Disabled due to a potential bug in coalescing. Reproduce with
- // examples/heat-2d/heat-2d.c - coalescing dep_raw leads to no hyperplanes
- // being found.
if (options->isldepcoalesce) {
assert(0 && "dep coalesce disabled with --pet due to a potential bug");
dep_raw = isl_union_map_coalesce(dep_raw);
@@ -2912,7 +2909,10 @@ PlutoOptions *pluto_options_alloc()
options->isldep = 0;
options->isldepaccesswise = 1;
- options->isldepcoalesce = 1;
+ /* Disabled due to a potential bug in coalescing. Reproduce with
+ * examples/heat-2d/heat-2d.c - coalescing dep_raw leads to no hyperplanes
+ * being found. */
+ options->isldepcoalesce = 0;
options->candldep = 0;
|
options/internal: Cast away sign in code | @@ -14,28 +14,29 @@ struct utf8_charcode {
auto cpoint() { return _cpoint; }
charcode_error operator() (code_seq<const char> &seq) {
+ auto uc = static_cast<unsigned char>(*seq.it);
if(!_progress) {
- if(!(*seq.it & 0b1000'0000)) {
+ if(!(uc & 0b1000'0000)) {
// ASCII-compatible.
- _cpoint = *seq.it;
- }else if((*seq.it & 0b1110'0000) == 0b1100'0000) {
- _cpoint = *seq.it & 0b1'1111;
+ _cpoint = uc;
+ }else if((uc & 0b1110'0000) == 0b1100'0000) {
+ _cpoint = uc & 0b1'1111;
_progress = 1;
- }else if((*seq.it & 0b1111'0000) == 0b1110'0000) {
- _cpoint = *seq.it & 0b1111;
+ }else if((uc & 0b1111'0000) == 0b1110'0000) {
+ _cpoint = uc & 0b1111;
_progress = 2;
- }else if((*seq.it & 0b1111'1000) == 0b1111'0000) {
- _cpoint = *seq.it & 0b111;
+ }else if((uc & 0b1111'1000) == 0b1111'0000) {
+ _cpoint = uc & 0b111;
_progress = 3;
}else{
// If the highest two bits are 0b10, this is the second (or later) unit.
- __ensure(!((*seq.it & 0b1100'0000) == 0b1000'0000));
+ __ensure(!((uc & 0b1100'0000) == 0b1000'0000));
// Units with highest five bits = 0b11111 do not occur in valid UTF-8.
__ensure(!"Unit cannot occur in valid UTF-8 character");
}
}else{
- __ensure((*seq.it & 0b1100'0000) == 0b1000'0000);
- _cpoint = (_cpoint << 6) | ((*seq.it) & 0x3F);
+ __ensure((uc & 0b1100'0000) == 0b1000'0000);
+ _cpoint = (_cpoint << 6) | (uc & 0x3F);
--_progress;
}
++seq.it;
|
exit group system call | @@ -495,7 +495,8 @@ static sysreturn fstat(int fd, struct stat *s)
thread_log(current, "fd %d, stat %p\n", fd, s);
file f = resolve_fd(current->p, fd);
// take this from tuple space
- if (fd == 1) {
+ if (fd == 1 || fd == 2) {
+ console("HERE......\n");
s->st_mode = S_IFIFO;
return 0;
}
@@ -617,6 +618,11 @@ void exit(int code)
while(1); //compiler put a noreturn on exit
}
+void exit_group(int status){
+ halt("exit_group");
+ while(1);
+}
+
void register_file_syscalls(void **map)
{
register_syscall(map, SYS_read, read);
@@ -637,6 +643,7 @@ void register_file_syscalls(void **map)
register_syscall(map, SYS_uname, uname);
register_syscall(map, SYS_getrlimit, getrlimit);
register_syscall(map, SYS_getpid, getpid);
+ register_syscall(map,SYS_exit_group, exit_group);
register_syscall(map, SYS_exit, (sysreturn (*)())exit);
}
|
fix mode calc iteration limit bug | @@ -87,9 +87,9 @@ int mode_calc(int argc, const char* argv[]) {
iterationsLimit = Min(iterationsLimit, model.GetTreeCount());
if (evalPeriod == 0) {
- evalPeriod = model.GetTreeCount();
+ evalPeriod = iterationsLimit;
} else {
- evalPeriod = Min(evalPeriod, model.GetTreeCount());
+ evalPeriod = Min(evalPeriod, iterationsLimit);
}
const int blockSize = Max<int>(32, static_cast<int>(10000. / (static_cast<double>(iterationsLimit) / evalPeriod) / model.ObliviousTrees.ApproxDimension));
|
Replace $GITHUB_WORKSPACE with ${{runner.workspace}}. | @@ -26,4 +26,4 @@ jobs:
if: ${{ github.ref == 'refs/heads/master' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- publish_dir: $GITHUB_WORKSPACE/tools/ci/docs/doxygen/html
+ publish_dir: ${{runner.workspace}}/tools/ci/docs/doxygen/html
|
Inject mouse events as touchscreen
As a mouse, some clicks on close prositions are sometimes not generated
on some devices. | @@ -31,7 +31,7 @@ public class EventController {
private void initPointer() {
MotionEvent.PointerProperties props = pointerProperties[0];
props.id = 0;
- props.toolType = MotionEvent.TOOL_TYPE_MOUSE;
+ props.toolType = MotionEvent.TOOL_TYPE_FINGER;
MotionEvent.PointerCoords coords = pointerCoords[0];
coords.orientation = 0;
@@ -108,7 +108,7 @@ public class EventController {
return false;
}
setPointerCoords(rawPoint);
- MotionEvent event = MotionEvent.obtain(lastMouseDown, now, action, 1, pointerProperties, pointerCoords, 0, buttons, 1f, 1f, 0, 0, InputDevice.SOURCE_MOUSE, 0);
+ MotionEvent event = MotionEvent.obtain(lastMouseDown, now, action, 1, pointerProperties, pointerCoords, 0, buttons, 1f, 1f, 0, 0, InputDevice.SOURCE_TOUCHSCREEN, 0);
return injectEvent(event);
}
|
check that strcat would not overflow static size buffer | @@ -44,6 +44,10 @@ od_target_module_add(od_logger_t *logger,
goto error_close_handle;
}
+ if (strlen(module_ptr->path) + strlen(target_module_path) + 1 >
+ sizeof(module_ptr->path))
+ goto error_close_handle;
+
module_ptr->handle = handle;
od_list_init(&module_ptr->link);
od_list_append(&modules->link, &module_ptr->link);
|
Fix pdst_mark for hand-written decode_huffman_fast | @@ -253,7 +253,7 @@ wuffs_base__status c_wuffs_deflate__decoder__decode_huffman_fast(
uint32_t n_bits = self->private_impl.f_n_bits;
// Initialize other local variables.
- uint8_t* pdst_mark = pdst;
+ uint8_t* pdst_mark = a_dst->data.ptr;
uint32_t lmask = MASK(self->private_impl.f_n_huffs_bits[0]);
uint32_t dmask = MASK(self->private_impl.f_n_huffs_bits[1]);
|
fix(gui): Widget_AutoSize() should not change the static width or height | @@ -1217,6 +1217,12 @@ done:
void Widget_AutoSize(LCUI_Widget w)
{
float width = 0, height = 0;
+ if (!Widget_CheckStyleType(w, key_width, scale)) {
+ width = ComputeXMetric(w, key_width);
+ }
+ if (!Widget_CheckStyleType(w, key_height, scale)) {
+ height = ComputeYMetric(w, key_height);
+ }
Widget_ComputeContentSize(w, &width, &height);
width = Widget_GetAdjustedWidth(w, width);
Widget_SetSize(w, ToBorderBoxWidth(w, width),
|
haskell-cabal-sandboxing: fix potential build issue with glib | @@ -88,6 +88,7 @@ before_install:
brew install gobject-introspection
brew install libgcrypt
brew install libgit2
+ brew install libuv
brew install lua
brew install openssl
brew install python
@@ -116,6 +117,7 @@ before_install:
sudo apt-get install ninja-build
sudo apt-get install libboost-all-dev
sudo apt-get install libyaml-cpp-dev
+ sudo apt-get install libuv-dev
fi
#
|
Print error string rather than just the code | @@ -733,7 +733,8 @@ static int parse(grib_context* gc, const char* filename)
parse_file = 0;
if (err)
- grib_context_log(gc, GRIB_LOG_ERROR, "Parsing error %d > %s\n", err, filename);
+ grib_context_log(gc, GRIB_LOG_ERROR, "Parsing error: %s, file: %s\n",
+ grib_get_error_message(err), filename);
GRIB_MUTEX_UNLOCK(&mutex_parse);
return err;
|
doc: release notes getenv interception | @@ -118,6 +118,8 @@ These notes are of interest for people maintaining packages of Elektra:
By default now all MAINTAINED bindings except EXPERIMENTAL and DEPRECATED are included.
For more details see
[/doc/COMPILE.md](https://github.com/ElektraInitiative/libelektra/tree/master/doc/COMPILE.md).
+ To include both intercept bindings, you now need to write `INTERCEPT`, to only include getenv
+ interception `intercept_env`. `intercept` alone does not work anymore.
- <<TODO>>
The following files are new:
|
docs/supported: add Waveshare OpenH743I-C to board support list | @@ -323,6 +323,7 @@ ST STM32
- `STM32 H743zi Nucleo <https://www.st.com/en/evaluation-tools/nucleo-h743zi.html>`__
- `STM32 H743i Evaluation <https://www.st.com/en/evaluation-tools/stm32h743i-eval.html>`__
- `STM32 H745i Discovery <https://www.st.com/en/evaluation-tools/stm32h745i-disco.html>`__
+- `Waveshare OpenH743I-C <https://www.waveshare.com/openh743i-c-standard.htm>`__
TI
--
|
[components][sdio] fix compile warning and optimized code. | @@ -294,11 +294,6 @@ static int mmc_select_bus_width(struct rt_mmcsd_card *card, rt_uint8_t *ext_csd)
EXT_CSD_BUS_WIDTH_4,
EXT_CSD_BUS_WIDTH_1
};
- rt_uint32_t bus_widths[] = {
- MMCSD_BUS_WIDTH_8,
- MMCSD_BUS_WIDTH_4,
- MMCSD_BUS_WIDTH_1
- };
struct rt_mmcsd_host *host = card->host;
unsigned idx, trys, bus_width = 0;
int err = 0;
@@ -312,7 +307,7 @@ static int mmc_select_bus_width(struct rt_mmcsd_card *card, rt_uint8_t *ext_csd)
* the supported bus width or compare the ext csd values of current
* bus width and ext csd values of 1 bit mode read earlier.
*/
- for (idx = 0; idx < sizeof(bus_widths)/sizeof(rt_uint32_t); idx++) {
+ for (idx = 0; idx < sizeof(ext_csd_bits)/sizeof(rt_uint32_t); idx++) {
/*
* Host is capable of 8bit transfer, then switch
* the device to work in 8bit transfer mode. If the
|
Fix double free of `found` structure `destroyEntry`
remove `destroyEntry` to avoid memory corruption
the protocol entry `found` which was in `g_protlist` was
already freed by calling `lstDelete(g_protlist, key)` by
`list->delete_fn`
Fixes: | @@ -1762,7 +1762,6 @@ processProtocolEntry(config_t* config, yaml_document_t* doc, yaml_node_t* node)
DBG(NULL);
}
protocol_context = NULL;
- destroyProtEntry(found);
break;
}
}
|
Fix handling of hex UDP args.
In the current code it is not possible to pass `--probe-args=hex:..`
to the `udp` probe module. The following error message is displayed:
```
udp: unknown UDP probe specification (expected file:/path or text:STRING or hex:01020304 or template:/path or template-fields)
``` | @@ -188,7 +188,7 @@ int udp_global_initialize(struct state_conf *conf)
udp_template = udp_template_load(in, in_len, &udp_template_max_len);
module_udp.make_packet = udp_make_templated_packet;
- } else if (strcmp(args, "hex") == 0) {
+ } else if (strncmp(args, "hex", arg_name_len) == 0) {
udp_fixed_payload_len = strlen(c) / 2;
udp_fixed_payload = xmalloc(udp_fixed_payload_len);
|
coap: fix doxygen multiple param warning
The parameters are already documented in the header
file. | @@ -388,8 +388,6 @@ coap_engine_init(void)
/*---------------------------------------------------------------------------*/
/**
* \brief Makes a resource available under the given URI path
- * \param resource A pointer to a resource implementation
- * \param path The URI path string for this resource
*
* The resource implementation must be imported first using the
* extern keyword. The build system takes care of compiling every
|
Migration guide updates for flags and controls.
Provided a section that links to the ctrl/flags mappings to parameters
for digests and ciphers.
Added "EVP_CIPHER_CTX_set_flags() ordering" to changes section. | @@ -423,6 +423,12 @@ Previously (in 1.1.1) these conflicting parameters were allowed, but will now
result in errors. See L<EVP_PKEY-DH(7)> for further details. This affects the
behaviour of L<openssl-genpkey(1)> for DH parameter generation.
+=head4 EVP_CIPHER_CTX_set_flags() ordering change
+
+If using a cipher from a provider the B<EVP_CIPH_FLAG_LENGTH_BITS> flag can only
+be set B<after> the cipher has been assigned to the cipher context.
+See L<EVP_EncryptInit(3)/FLAGS> for more information.
+
=head2 Installation and Compilation
Please refer to the INSTALL.md file in the top of the distribution for
@@ -869,6 +875,19 @@ See also L<crypto(7)/OPENSSL PROVIDERS>.
Implicit and Explicit Fetching is described in detail here
L<crypto(7)/ALGORITHM FETCHING>.
+=head3 Mapping EVP controls and flags to provider B<OSSL_PARAM> parameters
+
+The existing functions for controls (such as L<EVP_CIPHER_CTX_ctrl(3)>) and
+manipulating flags (such as L<EVP_MD_CTX_set_flags(3)>)internally use
+B<OSSL_PARAMS> to pass information to/from provider objects.
+See L<OSSL_PARAM(3)> for additional information related to parameters.
+
+For ciphers see L<EVP_EncryptInit(3)/CONTROLS>, L<EVP_EncryptInit(3)/FLAGS> and
+L<EVP_EncryptInit(3)/PARAMETERS>.
+
+For digests see L<EVP_DigestInit(3)/CONTROLS>, L<EVP_DigestInit(3)/FLAGS> and
+L<EVP_DigestInit(3)/PARAMETERS>.
+
=head3 Deprecation of Low Level Functions
A significant number of APIs have been deprecated in OpenSSL 3.0.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.